Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Different values. ZWaveAPI vs Expert UI #113

Closed
bogri opened this issue Jul 4, 2016 · 6 comments
Closed

Different values. ZWaveAPI vs Expert UI #113

bogri opened this issue Jul 4, 2016 · 6 comments

Comments

@bogri
Copy link

bogri commented Jul 4, 2016

Using the API to get values for Multichannel Association according to

ZWaveAPI/Run/devices[11].instances[0].commandClasses[142].data[1]

and then comparing to the values for "nodesInstances" shown in Expert UI (Expert Commands -> MultiChannelAssociation) are different? But if there's only one value like in value:[1] it looks like the same is shown in both alternatives.
z_api
z-eui

@PoltoS
Copy link
Member

PoltoS commented Jul 5, 2016

Please explain again. I've not got.

nodesInstances is an array of pairs node1, inst1, node2, inst2,....

While nodes gives you dirrect associations (A, not MCA)

@bogri
Copy link
Author

bogri commented Jul 5, 2016

Aha, sorry for the confusion. Didn't realize nodeInstances was an array of pairs (is there a good doc on this?).
Though, the ZWaveAPI shows that Group 1 doesn't have anything stored in nodeInstances (value:[]), while the Expert UI shows (1,1)?

@bogri
Copy link
Author

bogri commented Jul 5, 2016

Some more info. There's something "inconsistent" in the behaviour, IMHO. To reproduce:

Step 1. set the MCA (group=3, node=1, instance=1) through ZWaveAPI according to
:8083/ZWaveAPI/Run/devices[11].instances[0].commandClasses[142].data[3].nodesInstances.value=[1]

S 2. verify in log it's set
[2016-07-05 22:11:09.434] [D] [zway] SETDATA devices.11.instances.0.commandClasses.142.data.3.nodesInstances = byte[1]
[2016-07-05 22:11:09.434] [D] [zway] ( 01 )

S 2a. call the API again
:8083/ZWaveAPI/Run/devices[11].instances[0].commandClasses[142].data[3].nodesInstances
shows
{"invalidateTime":1467749191,"updateTime":1467749469,"type":"binary","value":[1]}

S 3. check the Expert UI-> Configuration -> Expert commands and pressing button MultiChannelAssociation for instance 0 and pop-up window shows:
3: None (22:06)
max: 16 (22:06)
nodes: 1 (04.07.2016)
nodesInstances: 1 (22:11)

S 4. On the same page in Expert UI enter "3" for Group and press button Get and log suddenly shows
[2016-07-05 22:15:55.455] [D] [zway] SETDATA devices.11.instances.0.commandClasses.142.data.3.nodesInstances = byte[0]
`[2016-07-05 22:15:55.455] [D] [zway] ( zero-length buffer )``

S 5. redo the step 3 and the result is suddenly different:
3: None (22:15)
max: 16 (22:15)
nodes: 1 (04.07.2016)
nodesInstances: (22:15)

So the "Get" seem to reset the value for nodesInstances.

@PoltoS
Copy link
Member

PoltoS commented Jul 6, 2016

https://github.com/Z-Wave-Me/Z-Way-Manual/blob/master/includesDev/commandclasses_autodoc.tex#L550

----- Исходное сообщение -----

От: "bogri" notifications@github.com
Кому: "Z-Wave-Me/z-way-issues" z-way-issues@noreply.github.com
Копия: "Poltorak Serguei" poltorak@alsenet.com, "Comment"
comment@noreply.github.com
Отправленные: Вторник, 5 Июль 2016 г 12:29:09
Тема: Re: [Z-Wave-Me/z-way-issues] Different values. ZWaveAPI vs Expert UI
(#113)

Aha, sorry for the confusion. Didn't realize nodeInstances was an array of
pairs (is there a good doc on this?).
Though, the ZWaveAPI shows that Group 1 doesn't have anything stored in
nodeInstances (value:[]), while the Expert UI shows (1,1)?


You are receiving this because you commented.
Reply to this email directly, view it on GitHub , or mute the thread .

@PoltoS
Copy link
Member

PoltoS commented Jul 6, 2016

You are really misusing the API. Doing data[3].nodesInstances.value=[1] will not result in sending Set command, but will change local copy of device's data. Please use .Set command!!!!

----- Исходное сообщение -----

От: "bogri" notifications@github.com
Кому: "Z-Wave-Me/z-way-issues" z-way-issues@noreply.github.com
Копия: "Poltorak Serguei" poltorak@alsenet.com, "Comment"
comment@noreply.github.com
Отправленные: Вторник, 5 Июль 2016 г 23:17:36
Тема: Re: [Z-Wave-Me/z-way-issues] Different values. ZWaveAPI vs Expert UI
(#113)

Some more info. There's something "inconsistent" in the behaviour, IMHO. To
reproduce:

  1. set the MCA (group=3, node=1, instance=1) through ZWaveAPI according to
    :8083/ZWaveAPI/Run/devices[11].instances[0].commandClasses[142].data[3].nodesInstances.value=[1]
  2. verify in log it's set [2016-07-05 22:11:09.434] [D] [zway] SETDATA
    devices.11.instances.0.commandClasses.142.data.3.nodesInstances = byte[1]
    [2016-07-05 22:11:09.434] [D] zway

2a. call the API again
http://192.168.0.141:8083/ZWaveAPI/Run/devices[11].instances[0].commandClasses[142].data[3].nodesInstances
shows
{"invalidateTime":1467749191,"updateTime":1467749469,"type":"binary","value":[1]}

check the Expert UI-> Configuration -> Expert commands and pressing button
MultiChannelAssociation for instance 0 and pop-up window shows: 3: None
(22:06) max: 16 (22:06) nodes: 1 (04.07.2016) nodesInstances: 1 (22:11)
2.

Enter "3" for Group and press button Get and log suddenly shows [2016-07-05
22:15:55.455] [D] [zway] SETDATA
devices.11.instances.0.commandClasses.142.data.3.nodesInstances = byte[0]
[2016-07-05 22:15:55.455] [D] zway
3.

redo the step 3 and the result is suddenly different: 3: None (22:15) max: 16
(22:15) nodes: 1 (04.07.2016) nodesInstances: (22:15)

So the "Get" seem to reset the value for nodesInstances.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub , or mute the thread .

@bogri
Copy link
Author

bogri commented Jul 6, 2016

Using the Set command was the first thing I tried (which I have already mentioned in another issue)!!! But since it did not work from the API or Expert UI, I tried to find another solution, which apparently was totally wrong.
Thanx for the link to doc (looks like I had an old version of 2.0.1, where this info was missing).

@PoltoS PoltoS closed this as completed Jan 26, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants