Toon as a domotica controller?

Everything about rooting Toons 1 and 2.

Moderators: marcelr, TheHogNL, Toonz

Templar
Member
Member
Posts: 180
Joined: Fri Mar 18, 2011 8:49 pm
Location: Netherlands

Re: Toon as a domotica controller?

Post by Templar »

marcelr wrote:Welcome aboard, Timeless.
Internally, all I/O between boiler (when it's and OpenTherm driven one) and toon can be monitored as well. All internal output is already in json format :-) (well, sort of).
Out of curiosity, is it possible to make the Toon transmit different OT Data-id's towards the boiler or only the ones listed below? Requesting solar related info for instance?

Code: Select all

ID's
ID0:HB0: Master status: CH enable
ID0:HB1: Master status: DHW enable
ID0:HB3: Master status: OTC active
ID0:HB5: Master status: Summer/winter mode
ID0:HB6: Master status: DHW blocking
ID0:LB0: Slave Status: Fault indication
ID0:LB1: Slave Status: CH mode
ID0:LB2: Slave Status: DHW mode
ID0:LB3: Slave Status: Flame status
ID0:LB6: Slave Status: Diagnostic/service indication
ID1: Control Setpoint i.e. CH water temperature Setpoint (°C)
ID2:HB0: Master configuration: Smart power
ID2:LB: Master MemberID Code
ID3:HB0: Slave configuration: DHW present
ID3:HB1: Slave configuration: Control type
ID3:HB4: Slave configuration: Master low-off&pump control
ID5:HB0: Service request
ID5:HB1: Lockout-reset
ID5:HB2: Low water pressure
ID5:HB3: Gas/flame fault
ID5:HB4: Air pressure fault
ID5:HB5: Water over-temperature
ID5:LB: OEM fault code
ID6:HB0: Remote boiler parameter transfer-enable: DHW setpoint
ID6:HB1: Remote boiler parameter transfer-enable: max. CH setpoint
ID6:LB0: Remote boiler parameter read/write: DHW setpoint
ID14: Maximum relative modulation level setting (%)
ID15: Maximum boiler capacity (kW) / Minimum boiler modulation level(%)
ID16: Room Setpoint (°C)
ID17: Relative Modulation Level (%)
ID18: Water pressure in CH circuit (bar)
ID24: Room temperature (°C)
ID25: Boiler flow water temperature (°C)
ID26: DHW temperature (°C)
ID27: Outside temperature (°C)
ID28: Return water temperature (°C)
ID35: Boiler fan speed Setpoint and actual value
ID48: DHW Setpoint upper & lower bounds for adjustment (°C)
ID56: DHW Setpoint (°C) (Remote parameter 1)
ID57: Max CH water Setpoint (°C) (Remote parameters 2)
ID73: An OEM-specific diagnostic/service code for ventilation / heat-recovery system
ID113: Number of un-successful burner starts
ID114: Number of times flame signal was too low
ID115: OEM-specific diagnostic/service code
ID116: Number of succesful starts burner
ID117: Number of starts CH pump
ID118: Number of starts DHW pump/valve
ID119: Number of starts burner during DHW mode
ID120: Number of hours that burner is in operation (i.e. flame on)
ID121: Number of hours that CH pump has been running
ID122: Number of hours that DHW pump has been running or DHW valve has been opened
ID123: Number of hours that burner is in operation during DHW mode
ID127: Slave product version number and type 
marcelr
Global Moderator
Global Moderator
Posts: 1153
Joined: Thu May 10, 2012 10:58 pm
Location: Ehv

Re: Toon as a domotica controller?

Post by marcelr »

@Timeless:
I have no experience with qt/qml so I have to learn everything from the ground up. Examples will surely accelerate the learning curve.
+1 :-)

Join the fun in the Software extensions thread. Toonz and a few others are doing a great job in making new applications. I already learned a lot from their examples.

@Templar:

It is possible to make toon transmit messages to the boiler module other than the pre-programmed ones in happ_thermstat. It's not straightforward, but it can be done.
The big question is: does the boiler module relay these messages towards the boiler (in OT format), and does it interpret the boiler's replies and relay these back to toon (in toon format)?
From a system design point of view, I'm inclined to think that the boiler module is fairly dumb and just relays information, irrespective of its contents. All interpretation is then done by toon.

There are two ways to find out:
i) Just test it, send OT requests to the boiler other than the ones listed in the table at Schelte's (hvxl) site (in the column toon thermostat). Choose some that are valid for your boiler,and don't show up in toon's set of IDs.
ii) Take the boiler module firmware apart with AVRstudio and see what's inside.
Timeless
Member
Member
Posts: 54
Joined: Fri Jan 06, 2017 12:51 pm

Re: Toon as a domotica controller?

Post by Timeless »

marcelr wrote:@Timeless:
I have no experience with qt/qml so I have to learn everything from the ground up. Examples will surely accelerate the learning curve.
+1 :-)

Join the fun in the Software extensions thread. Toonz and a few others are doing a great job in making new applications. I already learned a lot from their examples.
Thanks I'll have a look at that forum once I have SSH access to my recently bought (yeah... bought one 2nd hand today after reading these topics) Toon. I already opened the unit. Fun to see that it uses a mini-PCIe Wireless Card. It's not that usual in embedded electronics these days.

One quick question. Is it safe to power on the Toon and access the TTL logic without attaching the LCD and touchscreen controller? I quess for U-boot this should not be a problem but what for the OS?

Regards,
Timeless

Ps. When does the post validation by a moderator end? After how many posts.
"The greatest good you can do for another, is not to share your own riches, but to reveal to him, his own."
- Benjamin Disraeli -
marcelr
Global Moderator
Global Moderator
Posts: 1153
Joined: Thu May 10, 2012 10:58 pm
Location: Ehv

Re: Toon as a domotica controller?

Post by marcelr »

One quick question. Is it safe to power on the Toon and access the TTL logic without attaching the LCD and touchscreen controller? I quess for U-boot this should not be a problem but what for the OS?
I think it doesn't make any difference. Why would you disconnect the screen? Especially if your device has been returned to factory defaults, you will need the touchscreen to get in again.
Ps. When does the post validation by a moderator end? After how many posts.
After 10 posts you can talk freely.
Timeless
Member
Member
Posts: 54
Joined: Fri Jan 06, 2017 12:51 pm

Re: Toon as a domotica controller?

Post by Timeless »

marcelr wrote: I think it doesn't make any difference. Why would you disconnect the screen? Especially if your device has been returned to factory defaults, you will need the touchscreen to get in again.
I had to disconnect the screen to give me some workspace. Since I currently trying to get root access and install dropbear I don't need the screen as for now. I disconnected the thing just in case (So I could not accidentally damage the Flat Flex cables). I 'm not that far in the (root)manual yet but what do you mean with returned to factory defaults? I opened the shell access right after I got home with my 2nd hand Toon. And did not reset the device using the reset button. Does the reset to factory also reset part of the rootfs or something? So when I press the reset buttons are all my changes like shell/dropbear gone?
marcelr wrote: After 10 posts you can talk freely.
Ok thanks :)
"The greatest good you can do for another, is not to share your own riches, but to reveal to him, his own."
- Benjamin Disraeli -
Timeless
Member
Member
Posts: 54
Joined: Fri Jan 06, 2017 12:51 pm

Re: Toon as a domotica controller?

Post by Timeless »

Also another thing. I tried to download: openembedded-qb2-toon-2012r1.tar.bz2 but the link is dead. Is there another place where I could get the source code?
"The greatest good you can do for another, is not to share your own riches, but to reveal to him, his own."
- Benjamin Disraeli -
marcelr
Global Moderator
Global Moderator
Posts: 1153
Joined: Thu May 10, 2012 10:58 pm
Location: Ehv

Re: Toon as a domotica controller?

Post by marcelr »

I 'm not that far in the (root)manual yet but what do you mean with returned to factory defaults?
Factory reset ("herstel fabrieksinstellingen") wipes all data, resets the main configuration file to defaults, removes any activation code. You will start afresh, as with a brand new toon. The easiest way to get started again is to follow the startup menu after such an event. You should never do it, but if your seller has reset this toon prior to shipping, you will need the touchscreen to get in easily.
(I use a book or a flat box to fill the space between the touchscreen and the main pcb, so you can have both connected and at the same time steadily positioned).

Installed software (dropbear, init shell through ttymxc0) remains intact, no problem there.

And here's the code:

http://quby.com/static/openembedded-qb2 ... r1.tar.bz2

(don't know why these guys keep changing the url of that file).
hvxl
Senior Member
Senior Member
Posts: 2031
Joined: Sat Jun 05, 2010 11:59 am
Contact:

Re: Toon as a domotica controller?

Post by hvxl »

Timeless wrote:Is there any way of parsing JSON data from a source (for example Domoticz) and display them in a widget on Toon?
Yes. You can easily obtain the json data from a server using XMLHttpRequest(), parse it using JSON.parse() and then display it.
Schelte
Timeless
Member
Member
Posts: 54
Joined: Fri Jan 06, 2017 12:51 pm

Re: Toon as a domotica controller?

Post by Timeless »

Ok great I installed the newest dropbear the 2015 version and also Factory Reset my Toon. I also attached the screen which displays the initial setup.
If I'm correct there should not be a root user password right? But when I try to login using SSH there is still a password prompt. I don't know if this dropbear has a allowEmptyPassword option like OpenSSH has. But eventually I want to add a password to the root user anyway.

Is there any limitation of changing the root user password? Does this affect the "Toon software" in any harmful way? And if I 'm correct, if I for some reason looses the password I can just use the u-boot "setenv addmisc setenv bootargs \$\{bootargs\} mem=\$\{mem\} lpj=999424" option to login though TTL-serial and change the /etc/passwd file without the need of the root user correct?
"The greatest good you can do for another, is not to share your own riches, but to reveal to him, his own."
- Benjamin Disraeli -
marcelr
Global Moderator
Global Moderator
Posts: 1153
Joined: Thu May 10, 2012 10:58 pm
Location: Ehv

Re: Toon as a domotica controller?

Post by marcelr »

I think /etc/shadow has root:DISABLED: .... as password line.

Remove the DISABLED, and you're good to go. The serial IO doesn't require a password. You are dropped to a shell immediately, there.
The root password should be strong. More than 12 characters, numbers, brackets, lower case, capitals, as mixed as possible. If you choose a weak one, that's fine too ;-). And no, it doesn't affect any software that I'm aware of.

After you edit /etc/inittab, (and add a getty on /dev/ttymxc0 !) there's no need to enter the u-boot environment any more. There will always be a serial console available at the TTL serial port, accessible without passwd.
Timeless
Member
Member
Posts: 54
Joined: Fri Jan 06, 2017 12:51 pm

Re: Toon as a domotica controller?

Post by Timeless »

I removed the "DISABLED" word when I was in the limited shell. Restarted the device and used "passwd root" to change the root password. My installation of busybox does not allow a empty password. When I tried to login from another PC the "enter password" still appeared but a empty password did not let me enter.

So thats why I changed the password (Which I was already planned to do anyway) and that did (ofc) the trick. I do have serial/SSH access and both with password. And it seems that the password is (hashed) inside the /etc/passwd instead of /etc/shadow so If I for whatever reason forgot my password I can simply enter the limited shell again (because that doesn't need any authentication at all, right?) and remove my password hash from the /etc/passwd file.
I also noticed this:

Code: Select all

Note: the time protocol (tcp/udp port 37) is something else than the
network time protocol (ntp, udp port 123). You will need a time
server, not an ntp-server.
I skipped that part at first and entered my local NTP server anyhow and I noticed in my LEDE(OpenWRT) router that Toon (chrony) also uses port 123. And since chrony could support NTP why is it mentioned in the root-readme that there is only support for the TIME protocol at port 37?

I do however get messages like:

Code: Select all

daemon.warn chronyd[969]: No intersecting endpoints found
And I specificly set my NTP server to a wrong time which made me able to check if Toon uses that time after a cold boot. But there are no timejumps so either it does not work with NTP (even while there are connections to port 123) or chrony has implemented the real NTP standard and fastens/slowed the system clock instead of using timejumps. There is a real-time clock in Toon so I could imagine that there is no real need for timejumps, and/or if the Toon software is not made for timejumps and therefor specifically disabled.
"The greatest good you can do for another, is not to share your own riches, but to reveal to him, his own."
- Benjamin Disraeli -
Timeless
Member
Member
Posts: 54
Joined: Fri Jan 06, 2017 12:51 pm

Re: Toon as a domotica controller?

Post by Timeless »

Mmh... seems that it was not that smart to factory reset the unit. I cannot get past step 2.4 (Connecting with "SSID")

Code: Select all

Toon --OK--> Wireless --OK--> Internet --ERROR--> SC(Service Center).
The only option I get is "Retry" I cannot continue.

I already executed all the "disable Eneco" stuff. Do I need to undo that and finish the installation prior to blocking the OpenVPN tunnel and such?
"The greatest good you can do for another, is not to share your own riches, but to reveal to him, his own."
- Benjamin Disraeli -
Timeless
Member
Member
Posts: 54
Joined: Fri Jan 06, 2017 12:51 pm

Re: Toon as a domotica controller?

Post by Timeless »

Hi,

Sorry for the topic spamming. But I cannot edit me recent post since it has not been approved by a moderator yet.
It seems that the "activation step" is not really necessary. Because I entered step 3 "Measure Energy" and connected the Wireless Sensor Adapter. This went OK except that I seem to miss the optical Electricity/Gas sensors with my 2nd hand Toon. And I do not have a P1 meter so I cannot use that as a alternative. When I reboot Toon the WiFi network is still present and the setup-wizard goes directly to Step 3 "Measure Energy".

Is there any other way to complete those steps and get the Toon Dashboard?

EDIT:

I also found this picture link
Image

If that image is correct then the sensors are no more than a LED and a photosensitive diode/transistor. And there are no complex electronics inside. If thats the case I could just short the detect(photosensitive) wire with ground to simulate a pulse and make Toon think that it works.

But what do the LEDs on the Zwave plug mean? Are they continuous lit once the sensor is attached or do they blink (On --> Off or Off --> On) when a pulse is detected.

If they are continous lit then there must be some I2C or 1wire communication with the actual sensor. Otherwise it could not be possible to detect a sensor reliably.
Last edited by Timeless on Sat Jan 07, 2017 11:29 am, edited 1 time in total.
"The greatest good you can do for another, is not to share your own riches, but to reveal to him, his own."
- Benjamin Disraeli -
marcelr
Global Moderator
Global Moderator
Posts: 1153
Joined: Thu May 10, 2012 10:58 pm
Location: Ehv

Re: Toon as a domotica controller?

Post by marcelr »

Is there any other way to complete those steps and get the Toon Dashboard?
At this point you can go to /HCBv2/config/ and edit config_happ_scsync.xml and set the tag <wizardDone> to 1. After that you can move on to the next step (in the normal front panel).
I already executed all the "disable Eneco" stuff. Do I need to undo that and finish the installation prior to blocking the OpenVPN tunnel and such?
No, see above, but you will keep the error "not connected to SC" until you edit the internetSettings code. See rooting manual for details.
Not sure about the chrony bit. people have reported that ntp works well, in my case the time protocol does the job. YMMV.
and yes, passwd hashes are in /etc/passwd. In most of my other linux machines they're in /etc/shadow. Sorry about the confusion.
marcelr
Global Moderator
Global Moderator
Posts: 1153
Joined: Thu May 10, 2012 10:58 pm
Location: Ehv

Re: Toon as a domotica controller?

Post by marcelr »

If that image is correct then the sensors are no more than a LED and a photosensitive diode/transistor.
Not sure about the wiring (haven't checked). Datasheet of the photosensor attached to this post. It's the only component inside the white plastic housing (besides a pcb with connector, to which it is soldered).
Attachments
rpr-220pc30n.pdf
(62.52 KiB) Downloaded 546 times
Post Reply

Return to “Toon Rooting”