Chris Jahn Posted October 10, 2016 Share Posted October 10, 2016 The following works in both the 4.x.x and 5.x.x ISY versions supporting Z-Wave: You can use the following URL in a browser to set the Z-Wave parameter, and it should let you set a full 4-byte value. You can also specify a hexadecimal value by prefixing it with ‘0x’ https:///rest/zwave/node//config/set///> The parameter size can be either 1,2, or 4 bytes e.g. http: //192.168.0.51/rest/zwave/node/ZW003_1/config/set/1/77/1 http: //192.168.0.51/rest/zwave/node/ZW003_1/config/set/2/0xFFFFFFFF/4 You can query the actual value stored in the device by doing the following: https:///rest/zwave/node//config/query/> e.g. http: //192.168.0.101/rest/zwave/node/ZW003_1/config/query/2 It will return something like: 4 Link to comment Share on other sites More sharing options...
mwester Posted October 10, 2016 Share Posted October 10, 2016 Awesome! Thanks! Link to comment Share on other sites More sharing options...
MWareman Posted October 10, 2016 Share Posted October 10, 2016 Chris, I hope you don't mind - but I've added this to the REST Wiki documentation page. Is it correct to say this arrived in 5.0.6? https://wiki.universal-devices.com/index.php?title=ISY_Developers:API:REST_Interface#Z-Wave Michael. Link to comment Share on other sites More sharing options...
gduprey Posted October 10, 2016 Share Posted October 10, 2016 It's supported at least as far back as 4.3 and likely close to when ZWave was added to the REST interface (1st line in post says 4.x.x or 5.x.x, so for a while). I'm running 4.3.26 and while not using it from a browser, I am using REST based scripts to do this and it works. One caveat - at least under 4.3.26, there is a problem where the set command always returns successful, even when it failed -- query works and reports errors appropriately if it can't contact the device (a more likely event for battery powered devices). Link to comment Share on other sites More sharing options...
MWareman Posted October 10, 2016 Share Posted October 10, 2016 I'll modify the version int he wiki then. Chris - can you confirm the earliest versions supported? Thanks, Michael. Link to comment Share on other sites More sharing options...
cyberk Posted October 11, 2016 Share Posted October 11, 2016 Stupid, somewhat lazy question. But I'm assuming that this could be used in conjunction with the network module and a program to repeatedly send the command for a specific amount of time? Sent from my iPhone using Tapatalk Link to comment Share on other sites More sharing options...
gduprey Posted October 11, 2016 Share Posted October 11, 2016 For folks looking to script this process, the wget command is available for all platforms (it's native to linux, but there are builds for Mac and Windows). With it, you can write a script file to set all your parameters, then run it and wake up your device to have it all set in one blurp (helpful for battery devices that might go back to sleep if you were to delay between each parameter setting). I actually created a script to setup each type of device. For example, my everspring climate sensors need 3 parameters set to work for my use. I have 12 of the sensors around this house and the settings are in a script where I pass the ZWave ID as a parameter. When I add a new or replace a unit, a single command configures it. I have a script for those, power sensors, doorbells, motion sensors. A typical usage would be: wget -q -O - --user=USRNAME --password=PASSWD http://isy994i/rest/zwave/node/ZID/config/set/P#/VALUE/SIZE where USRNAME is the ISY user name PASSWD is the ISY user password isy994i is the dns name of your unit (or use an IP address) ZID is the ZWave ID from the ISY (like 'ZW002_1') P# is the parameter # to set VALUE is the value to set into the parameter SIZE is the value size from the ZWave docs for that device/parameter (1,2 or 4) NOTE: The "-O -" (that is, dash oh, not zero) directs wget to write the results returned from the ISY to the console/display. If you'd rather not see it, you can put a file name there like "-O setparam.log" and direct it out to a file. Example: Setting Parameter 6 to a value of 1 for my climate device ZW031_1 would look like: wget -q -O - --user=admin --password=admin http://isy994i/rest/zwave/node/ZW031_1/config/set/6/1/2 Its pretty easy to string a bunch of these together in a script to program a specific kind of device You can also use this to query a configuration parameter like this: wget -q -O - --user=admin --password=admin http://isy994i/rest/zwave/node/ZW031_1/config/query/6 note that the result is returned as an XML fragment (just look for the value= part for the value) and it includes the size of parameter you'd use for setting the parameter (useful when you're not sure -- zwave docs can be very unreliable about actual size). Finally, a good (but not perfect) place to find ZWave parameter documentation is http://www.pepper1.net/zwavedb/device Gerry 2 Link to comment Share on other sites More sharing options...
MWareman Posted October 11, 2016 Share Posted October 11, 2016 You can actually use a network resource to call the REST API on the same ISY. It works fine AS LONG as you DON'T use 127.0.0.1 as the host. This can cause the ISY to lock up randomly... If your ISY has a static IP (or a static DHCP reservation), you can use the actual IP in the host field.... Just make sure to add an Authorization header with your ISY username and password... Michael. 4 Link to comment Share on other sites More sharing options...
brockp Posted October 16, 2016 Share Posted October 16, 2016 Is there expected in version 5 to expose other feature rather than lock/unlock/querry in the normal programing interface? Going via rest via network module feels like your expecting a lot of the average user. Eg. I want to add and remove user codes for a given time period for a cleaning service. And I'm hacking around rest from my Linux box. Link to comment Share on other sites More sharing options...
Chris Jahn Posted October 17, 2016 Author Share Posted October 17, 2016 Is there expected in version 5 to expose other feature rather than lock/unlock/querry in the normal programing interface? Going via rest via network module feels like your expecting a lot of the average user. Eg. I want to add and remove user codes for a given time period for a cleaning service. And I'm hacking around rest from my Linux box. Hi brockp, Its there now, you just right+click on the device in the tree and select it from the Z-Wave submenu Link to comment Share on other sites More sharing options...
brockp Posted October 17, 2016 Share Posted October 17, 2016 Chris, Thanks for your reply. The Z-Wave menu isn't what I mean, I men in ISY programs, if I select the device, the only options I am given are lock, unlock, and query. I want to script this up, and not resort to hacking the REST interface. Link to comment Share on other sites More sharing options...
Chris Jahn Posted October 17, 2016 Author Share Posted October 17, 2016 Chris, Thanks for your reply. The Z-Wave menu isn't what I mean, I men in ISY programs, if I select the device, the only options I am given are lock, unlock, and query. I want to script this up, and not resort to hacking the REST interface. Hi brockp, This is available in the ISY 5.x branch, but not the 4.x. 1 Link to comment Share on other sites More sharing options...
MikeD Posted November 22, 2016 Share Posted November 22, 2016 You can actually use a network resource to call the REST API on the same ISY. It works fine AS LONG as you DON'T use 127.0.0.1 as the host. This can cause the ISY to lock up randomly... If your ISY has a static IP (or a static DHCP reservation), you can use the actual IP in the host field.... Just make sure to add an Authorization header with your ISY username and password... Michael. Now I can change the ringtone in v4 with a program. Thanks for the tip! ~Mike 1 Link to comment Share on other sites More sharing options...
blueman2 Posted April 21, 2017 Share Posted April 21, 2017 (edited) I was going to use this feature to update the voltage setting of my AEON HEM v1 (Home Energy Monitor) for better accuracy. The v1 does not have the ability to measure voltage itself (just current using current clamps), but does have a parameter setting to set voltage so that its Wattage calculations are accurate. So I plan to read voltage from an Aeon Gen5 Smart Switch which does provide voltage readings and put that into the HEMv1 whenever the voltage changes by more than 1 V. So far, this seems to send updates to the HEMv1 about 20-30 times a day. My home voltage varies from a low of 119V to high of 125V. The issue is that I worry about all that writing to what I assume is flash memory on the HEMv1. Is there a concern this will destroy the memory after a while? Edited April 21, 2017 by blueman2 Link to comment Share on other sites More sharing options...
stusviews Posted April 22, 2017 Share Posted April 22, 2017 Absolutely, yes! The flash memory for changing the LED brightness allows 1,000,000 changes. Guessing the HEM is about the same, at 30 changes a day that'd be just over ninety-one and one quarter years. You may want to start saving for a replacement 1 Link to comment Share on other sites More sharing options...
blueman2 Posted April 24, 2017 Share Posted April 24, 2017 Absolutely, yes! The flash memory for changing the LED brightness allows 1,000,000 changes. Guessing the HEM is about the same, at 30 changes a day that'd be just over ninety-one and one quarter years. You may want to start saving for a replacement But what if it has only 1/2 the life they say. I might have to replace this in only 45 years. Thanks for the sanity check!!! Link to comment Share on other sites More sharing options...
Jimbo.Automates Posted May 29, 2017 Share Posted May 29, 2017 (edited) Chris, is it possible to make the set return a bad status when it doesn't actually set the param? I run on a battery device and I think it sets the value, but then I check with the query and it's not set. I ran this: http://192.168.86.64/rest/zwave/node/ZW037_1/config/set/8/5/1 Which returned: <RestResponse succeeded="true"> <status>200</status> </RestResponse> Then ran: http://192.168.86.64/rest/zwave/node/ZW037_1/config/query/8 which returned: <config paramNum="8" size="1" value="0"/> Edited May 29, 2017 by Jimbo Link to comment Share on other sites More sharing options...
Chris Jahn Posted May 29, 2017 Author Share Posted May 29, 2017 Hi Jimbo, If the command itself cannot be sent then it will return an error, but the only way to be sure the value is updated as expected is to query it afterwards because some devices just fail silently when processing the config command. I suppose we could add an optional "verify" parameter to the command that would cause us to automatically do a query after the set (its a low priority though). Link to comment Share on other sites More sharing options...
Jimbo.Automates Posted May 29, 2017 Share Posted May 29, 2017 Hi Chris, Yes, a verification would be awesome. Would it also be possible to store the param and write it to the battery device when it's awake? Thanks, Jim 1 Link to comment Share on other sites More sharing options...
manowell Posted September 25, 2017 Share Posted September 25, 2017 Hi brockp, This is available in the ISY 5.x branch, but not the 4.x. Is it possible to remove or add user codes for a door lock programmatically? Link to comment Share on other sites More sharing options...
Michel Kohanim Posted September 26, 2017 Share Posted September 26, 2017 Hi manowell, Yes. Please download WSDK (http://www.universal-devices.com/isy-developers), unzip, under /doc directory, open ISY-WS-SDK-Z-Wave[docx|pdf]. With kind regards, Michel Link to comment Share on other sites More sharing options...
manowell Posted October 2, 2017 Share Posted October 2, 2017 Is it possible to remove or add user codes for a door lock programmatically? Not by any published sources I've found yet. Link to comment Share on other sites More sharing options...
gduprey Posted October 3, 2017 Share Posted October 3, 2017 You can, but depends on what you mean Programatically. From outside the ISY, the REST interface is well described and pretty easy to use. From within the ISY, you can use a network resource to basically execute the REST command and then trigger that from an ISY program. Link to comment Share on other sites More sharing options...
DisplacedHusker Posted October 25, 2017 Share Posted October 25, 2017 I primary have Insteon and have been getting more and more into Zwave. I have 4 doors and a garage door with sensors. I bought a Dome Siren and can program it to turn on and off when a door opens but cannot control the volume or get to the different chimes for different doors. Is there anyone that can walk me through this? I am using isy 4.6.2 and don't know where to start. Link to comment Share on other sites More sharing options...
Jimbo.Automates Posted October 25, 2017 Share Posted October 25, 2017 I have my notes here https://docs.google.com/document/d/108vJYiB7BZdLT5d8w8UAHrT18S_QfGMk1NWngz7U1_I/edit?usp=drivesdk But I don't have the zwave params for the dome siren, so you will have to find those. Sent from my Pixel XL using Tapatalk Link to comment Share on other sites More sharing options...
Recommended Posts