Retrieving updates
Posted: 01 Jul 2013 23:52
Hello,
The documentation (http://razberry.z-wave.me/docs/zway.pdf section 7.4) states:
"The tree have same structure as the backend tree (Figure 8) with one additional root element
"updateTime" which contains the time of latest update. This "updateTime" value should be
used in the next request for changes. All timestamps (including updateTime) corresponds to
server local time."
This makes perfect sense. However, it doesn't seem to work as expected - the values from my Fibraro wall plug aren't distributed through the JSON api until i request an update of that particular value though the RaZberry UI.
The use case is as follows:
1. Retrieve /ZWaveAPI/Data/0
2. Take the updateTime from 1st call, lets say it is 12345 and make a new call: /ZWaveAPI/Data/12345
3. Received data is now "empty":
{
"updateTime": 1372711245
}
4. Continuous calls to /ZWaveAPI/Data/ yields no updates regarding the device.
5. Plug something into the Fibraro wall plug - the following immediately is logged to the /var/log/z-way-server.log:
[2013-07-01 22:36:50.162] RECEIVED: ( 01 0C 00 04 00 03 06 31 05 04 22 00 0A EA )
[2013-07-01 22:36:50.173] SENT ACK
[2013-07-01 22:36:50.176] SETDATA devices.3.data.failureCount = Empty
[2013-07-01 22:36:50.177] SETDATA devices.3.data.lastReceived = 0 (0x00000000)
[2013-07-01 22:36:50.179] SETDATA devices.3.instances.0.commandClasses.49.data.4.deviceScale = 0 (0x00000000)
[2013-07-01 22:36:50.181] SETDATA devices.3.instances.0.commandClasses.49.data.4.scale = 0 (0x00000000)
[2013-07-01 22:36:50.183] SETDATA devices.3.instances.0.commandClasses.49.data.4.val = 1.000000
[2013-07-01 22:36:50.185] SETDATA devices.3.instances.0.commandClasses.49.data.4.scaleString = "W"
[2013-07-01 22:36:50.188] SETDATA devices.3.instances.0.commandClasses.49.data.4 = Empty
6. The next call to /ZWaveAPI/Data/ does NOT return any updated values for the wall plug - this was expected.
7. Press the "update" button in the UI
8. Now the next call to /ZWaveAPI/Data/ return updated values for the wall plug.
Have I misunderstood how the updateTime works? Must devices be "polled" by invalidating the respective values?
The documentation (http://razberry.z-wave.me/docs/zway.pdf section 7.4) states:
"The tree have same structure as the backend tree (Figure 8) with one additional root element
"updateTime" which contains the time of latest update. This "updateTime" value should be
used in the next request for changes. All timestamps (including updateTime) corresponds to
server local time."
This makes perfect sense. However, it doesn't seem to work as expected - the values from my Fibraro wall plug aren't distributed through the JSON api until i request an update of that particular value though the RaZberry UI.
The use case is as follows:
1. Retrieve /ZWaveAPI/Data/0
2. Take the updateTime from 1st call, lets say it is 12345 and make a new call: /ZWaveAPI/Data/12345
3. Received data is now "empty":
{
"updateTime": 1372711245
}
4. Continuous calls to /ZWaveAPI/Data/ yields no updates regarding the device.
5. Plug something into the Fibraro wall plug - the following immediately is logged to the /var/log/z-way-server.log:
[2013-07-01 22:36:50.162] RECEIVED: ( 01 0C 00 04 00 03 06 31 05 04 22 00 0A EA )
[2013-07-01 22:36:50.173] SENT ACK
[2013-07-01 22:36:50.176] SETDATA devices.3.data.failureCount = Empty
[2013-07-01 22:36:50.177] SETDATA devices.3.data.lastReceived = 0 (0x00000000)
[2013-07-01 22:36:50.179] SETDATA devices.3.instances.0.commandClasses.49.data.4.deviceScale = 0 (0x00000000)
[2013-07-01 22:36:50.181] SETDATA devices.3.instances.0.commandClasses.49.data.4.scale = 0 (0x00000000)
[2013-07-01 22:36:50.183] SETDATA devices.3.instances.0.commandClasses.49.data.4.val = 1.000000
[2013-07-01 22:36:50.185] SETDATA devices.3.instances.0.commandClasses.49.data.4.scaleString = "W"
[2013-07-01 22:36:50.188] SETDATA devices.3.instances.0.commandClasses.49.data.4 = Empty
6. The next call to /ZWaveAPI/Data/ does NOT return any updated values for the wall plug - this was expected.
7. Press the "update" button in the UI
8. Now the next call to /ZWaveAPI/Data/ return updated values for the wall plug.
Have I misunderstood how the updateTime works? Must devices be "polled" by invalidating the respective values?