Stoker http API


 
JSON is good!
icon_smile.gif


Do you/anyone know if this capability is part of Stokers currently being shipped? I have on coming.

Thanks,
Curt

BTW - I was having trouble with that link, looked like server problems.
 
As far as I know this isn't in what's shipping from Rock, but it is in a freely available beta release. Here's the text if you can't get to http://www.kaytat.com/

<pre class="ip-ubbcode-code-pre">July 31, 2009

JSON support.

To request the current Stoker status in JSON format, "GET" the page at "http://stoker_ip/stoker.json". The format is:

{ "stoker" : {
"sensors" :
[
{ "id" : id, "name" : name, "al" : al, "ta" : ta, "th" : th, "tl" : tl, "tc" : tc, "blower" : blower_id },
...
],

"blowers" :
[
{ "id" : id, "name" : name, "on": on },
...
]
}
}
The idea is this:

1 global Stoker object
Stoker object contains two other objects
First object is called "sensors"
"sensors" object is an array of sensor entries
Each sensor entry has:
id - 16 character serial number
name - User defined name
al - alarm, which can be 0, 1, 2
0 - no alarms
1 - Target
2 - Fire hi/low
ta - Target temperature
th - Fire high
tl - Fire low
tc - Current temp
blower - 16 character serial number of the blower, if any. If no blower, then the value is null
The second object is called "blowers"
"blowers" is an array of blower entries
Each blower entry has:
id - 16 character name
name - User defined name
on - 0 for blower off, 1 for blower on
To "POST" data, the JSON body should look exactly like the Stoker object above. The only difference is that the "POST" handler will ignore the read-only attributes.

For the sensor entries, the POST handler will ignore the tc field. For blower entries, the POST handler will ignore the on field.

If the POST succeeds, then the HTTP status code of 200 will be returned with nothing in the HTTP body. If the POST fails, status code of 400 will be returned and the body wil contain this JSON message:

{ "stoker_response" : "Failed" }
Version 2.6.0.226
When POSTing, use http://stoker_ip_address/stoker.Json_Handler</pre>
 

 

Back
Top