ISY994i Plugin Ver 8.0

NP glad it’s working now. There was a change with switch(bug fix) in the latest version. That’s prob why using switch on a scene stopped working.

I have some Zwave dimmers and plug in modules in my system, and I modified the plugin to handle their importing as Lights. For the most part that worked, but the brightness number scaling is wrong, since they are 0-100 and not 0-255. So I copied the existing case:
case “Light”:
if (value > 0) {
curDevice.Switch = “On”;
curDevice.Level = Math.round(Number(value) / 2.55);
} else {
curDevice.Switch = “Off”;
curDevice.Level = 0;
}
break;

…and created a new case without the scaling:
case “Light_Zwave”:
if (value > 0) {
curDevice.Switch = “On”;
curDevice.Level = value;
} else {
curDevice.Switch = “Off”;
curDevice.Level = 0;
}
break;

And I changed the Device Type to “Light_Zwave”. This works perfectly in reporting the current level (in both the Tile template and the Details template), but I can’t get the direct control of the slider to work correctly. In the part of the plugin where commands are sent to the ISY, I created another case to handle the Zwave devices without scaling the number

 case "Level_Zwave":
        //These are your Zwave Dimmer Devices
        if (value == 0) {
            var inputCmd = "/rest/nodes/" + devicenode + "/cmd/DOF";
        } else {
            var inputCmd = "/rest/nodes/" + devicenode + "/cmd/DON/" + value;
        }
        http.get("http://" + plugin.Settings["HostName"] + ":" + plugin.Settings["IsyPort"] + inputCmd, config);
        break;   

…but I can’t get the Zwave dimmer to execute that case. It keeps on running the standard “Level” case with the scaling. Can anyone tell me what I’m doing wrong?

I can take a look but I think it will always be case LEVEL not LEVEL_ZWAVE. Under case LEVEL check if the device type is zwave and then do your code there. all default ui send level and your devices will work with any new or old ui. If I get a chance this week I can add in your code and update the release.

Ah, I see. I’ll take a crack at that. Not sure how to retrieve the device type within the onChangeRequest function, but I’ll see if I can figure it out. I’m not much of a programmer. Thanks!

Got it working! At the top of the onChangeRequest function, I added:
var deviceType = device.DeviceType;

Then, per your advice, I changed the case “Level” to:

case "Level":
    //These are your Dimmer Devices 
    if (value == 0) {
        var inputCmd = "/rest/nodes/" + devicenode + "/cmd/DOF";
    } else {            
        if (deviceType == "Light_Zwave") {
            var inputCmd = "/rest/nodes/" + devicenode + "/cmd/DON/" + value;
        } else {
            var inputCmd = "/rest/nodes/" + devicenode + "/cmd/DON/" + Math.round(Number(value * 2.55));
        }              
    }
    http.get("http://" + plugin.Settings["HostName"] + ":" + plugin.Settings["IsyPort"] + inputCmd, config);
    break; 

Not sure if this is the best way to do it, but my programming skills are rudimentary at best. Thanks for your help!

Sorry but I’m new to Home Remote, I’m not sure why I get “Unknown” on the Tile and it looks like its only returning “off” from the switches as when I click on the the button it will turn on the light but will not turn off the light, can someone help me sort this out please.

image

What version is your ISY firmware? Are you using the latest home remote builder? Are any devices updating? It could be a sign on issue/password/ip address.

Hi James,
I’m using ISY v.4.9.0 and the home remote builder is 4.2.0.0, I don’t think it’s a sign on, password, or address problem as I can get the lights to turn on, it just seems no turn off or status updates, is there a way to run in a debugger in home remote?

Drk

If I were to guess, it’s that you likely provided an invalid “EncodedUsernPass”. That is needed for status updates. Commands use the standard Username & Password so those will work fine, even if you have invalid encoded credentials. This is often the thing most people forget to set.

Here’s a tool you can use to generate that.
https://www.blitter.se/utils/basic-authentication-header-generator/

You don’t need to include the part "Authorization: Basic ". The plugin will add that automatically. You just need the part after.

I feel so dumb :roll_eyes:, yea that was it I did not Encode the username, it’s all working now,

Thanks everyone for the help!

1 Like

Hey guys I just got into the Designer and watched the avstatus tutorials on youtube. I have the grids and buttons happening right now but I’m pretty confused about how to actually bind the action to the button. I’ve installed the isy plugin under devices and my fanlinc and scenes and kpl switch is showing up. Any insight would be greatly appreciated ! Thanks!!!

–EDIT

I was able to get the KPL to bind to my buttons which ultimately allowed me to control my Fanlinc. The KPL would correspond to the different fan speeds. I can’t seem to get it to work properly though. I tried Radio Buttons which works when I jump from Medium to High but pressing Medium (from High) turns the fan off instead of turning the fan to medium.

Hi everyone, I just came from working with irule and I’m trying to get to know this wonderful program, but I have a lot of doubts.
Eadmin I’m trying to control my lights with the Isy994i-v8_6.plugin plugin but the status does not come out also when I want to control a dimmer switch I get a warning that says “a task was canceled.”

on isy i am using version 5.0.16C
I thank you for your collaboration


Make sure you have your password and encoded password added. Usually any issues with my plugin are related to passwords not put in correct.

Hello, I want to thank you for the great effort to make the pliging and share it, I have a question that I should do with the file
ISYStatusTile.xaml
I appreciate someone can help me with this information

I am currently running ISY 5.0.16C. For testing purposes i downloaded the 8.7 plugin and started a new project with just the ISY plugin. I filled out all the information and it populated with all my devices. I added a few lights and other devices into the existing HomeGroup. When i start the simulator it shows the status as “unknown”. It will turn the light on but won’t update the status. And since the status doesn’t update, it won’t turn off the light. I can also use a slider to set intensity.

I double checked my encoded username and password, that all seems right. I opened up http://ip-address:8051/rest/subscriptions and home remote is definitely opening a subscription. If i put the wrong encoded credentials in a subscription doesn’t open, correct credentials and a subscription opens.

Even with all that I’m still not getting status information from ISY, kinda at a loss here. Anything I’m missing or that i can further check?

Thanks.

Are you using Insteon devices and is the status from an Insteon switch?

That is for if you use the default ui. It will use that to add tiles to the ui.

I am using pretty much all Insteon devices. I’ve experimented with a switch and a light from a fanlinc module. I’m using all the default tiles for now just to make sure it works. I can control the light and I can set the level with the slider, I just don’t get any feedback. Is there a way I can test or see a log to see if I’m actually getting a successful subscription? I can see that a subscription has been started from looking at /rest/subscriptions in a browser, but I still don’t get any status in Home Remote. Should I see status when running the remote in the designer?

After staring at the plugin for some time, i realized James actually has all the log functions built in to the plugin, just needed to uncomment them. I’m definitely getting a response from the ISY subscription when things change, just need to figure out why the status in the tile isn’t reflecting it.

@Jimk72 I downloaded the 8.6 plugin and found that my tiles update with their status as expected. If I replace the 8.6 for the 8.7 plugin then I no longer get status updates. I’m not very good with code, but looking at the onPoll section it looks like after getting the status for the devices it’s not calling the updatevalue function. I’m not exactly sure what’s going on in the onPoll section, but it seems like the polling is handled twice. Is that correct and what you intended?