Hi,
Received and set up my new Fluksometer few hours ago :-). So far, so good: now it is registered and I can see the data on my Dashboard on flukso.net. Also obtained a sensor id and token. Using curl commands like this works great:
- curl -k -X GET -H "Accept: application/json" -H "X-Version: 1.0" -H "X-Token: xxxxxxxxxx" "https://api.flukso.net/sensor/yyyyyyy?interval=hour&unit=watt"
However the problem is that I can't obtain valid response from the local JSON interface. Is is enabled in the web interface. I am trying with:
- curl -k -X GET -H "Accept: application/json" -H "X-Version: 1.0" "http://192.168.1.160:8080/sensor/yyyy?interval=minute&unit=watt"
But the answer always is:
- Malformed query string interval, unit and version query parameters are required.
What is wrong? Tried with and without token, with the version in header and as parameter with no success.
Thank you in advance!
Ok, "for the record" I am answering myself: it seems that headers should not be used. The version shoud should be specified as parameter and Accept header should *not* be present. This works ok:
Correct. No header parsing is done on the local API, contrary to api.flukso.net. All parameters should be included as query params, i.e. following the '?'.
Better go for MQTT :-) See https://www.flukso.net/content/mqtt-mq-telemetry-transport