Toon as a domotica controller?

Everything about rooting Toons 1 and 2.

Moderators: marcelr, TheHogNL, Toonz

Timeless
Member
Member
Posts: 54
Joined: Fri Jan 06, 2017 12:51 pm

Re: Toon as a domotica controller?

Post by Timeless »

Sorry the EDIT was before reading your posts.
I changed the <wizardDone> to 1 and Toon displays its dashboard now. So I do not need to fool the meter sensors anymore. Thanks!

Now can the "customize all the dashboard" begin :) whoho!
Another thing. Since I 'm not using the meter-adapter. Is there any way of suppressing the warning? I don't want it to be connected and send unnecessary radiation. When I had to adapter connected(which was done in the setup-wizard) there was no warning in the top notification bar when the dashboard was displayed. Even while it was not plugged in the power socket at the time. But once I removed it though software a red triangle popped up and does not go away.

As a side node:
I blocked Toon in my routers firewall and executed all the Disable Eneco stuff. But still I see that Toon tries to contact the internet(hits on the firewall rules). I don't know if this is normal behavior of the OS but maybe I can just firewall it inside Toon so my router will not get useless packets to block.
"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 »

And that's your tenth post, in less than 24 hours! You're free to move now.
If you want to play around with your toon (and I think you do, because otherwise you wouldn't be here, would you?), I'd keep the internet connection intact. So much easier to work on your toon through multiple shells/browsers/what-have-you. Just lock out the SC.
Not sure how to block the warnings from the meter adapter, but my guess is that the mechanism is very similar to the SC warning blocking.
Timeless
Member
Member
Posts: 54
Joined: Fri Jan 06, 2017 12:51 pm

Re: Toon as a domotica controller?

Post by Timeless »

marcelr wrote:And that's your tenth post, in less than 24 hours! You're free to move now.
Haha yeah... I'm a active poster. Also nice and fast replies on your side! That helped me allot to get the 10 posts in 24 hours :)
marcelr wrote: If you want to play around with your toon (and I think you do, because otherwise you wouldn't be here, would you?), I'd keep the internet connection intact. So much easier to work on your toon through multiple shells/browsers/what-have-you. Just lock out the SC.
Yeah true. But by internet access I mean the World Wide Web. Not just my local LAN connection. ofc I keep the SSH port and such open. But just for my private LAN range. I also noticed ports 10080 and 80 present in the iptables. I know that port 80 is for a webserver (at least it should) but does Toon feature a webserver or something? I could not imagine why that port should be unblocked if there is no use for it. And I have no idea of port 10080 (mobile app or something).
marcelr wrote: Not sure how to block the warnings from the meter adapter, but my guess is that the mechanism is very similar to the SC warning blocking.
Ok I"ll have a look see what I can find.

I also on planning to "dd" the flash partitions to a file so I always have a backup in case the rootfs flash goes corrupt. So I would have the option to use u-boot to flash the correct image back. Or is there a easier way?

Regards,
Timeless
"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 »

toon handles some of its internal communication through a webserver, lighttpd, through service port 10080.
see /HCBv2/etc/lighttpd/lighttpd.conf for details.

I didn't delve deeply into nand dumps. Restoring an UBI rootfs through dd is rather pointless. The UBI filesystem is tailored to the hardware it resides on (including bad blocks etc). So, it's more often than not impossible to dump one ubifs from one flash chip and write the image onto another flash chip, even if they are of the very same type (unless neither have any bad blocks, which is unlikely).
Some time ago I rebuilt and reflashed a complete rootfs with the help of another forum member, this works as long as u-boot still functions. When the whole flash chip is corrupted, also u-boot needs replacement, and that's quite a different kettle of fish. I'm working on u-boot replacement/restoration. but it's a lot tougher than rootfs replacement.
Timeless
Member
Member
Posts: 54
Joined: Fri Jan 06, 2017 12:51 pm

Re: Toon as a domotica controller?

Post by Timeless »

But this is all local traffic. So this does not pass iptables at all. Also the lines are commented out by default? If Toon could not function without these ports then a factory default installation would not work either.

I have these mtd partitions (There are more in /dev, but they seem empty):

Code: Select all

cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00080000 00020000 "u-boot-env"
mtd1: 00180000 00020000 "splash-image"
mtd2: 00300000 00020000 "kernel"
mtd3: 00300000 00020000 "kernel-backup"
mtd4: 07700000 00020000 "rootfs"
I dumped them all just in case. Some bootloaders actually support writing to a mtd parition. see: link so maybe they could be of some use.

A completely corrupted flash chip is also a sign of a bad chip. because u-boot is most likely protected from within the OS. But the OS itself could corrupt its on rootfs when it is not protected against unplanned shutdown/power-offs. I think the possibility of a corrupted u-boot is highly unlikely, but a rootfs could be corrupted just like you proofed.

But what method is advised to backup my rootfs (or complete toon)?
"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 »

Also the lines are commented out by default?
Yes, Quby like to keep their product quite tightly shut :-).

A completely corrupted flash chip is also a sign of a bad chip. because u-boot is most likely protected from within the OS.
Coorect. the bootloader is unreachable from within a running toon.
But what method is advised to backup my rootfs (or complete toon)?
I just downloaded most of the rootfs to a directory on my day-to-day machine via scp, using a script that I published some time ago on this forum.

With the ubifs tools (or something along these lines, don't remember exactly), this whole rootfs can be transformed into an ubifs image and subsequently flashed to NAND. Done that some time ago (with somebody else's rootfs, now I keep my copies of toon in a safe place, won't make that mistake again), that toon is now driving my heating system with an uptime of 285 days today, without glitches.

Anyway, I can share the tools for building a ubifs image if you want them (if I can still remember what I used :-), moved to a new machine in the meantime, so don't start pushing me now ;-)).
Timeless
Member
Member
Posts: 54
Joined: Fri Jan 06, 2017 12:51 pm

Re: Toon as a domotica controller?

Post by Timeless »

marcelr wrote: Anyway, I can share the tools for building a ubifs image if you want them (if I can still remember what I used :-), moved to a new machine in the meantime, so don't start pushing me now ;-)).
Yeah that would be neat. I'm planning on experimenting with the build-in widgets and create new widgets. So I like to have a complete back-up before I start just in case.

And I will try to back-up all the files with scp. Need to find the script first :).
But:

Code: Select all

scp -r root@ip:/ /location/blackup/

should also do the trick right?

Regards,
Timeless
"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 »

Yes, but you will run into trouble in /dev /proc, /var and /sys
Timeless
Member
Member
Posts: 54
Joined: Fri Jan 06, 2017 12:51 pm

Re: Toon as a domotica controller?

Post by Timeless »

marcelr wrote:Yes, but you will run into trouble in /dev /proc, /var and /sys
Yeah I noticed, I ignored those folders.
"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,

I'm trying to get the Thermostatic information from Toon. But for whatever reason I get error 403 "Forbidden" when "http://toon_ip:10080/happ_thermstat?action=getThermostatInfo" is called from within firefox.

I can get other JSON data like: "http://toon_ip:10080/hdrv_zwave?action=getDevices.json" for example.
I completely disabled Toons firewall just to be sure.

Did I miss something or is the link incorrect?


Ah never mind, this solved my issue: link

EDIT:
I also noticed these messages in the log [/HCBv2/log/01_GENERAL.log.json]:

Code: Select all

Problem posting report to %s; error(%s) discarding",["http://feed.hae.int:31080/benchmark/friendRequest","Couldn\'t resolve host \'feed.hae.int\'"]],
Seems that Toon is still calling to external hosts.

And even while OpenVPN is disabled (commented out) in /etc/inittab I still see these messages in [99_DEBUG.log.json]:

Code: Select all

["2017-01-08 15:32:48 +0100",99,1,0,"Triggering HardRestarts for all OpenVPN instances (%s)",["iterations % 20: ST_INTERNET tunnel conn timeout"]],
Yesterday I even got the message "your subscription has ended and you will no longer receive [advanced features]" in my Toon's message inbox. I don't know if this is something locally generated or not. I cannot ping 8.8.8.8 from within Toon for example, I completely blocked Toon in my Routers Firewall. So there should not be any connection to the internet possible from Toon itself. So I have no idea where the message came from.

Regards,
Timeless
"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 »

Ah never mind, this solved my issue: link
and here :-) :

https://domoticaforum.eu/viewtopic.php? ... 235#p79844

A really nerdy moderator would just say: RTFM
No offence.

About your log data: Yes, some parts of the toon firmware persist in trying to phone home.
(Which fails miserably, when your VPN client is shut down).

Messages are all generated locally. You probably fiddled around in the scsync config file. Gives this warning about your subscription ending. No big deal (unless you have a subscription).
Timeless
Member
Member
Posts: 54
Joined: Fri Jan 06, 2017 12:51 pm

Re: Toon as a domotica controller?

Post by Timeless »

marcelr wrote: A really nerdy moderator would just say: RTFM
No offence.
True.. true, still have to find my way around on this forum.
marcelr wrote: About your log data: Yes, some parts of the toon firmware persist in trying to phone home.
(Which fails miserably, when your VPN client is shut down).

Messages are all generated locally. You probably fiddled around in the scsync config file. Gives this warning about your subscription ending. No big deal (unless you have a subscription).
Ok thanks for the clarification.
"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 »

Timeless wrote: Yesterday I even got the message "your subscription has ended and you will no longer receive [advanced features]" in my Toon's message inbox.
It seems that I receive these messages every day at 01:00 Local time which is 00:00 UTC. Because I received a second one today. Does anyone share this problem?
Maybe it is because I never really finished the setup process and faked it with the <wizardDone> parameter.
I also noticed an <activated> parameter. Which is currently set to 0. Maybe setting it to 1 will fix this issue. But I don't know. Anyone has a idea?
"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 »

Mine has activated set to 1. It never moans about contract changes.

You can play around with these parameters, as long as you keep a backup of one that works. It won't drive the thermostat off a cliff or cause other serious events.
Timeless
Member
Member
Posts: 54
Joined: Fri Jan 06, 2017 12:51 pm

Re: Toon as a domotica controller?

Post by Timeless »

I set the activated parameter to 1. I'll check after 1am if it fixed the issue.

Could you maybe paste the contents of your file? I'm curious about the <ElectricityDisplay> and <GasDisplay>. I've both set to 0. But I do have the Current Electricity widget. But the Electricity History and Gas Current/History are not selectable. When I set both the parameters to 1. Both the Current Energy/Gas are selectable but the history is nowhere to be found.

I'm also curious what the <visibility> and <BoilerManagement activated=> parameters do.
"The greatest good you can do for another, is not to share your own riches, but to reveal to him, his own."
- Benjamin Disraeli -
Post Reply

Return to “Toon Rooting”