Page 11 of 39

Re: Toon as a domotica controller?

Posted: Mon Dec 14, 2015 7:54 pm
by Ierlandfan
Here's the original update script for 3.0.29.

Re: Toon as a domotica controller?

Posted: Tue Dec 15, 2015 2:46 am
by al_n
Thank you for that Ierlandfan.

Now I just need to see how to pull the packages that I need.

Re: Toon as a domotica controller?

Posted: Tue Dec 15, 2015 10:17 am
by wwolkers
packages are only available if you have the vpn up & running, since they come from http://feed.hae.int/feeds

Re: Toon as a domotica controller?

Posted: Tue Dec 15, 2015 11:52 am
by al_n
Yes, I've got them

Code: Select all

-rw-r--r--    1 root     root          7525 Dec 15 09:41 base-qb2-ene_3.0.29-880-0_qb2.ipk
-rw-r--r--    1 root     root        148428 Dec 15 09:41 boot-logos_1.64-ene_qb2.ipk
-rw-r--r--    1 root     root        206675 Dec 15 09:41 firmware-ma_1.74_qb2.ipk
-rw-r--r--    1 root     root        197400 Dec 15 09:41 flash-gui_1.648-ene-qeio_qb2.ipk
-rw-r--r--    1 root     root        562747 Dec 15 09:41 flash-qwidget-diy_1.161-qeio_qb2.ipk
-rw-r--r--    1 root     root         56154 Dec 15 09:41 happ-kpi_1.119-ene_qb2.ipk
-rw-r--r--    1 root     root        175568 Dec 15 09:41 happ-pwrusage_1.416_qb2.ipk
-rw-r--r--    1 root     root         52630 Dec 15 09:42 happ-scsync_1.102_qb2.ipk
-rw-r--r--    1 root     root         50385 Dec 15 09:42 happ-smartplug_1.90_qb2.ipk
-rw-r--r--    1 root     root        170268 Dec 15 09:42 happ-thermstat_1.554-trunk_qb2.ipk
-rw-r--r--    1 root     root         20054 Dec 15 09:42 happ-usermsg_1.36_qb2.ipk
-rw-r--r--    1 root     root         36968 Dec 15 09:42 happ-weather_1.68_qb2.ipk
-rw-r--r--    1 root     root         29711 Dec 15 09:41 hcb-bxtproxy_1.70_qb2.ipk
-rw-r--r--    1 root     root        111531 Dec 15 09:42 hcb-config_1.218_qb2.ipk
-rw-r--r--    1 root     root        149656 Dec 15 09:41 hcb-core_1.144_qb2.ipk
-rw-r--r--    1 root     root        115749 Dec 15 09:41 hcb-netcon_1.224_qb2.ipk
-rw-r--r--    1 root     root         56363 Dec 15 09:41 hcb-rrd_2.125_qb2.ipk
-rw-r--r--    1 root     root         23459 Dec 15 09:42 hcb-watchdog_1.40_qb2.ipk
-rw-r--r--    1 root     root         51561 Dec 15 09:42 hdrv-hue_1.61-eneDevices_qb2.ipk
-rw-r--r--    1 root     root         96858 Dec 15 09:42 hdrv-p1_1.363_qb2.ipk
-rw-r--r--    1 root     root        261129 Dec 15 09:41 hdrv-zwave_1.505-ene_qb2.ipk
-rw-r--r--    1 root     root         22132 Dec 15 09:41 kernel-module-ftdi-sio_2.6.36-R07-h18_qb2.ipk
-rw-r--r--    1 root     root         10500 Dec 15 09:41 kernel-module-pl2303_2.6.36-R07-h18_qb2.ipk
-rw-r--r--    1 root     root         14715 Dec 15 09:41 libhcb-xml_1.83_qb2.ipk
-rw-r--r--    1 root     root         82856 Dec 15 09:42 libpcre_7.6-r8_qb2.ipk
-rw-r--r--    1 root     root        103529 Dec 15 09:42 lighttpd-mod-hcb-web_1.4.33-26_qb2.ipk
-rw-r--r--    1 root     root        121967 Dec 15 09:42 lighttpd_1.4.33-17_qb2.ipk
-rw-r--r--    1 root     root       2817466 Dec 15 09:41 qt-gui_1.3733_qb2.ipk
-rw-r--r--    1 root     root      12272555 Dec 15 09:42 qt-libs_5.3.1-06-setpos_qb2.ipk
I think I can safely install all beside of firmware-ma. Any other thoughts?

Re: Toon as a domotica controller?

Posted: Tue Dec 15, 2015 8:08 pm
by Ierlandfan
You're welcome :)
You probably want to check /etc/inittab for (if not auto-added by opkg install)

Code: Select all

# HCBv2 static stuff
qtqt:245:respawn:/usr/bin/startqt >/dev/null 2>&1
Also funny:
create/tmp/dropbox_message.xml

Code: Select all

  <Config>
        <message>
         <content>Merry Christmas!!</content>
          <subject>A Wish</subject>
          <subtitle>for everyone</subtitle>
          <messageType>critical</messageType>
          <received_t>2015-12-25 0:00</received_t>
          <internalAddress></internalAddress>
          <read_t></read_t>
          <readMsgSend>1</readMsgSend>
          <hideOnRemove>0</hideOnRemove> 
          <package>happ_usermsg</package>
          <type>message</type>
          <name>upgrade_msg</name>
          <visibility>1</visibility>$ACTIONS //to do: show christmas tree.png 
         </message>
        </Config>"
cp dropbox_message.xml /HCBv2/config/dropbox/
Watch your screen for a message :-)

Re: Toon as a domotica controller?

Posted: Tue Dec 15, 2015 8:43 pm
by al_n
Ierlandfan wrote: You probably want to check /etc/inittab for (if not auto-added by opkg install)

Code: Select all

# HCBv2 static stuff
qtqt:245:respawn:/usr/bin/startqt >/dev/null 2>&1
I was just about to ask this :)

Re: Toon as a domotica controller?

Posted: Wed Dec 16, 2015 12:18 am
by al_n
Well, I did the upgrade semi-automatic, I've downloaded the packages myself and then deleted the firmware package, than I used the script from Ierlandfan to execute the second phase.
The upgraded ran and then I've got a RED screen saying something went wrong and I have to contact tech support.

Shit, I reboot.

...


Everything looks ok :D I've got the QT version but I did lose my ssh. Will have to re-root it again.

Re: Toon as a domotica controller?

Posted: Wed Dec 16, 2015 1:31 am
by al_n
second time is easier, the terminal was still active. The only problem was iptables. Something in the process re-patch it. Got to keep that in mind for next time.

Re: Toon as a domotica controller?

Posted: Thu Dec 17, 2015 8:29 pm
by Ierlandfan
By the way, you need to edit the iptables.conf every time Toon is software updated (And so SSH is again firewalled)
Edit: even if you upgrade manually!
So better way is to make a custom start-up script which modifies the iptables every time Toon reboots. Multiple ways of doing that. If anyone wants to write that part, "go your gang" as some soccer trainer probably will say some day

Re: Toon as a domotica controller?

Posted: Thu Dec 17, 2015 10:37 pm
by marcelr
So better way is to make a custom start-up script which modifies the iptables every time Toon reboots.
That's not really going to help you when all boot scripts are replaced in an update ( from /etc/inittab to /etc/default HCBv2). Better keep a small 3-pin plug dangling from your serial port to the outside of toon, just in case. The boot loader will not be replaced that often, if at all, so serial access through /dev/ttymxc0 wil not be compromised that easily.

grtz,

marcelr

Re: Toon as a domotica controller?

Posted: Fri Dec 18, 2015 10:37 pm
by al_n
Can someone please repeat the following test;
Please go to http://10.10.10.7/hdrv_zwave?action=getDevices.json (use your toon's IP) and compare the results of CurrentGasQuantity with the daily gas usage on the toon's screen.

I get 6,83 m3 on the toon's screen and 669490.00 from the json reply and I don't understand why.
The electricity readouts are accurate.

on http://10.10.10.7:7080/happ_pwrusage?ac ... rrentUsage

I get only avgValue for gas of 298.10 which makes no sense either.

If anyone knows of another way to get the daily gas usage than I'll be happy to know.

Re: Toon as a domotica controller?

Posted: Fri Dec 18, 2015 11:36 pm
by marcelr
I get 6,83 m3 on the toon's screen and 669490.00 from the json reply and I don't understand why.
Mine has "CurrentGasQuantity":"5914146.00", and 5914.211 m^3 on the meter. The meter has the actual value (in m^3), while gas readings through the M-bus to the P1 port are updated only once every hour, on the hour, in liters. Electricity data transferred to the P1 port are updated every 10 seconds. These data include total consumption and production, for the current tariff, the actual tariff, actual power uptake and power production (in case of solar panels or microWKK).

For gas, daily consumptions are calculated by toon, as are the burn rates. Burn rates get updated more than once every hour, so there is some guessing/estimating going on in the software. The gas meter only transmits the total gas usage to the P1 port (through the M-bus).
So, to get daily consumption, record CurrentGasQuantity, take the number measured just after midnight, and subtract from all following readings. Update the midnight measurement every night to get accurate data every day.

grtz,

marcelr

Re: Toon as a domotica controller?

Posted: Sat Dec 19, 2015 1:11 pm
by al_n
marcelr wrote: So, to get daily consumption, record CurrentGasQuantity, take the number measured just after midnight, and subtract from all following readings. Update the midnight measurement every night to get accurate data every day.
This makes sense, and is actually also what is happening inside toon. happ_pwrusage has a data structure called midnightInfo. There just isn't any web handler to get it :?

Re: Toon as a domotica controller?

Posted: Sat Dec 19, 2015 1:21 pm
by marcelr
happ_pwrusage has a data structure called midnightInfo. There just isn't any web handler to get it
No, but you CAN get the UNIX timestamp.

Code: Select all

 return file_get_contents( $toon_url.':'.$toon_port.'/happ_thermstat?action=printTableInfo');
Fill in your own URL and port number, YMMV.
Parse the file and you're good to go.

Divide the timestamp by 86400 (seconds per day) and when the remainder is less than 3600, you're between 24.00h and 01:00h. Gas readings in that period are your starting value :-).

grtz,

marcelr

Re: Toon as a domotica controller?

Posted: Sat Dec 19, 2015 1:27 pm
by al_n
all i get are empty values

Code: Select all

info = [ 
{'dataId':'0', 'value0':'00', 'value1':'00', 'updated':'0', 'description':'[ID 0: 00 00, SlaveState burn=NoFlame, fault=0]'},
{'dataId':'1', 'value0':'00', 'value1':'00', 'updated':'0', 'description':'[ID 1: 00 00]'},
{'dataId':'2', 'value0':'00', 'value1':'00', 'updated':'0', 'description':'[ID 2: 00 00]'},
{'dataId':'3', 'value0':'00', 'value1':'00', 'updated':'0', 'description':'[ID 3: 00 00]'},
{'dataId':'15', 'value0':'00', 'value1':'00', 'updated':'0', 'description':'[ID 15: 00 00]'},
{'dataId':'17', 'value0':'00', 'value1':'00', 'updated':'0', 'description':'[ID 17: 00 00, RelModLvl=0.00]'},
{'dataId':'25', 'value0':'00', 'value1':'00', 'updated':'0', 'description':'[ID 25: 00 00, TempBoiler=0.00]'},
{'dataId':'5', 'value0':'00', 'value1':'00', 'updated':'0', 'description':'[ID 5: 00 00]'},
{'dataId':'6', 'value0':'00', 'value1':'00', 'updated':'0', 'description':'[ID 6: 00 00]'},
{'dataId':'9', 'value0':'00', 'value1':'00', 'updated':'0', 'description':'[ID 9: 00 00]'},
{'dataId':'16', 'value0':'00', 'value1':'00', 'updated':'0', 'description':'[ID 16: 00 00, RoomSetpoint=0.00]'},
{'dataId':'18', 'value0':'00', 'value1':'00', 'updated':'0', 'description':'[ID 18: 00 00]'},
{'dataId':'24', 'value0':'00', 'value1':'00', 'updated':'0', 'description':'[ID 24: 00 00, RoomTemperature=0.00]'},
{'dataId':'26', 'value0':'00', 'value1':'00', 'updated':'0', 'description':'[ID 26: 00 00]'},
{'dataId':'27', 'value0':'00', 'value1':'00', 'updated':'0', 'description':'[ID 27: 00 00]'},
{'dataId':'28', 'value0':'00', 'value1':'00', 'updated':'0', 'description':'[ID 28: 00 00, TempReturn=0.00]'},
{'dataId':'35', 'value0':'00', 'value1':'00', 'updated':'0', 'description':'[ID 35: 00 00]'},
{'dataId':'48', 'value0':'00', 'value1':'00', 'updated':'0', 'description':'[ID 48: 00 00]'},
{'dataId':'56', 'value0':'00', 'value1':'00', 'updated':'0', 'description':'[ID 56: 00 00, DHW Setpoint=0.00]'},
{'dataId':'57', 'value0':'00', 'value1':'00', 'updated':'0', 'description':'[ID 57: 00 00]'},
{'dataId':'73', 'value0':'00', 'value1':'00', 'updated':'0', 'description':'[ID 73: 00 00]'},
{'dataId':'113', 'value0':'00', 'value1':'00', 'updated':'0', 'description':'[ID 113: 00 00]'},
{'dataId':'114', 'value0':'00', 'value1':'00', 'updated':'0', 'description':'[ID 114: 00 00]'},
{'dataId':'115', 'value0':'00', 'value1':'00', 'updated':'0', 'description':'[ID 115: 00 00]'},
{'dataId':'116', 'value0':'00', 'value1':'00', 'updated':'0', 'description':'[ID 116: 00 00, BurnerStarts=0]'},
{'dataId':'117', 'value0':'00', 'value1':'00', 'updated':'0', 'description':'[ID 117: 00 00]'},
{'dataId':'118', 'value0':'00', 'value1':'00', 'updated':'0', 'description':'[ID 118: 00 00]'},
{'dataId':'119', 'value0':'00', 'value1':'00', 'updated':'0', 'description':'[ID 119: 00 00]'},
{'dataId':'120', 'value0':'00', 'value1':'00', 'updated':'0', 'description':'[ID 120: 00 00, BurnerHours=0]'},
{'dataId':'121', 'value0':'00', 'value1':'00', 'updated':'0', 'description':'[ID 121: 00 00]'},
{'dataId':'122', 'value0':'00', 'value1':'00', 'updated':'0', 'description':'[ID 122: 00 00]'},
{'dataId':'123', 'value0':'00', 'value1':'00', 'updated':'0', 'description':'[ID 123: 00 00]'},
{'dataId':'127', 'value0':'00', 'value1':'00', 'updated':'0', 'description':'[ID 127: 00 00]'}
]