Author Topic: Setting Z-Wave parameters via Luup  (Read 24273 times)

Offline jhanson999

  • Newbie
  • *
  • Posts: 7
  • Karma: +1/-0
Re: Setting Z-Wave parameters via Luup
« Reply #30 on: November 23, 2015, 08:40:06 pm »
I managed to figure it out for the doorbell using another online example, but I still wouldn't mind a good explanation if anyone has the time, if not no bigge.  Thanks!

Offline tsvi

  • Newbie
  • *
  • Posts: 1
  • Karma: +0/-0
Re: Setting Z-Wave parameters via Luup
« Reply #31 on: March 07, 2017, 04:12:41 am »

Anyway, I'm trying to figure out how to send say a value of 5 to parameter 6 via zwave senddata, but I don't understand the hex in the data package... the command vera lists in the example here (http://wiki.micasaverde.com/index.php/Luup_UPnP_Variables_and_Actions) shows:

1. Set parameter 29 to "3" on node 15:
luup.call_action("urn:micasaverde-com:serviceId:ZWaveNetwork1", "SendData", {Node=15, Data="x70 4 29 1 3"}, 1)

Can someone please explain to me how they get "x70 4 29 1 3"???

I came across this post as I was investigating the possibility for changing sensor behavior based on a variety of triggers.

Looking at http://www.vesternet.com/resources/application-notes/apnt-90 I discovered the following:

Quote
47 = Z-Wave Device ID
112 = Configuration Command Class
4 = SET
37 = Parameter
2 = Size
3 = "Value" from the short-cuts detailed above for the "Sound" required
1 = "Value" from the short-cuts detailed above for the "Volume" required

So x70 in our case is again the configuration command class (112) (Take a look at http://wiki.micasaverde.com/index.php/ZWave_Command_Classes for a full list)

The command value comes from here http://zwavepublic.com/sites/default/files/SDS13740-1%20-%20Z-Wave%20Plus%20Device%20and%20Command%20Class%20Types%20and%20Defines%20Specification.pdf and http://z-wave.sigmadesigns.com/wp-content/uploads/2016/08/SDS12657-12-Z-Wave-Command-Class-Specification-A-M.pdf:
#define CONFIGURATION_VERSION              0x01
#define CONFIGURATION_GET                      0x05
#define CONFIGURATION_REPORT                0x06
#define CONFIGURATION_SET                      0x04

So set = 4

and then it's parameter, size, value.

Hope this helps others as a future reference.

Thanks,

Tsvi




Offline Nailer00

  • Newbie
  • *
  • Posts: 11
  • Karma: +0/-2
Re: Setting Z-Wave parameters via Luup
« Reply #32 on: September 15, 2017, 01:44:37 pm »
It took me a while to figure this out, but finally the solution was very simple. Hopefully this will help someone along the way


luup.variable_set( "urn:micasaverde-com:serviceId:ZWaveDevice1", "ConfiguredVariable", "[Parameter no],[bytes for ex 1d],[Parameter value]", Device ID )
luup.variable_set( "urn:micasaverde-com:serviceId:ZWaveDevice1", "VariablesSet", "[Parameter no],[bytes for ex 1d],[Parameter value]", Device ID )


For example here I am setting the max dim level of a Fibaro dimmer to 15% by setting variable 12 which is 1 byte decimal to the value of 15:

luup.variable_set( "urn:micasaverde-com:serviceId:ZWaveDevice1", "ConfiguredVariable", "12,1d,15", 48 )
luup.variable_set( "urn:micasaverde-com:serviceId:ZWaveDevice1", "VariablesSet", "12,1d,15", 48 )


IMPORTANT: Use the advanced tab in the scene and execute a "Reconfigure command" - This will send the parameters to the device.

You can set multiple parameters at once by serialising the command, ie:
luup.variable_set( "urn:micasaverde-com:serviceId:ZWaveDevice1", "ConfiguredVariable", "4,2d,6000,3,1d,1", 95 )
which is parameter 4, 2bytes decimal, value 6000, parameter 3, 1 byte decimal, value 1

The parameters will not take effect until you send and complete the reconfigure command.


"luup.variable_set( "urn:micasaverde-com:serviceId:ZWaveDevice1", "ConfiguredVariable", "12,1d,15", 48 )
luup.variable_set( "urn:micasaverde-com:serviceId:ZWaveDevice1", "VariablesSet", "12,1d,15", 48 )"

What's the difference between these two in reality?

"The parameters will not take effect until you send and complete the reconfigure command."

Is this another code to send or an option in the scene

Online zedrally

  • Hero Member
  • *****
  • Posts: 861
  • Karma: +1/-0
  • Black Cat Controllers & Control Systems
    • Black Cat Control Systems
Re: Setting Z-Wave parameters via Luup
« Reply #33 on: September 15, 2017, 10:44:22 pm »
Problem with Sensors is that they are generally asleep until triggered.
If they are asleep then you cannot send configuration parameters to them. (well you can send them but the device is asleep and will not receive them).
Living in the Land of Oz, give me a vegemite sandwich. Home Seer, Vera Lite & Edge, Popp, Black Cat Smart Hub & Vera G, Black Cat Lite 1 & 2's a Black Cat Dimmer or 2, then some  Black Cat Cat's Eye PIR's & Door-Window Sensors plus a Z-UNO or 2.