Set your tariff and have month usage

If you don't know where to post, post here.

Moderators: marcelr, TheHogNL, TerrorSource, Toonz

Set your tariff and have month usage

Postby TheHogNL » Thu Apr 11, 2019 4:13 pm

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
Member of the Toon Software Collective
User avatar
TheHogNL
Forum Moderator
Forum Moderator
 
Posts: 1022
Joined: August 2017

Re: Set your tariff and have month usage

Postby MyZ » Thu Apr 11, 2019 8:17 pm

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?
MyZ
Member
Member
 
Posts: 53
Joined: June 2018

Re: Set your tariff and have month usage

Postby RobbieT » Tue Apr 30, 2019 6:54 pm

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?
RobbieT
Starting Member
Starting Member
 
Posts: 9
Joined: March 2019

Re: Set your tariff and have month usage

Postby marcelr » Tue Apr 30, 2019 9:26 pm

/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.
marcelr
Global Moderator
Global Moderator
 
Posts: 1061
Joined: May 2012
Location: Ehv

Re: Set your tariff and have month usage

Postby yjb » Wed May 01, 2019 6:27 am

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.
yjb
Member
Member
 
Posts: 186
Joined: April 2009
Location: Venhuizen, Netherlands

Re: Set your tariff and have month usage

Postby michel30 » Wed May 01, 2019 8:25 am

@TheHogNL nice work... I will add it later today :) :D
michel30
Member
Member
 
Posts: 202
Joined: August 2017

Re: Set your tariff and have month usage

Postby Phoolie » Mon May 06, 2019 8:10 pm

I executed the 3 commands. How can I check if it works?
Phoolie
Starting Member
Starting Member
 
Posts: 10
Joined: February 2019

Re: Set your tariff and have month usage

Postby TheHogNL » Tue May 07, 2019 4:52 pm

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.
Member of the Toon Software Collective
User avatar
TheHogNL
Forum Moderator
Forum Moderator
 
Posts: 1022
Joined: August 2017

Re: Set your tariff and have month usage

Postby flamingbob » Thu May 09, 2019 4:20 pm

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!
flamingbob
Starting Member
Starting Member
 
Posts: 21
Joined: November 2016

Re: Set your tariff and have month usage

Postby TheHogNL » Thu May 09, 2019 4:24 pm

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.
Member of the Toon Software Collective
User avatar
TheHogNL
Forum Moderator
Forum Moderator
 
Posts: 1022
Joined: August 2017


Return to Toon miscellaneous

Who is online

Users browsing this forum: No registered users and 1 guest