How to frame a RAW Z-Wave Command

Posted on
Mon May 06, 2019 2:07 pm
jay (support) offline
Site Admin
User avatar
Posts: 18200
Joined: Mar 19, 2008
Location: Austin, Texas

Re: How to frame a RAW Z-Wave Command

Yeah, unfortunately we're extremely behind getting some of the API calls added previously into the official docs.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Sat Jan 18, 2020 6:36 am
DaveL17 offline
User avatar
Posts: 6744
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: How to frame a RAW Z-Wave Command

Just starting to wrap my head around raw Z-Wave, and I want to be sure that I'm not tilting at windmills. The purpose of the following command is to (theoretically) execute a Configuration Class (0x70), Bulk Get (0x08).
Code: Select all
cmd_str = [0x70, 0x08]
reply = indigo.zwave.sendRaw(dev, cmdBytes=cmd_str, sendMode=1)
The reply:
Code: Select all
Data : (dict)
  cmdSuccess : true (bool)
  endpoint : None (empty)
  nodeId : 57 (integer)
  queuedForNextWake : false (bool)
What I was hoping to get was the response from the device (a list of all parameters and their current values).

If I know that a device supports the configuration class, is it right to assume that it would support the bulk get command (i.e., support the entire class)?

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

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

Re: How to frame a RAW Z-Wave Command

You won’t get the reply in your immediate x = sendRaw() assignment.

You send the raw request (bulk get or whatever) then listen for the device to send whatever you want via subscribeToIncoming()

Peter


Sent from my iPhone using Tapatalk Pro

Posted on
Sat Jan 18, 2020 7:19 am
howartp offline
Posts: 4559
Joined: Jan 09, 2014
Location: West Yorkshire, UK

Re: How to frame a RAW Z-Wave Command

So if you send a GET which is typically 0x3 then you’ll usually hear a REPORT which is typically 0x5.


Sent from my iPhone using Tapatalk Pro

Posted on
Sat Jan 18, 2020 7:32 am
DaveL17 offline
User avatar
Posts: 6744
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: How to frame a RAW Z-Wave Command

howartp wrote:
You won’t get the reply in your immediate x = sendRaw() assignment.

You send the raw request (bulk get or whatever) then listen for the device to send whatever you want via subscribeToIncoming()

Peter


Sent from my iPhone using Tapatalk Pro

Oh, snap.

Thanks Peter. I'll have a go at this some more.

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Posted on
Sat Jan 18, 2020 1:09 pm
matt (support) offline
Site Admin
User avatar
Posts: 21411
Joined: Jan 27, 2003
Location: Texas

Re: How to frame a RAW Z-Wave Command

Without digging into the spec I don't know the details of the bulk get command (it might just be [0x70, 0x08] ), but to get individual config parm values we use [0x70, 0x05, parmIndex], then as Peter said eventually we get back a reply that starts with [0x70, 0x06, ...].

Image

Posted on
Wed Jan 22, 2020 6:54 am
DaveL17 offline
User avatar
Posts: 6744
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: How to frame a RAW Z-Wave Command

I've had a chance to play with this a bit more and have made decent progress. However, I'm stuck on how to interpret the packet data. Is there a master decoder ring?

Is the packet construction situational, or can I expect that the node ID will always be in the same position (for example)?

Code: Select all
# indigo.zwave.sendRaw(nodeId=57, cmdBytes=[0x70, 0x05, 0x10], sendMode=1)

   Z-Wave                          sent "Workshop - Inovelli Dimmer" raw command [70 05 10]
   Inovelli                        sent: 01 0A 00 13 39 03 70 05 10 25 39 A5 (node 057 ACK after 76 milliseconds)
   Inovelli                        received: 01 0E 00 04 00 39 08 70 06 10 04 00 00 00 00 A6 (node 057)


Code: Select all
 01 0E 00 04 00 39 08  70 06 10 04 00 00 00 00  A6
  1 14  0  4  0 57  8 112  6 16  4  0  0  0  0 166
  ^  ^  ^  ^  ^  ^  ^   ^  ^  ^  ^  ^  ^  ^  ^   ^
  |  |  |  |  |  |  |   |  |  |  |  |  |  |  |   |_
  |  |  |  |  |  |  |   |  |  |  |  |  |  |  |_____ report?
  |  |  |  |  |  |  |   |  |  |  |  |  |  |________ report?
  |  |  |  |  |  |  |   |  |  |  |  |  |___________ report?
  |  |  |  |  |  |  |   |  |  |  |  |______________ report?
  |  |  |  |  |  |  |   |  |  |  |_________________
  |  |  |  |  |  |  |   |  |  |____________________ Parameter 16
  |  |  |  |  |  |  |   |  |_______________________ Configuration Command Class - Configuration Report
  |  |  |  |  |  |  |   |__________________________ Configuration Command Class
  |  |  |  |  |  |  |______________________________
  |  |  |  |  |  |_________________________________ Node 57
  |  |  |  |  |____________________________________
  |  |  |  |_______________________________________
  |  |  |__________________________________________
  |  |_____________________________________________
  |________________________________________________

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Posted on
Wed Jan 22, 2020 7:36 am
howartp offline
Posts: 4559
Joined: Jan 09, 2014
Location: West Yorkshire, UK

Re: How to frame a RAW Z-Wave Command

The structure is identical, front-loaded.

Bytes 0-4 you ignore (for our purposes - Matt possibly uses some of them)
Byte 5 is always node
Byte 6 is data length
Bytes 7-8 is class and command as you've said
Bytes 9-n are command specific:

Byte 9 is Param ID (16)
Byte 10 is Param size (4)
Bytes 11-14 are the 4-byte param value
Byte 15 is checksum/differentiation value (eg for scene controllers, it increases every time the button is pressed, but other devices appear random)

https://www.silabs.com/documents/login/ ... cation.pdf

That's the spec.

The command-specific map in that PDF starts from byte 7-8.

Posted on
Wed Jan 22, 2020 8:28 am
DaveL17 offline
User avatar
Posts: 6744
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: How to frame a RAW Z-Wave Command

Thanks Peter. This is super helpful.

Cheers.

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Posted on
Tue Jan 28, 2020 2:16 pm
DaveL17 offline
User avatar
Posts: 6744
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: How to frame a RAW Z-Wave Command

matt (support) wrote:
Without digging into the spec I don't know the details of the bulk get command (it might just be [0x70, 0x08] ), but to get individual config parm values we use [0x70, 0x05, parmIndex], then as Peter said eventually we get back a reply that starts with [0x70, 0x06, ...].

Making slow but steady progress, but I've not been able to do a successful bulk get. I want parameters 13 - 17. I *think* the command should be:

0x70 0x08 0x0D 0x11 0x05

Here's a couple of possibilities.
- If Indigo is sending its commands via multicast, it looks like I'm out of luck and need go no farther on bulk reporting.
- Indigo says the device supports 70v1. Perhaps bulk reporting isn't supported in v1?
- I'm not formatting the command properly.
Attachments
Screen Shot 2020-01-28 at 1.42.20 PM.png
Screen Shot 2020-01-28 at 1.42.20 PM.png (128.38 KiB) Viewed 1438 times

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Posted on
Wed Jan 29, 2020 1:38 am
howartp offline
Posts: 4559
Joined: Jan 09, 2014
Location: West Yorkshire, UK

Re: How to frame a RAW Z-Wave Command

DaveL17 wrote:
I want parameters 13 - 17. I *think* the command should be:

0x70 0x08 0x0D 0x11 0x05

Here's a couple of possibilities.
- If Indigo is sending its commands via multicast, it looks like I'm out of luck and need go no farther on bulk reporting.
- Indigo says the device supports 70v1. Perhaps bulk reporting isn't supported in v1?
- I'm not formatting the command properly.

Wouldn’t it be:

0x70 0x08 0x00 0x0D 0x05

The param offset for 13, in two bytes MSB and LSB, is 000D, or 0x00 0x0D

Re v1, v2 etc - on the page you’ve screenshot scroll up to see what version that table is for. It starts at v1 with basic stuff, then v2 either says “as above” or “this table, but see above for the rows that haven’t changed”. I don’t have PDF with me right now.


Sent from my iPhone using Tapatalk Pro

Who is online

Users browsing this forum: No registered users and 4 guests