Version 2.6.0.226

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

Software feature update

There’s one more small development project I’m working on and that’s to bring JSON support for web access.

After that, I think it’s best to stop adding new stuff and fix the broken stuff. There are two major concerns I would like to address.

  • StokerLog losing connection
  • Bug where the fan remains on right after the unit is started.

Version 2.6.0.221

Create a read-only page. The settings are at ro.html. This new web page will allow Stoker to serve up a non-modifiable web page. When you enable the “read-only” mode, the regular web page will have all of its input boxes disabled. When you enable read-only mode, you will need to supply a password. To disable read-only mode, uncheck the read-only box and input the proper password. If you forget the password, then you will have to clear out the database; this will mean you will lose all of your custom settings.

Enable DNS and gateway fields for static IP addresses. To use these settings properly, you must first modify the DNS, gateway, and mask settings, and then at the end set the static IP address.

Fix alarm strings on Twitter.

Clean up output on telnet so that StokerLog will not lose connection.

Version 2.6.0.221

More Twitter usage notes

More info for Twitter support on the Stoker.

Tweets will only work if you are using DHCP on the Stoker. The reason is there are bugs in using static IP addresses where the user cannot specify the gateway IP or the DNS IP addresses. Until this is fixed, the only way to set these values is to use DHCP.

Twitter usage notes

For those of you who have enabled Twitter on the Stoker, please note that:

Twitter will ignore attempts to perform a duplicate update. With each update attempt, the application compares the update text with the authenticating user’s last successful update, and ignores any attempts that would result in duplication. Therefore, a user cannot submit the same status twice in a row. The status element in the response will return the id from the previously successful update if a duplicate has been silently ignored.

This is quoted from here. This means that if the temps are the same between two intervals, then the new update will be ignored because the update will be the same as the previous

Version 2.6.0.191

Revert web page to maintain compatibility with StokerLog. Twitter settings have now been moved to twitter.html.

So, let’s say your Stoker IP address is 192.168.1.10. And usually, you access the web page with “http://192.168.1.10”. Now, the Twitter settings are located at “http://192.168.1.10/twitter.html”
2.6.0.191