bentsolheim / weather-station-data-receiver

Simple endpoint for receiving data from the weather-station-mkrgsm1400

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

weather-station-data-receiver

Simple endpoint for receiving data from the weather-station-mkrgsm1400

Posting data to endpoint

Service will start on localhost:8081 by default.

In fish shell create a tmp function to allow piping long json without issues

function tmp; set f (mktemp); echo $argv > "$f"; echo $f; end  

Readings-endpoint:

http -v http://localhost:8081/api/v1/logger/bua/readings < (tmp '{ "readings": [ { "sensorName": "inne-temp", "value": 25.700001, "localTime": 1596663858, "unixTime": 1596656658 }, { "sensorName": "inne-humidity", "value": 68.000000, "localTime": 1596663858, "unixTime": 1596656658 } ] }')

Debug-endpoint:

http -v http://localhost:8081/api/v1/logger/bua/debug < (tmp '{ "signalStrength": "6", "timeSpent": 17658, "iteration": 26, "connectionErrors": 1, "sensorErrors": 0, "millisSinceStart": 7891839, "battery": { "analogReading": 943, "voltage": 3.925273, "level": 67 } }')

About

Simple endpoint for receiving data from the weather-station-mkrgsm1400


Languages

Language:Go 85.4%Language:Dockerfile 11.1%Language:Shell 3.6%