farmOS.py icon indicating copy to clipboard operation
farmOS.py copied to clipboard

Add support for the sensor API

Open paul121 opened this issue 5 years ago • 3 comments

Creating an issue so we can talk about adding support for sensors in the future. They are a little different because they use a public/private key auth, not username/password.

Potential features:

  • Add/update/remove sensors
  • Send sensor data
  • Get sensor data

paul121 avatar Apr 29 '19 18:04 paul121

Add/update/remove sensors

This is partially possible now - but will require some work on the server farmOS code to make it fully possible. You can already create sensor assets, just like any other asset. But you can't set the "sensor type" or add additional type-specific sensor configuration via API currently. That can only be done via the normal farmOS UI.

mstenta avatar Apr 29 '19 19:04 mstenta

Another question: should this be added to farmOS.js as well? @jgaehring

I think some of the sensor stuff wouldn't make sense in client-side code (eg: pushing data), but could be useful in server side JS (node.js). Or maybe all of it would be useful. Worth thinking through...

mstenta avatar Apr 29 '19 19:04 mstenta

Yea I could see this being useful to a Node application running on a sensor device, or a server running Node. Is there anyone who actually wants to use it that way currently? Idk...

jgaehring avatar Apr 29 '19 21:04 jgaehring