sensorlogger
sensorlogger copied to clipboard
documentation walkthrough device with non-standard meassurement
Expected Behavior
I do not manage to get a sensor running that does not meassure the standard values tempereature and humidity according to the documentation as it is now
Actual Behavior
have a documentation in a way where it is easy to see how to setup AND send data to sensorlogger that is non-standard. In my case I would like to have a 3rd value voltage to control the battery. I would like to have that in the data list but don't see how to do that.
From the docu I can learn how to register a device with whatever value but I do not see how to send data afterwards.
@daniu-de
- registerDevice Response gives you IDs for data types you need for createLog (extended).
- getDeviceDataTypes
- createLog (extended)
Hope this helps. I will try to write a better explanation. Any contributions appreciated.
kindest Alex
@daniu-de You can use php example : https://github.com/alexstocker/sensorlogger/blob/master/tests/curl/post_extend.php
Or in python :
https://github.com/alexstocker/sensordata/blob/master/sensordata.py
Where
payload = { 'deviceId': deviceId, 'temperature': temperature, 'humidity': humidity, 'date': currentDate }
Can be replaced by :
payload = { 'deviceId': deviceId, 'date': currentDate, 'data': [{'dataTypeId':'1', 'value' : temperature}, {'dataTypeId':'2', 'value' : humidity}, {'dataTypeId':'4', 'value' : VOC}] }