Page 1 of 1

Set your tariff and have month usage

Posted: Thu Apr 11, 2019 5:13 pm
by TheHogNL
Hi all,
Finally we found out how to set your own tariff on your rooted toons and how to get monthly usage in your Toon.
First of all, if no tariff info is known to the toon it uses built in tariff information and it will not save monthly power usage. Strangly the developers of the toon decided to save the montly power usage to a seperate file instead of just using the RRD data. Probably to make it comparible with your montly bills.

When you do enter your own tariff using the commandos below you will notice that your toon will save your month usage on the next month. There is no known method currently to let the Toon recacultated previous months.

To set your own tariffs I will soon create a button in the TSC menu. But for now you can use these commands in your favourite SSH client. If you don't have seperate high and low-tariff for electricity change the first two lines to False for SeperateBilling and only fill in the TariffPeak (just like the last line for GAS).

The first two lines are for electricity (one for usage and one for producing with solar energy to the grid). Currently producing and using is always the same tariff but somewhere in 2020-2021 this will change. And to be clear, you need to run it as a command in your Toon shell. Running these commands will change the tariffs configuration for you.

Code: Select all

/qmf/bin/bxt -d :happ_pwrusage -s specific1 -n BaseData -x "<BaseField><Type>POWER</Type><SeparateBilling>true</SeparateBilling><TariffPeak>0.22</TariffPeak><TariffOffPeak>0.20</TariffOffPeak></BaseField>" -w 0

/qmf/bin/bxt -d :happ_pwrusage -s specific1 -n BaseData -x "<BaseField><Type>PRODU</Type><SeparateBilling>true</SeparateBilling><TariffPeak>0.22</TariffPeak><TariffOffPeak>0.20</TariffOffPeak></BaseField>" -w 0

/qmf/bin/bxt -d :happ_pwrusage -s specific1 -n BaseData -x "<BaseField><Type>GAS</Type><SeparateBilling>false</SeparateBilling><TariffPeak>0.62</TariffPeak></BaseField>" -w 0

Re: Set your tariff and have month usage

Posted: Thu Apr 11, 2019 9:17 pm
by MyZ
Very nice!

Just an idea; is it possible to set the sysdate for example 4 years back, execute the script and put set the time back to fill the previous months?

Re: Set your tariff and have month usage

Posted: Tue Apr 30, 2019 7:54 pm
by RobbieT
Perhaps i'm missing something but the file /qmf/bin/bxt is just a bunch of symbols and a few lines of text but no option to change anything..What file do i need to edit?

Re: Set your tariff and have month usage

Posted: Tue Apr 30, 2019 10:26 pm
by marcelr
/qmf/bin/ holds binary code, specific for toon. Not supposed to be human-readable. I wouldn't touch this if I were you, unless you want to screw up your toon.

Re: Set your tariff and have month usage

Posted: Wed May 01, 2019 7:27 am
by yjb
RobbieT wrote:Perhaps i'm missing something but the file /qmf/bin/bxt is just a bunch of symbols and a few lines of text but no option to change anything..What file do i need to edit?
/qmf/bin/bxt is the command which you need to run with the arguments as documented in the 1st post of this thread.

Executing this command will make the required changes in the configuration files.

Re: Set your tariff and have month usage

Posted: Wed May 01, 2019 9:25 am
by michel30
@TheHogNL nice work... I will add it later today :) :D

Re: Set your tariff and have month usage

Posted: Mon May 06, 2019 9:10 pm
by Phoolie
I executed the 3 commands. How can I check if it works?

Re: Set your tariff and have month usage

Posted: Tue May 07, 2019 5:52 pm
by TheHogNL
Phoolie wrote:I executed the 3 commands. How can I check if it works?
The /qmf/config/config_happ_pwrusage.xml will now containt more billingInfo configurations. And at the start of the next month you will see the month graphs. And maybe you now see also a 'grayed' month May graph. Not sure about that.

Re: Set your tariff and have month usage

Posted: Thu May 09, 2019 5:20 pm
by flamingbob
I didnt see the geyed out tab but maybe because i need to reboot the gui. Still look so promising and tempting to see what else we can do with that program. Good find!

Re: Set your tariff and have month usage

Posted: Thu May 09, 2019 5:24 pm
by TheHogNL
The bxt program is to send boxtalk messages from commandline to other processes on the Toon. It is a proprietary protocol used by the Toon to let processes communicate with each other. Somewhat like mqtt. Normally the boxtalk messages are only used within the GUI and processes itself. The program is normally used for debugging etc. But can also be used by us. The TSC script uses it to send those top messagebar notifications for example.

Reading the QML code you can understand what bxt commands are available. But it is not always easy to understand without proper documentation.