Stokerforum
Interface => Interface til varme systemer => Emne startet af: lassewt efter Aug 06, 2017, 15:50
-
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 ?
-
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:
GET /pellmon/getparam/boiler-temp
which return the JSON data:
value "65"
param "boiler-temp"
and change settings with POST, eg:
POST /pellmon/setparam/alarm-max_shaft_temp
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.
-
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. :)
-
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.
-
Did you give up? Anyway, here are some pointers to get you a bit further:
Using CURL to login to stokercloud:
curl 'http://www.stokercloud.dk/dev/yourusername.html' -H 'Host: www.stokercloud.dk' --cookie-jar ./somefile --data 'username=yourusername&password=urlencodedpassword&action=login&tpg='
And then change hopper contents to 500 kg:
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'
And to logout:
curl 'http://www.stokercloud.dk/dev/yourusername.html' --cookie ./somefile -H 'Host: www.stokercloud.dk' --data 'logout=logout'
The password and form field data is urlencoded.
-
Hej
nej ikke givet op, men var lidt mere op af bakke end hvad jeg havde håbet på. Tak for det nye forslag
jeg har fået den til måske at logge ind men linie 2 hvor den skal ændre en status på fyre siger den bad password
-
Assuming you are on windows you probably have to change
--cookie-jar ./somefile
and --cookie ./somefile
into something like
--cookie-jar .\somefile
or just
--cookie-jar somefile
Check that it creates the 'somefile' file in you current working directory.
-
It makes the file..
-
Hard to say then why it doesn't work for you.
I have made a stokercloud account to check it out but as I don't actually use it I don't have my password here so I can't double check now that it works. What I did was just open the developer tools network tab in firefox, log on to stokercloud, locate the POST in the scrolling list of network traffic, right-click on it and choose 'copy as CURL'. Same when changing a setting. Then I added the --cookie-jar option to the login POST, and the --cookie option the the setting change so save and use the session cookie, removed some unnecessary looking stuff from the POST's and tried it out. It worked for me...
-
Hey, con you help me with the command?? im trying to send Http post command from a restful command via Home Assistant, but im do not know what im doing soooooo.. does not work :-)
please help
rest_command:
nbe:
url: "http://192.168.20.100:8090"
method: post
content_type: "/pellmon/setparam/boiler-min_return"
payload: "35"
username: "xxxxx"
password: "12345"
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:
GET /pellmon/getparam/boiler-temp
which return the JSON data:
value "65"
param "boiler-temp"
and change settings with POST, eg:
POST /pellmon/setparam/alarm-max_shaft_temp
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.
-
You can't send username and password with the POST, you need to be logged in to be able to POST to /setparams. The way to do that is to POST username and password to /pellmon/auth/login and keep track of the session_id cookie. No idea if that can be done with Home Assistant.