Toon as a domotica controller?

Everything about rooting Toons 1 and 2.

Moderators: marcelr, TheHogNL, Toonz

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 »

Ierlandfan wrote:Marcel, could he have reversed the keteladapter? I mean the HVAC expects 24v or so and Toon expect (for some odd reason unknown to men) the same?
Quite possible, but I assume that that's the first thing you check (and therefore not the case, right, Tom?). Another option is that the boiler doesn't speak OT. What make and type of boiler is it, anyway?

grtz,

marcelr
Tom
Starting Member
Starting Member
Posts: 25
Joined: Mon May 23, 2016 11:16 am

Re: Toon as a domotica controller?

Post by Tom »

@Marcelr, I am a programmer myself so I guess it should be possible to create a working bash script.

I did double check (say 20 times) all the connections and the direction of the keteladapter.
My CV is a Remeha Avanta 28c and was working with an OT iSense thermostat before. I am certain that it works with OT. Eventhough when it doesn't it should still connect as a regular on/off thermostat right?

As for the serial dump, I will check your script and try if I can get something out of it. Keep you posted!
Ierlandfan
Member
Member
Posts: 151
Joined: Thu Oct 03, 2013 7:53 pm

Re: Toon as a domotica controller?

Post by Ierlandfan »

Slight offtopic:

why power Toon with 24v since 24v is only a standard for HVAC? It is not like you would connect another thermostat than Toon to it? (I wouldn't make sense since Toon does not uses OT directly...) It slipped my mind some day not long ago. I think that it will run happily on 5V with some conversion..(which they probably have to in some future)

I am not sure whether it's ok to say something about something that took place somewhere someplace :-)
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 »

why power Toon with 24v since 24v is only a standard for HVAC?
Dunno, 24V is an industry standard level for signaling. We weren't around when toon was first designed, it might be that the original plan was to control the boiler directly from toon, drawing power from the boiler, as most thermostats do, without the module in between.
I am not sure whether it's ok to say something about something that took place somewhere someplace :-)
I don't see how that could be of interest to the domoticaforum visitors at large.
As for the serial dump, I will check your script and try if I can get something out of it. Keep you posted!
It's not really serial, it's just generating output from the boiler controller code. Quby made their interfacing software quite verbose, which is good, and quite nifty for debugging. In the production code, all output is suppressed (redirected to /dev/null), by switching the redirection off, you can actually see what's going on.

grtz,

marcelr
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 »

@Tom:

Can't find the happ_thermstat logs in this thread, just yell if you need them.

grtz,

marcelr
Tom
Starting Member
Starting Member
Posts: 25
Joined: Mon May 23, 2016 11:16 am

Re: Toon as a domotica controller?

Post by Tom »

Got the logging working for the happ_thermstat (first forgot to chmod 755 after uploading the edited file through ssh)

the log is returning lots of Unknown First byte in the beginning;

Code: Select all

[01;34m[[01;36mhapp_thermstat[0m:[01;36m../src/rs232.c[0m@[01;36mcheckForDataNew()[0m:[01;36m1096[0m[01;34m][01;35mERROR: [0mUnknown First byte: 106 (0x6A) (j), skipping!
and the end of the file a repetition of the following;

Code: Select all

[01;34m[[01;36mhapp_thermstat[0m[01;34m][0mcurrent time 24-05-2016 23:43:00. [01;35mNo next entry found. Will never stop this :P.
[0m[01;34m[[01;36mhapp_thermstat[0m:[01;36m../src/rs232.c[0m@[01;36msetupStepTimeout()[0m:[01;36m1278[0m[01;34m][01;35mERROR: [0mTimeout for Step 02, re-sending last setup command!!
[01;34m[[01;36mhapp_thermstat[0m[01;34m][0mOTGW setup step 02/13: get version
[01;34m[[01;36mhapp_thermstat[0m[01;34m][0mOTGW <<- 'B' 'V'  00 00 00 00            Step 02/13 CheckSum=98
[01;34m[[01;36mhapp_thermstat[0m:[01;36m../src/rs232.c[0m@[01;36mcheckForDataNew()[0m:[01;36m1121[0m[01;34m][0mSkip reading CRC
[01;34m[[01;36mhapp_thermstat[0m[01;34m][0mOTGW ->> 'B' C2  56 00 00 00  (echo)  received echo
[01;34m[[01;36mhapp_thermstat[0m:[01;36m../src/rs232.c[0m@[01;36msetupStepTimeout()[0m:[01;36m1278[0m[01;34m][01;35mERROR: [0mTimeout for Step 02, re-sending last setup command!!
[01;34m[[01;36mhapp_thermstat[0m[01;34m][0mOTGW setup step 02/13: get version
[01;34m[[01;36mhapp_thermstat[0m[01;34m][0mOTGW <<- 'B' 'V'  00 00 00 00            Step 02/13 CheckSum=98
[01;33m<c->bcu:[01;35mblocked[0m[01;33m>[0m[01;33m<c->bcu:[01;35mgotit[0m[01;33m>[0m[01;34m[[01;36mhapp_thermstat[0m:[01;36m../src/rs232.c[0m@[01;36mcheckForDataNew()[0m:[01;36m1121[0m[01;34m][0mSkip reading CRC
[01;34m[[01;36mhapp_thermstat[0m[01;34m][0mOTGW ->> 'B' C2  56 00 00 00  (echo)  received echo
It basically returns 'B' 'V' 00 00 00 00 and 'B' C2 56 00 00 00 constantly and never gets any correct data, it even fails to write data to the keteladapter
Tom
Starting Member
Starting Member
Posts: 25
Joined: Mon May 23, 2016 11:16 am

Re: Toon as a domotica controller?

Post by Tom »

I got the feeling that the ketelmodule has stopped doing what it is supposed to be doing..
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 »

That doesn't look to well, but then again, I could post logs from my boiler module with similar recordings. In other words: I don't think it automatically means your module is a goner.

The unknown first byte is part of the bootstrap of the module: Toon sends 128 'j' characters first, and then starts the actual initialization. This can take quite a while. I have logs with exactly the same content, including errors, recorded from a working boiler module. At some point I had to repeat the test for opentherm capability more than 10 times before it worked. Don't ask why, because I don't know :-).

How is the connection between toon and the module? If you just connect toon and the module, and forget about the boiler for now, does that work (two short pieces of wire, between toon and the module, and test e.g., on your kitchen table)? Naturally, you will only get bang-bang control, because there no boiler to respond to toon's requests.

grtz,

marcelr
Tom
Starting Member
Starting Member
Posts: 25
Joined: Mon May 23, 2016 11:16 am

Re: Toon as a domotica controller?

Post by Tom »

Good to heir that you seen the same paterns in the module. I tested with a Cat5E cable of about 2 meters between the toon and module. Both with connection to the boiler and without. I will change the cable for a smaller one and only put the module. But it shouldn't make a difference.

I have the toon connected to only the module for 24 hours and still no connection.
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 »

You should also test "Aansturing ketel->Controleren" in Menu->Instellingen->Verwarming until you get bored ...
Every hit you should hear clicking sounds in the boiler module. If you redirect happ_thermstat output to /dev/console, you can follow what's going on.

AFAIK Toon doesn't keep trying. You will have to make it try again and again by hitting the "Controleren" button.

grtz,

marcelr
Tom
Starting Member
Starting Member
Posts: 25
Joined: Mon May 23, 2016 11:16 am

Re: Toon as a domotica controller?

Post by Tom »

Just an in between notice, the 6 pin header on the boiler module is an SPI connector for In Service Programming of the Atmega328p chip (see layout here: http://www.atmel.com/webdoc/avrdragon/a ... ption.html). I solved this by measuring the connector wiring to the chip and later found this link.

This might be possible to use for debugging the atmega chip itself.

I will try your suggestions for now.

P.S. Have the toon laying on the kitchen table on a short thick cable now but this doesn't change the outcome upto now.
Tom
Starting Member
Starting Member
Posts: 25
Joined: Mon May 23, 2016 11:16 am

Re: Toon as a domotica controller?

Post by Tom »

Apparently the Atmega328 SPI runs on 5v and connecting that directly to the SPI interface of my RPi will destroy the GPIO since it can only handle 3.3v. Will keep trying to make it work.
Tom
Starting Member
Starting Member
Posts: 25
Joined: Mon May 23, 2016 11:16 am

Re: Toon as a domotica controller?

Post by Tom »

marcelr wrote:You should also test "Aansturing ketel->Controleren" in Menu->Instellingen->Verwarming until you get bored ...
Every hit you should hear clicking sounds in the boiler module. If you redirect happ_thermstat output to /dev/console, you can follow what's going on.

AFAIK Toon doesn't keep trying. You will have to make it try again and again by hitting the "Controleren" button.

grtz,

marcelr
I just put my Toon back on the module to power up and use these settings but in the Menu->Instellingen->Verwarming is no 'Aansturing ketel', there are only 'Type verwarming' and 'Correctie temperatuurmeting'.

Did I maybe put one (or more) of the settings wrong in scsync?

Code: Select all

<visibility>0</visibility><StartDate>0</StartDate><EndDate>0</EndDate><ProductVariant>Toon</ProductVariant><activated>1</activated><wizardDone>1</wizardDone><SoftwareUpdates>0</SoftwareUpdates><BoilerManagement>0</BoilerManagement><ElectricityDisplay>1</ElectricityDisplay><GasDisplay>1</GasDisplay><HeatDisplay>1</HeatDisplay><SolarDisplay>0</SolarDisplay><SolarActivated>0</SolarActivated><OtherProviderElec>0</OtherProviderElec><OtherProviderGas>0</OtherProviderGas><ContentApps>1</ContentApps><TelmiEnabled>0</TelmiEnabled><mobileAccess>1</mobileAccess><supportEnabled>1</supportEnabled><researchEnabled>0</researchEnabled><doSolarWhatsnew>0</doSolarWhatsnew><latestWhatsnewVersion>qt-gui - 1.5077-release-3.2.9-with-dateselectorco</latestWhatsnewVersion><scStatusFlags>0</scStatusFlags><commissionState>0</commissionState></device>
2 days ago i did a factory defaults as well, maybe that messed something up in the process.
Tom
Starting Member
Starting Member
Posts: 25
Joined: Mon May 23, 2016 11:16 am

Re: Toon as a domotica controller?

Post by Tom »

A small update (sorry for all the spam, since my posts still need acceptance thus I cannot add it to the previous post):

I restored a backup of all the config files in HCBv2\config\ and I now have the Aansturing ketel->Controleren button back however the log of happ_thermstat still returns the same.
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 »

Just an in between notice, the 6 pin header on the boiler module is an SPI connector for In Service Programming of the Atmega328p chip
Maybe you can use it to reflash the firmware onto the module?
A small update (sorry for all the spam, since my posts still need acceptance thus I cannot add it to the previous post):
Your posts counter is 10 now, so that should be a thing of the past now.

grtz,

marcelr
Post Reply

Return to “Toon Rooting”