Post Data to Datastream
Create a Sensor in farmOS
Create a DataStream in / for that sensor
Call GET
http://localhost/api/data_stream/basic/
to get all basic data streams
Response:
data includes an array of data_streams
ID: res.data[i].id
private_key: res.data[i].attributes.private_key
name: res.data[i].attributes.name
Call POST
http://localhost/api/data_stream/
<ID>/data?private_key=<private_key> with a Body (in Postman 'raw','json'):
{'data': 20}
basic data streams can only have one value
will look for 'data' in JSON
Should give a 201 Created back
This value can now be found in Assets>Sensors>(The Sensor you want)>Data stream
Important Links:
Introduction farmOS 2.x API
farmOS 1.x Sensors
Hint for ?private_key=
farmOS 1.x OAuth 2.0
2.x Data stream issue / todo
currently (7.2021) no graphs
labeled as beta blocker
farmsOS 2.x data stream module routing
shows how to build the url