The server for Walter written in Python.
NOTE: The development of this repository has been paused. I'm currently testing Home Assistant instead.
Install the requirements using pip
pip install -r requirements-dev.txt
Create the database with
flask db init
Start the application with
flask run
curl -X POST http://127.0.0.1:5000/api/temperature \
-H 'Content-Type: application/json' \
-d '{
"timestamp": 1571327874,
"sensor": "my-sensor-1",
"value": 22.1,
"next_update": 720
}'
curl -X GET http://127.0.0.1:5000/api/sensors
curl -X GET http://127.0.0.1:5000/api/sensors/my-sensor-1/readings/last
curl -X GET 'http://127.0.0.1:5000/api/sensors/my-sensor-1/readings?days_back=5'
curl -X POST 'http://127.0.0.1:5000/api/sensors/my-sensor-1/logs' \
-H 'Content-Type: application/json' \
-d '{
"timestamp": 1580417092,
"message": "some message"
}'
curl -X GET 'http://127.0.0.1:5000/api/sensors/my-sensor-1/logs'
flask db init
flask db migrate -m "<message>"
flask db upgrade