set timestamp on update

Python and python framework

Moderator: leecollings

Post Reply
htca
Posts: 21
Joined: Thursday 28 January 2016 10:32
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

set timestamp on update

Post by htca »

hi I am currently woring on a plugin, which gets information from the internet (api.luchtmeetnet.nl). The sensors are updated on that service every hour and sometimes they are an hour behind or of the hook because of calibration.

I got the information in JSON layout and I am able to get the closest station based on lat,lon, but I would like to take over the timestamp in the json in domoticz. I checked the wiki, but it can find it over there. Is it correct that it need to be added or changed on sqlite level?
Any directions would be appreciated.
Toulon7559
Posts: 849
Joined: Sunday 23 February 2014 17:56
Target OS: Raspberry Pi / ODroid
Domoticz version: mixed
Location: Hengelo(Ov)/NL
Contact:

Re: set timestamp on update

Post by Toulon7559 »

(IMHO) Time validity is 'under-developed' in Domoticz.
In JSON-responses you always get ActTime and ServerTime (which are message-related), and sometimes LastUpdate (wnich may be content-related), but that's all ......
Luchtmeetnet.nl also has Timestamp_measured
The last one probably is the timetag you mean.

But also have no idea how to transfer that timevalidity-info into Domoticz' Database, except as a dedicated, separate field for a Customer Sensor.

At least, that is my conclusion after this brainstorm.
And further application is DIY .......
Set1 = RPI-Zero+RFXCom433+S0PCM+Shield for BMP180/DS18B20/RS485+DDS238-1ZNs
Set2 = RPI-3A++RFLinkGTW+ESP8266s+PWS_WS7000
Common = KAKUs+3*PVLogger+PWS_TFA_Nexus
plus series of 'satellites' for dedicated interfacing, monitoring & control.
Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 1 guest