How to frame a RAW Z-Wave Command

Posted on
Sat May 04, 2019 6:12 am
Busta999 offline
User avatar
Posts: 714
Joined: Mar 30, 2016
Location: Wales UK

How to frame a RAW Z-Wave Command

Can someone who has done this before help?
Screenshot 2019-05-04 at 12.37.19.png
Screenshot 2019-05-04 at 12.37.19.png (163.93 KiB) Viewed 3789 times


I want to send a Z-Wave Command that sets the keep alive time to 255.

I am struggling to understand how that command is constructed.

I have tried sending AA=0xFF but it does not work.

Any ideas?

As always, much appreciated.

Posted on
Sat May 04, 2019 6:22 am
norcoscia online
User avatar
Posts: 1206
Joined: Sep 09, 2015

Re: How to frame a RAW Z-Wave Command

Great question - I have the same problem every time I try to mess with this type of thing - I have never found a guide with some simple info on how to format the messages!

_______
Norm

Posted on
Sat May 04, 2019 6:41 am
howartp offline
Posts: 4559
Joined: Jan 09, 2014
Location: West Yorkshire, UK

Re: How to frame a RAW Z-Wave Command

If you are really digging into Zwave, you need the whole command: 0x70,0x04,0xXX,0xYY0xAA

0x70: ZWave Configuration class
0x04: Set

(So 0x70, 0x04 means you're setting a parameter)

0xXX is the parameter to set, 0xYY is how big the data for that parameter is (1, 2 or 4 bytes), and 0xAA is the value you're setting.

However for setting the alive time, which I presume is a one-off job, just go Interfaces > ZWave > Modify Config Parameter. (ie don't worry about doing it in Zwave code)

Parameter = 1, Size = 1, Value = 255

Posted on
Sat May 04, 2019 6:42 am
howartp offline
Posts: 4559
Joined: Jan 09, 2014
Location: West Yorkshire, UK

Re: How to frame a RAW Z-Wave Command

norcoscia wrote:
Great question - I have the same problem every time I try to mess with this type of thing - I have never found a guide with some simple info on how to format the messages!

There ain't no simple guide :)

I'll come back tonight and give you the full code for doing this task in Zwave.

Posted on
Sat May 04, 2019 6:54 am
norcoscia online
User avatar
Posts: 1206
Joined: Sep 09, 2015

Re: How to frame a RAW Z-Wave Command

sigh - at this rate -- in five years I will not be able to figure out how to flush the toilet :roll:

_______
Norm

Posted on
Sat May 04, 2019 7:14 am
howartp offline
Posts: 4559
Joined: Jan 09, 2014
Location: West Yorkshire, UK

Re: How to frame a RAW Z-Wave Command

In Indigo:
Code: Select all
codeStr = [112, 4, XX, YY, AA]
indigo.zwave.sendRaw(device=indigo.devices[1234578],cmdBytes=codeStr,sendMode=1) #If you know/have the device ID in your code
indigo.zwave.sendRaw(node=55,cmdBytes=codeStr,sendMode=1) #If you have the Zwave node in your code

#So...

codeStr = [112, 4, 1, 1, 255]
indigo.zwave.sendRaw(device=indigo.devices[1234578],cmdBytes=codeStr,sendMode=1)

112 is 70 in decimal
4 is 04 in decimal

XX = 1 (Param 1)
YY = 1 (Size 1)
AA = 255 (Value)

Posted on
Sat May 04, 2019 7:29 am
Busta999 offline
User avatar
Posts: 714
Joined: Mar 30, 2016
Location: Wales UK

Re: How to frame a RAW Z-Wave Command

Wow thanks guys !!!!

Specifically I am looking fo the exact characters I am looking for in the Indigo Interfaces/ZWave / Send Raw Z-Wave Command

I know the target device.

What do I put in the payload bytes filed to set the time out to 255 please.

Then hopefully I can see the application and get my head around it.

Assume for the moment that Parameter set is not an option here and RAW Wave is the only way.

Bear with me - I am feeling very inadequate right now :-)

[Edit] It seems that I send "0x70,0x04,0x01,0x02,0x01,0xFF" in the Send Raw Z-Wave Command - going to test it now.

Mike

Posted on
Sat May 04, 2019 7:51 am
Busta999 offline
User avatar
Posts: 714
Joined: Mar 30, 2016
Location: Wales UK

Re: How to frame a RAW Z-Wave Command

Progress!!!

0x70 0x04 0x01 0x01 0x01 0x01

That sets it 1 - FF will set it to 255?

Posted on
Sat May 04, 2019 7:53 am
autolog offline
Posts: 3991
Joined: Sep 10, 2013
Location: West Sussex, UK [GMT aka UTC]

Re: How to frame a RAW Z-Wave Command

Yes :)

Posted on
Sat May 04, 2019 7:57 am
howartp offline
Posts: 4559
Joined: Jan 09, 2014
Location: West Yorkshire, UK

Re: How to frame a RAW Z-Wave Command

Busta999 wrote:
Assume for the moment that Parameter set is not an option here and RAW Wave is the only way.

Mike

But your example screenshot IS a parameter.


Sent from my iPhone using Tapatalk Pro

Posted on
Sat May 04, 2019 7:59 am
howartp offline
Posts: 4559
Joined: Jan 09, 2014
Location: West Yorkshire, UK

Re: How to frame a RAW Z-Wave Command

Busta999 wrote:
Progress!!!

0x70 0x04 0x01 0x01 0x01 0x01

That sets it 1 - FF will set it to 255?

You’ve got too many codes there?

0x70 0x04 0x01 0x01 0xFF should do what you want if choosing to do it in Send Raw Command.


Sent from my iPhone using Tapatalk Pro

Posted on
Sat May 04, 2019 8:01 am
autolog offline
Posts: 3991
Joined: Sep 10, 2013
Location: West Sussex, UK [GMT aka UTC]

Re: How to frame a RAW Z-Wave Command

FF is base 16 (hexadecimal) i.e. (hex = decimal): A = 10, B = 11, C=12, D=13, E=14, F=15

So FF = (15 x 16) + 15 = 240 + 15 = 255 :)

Each hexadecimal position going left is multiplied by 16 as opposed to decimal where it would be by 10.

Decimal:
1
10 = 10 x 1
100 = 10 x10
1000 = 10 x 100
etc

Hexadecimal:
1
16 = 16 x 1
256 = 16 x 16
4096 = 16 x 256
etc

:)
Last edited by autolog on Sat May 04, 2019 9:14 am, edited 1 time in total.

Posted on
Sat May 04, 2019 8:36 am
Busta999 offline
User avatar
Posts: 714
Joined: Mar 30, 2016
Location: Wales UK

Re: How to frame a RAW Z-Wave Command

Thanks
guys

very helpful

I am making progress, been successfully sending a status enquiry to a device that is effecting working as a poll so - interesting to play with.

:-)

Very much appreciate your help today ...

Posted on
Sat May 04, 2019 2:19 pm
matt (support) offline
Site Admin
User avatar
Posts: 21417
Joined: Jan 27, 2003
Location: Texas

Re: How to frame a RAW Z-Wave Command

Note there is an additional API for setting config parameters on Z-Wave devices. Ultimately It does the same thing as the indigo.zwave.sendRaw() command mentioned above, but is easier to use if you are just setting config parms:

Code: Select all
indigo.zwave.sendConfigParm(deviceOrNodeID, paramIndex=1, paramSize=1, paramValue=255)

Image

Posted on
Sat May 04, 2019 2:19 pm
howartp offline
Posts: 4559
Joined: Jan 09, 2014
Location: West Yorkshire, UK

Re: How to frame a RAW Z-Wave Command

Cool, never knew that.


Sent from my iPhone using Tapatalk Pro

Who is online

Users browsing this forum: No registered users and 9 guests