sensorlogger icon indicating copy to clipboard operation
sensorlogger copied to clipboard

documentation walkthrough device with non-standard meassurement

Open daniu-de opened this issue 6 years ago • 2 comments

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 avatar May 24 '18 13:05 daniu-de

@daniu-de

  1. registerDevice Response gives you IDs for data types you need for createLog (extended).
  2. getDeviceDataTypes
  3. createLog (extended)

Hope this helps. I will try to write a better explanation. Any contributions appreciated.

kindest Alex

alexstocker avatar May 25 '18 06:05 alexstocker

@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}] }

ernesst avatar Sep 18 '18 04:09 ernesst