Reading latest update time

Discussions about RaZberry - Z-Wave board for Raspberry computer
Post Reply
pz1
Posts: 2053
Joined: 08 Apr 2012 13:44

Reading latest update time

Post by pz1 »

The call http://raspberri_IP:8083/ZwaveAPI/Data/0 does return the complete data tree.
Section 7.4 of the manuals says: "The tree have same structure as the backend tree (Figure 8) with one additional root element "updateTime" which contains the time of latest update."

I have tried in various ways to extract this updateTime in one call. For example as:
http://raspberri_IP:8083/ZwaveAPI/Data.updateTime

Can it be done in a single call like this at all? If so how?
Or is it a two step proces of retrieving data followed by parsing the JSON blurp




Since 29-12-2016 I am no longer a moderator for this forum
pz1
Posts: 2053
Joined: 08 Apr 2012 13:44

Just found that:http:/

Post by pz1 »

Just found that:
http://raspberry:8083/JS/Run/zway.contr ... updateTime
gives me that time without further parsing
Since 29-12-2016 I am no longer a moderator for this forum
User avatar
PoltoS
Posts: 7594
Joined: 26 Jan 2011 19:36

Please check the manual. If

Post by PoltoS »

Please check the manual. If you want to access individual data subtrees, use /ZWaveAPI/Run/devices[x].instances[x].Basic.data.updateTime
pz1
Posts: 2053
Joined: 08 Apr 2012 13:44

My question was not about

Post by pz1 »

My question was not about reading the updateTime of an individual device, but about the updateTime stored at the root element (See in zwayDev.pdf section 8.4 now).
Since 29-12-2016 I am no longer a moderator for this forum
User avatar
PoltoS
Posts: 7594
Joined: 26 Jan 2011 19:36

You need to read the full

Post by PoltoS »

You need to read the full tree and parse JSON. The /Data/xxxx method just return the full tree.
pz1
Posts: 2053
Joined: 08 Apr 2012 13:44

Thanks, that is what I did.

Post by pz1 »

Thanks, that is what I did. I had hoped here was a simple direct call that returned a single value.
Since 29-12-2016 I am no longer a moderator for this forum
Post Reply