Interface > Interface til varme systemer
http get / post
lassewt:
Hej
Findes der "simple " http post kommandoer til at ændre på fyrets settings, så man kan sende en "kommando " via web og ændre fyret istedet for at skulle ind manuelt og ændre det ?
motoz:
The controller does not contain an http server. You can use stokercloud, or if you want a local solution then you could use pellmon eg. on a raspberry or any old pc with linux, or in a virtual machine running linux on your windows pc.
Pellmon contains a webserver where you can GET settings with eg:
--- Kode: ---GET /pellmon/getparam/boiler-temp
--- afslutning på kode ---
which return the JSON data:
--- Kode: ---value "65"
param "boiler-temp"
--- afslutning på kode ---
and change settings with POST, eg:
--- Kode: ---POST /pellmon/setparam/alarm-max_shaft_temp
--- afslutning på kode ---
with params:
data: "50"
setparam/ requires a logged in user, so you need to POST username and password to /pellmon/auth/login and keep track of the session_id cookie.
Another option would be to set up a webserver pretending to be stokercloud, and a dns server to fool the burner to talk to your 'stokercloud' instead of the real one. But that's a lot of trouble and won't ever be nearly as good as just using the existing nice and fast UDP protocol.
lassewt:
thanks for the reply
is there a simpel way to change settings on the burner from stokercloud.
im already getting status from stocker cloud via json outputtet..
Hope there is af oneline simpel command to stocker cloud. :)
motoz:
You can use the developer tools in your browser (ctrl-shift-k in firefox) and look at the network tab when changing a setting in stokercloud to see what it does.
motoz:
Did you give up? Anyway, here are some pointers to get you a bit further:
Using CURL to login to stokercloud:
--- Kode: ---curl 'http://www.stokercloud.dk/dev/yourusername.html' -H 'Host: www.stokercloud.dk' --cookie-jar ./somefile --data 'username=yourusername&password=urlencodedpassword&action=login&tpg='
--- afslutning på kode ---
And then change hopper contents to 500 kg:
--- Kode: ---curl 'http://www.stokercloud.dk/dev/updateajax.php?mac=yourusername&panel=2' --cookie ./somefile -H 'Host: www.stokercloud.dk' -H 'Content-Type: application/x-www-form-urlencoded' -H 'X-Requested-With: XMLHttpRequest' --data 'data=%7b%22field9%22%3a%22300%22%7d'
--- afslutning på kode ---
And to logout:
--- Kode: ---curl 'http://www.stokercloud.dk/dev/yourusername.html' --cookie ./somefile -H 'Host: www.stokercloud.dk' --data 'logout=logout'
--- afslutning på kode ---
The password and form field data is urlencoded.
Navigering
[0] Emneindeks
[#] Næste side
Skift til fuld version