Toon as a domotica controller?

Everything about rooting Toons 1 and 2.

Moderators: marcelr, TheHogNL, Toonz

cygnusx
Starting Member
Starting Member
Posts: 48
Joined: Tue Apr 14, 2015 10:12 am

Re: Toon as a domotica controller?

Post by cygnusx »

Wow, a big bow down to marcelr. That's great. I installed it on my test toon and it works. First time i tried it hanged after 1 click (it responded to the click, but after that i saw no changes anymore. So i reconnected and now it's responding nicely. This is great for testing and app development :)

Huge effort!
hayman
Starting Member
Starting Member
Posts: 36
Joined: Fri Feb 26, 2016 6:16 pm

Re: Toon as a domotica controller?

Post by hayman »

the VNC work Great ,but still have some problem with the DOMOTICZ and HTTP,
after changing these (( <!-- Release uses lighttpd; put hcb_web somewhere where its harmless -->
<port>10080</port>
<defaultEntry>/HCBv2/www/</defaultEntry>
<enforceWhitelist>0</enforceWhitelist>
<whitelist>
<item>hdrv_zwave</item>
</whitelist>))))

i still got ((403 - Forbidden)) on my website ((http://192.168.1.11:10080/happ_thermsta ... tTableInfo))

please more help
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 »

Can you check the error log of lighttpd:

/tmp/lighttpd_error.log

what does it say?

grtz,

marcelr
hayman
Starting Member
Starting Member
Posts: 36
Joined: Fri Feb 26, 2016 6:16 pm

Re: Toon as a domotica controller?

Post by hayman »

marcelr wrote:Can you check the error log of lighttpd:

/tmp/lighttpd_error.log

what does it say?

grtz,

marcelr

hallo ,here is it


2016-05-16 21:58:05: (../../src/log.c.168) server started
2016-05-16 21:58:05: (../../src/server.c.1032) WARNING: unknown config-key: accesslog.filename (ignored)
2016-05-16 21:58:05: (../../src/server.c.1032) WARNING: unknown config-key: url.access-deny (ignored)
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 »

Hmmm ...
Mine has that as well, and, here it's working ...
Not very helpful, I'm afraid. I have no idea what's wrong.

grtz,

marcelr
hayman
Starting Member
Starting Member
Posts: 36
Joined: Fri Feb 26, 2016 6:16 pm

Re: Toon as a domotica controller?

Post by hayman »

ooooh okey will edit the files again and try it one more time
thanks
Ierlandfan
Member
Member
Posts: 151
Joined: Thu Oct 03, 2013 7:53 pm

Re: Toon as a domotica controller?

Post by Ierlandfan »

I think it could be permission thing. Check the /HCBv2/www (ls -la) to see what the permissions are.
Restart lightpd after editing. But I am sure you did that.
fkruis
Starting Member
Starting Member
Posts: 20
Joined: Sun May 01, 2016 7:44 pm

Re: Toon as a domotica controller?

Post by fkruis »

you can try this ?

<hcb_web>
<!-- Release uses lighttpd; put hcb_web somewhere where its harmless -->
<port>7080</port>
<defaultEntry>/hdrv_zwave/</defaultEntry>
<enforceWhitelist>0</enforceWhitelist>
<whitelist>
<item>hdrv_zwave</item>
</whitelist>
</hcb_web>
Tom
Starting Member
Starting Member
Posts: 25
Joined: Mon May 23, 2016 11:16 am

Re: Toon as a domotica controller?

Post by Tom »

Hi guys, since a couple of months I am following your posts with great pleasure. I while ago I finally bought a Toon from Marktplaats and rooted it according to your guides. Now I am finally at the stage to put it up and running and after connecting the ketelmodule to the CV I boticed the Toon cannot connect.

The Toon tells the connection with the ketel adapter cannot be created. Which is strange to me since it is actually powering the Toon. I tried monitoring the serial connection with the adapter using 'microcom -s 4800 /dev/ttymcx1' but it returns only non readable text (a rectangle followed by a V) which repeats every couple of seconds.

Does any of you have an idea about how to check if the ketelmodule is defect?
cygnusx
Starting Member
Starting Member
Posts: 48
Joined: Tue Apr 14, 2015 10:12 am

Re: Toon as a domotica controller?

Post by cygnusx »

I recall having the same thing. Wasnt it that you have to enable toon op afstand on the gui on your toon itself? Somewhere in the instellingen page...

I think that was the solution for me :)
cygnusx
Starting Member
Starting Member
Posts: 48
Joined: Tue Apr 14, 2015 10:12 am

Re: Toon as a domotica controller?

Post by cygnusx »

Now for something else. The toon has a speaker. Also it has some devices as /dev/dsp . I would like to be able to play some sounds on some occasions. I tried to echo random data and even cat a wave file and pipe it to the audio device, but so far nothing.

Anyone have more luck then me?
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 »

Does any of you have an idea about how to check if the ketelmodule is defect?
Two things:

Did it work BEFORE you rooted your toon?

Are the port settings correct? stty should give you something like this:

Code: Select all

toon:~# stty -a -F /dev/ttymxc1
speed 4800 baud;stty: /dev/ttymxc1

intr = <undef>; quit = <undef>; erase = <undef>; kill = <undef>; eof = <undef>;
eol = <undef>; eol2 = <undef>; start = <undef>; stop = <undef>; susp = <undef>;
rprnt = <undef>; werase = <undef>; lnext = <undef>; flush = <undef>;
min = 5; time = 1;
parenb -parodd cs8 -hupcl -cstopb cread clocal -crtscts
-ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr -icrnl -ixon
-ixoff -iuclc -ixany -imaxbel
-opost -olcuc -ocrnl -onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0
ff0
-isig -icanon -iexten -echo -echoe -echok -echonl -noflsh -xcase -tostop
-echoprt -echoctl -echoke
toon:~# 
The toon has a speaker. Also it has some devices as /dev/dsp . I would like to be able to play some sounds on some occasions. I tried to echo random data and even cat a wave file and pipe it to the audio device, but so far nothing.
I think you will need a sound mixer device etc. as well (not sure if the iMX27 has one on board, would need to check), and the OSS/ALSA stack enabled in the kernel.

Excerpt from the kernel config file:

Code: Select all

#
# Console display driver support
#
CONFIG_DUMMY_CONSOLE=y
CONFIG_FRAMEBUFFER_CONSOLE=y
# CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY is not set
# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set
CONFIG_FONTS=y
# CONFIG_FONT_8x8 is not set
# CONFIG_FONT_8x16 is not set
# CONFIG_FONT_6x11 is not set
# CONFIG_FONT_7x14 is not set
# CONFIG_FONT_PEARL_8x8 is not set
# CONFIG_FONT_ACORN_8x8 is not set
# CONFIG_FONT_MINI_4x6 is not set
CONFIG_FONT_SUN8x16=y
# CONFIG_FONT_SUN12x22 is not set
# CONFIG_FONT_10x18 is not set
# CONFIG_LOGO is not set
# CONFIG_SOUND is not set                                  <-- You will need this to be set, to enable sound at all.
# CONFIG_HID_SUPPORT is not set
CONFIG_USB_SUPPORT=y
CONFIG_USB_ARCH_HAS_HCD=y
# CONFIG_USB_ARCH_HAS_OHCI is not set
CONFIG_USB_ARCH_HAS_EHCI=y
CONFIG_USB=y
# CONFIG_USB_DEBUG is not set
CONFIG_USB_ANNOUNCE_NEW_DEVICES=y
So, even if the hardware is all there, unless you build your own kernel, it's a no-go.

BTW, the excerpt also nicely shows that the USB port of toon is useable (at least has kernel support for it). But we already knew that.

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 »

@Cygnusx, I tried enable toon op afstand and it is not making any difference. Do you maybe recall doing anything else?

@Marcelr, the moment I bought it i directly started rooting so I didn't check if it was functioning at all. I also checked the port settings and these are identical to what you posted.
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 »

Hmmm ...
the moment I bought it i directly started rooting so I didn't check if it was functioning at all.
OK, shouldn't be an issue. AFAIK rooting does not affect the power supply, signal levels over the wiring, etc. It's a software thing only.
I also checked the port settings and these are identical to what you posted.

So, the UART on the processor is OK and set properly.

cygnusx's solution is preferable, since it seems the simplest. If it doesn't work for you, there's another option.

What you could do is check the communication between toon and ketelmodule directly. This involves a small hack of the startup script that does the actual startup of toon's services (the stuff that's cranked up in /etc/inittab/ right after the setup of the serial port /dev/ttymxc0). I used it to dump the IO to the boiler module.

I don't know if you are well-versed in bash scripting, but this is what you can do:

in/etc/init.d/HCBv2, locate the function inittabwrap:

Code: Select all

inittabwrap()
{
        cd ${PREFIX}/sbin
        # let hcb_comm restart fast
        if [ "${XTRAARG}" != "hcb_comm" ]
        then
                sleep 1 # prevent mega-rapid-hcb-comm-reconnects :P
        fi
        # replace current exec context with binary
        exec ${PREFIX}/sbin/${XTRAARG} --daemon >/dev/null 2>/dev/null
}
change into:

Code: Select all

inittabwrap()
{
        cd ${PREFIX}/sbin
        # let hcb_comm restart fast
        if [ "${XTRAARG}" != "hcb_comm" ]
        then
                sleep 1 # prevent mega-rapid-hcb-comm-reconnects :P
        fi
        if [ "${XTRAARG}" == "happ_thermstat" ]
        then
                exec ${PREFIX}/sbin/${XTRAARG}           # all output sent to console. 
        else
       # replace current exec context with binary
                exec ${PREFIX}/sbin/${XTRAARG} --daemon >/dev/null 2>/dev/null
        fi
}
NB: Spaces are significant in shell scripts, and there can be typo's in my version. Did this from the top of my head, it's not a copy of the actual script.

Then, kill the happ_thermstat process:

Code: Select all

killall happ_thermstat
The inittab call will respawn a new happ_thermstat, and this will now spit out (lots of) data to the console. Redirect to a file if you think that's better (I think it is :-)).
Typically redirect to something on /tmp, which is in memory, faster, and no load on flash.
Stop the process after some minutes (your toon will run out of disk space or memory real fast).
Copy to another machine before switching off toon (if you sent everything to /tmp), otherwise the info will be lost again.
You should see the bootstrap/initialization of the ketelmodule, and subsequent OT commands to and from the boiler. I think I posted a copy of mine last summer, should be somewhere in this thread (early on, before the rooting post of Ierlandfan, IIRC). Compare, and maybe you can see what's wrong.

Good luck.

marcelr
Ierlandfan
Member
Member
Posts: 151
Joined: Thu Oct 03, 2013 7:53 pm

Re: Toon as a domotica controller?

Post by Ierlandfan »

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?
Post Reply

Return to “Toon Rooting”