Rello / analytics

Analytics - Open source data warehouse and reporting for Nextcloud
GNU Affero General Public License v3.0
116 stars 32 forks source link

Automatic timestamping at reception #221

Closed guyou closed 2 years ago

guyou commented 2 years ago

I'm planning to use Analytics in a mini IoT project: I have few temperature/humidity sensors I want to collect. These sensors are quite capable (WiFi, HTTP...) but as many IoT, having a good time reference is not simple: to reduce power consumption, the IoT is in deep sleep, loosing time reference and fetching a new one will consume power.

It would be simple if a predefined value in dimension2 let the server part (Analytics) insert itself the current timestamp.

Is it already possible? I didn't find that in the wiki.

Rello commented 2 years ago

Hi, it is possible. during the dataload, there is a dropdown to add the timestamp. but the question is, how do you want to add the values to analytics?

should the sensors push them (then you can use e.g. the curl form the wiki) or should Analytics pull the values (then you could use a e.g. hourly json dataload). it depends on your sensors. let me know

guyou commented 2 years ago

Oh yes, sorry: the sensor will push (via API) the data as it will awake only for few times.

Rello commented 2 years ago

Hello, ok, same I do for my plant moisture sensors. but then you can push the date/time from your side?! don´t you have a now() or so in your coding? Analytics does not have e.g. textvariables like %currenttime% for the incoming API