alexstocker / sensordata

Simple python scripts to read sensor data using adafruit and publish to SensorLogger for owncloud or nextcloud
15 stars 10 forks source link

Get more than two variables from NodeMCU displayed in owncloud #7

Open christoschronopoulos opened 5 years ago

christoschronopoulos commented 5 years ago

Dear all,

I have successfully achieved to log temperature and humidity to my owncloud by using the sample code provided by alex (the one for the NodeMCU/Arduino). However, I cannot make it send the light intensity values even though I have changed the code. In other words, I would like some guidance on how to log more than two data types and what changes I need to make. Thank you in advance.

alexstocker commented 5 years ago

Hi @christoschronopoulos https://github.com/alexstocker/sensordata/blob/master/sensordata.ino is for Simple logging purpose only.

If you want to log data from a sensor device providing more than humidity and temerature, than you need to

  1. Register this device
  2. GetDeviceDataTypes
  3. modify the sample Code to send an Extended CreateLog JSON

or even better, write a new NodeMCU Extended Sample ;-) I'm planning to do so, but this will take a while.

I suggest to try the correspnding PHP Examples for device registration and sending extended logs first.

christoschronopoulos commented 5 years ago

@alexstocker thank you for your reply! I am not familiar with the PHP and JSON, and, as far as I understand, there is a way to Register and GetDeviceDataTypes in Arduino code for NodeMCU. Any clues about how to do it?

christoschronopoulos commented 5 years ago

Anyone who could help?

alexstocker commented 5 years ago

Sorry @christoschronopoulos there is no way to get this done for NodeMCU without some additional effort.

christoschronopoulos commented 5 years ago

Of course, I could try things, but I don't know what.