Toon app: boiler status

Forum about forum-provided applications on Toon

Moderators: marcelr, TerrorSource, Toonz, TheHogNL

Re: Toon app: boiler status

Postby madpatrick » Sat Sep 22, 2018 7:44 pm

Hi,

I'm not able to install the app Boilerstatus on (rooted) Toon2.
Unfortunately i don't see an error or other message.

firmware : 4.19.10
toonstore : 2.0.1
User avatar
madpatrick
Member
Member
 
Posts: 89
Joined: December 2017
Location: Zuid-Holland

Re: Toon app: boiler status

Postby TheHogNL » Sat Sep 22, 2018 7:51 pm

Did you also try a manual install (so not use toonstore?)
Member of the Toon Software Collective
User avatar
TheHogNL
Forum Moderator
Forum Moderator
 
Posts: 1388
Joined: August 2017

Re: Toon app: boiler status

Postby madpatrick » Sat Sep 22, 2018 8:00 pm

TheHogNL wrote:Did you also try a manual install (so not use toonstore?)

No, but i saw the reply from Toonz on my other post (domoticaforum.eu/viewtopic.php?f=101&am ... =30#p87585) he has the same problem.
User avatar
madpatrick
Member
Member
 
Posts: 89
Joined: December 2017
Location: Zuid-Holland

Re: Toon app: boiler status

Postby Toonz » Sun Sep 23, 2018 4:11 pm

Hi all,

boilerstatus version 1.0.4 is available on ToonStore.

Changelog:
- installer and the Tile layout (reformatted) are now compatible with Toon 2.
no need to update for Toon 1 users (can't harm either)

Kind regardz,

Toonz
member of the Toon Software Collective
User avatar
Toonz
Forum Moderator
Forum Moderator
 
Posts: 1311
Joined: December 2016

Re: Toon app: boiler status

Postby madpatrick » Sun Sep 23, 2018 5:57 pm

Toonz wrote:Hi all,

boilerstatus version 1.0.4 is available on ToonStore.

Changelog:
- installer and the Tile layout (reformatted) are now compatible with Toon 2.
no need to update for Toon 1 users (can't harm either)

Kind regardz,

Toonz

Great !!
Can you update ToonRepo.xml, because it is not available in the toonstore
User avatar
madpatrick
Member
Member
 
Posts: 89
Joined: December 2017
Location: Zuid-Holland

Re: Toon app: boiler status

Postby Toonz » Sun Sep 23, 2018 6:23 pm

Press the refresh button.....
member of the Toon Software Collective
User avatar
Toonz
Forum Moderator
Forum Moderator
 
Posts: 1311
Joined: December 2016

Re: Toon app: boiler status

Postby madpatrick » Sun Sep 23, 2018 6:54 pm

Installed !!
User avatar
madpatrick
Member
Member
 
Posts: 89
Joined: December 2017
Location: Zuid-Holland

Re: Toon app: boiler status

Postby BOverdevest » Thu Oct 25, 2018 10:30 pm

Hi, great app!

In the Toon2, which i installed today I saw several items i would like to pull into Domoticz. (maybe also available in Toon1?)
Could these be added to the boiler app?

- Humidity (not a boiler property...)
- Boiler Max Temperature set point and degrees/hour increase allowed (Setting Verwarmingsinstallatie)
- warm water settings

Though humidity might be better placed in http://<ToonIP>/happ_thermstat?action=getThermostatInfo
B Overdevest
Rooted Toon, Raspberry 3B+, Domoticz
BOverdevest
Starting Member
Starting Member
 
Posts: 16
Joined: February 2018
Location: Delft

Re: Toon app: boiler status

Postby TheHogNL » Fri Oct 26, 2018 8:17 am

BOverdevest wrote:Hi, great app!

Though humidity might be better placed in http://<ToonIP>/happ_thermstat?action=getThermostatInfo


Ask Eneco to do that :-) we can't modify that code.
Member of the Toon Software Collective
User avatar
TheHogNL
Forum Moderator
Forum Moderator
 
Posts: 1388
Joined: August 2017

Re: Toon app: boiler status

Postby Rudolf » Fri Oct 26, 2018 12:05 pm

Could writing a similar app that exposes the same thermostat (and additional) data via a web-page (just like boilerstatus) be a feasable solution?

Not sure how to gather the additional data from the Toon(2) though, might need some pointers on that before I start hacking something together.
Rudolf
Member
Member
 
Posts: 119
Joined: December 2017

Re: Toon app: boiler status

Postby Toonz » Fri Oct 26, 2018 12:12 pm

Basically all data available in the rra databases can be queried via Toon's own webserver (that's how the boiler app get its data as well).
Humidity is not stored in the rra databases as far as I know but that needs to be checked to be sure.
member of the Toon Software Collective
User avatar
Toonz
Forum Moderator
Forum Moderator
 
Posts: 1311
Joined: December 2016

Re: Toon app: boiler status

Postby Ierlandfan » Sun Nov 25, 2018 7:19 pm

If I want to add more values to boilervalues.txt then I have to change BoilerstatusApp.qml right?
Probably need to extend the switch statement to include the names. (Among some other changes)
Something I not really get is the fact that the names in the switch differ from the config_hcb_rrd.xml. Can you explain that?
For example:
Code: Select all
case "boilerInTemp":
boilerInTemp = resultValue;;

But the name, according to config_hcb_rrd.xml is "thermstat_boilerRetTemp" so I am little confused which name to use.
Can you clarify?
Ierlandfan
Member
Member
 
Posts: 150
Joined: October 2013

Re: Toon app: boiler status

Postby Toonz » Sun Nov 25, 2018 8:47 pm

You need to change BoilerstatusApp.qml indeed.
I changed the names from the rra files to make these a bit more user friendly in the JSON file, that's all.
Feel free to add more names (happy to publish a new version in ToonStore when you are done :-) )
member of the Toon Software Collective
User avatar
Toonz
Forum Moderator
Forum Moderator
 
Posts: 1311
Joined: December 2016

Re: Toon app: boiler status

Postby Ierlandfan » Sun Nov 25, 2018 11:58 pm

I figured out where the conversion is done,
Here's my modified code. I only changed BoilerstatusApp.qml to write more values to boilervalues.txt.
For some reason the extended values aren't populated (Besides the default 0.1 value) Eventhough for example
http://192.168.1.11/hcb_rrd?action=getR ... llForNaN=1
Gives me output: ( The output is a few lines longer but for this example I just pasted the beginning and the end)

{ "28-10-2018 02:00:00": 11565.00,"29-10-2018 01:00:00": 11569.00,"30-10-2018 01:00:00": 11573.00,"31-10-2018 01:00:00": 11577.00,"
"25-11-2018 01:00:00": 11583.00,"26-11-2018 01:00:00": 11589.00,"27-11-2018 01:00:00": 11591.00}


Output in boilervalues.txt:

Code: Select all
{"sampleTime":"26-11-2018 13:18:00","boilerSetpoint":83.65,"roomTempSetpoint":22.5,"boilerPressure":1.39,"roomTemp":21.36,"boilerOutTemp":34,"boilerInTemp":28,"boilerModulationLevel":0,"boilerOperationMode":1,"boilerInternalSetpoint":22.5,"thermostatOffset":0,"boilerHotWaterBurnerHours":0.1,"boilerBurnerHours":0.1,"boilerPumpStarts":0.1,"boilerSuccessfullBurnerStarts":0.1,"boilerFailedBurnerStarts":0,"boilerHotWaterBurnerStarts":0.1,"boilerHeatingFactor":3.06}


Here's the modified BoilerstatusApp.qml:

Code: Select all
import QtQuick 1.1
import qb.components 1.0
import qb.base 1.0

/*
* BoilerstatusApp.qml
*
* Toon application for boiler parameters display.
* data is retrieved from the rra databases (used to be happ_thermstat)
*
* 20170117: marcelr, first draft
* 20180118: Toonz, rewritten to use rra database as datasource
*/

App {
    id: boilerStatusApp
   
   
    property url tileUrl : "BoilerstatusTile.qml"
    property url thumbnailIcon: "./drawables/boilerstatus.png"

    /* boiler status parameters */

    property real boilerSetpoint
    property real roomTempSetpoint
    property real boilerPressure
    property real roomTemp
    property real boilerOutTemp
    property real boilerInTemp
    property real boilerOperationMode
    property real boilerInternalSetpoint
    property real thermostatOffset
    property real boilerHotWaterBurnerHours
    property real boilerBurnerHours
    property real boilerPumpStarts
    property real boilerSuccessfullBurnerStarts
    property real boilerFailedBurnerStarts
    property real boilerHotWaterBurnerStarts
    property real boilerHeatingFactor
    property real boilerModulationLevel : 1
    property string sampleTime
    property bool showPressureInDimState : true
    property string fullDateStr

    property string ipToon : "127.0.0.1"  //can put any external Toon ip address as well for testing purposes
   
    function init() {
   registry.registerWidget( "tile", tileUrl, this, null,
             { thumbLabel: qsTr("Ketel status"),
               thumbIcon: thumbnailIcon,
               thumbCategory: "general",
               thumbWeight: 30,
               baseTileWeight: 10,
               thumbIconVAlignment: "center" } );
   }

   Component.onCompleted: {
      datetimeTimer.start();
      readDefaults();
   }

   function readDefaults() {
      var doc4 = new XMLHttpRequest();
      doc4.onreadystatechange = function() {
         if (doc4.readyState == XMLHttpRequest.DONE) {
            if (doc4.responseText.length > 2) {
               showPressureInDimState = (doc4.responseText == "true");
            }
         }
      }        
      doc4.open("GET", "file:///HCBv2/qml/apps/boilerstatus/showPressureInDimState.txt", true);
      doc4.send();
   }

   function saveShowPressureInDimState() {

         var doc2 = new XMLHttpRequest();
      doc2.open("PUT", "file:///HCBv2/qml/apps/boilerstatus/showPressureInDimState.txt");
      doc2.send(showPressureInDimState);
   }

    function getBoilerParameter(loggerName, variableName) {
   
   var xmlhttp = new XMLHttpRequest();
   var infoJson = {};
   var resultValue = 0.1;

   xmlhttp.onreadystatechange = function() {
      if  ( xmlhttp.readyState == 4 ) {
         if  ( xmlhttp.status == 200  ) {

               infoJson = JSON.parse( xmlhttp.responseText );
            for (var props in infoJson ) {
               resultValue = parseFloat(infoJson [props]);  //only interested in the last one == most recent
               sampleTime = props;
            }
            switch(variableName) {
               case "boilerSetpoint":
                  boilerSetpoint = resultValue;
                  break;
               case "roomTempSetpoint":
                  roomTempSetpoint = resultValue;
                  break;
               case "boilerPressure":
                  boilerPressure = resultValue;
                  break;
               case "roomTemp":
                  roomTemp = resultValue;
                  break;
               case "boilerOutTemp":
                  boilerOutTemp = resultValue;
                  break;
               case "boilerInTemp":
                  boilerInTemp = resultValue;
                  break;
                    case "boilerOperationMode":
                              boilerOperationMode = resultValue;
                    break;
               case "boilerInternalSetpoint":
                    boilerInternalSetpoint = resultValue;
                    break;
               case "thermostatOffset":
                    thermostatOffset = resultValue;
                    break;
               case "boilerHotWaterBurnerHours":
                    boilerHotWaterBurnerHours = resultValue;
                    break;
               case "boilerBurnerHours":
                    boilerBurnerHours = resultValue;
                    break;
               case "boilerPumpStarts":
                    boilerPumpStarts = resultValue;
                    break;
               case "boilerSuccessfullBurnerStarts":
                    boilerSuccessfullBurnerStarts = resultValue;
                    break;
               case "boilerFailedBurnerStarts":
                    boilerFailedBurnerStarts = resultValue;
                    break;
               case "boilerHotWaterBurnerStarts":
                  boilerHotWaterBurnerStarts = resultValue;
                    break;
               case "boilerHeatingFactor":
                    boilerHeatingFactor = resultValue;
                    break;
               default:
                  break;
            }
         }
          }
   }
   xmlhttp.open( "GET", "http://" + ipToon + "/hcb_rrd?action=getRrdData&loggerName=" + loggerName + "&rra=30days&readableTime=1&nullForNaN=1&from=" + fullDateStr, true );
   xmlhttp.send();
    }

    function getThermostatInfo() {
   
   var xmlhttp = new XMLHttpRequest();
   var infoJson = {};
   var resultValue = 0.1;

   xmlhttp.onreadystatechange = function() {
      if  ( xmlhttp.readyState == 4 ) {
         if  ( xmlhttp.status == 200  ) {
               infoJson = JSON.parse( xmlhttp.responseText );
            boilerModulationLevel = parseFloat(infoJson ["currentModulationLevel"]);
            writeBoilerValues();
         }
          }
   }
   xmlhttp.open( "GET", "http://" + ipToon + "/happ_thermstat?action=getThermostatInfo", true );
   xmlhttp.send();
    }
     
   function writeBoilerValues() {
      var infoJSson = {};
      infoJSson["sampleTime"] = sampleTime;
      infoJSson["boilerSetpoint"] = boilerSetpoint;
      infoJSson["roomTempSetpoint"] = roomTempSetpoint;
      infoJSson["boilerPressure"] = boilerPressure;
      infoJSson["roomTemp"] = roomTemp;
      infoJSson["boilerOutTemp"] = boilerOutTemp;
      infoJSson["boilerInTemp"] = boilerInTemp;
      infoJSson["boilerModulationLevel"] = boilerModulationLevel;
                infoJSson["boilerOperationMode"] = boilerOperationMode;
      infoJSson["boilerInternalSetpoint"] = boilerInternalSetpoint;
      infoJSson["thermostatOffset"] = thermostatOffset;
      infoJSson["boilerHotWaterBurnerHours"] = boilerHotWaterBurnerHours;
      infoJSson["boilerBurnerHours"] = boilerBurnerHours;
      infoJSson["boilerPumpStarts"] = boilerPumpStarts;
      infoJSson["boilerSuccessfullBurnerStarts"] = boilerSuccessfullBurnerStarts;
      infoJSson["boilerFailedBurnerStarts"] = boilerFailedBurnerStarts;
      infoJSson["boilerHotWaterBurnerStarts"] = boilerHotWaterBurnerStarts;
      infoJSson["boilerHeatingFactor"] = boilerHeatingFactor;
       var doc2 = new XMLHttpRequest();
         doc2.open("PUT", "file:///var/volatile/tmp/boilervalues.txt");
         doc2.send(JSON.stringify(infoJSson));
   }


    Timer {
   id: datetimeTimer
   interval: 60000  // update every minute
   triggeredOnStart: false
   running: false
   repeat: true
   onTriggered: {
      var now = new Date().getTime() - 3000;
      fullDateStr = i18n.dateTime(now, i18n.cent_yes) + " " + i18n.dateTime(now, i18n.time_yes);
      getBoilerParameter("thermstat_realTemps", "roomTemp");
      getBoilerParameter("thermstat_boilerRetTemp", "boilerInTemp");
      getBoilerParameter("thermstat_boilerTemp", "boilerOutTemp");
      getBoilerParameter("thermstat_boilerSetpoint", "boilerSetpoint");
      getBoilerParameter("thermstat_boilerChPressure", "boilerPressure");
      getBoilerParameter("thermstat_setpoint", "roomTempSetpoint");
                getBoilerParameter("thermstat_outsideRate", "boilerOutsideRate");
      getBoilerParameter("thermstat_boilerOpMode", "boilerOperationMode");
      getBoilerParameter("thermstat_internalSetpoint", "boilerInternalSetpoint");
      getBoilerParameter("thermstat_longTermOffset", "ThermostatOffset");
      getBoilerParameter("thermstat_boilerDhwBurnerHours", "boilerHotWaterBurnerHours");
      getBoilerParameter("thermstat_boilerBurnerHours", "boilerBurnerHours");
      getBoilerParameter("thermstat_boilerPumpStarts", "boilerPumpStarts");
      getBoilerParameter("thermstat_boilerSuccesfulBurnerStarts", "boilerSuccessfullBurnerStarts");
      getBoilerParameter("thermstat_boilerFailedBurnerStarts", "boilerFailedBurnerStarts");
      getBoilerParameter("thermstat_dhwBurnerStarts", "boilerHotWaterBurnerStarts");
      getBoilerParameter("thermstat_heatingFactor", "boilerHeatingFactor");
                getThermostatInfo();
   
                }
   }
}
Ierlandfan
Member
Member
 
Posts: 150
Joined: October 2013

Re: Toon app: boiler status

Postby Rudolf » Sat Dec 01, 2018 3:25 pm

Is 'boilerOperationMode' 2.0 when Dhw is being used?

I'd like to enable my fan when this is true for some time (over a minute).
Any other values I should look into?
Rudolf
Member
Member
 
Posts: 119
Joined: December 2017

PreviousNext

Return to Toon Apps

Who is online

Users browsing this forum: No registered users and 1 guest