IOT (esp8266, lua) system with server side logic
params: ?s=\<settings hash sum\>
response:
200
- all up to date (empty body)400
- no sum provided205
- settings update, body:{new: <settings>, sum: <hashsum>}
body: {key: "", msg: "", val: ""}
response:
200
- data saved400
- bad data401
- bad authority information
body: {key: "", ...}
see const FIELDS
in heart/modules/database
for keys dictionary (all are float)
response:
200
- data saved400
- bad data401
- bad authority information
get current settings
get default settings
get last devices event and data
update settings
body: {settings: {new settings}, secert: "secret"}
response:
200
- settings saved400
- bad settings401
- invalid secret