Just so you know I made no changes to ISY from using 8.0 and going to 8.5. So it did work with ISY firmware 5.3.0
So after going back through my notes. You cannot control secondary buttons on devices. The isy network sends an error back. That is why I removed them from syncing. I am not sure what I want to do with this. I could maybe have it create a status device that has no commands kind of like a motion detector. Would be on or off. I will have to go back through the default devices bill has and see what fits best for this. I did test and isy will send an update status so I could see a use case for it. I should be able to update it and upload this weekend.
Thank you so much Jim. That is what I used it for since my scene only has the fan module and one of these other switches in it.
Plugin update 8_6 released. The new added devices are status only devices but should allow you to continue using them as you were before.
Thanks very much for this. I tried to import the plugin and get “Unexpected end of input” I also tried pasting the code and get the same error.
I added a } to the end of the file and it imported. But I cannot confirm everything else works…
Jim I hope I am just doing something wrong. I cannot turn a scene on or off now. I setup 2 labels one for the scene and the other for the “other button” The other button gives the correct feedback just like I need and the scene switch just says Unknown. If I try to toggle the scene on nothing happens.
I know you do this as a hobby and I really appreciate it. Just wanted to give you some feedback. I would help if I understood more about what is really going on
I fixed the plugin above. Copy and pasted in a hurry and must have missed the last bracket.
As far as scenes they are only toggle. there is no status returned from ISY. If you look at SceneTile.xaml in the designer you will see how scenes are changed. Basically any call with device type scene will just toggle that scene. Its the way Bill setup Scenes. I Design my plugins to try and stay as close to Bills default xaml files as possible. This allows for easy changing of devices without having to redesign interfaces. So sending the same Scene command should toggle the scene on and off. If you try to use logic and create a toggle using the Switch value they could easily become out of sync as ISY doesn’t send Scene changes. So I stayed away from this.
If there is a situation that you need to send an On or Off command to a scene I can make some changes to do that but remember there is no feedback for scenes so you cant setup a status to show the value of the scene.
Sorry Jim, I do not think I am explaining it correctly. The short explanation is if I load 8.5 I can toggle the scene. If I load 8.6 I cannot toggle the same scene. The same scene also works in 8.0 along with the “other switches”
I’ll take a look. Shouldn’t have effected anything else.
I double checked all three versions and I dont see any difference in the code for Scenes. Not sure what it could be. I also redownloaded the 8_6 then clicked new in Homeremote designer to create a default UI and then imported the plugin, added credentials and synchronized. Then clicked on home and then add devices, added two scenes and tested them and they both worked. Just check and make sure your not sending Switch command. Should be Device.Scene for the trigger
Wow Jim. You are right. When I changed it to scene it worked. In my defense both 8.0 and 8.5 work when I use “Scene_Livingfanlow.Switch” and that does not work in 8.6. Just an FYI. Thank you very much for the support you provide for me and the community.
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.
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.