Page 3 of 3

Re: Using NodeJS as MQTT client for Toon

Posted: Sat Feb 24, 2018 9:58 pm
by TheHogNL
HansS wrote: Not sure how it works yet, but I saw that the builtin thermostat app reacts to boiler info changes somehow. Don't know if that's also bound to minute interval polls. But maybe it's not. I believe that the thermostat displays the flame icon this way, and it doesn't take a minute to determine that it needs to be on.
That is also done using their BXT protocol. I am not really understanding it yet due to lack of proper skills but I think BXT is something like MQTT where data is pushed and subscribed to. In the thermostat app their is a section which updates the display value when the data is changed, see this in the file "/qmf/qml/apps/thermostat/ThermostatApp.qml":

Code: Select all

        BxtDatasetHandler {
                id: thermstatInfoDsHandler
                dataset: "thermostatInfo"
                discoHandler: thermstatDiscoHandler
                onDatasetUpdate: onThermostatInfoChanged(update)
        }

Re: Using NodeJS as MQTT client for Toon

Posted: Sun Feb 25, 2018 12:09 am
by HansS
I'm on version 3.6.3. Will try to get the files from the same source, thanks.

And indeed, I saw the bxt stuff. I've seen other posts on the forum about it. Looks interesting. If that's more realtime, then mqtt becomes more interesting maybe.

BTW, how do you know what's on that repository?

Re: Using NodeJS as MQTT client for Toon

Posted: Sun Feb 25, 2018 12:16 am
by marcelr
The upgrade software downloads a list of packages as part of the update ;-)

Re: Using NodeJS as MQTT client for Toon

Posted: Sun Feb 25, 2018 8:52 am
by TheHogNL
Correct, the packages files are in these three locations:

Code: Select all

wget http://feed.hae.int/feeds/qb2/oe/2.6.36-base-r10-qmf0/Packages.gz
wget http://feed.hae.int/feeds/qb2/oe/2.6.36-R10-h27-no6/Packages.gz
wget http://feed.hae.int/feeds/qb2/ene/4.10.6/Packages.gz
The first one is the base and contains all packages which are available from normal Linux distrubutions, this is where mosquitto packages are found.
The second one should match your kernel version (zie 'uname -a'), and mainly contains kernel related stuff including modules.
The third one should reflect your Toon version and contains Toon related stuff.

Re: Using NodeJS as MQTT client for Toon

Posted: Sun Feb 25, 2018 6:14 pm
by TheHogNL
Found a way to poll all RRD values using the /qmf/bin/bxt command.

It is working but I'm not really proud of it 8)
Btw, notice a lot of CurrentElectricityFlow results. That is just because I have too many Fibaro plugs :lol:
And because I don't have OpenTherm a lot of boiler values are NaN or zero.

Code: Select all

eneco-xxx-xxxx:/qmf/bin# grep deviceUuid /qmf/config/config_hcb_rrd.xml | sed 's/[<,>]/,/g' | cut -d, -f7,11 | grep -v placeholder |  while IFS=, read -r f1 f2 ; do /qmf/bin/bxt -c -q $f2 -d $f1  2>&1 |  grep "HBXT_QUERY_RESPONSE" | cut -d\  -f8 ; done

OutsideRate=-2.59
BoilerOpMode=0.00
InternalSetpoint=21.00
LongTermOffset=-0.00
CurrentTemperature=22.91
CurrentSetpoint=21.00
BoilerDhwBurnerHours=NaN
BoilerBurnerHours=NaN
CurrentBoilerReturnTemperature=0.00
CurrentBoilerTemperature=0.00
CurrentBoilerSetpoint=0.00
BoilerPumpStarts=NaN
BoilerSuccesfulBurnerStarts=NaN
BoilerFailedBurnerStarts=NaN
BoilerChPressure=0.00
BoilerDhwBurnerStarts=NaN
HeatingFactor=0.58
CurrentElectricityFlow=678
CurrentElectricityQuantity=2606695
CurrentElectricityQuantity=2726996
CurrentElectricityQuantity=5426441
CurrentElectricityQuantity=5358383
CurrentGasFlow=0
CurrentGasQuantity=1419754
CurrentElectricityQuantity=1198298
CurrentElectricityQuantity=3251669
CurrentElectricityFlow=0
CurrentElectricityQuantity=181800.00
CurrentElectricityFlow=1.00
CurrentElectricityQuantity=1670550.00
CurrentElectricityFlow=343.00
CurrentElectricityFlow=0.00
CurrentElectricityQuantity=67400.00
CurrentElectricityFlow=498
CurrentElectricityQuantity=2215553
ProgramState=1.00
BoilerBurnerMinutes=21532
CurrentElectricityFlow=1.65
CurrentElectricityQuantity=9820.00
CurrentElectricityQuantity=6960.00
CurrentElectricityFlow=20.36
CurrentElectricityFlow=16.30
CurrentElectricityQuantity=3930.00
CurrentElectricityFlow=1.29
CurrentElectricityQuantity=1240.00

Re: Using NodeJS as MQTT client for Toon

Posted: Mon Feb 26, 2018 7:11 pm
by HansS
Nice. Though a bit slow it seems.

From an app, you can subscribe to the thermostat information, and you will get a notification when something has changed, and an xml object with all the latest data. Seems that's the only construct that would make mqtt useful.
I've seen that you can run mosquito , and that you can run it like sort of a daemon, and it will send any stdin as an mqtt message.
Any way to send something from a QT app to an outside process?

Re: Using NodeJS as MQTT client for Toon

Posted: Mon Feb 26, 2018 9:13 pm
by glsf91
TheHogNL wrote:Found a way to poll all RRD values using the /qmf/bin/bxt command.

It is working but I'm not really proud of it 8)
Btw, notice a lot of CurrentElectricityFlow results. That is just because I have too many Fibaro plugs :lol:
And because I don't have OpenTherm a lot of boiler values are NaN or zero.

Code: Select all

eneco-xxx-xxxx:/qmf/bin# grep deviceUuid /qmf/config/config_hcb_rrd.xml | sed 's/[<,>]/,/g' | cut -d, -f7,11 | grep -v placeholder |  while IFS=, read -r f1 f2 ; do /qmf/bin/bxt -c -q $f2 -d $f1  2>&1 |  grep "HBXT_QUERY_RESPONSE" | cut -d\  -f8 ; done

I tried for an Opentherm CurrentBoilerTemperature value. I saw the corresponding value in RRD is changed at about the same moment when seeing a change in value with bxt.

Re: Using NodeJS as MQTT client for Toon

Posted: Mon Apr 09, 2018 1:09 am
by makkie2002
HansS wrote:That is also done using their BXT protocol. I am not really understanding it yet due to lack of proper skills but I think BXT is something like MQTT where data is pushed and subscribed to.
It seems indeed to be that Quby uses MQTT natively ... https://www.isaac.nl/nl/cases/isaac-case/quby/