Toon as a domotica controller?
Moderators: marcelr, TheHogNL, Toonz
Re: Toon as a domotica controller?
look at my post from 23/1 on how to enable modules.
Re: Toon as a domotica controller?
That's true, there is no reference of 'electricity'. That's because it gets loaded via a XML input normally.
I think this does not come from a xml config file, but from one of the C programs that are running on Toon. These communicate with the mothership and the toon (something with BTX). Toon requests it's features to this service and then adds this to a array.
We can't change the C program, so we adjust the part where it gets loaded in and add it ourself. That's why i suggested adding the line on Globals.qml before line 57.
I think this does not come from a xml config file, but from one of the C programs that are running on Toon. These communicate with the mothership and the toon (something with BTX). Toon requests it's features to this service and then adds this to a array.
We can't change the C program, so we adjust the part where it gets loaded in and add it ourself. That's why i suggested adding the line on Globals.qml before line 57.
Re: Toon as a domotica controller?
Well, my toon doesn't communicate with the mothership (blocked on my router) and it shows the graphs. It seems much more likely to me that this is due to a setting in an xml config file somewhere than the alternative; a different C program.
Also, the happ_pwrusage binary contains the string "Received productOptions from scsync: standalone=%i po_electricity=%i po_gas=%i po_districtHeat=%i po_op_elec=%i po_op_gas=%i". So config_happ_scsync.xml sounds like quite a reasonable candidate.
Also, the happ_pwrusage binary contains the string "Received productOptions from scsync: standalone=%i po_electricity=%i po_gas=%i po_districtHeat=%i po_op_elec=%i po_op_gas=%i". So config_happ_scsync.xml sounds like quite a reasonable candidate.
Schelte
Re: Toon as a domotica controller?
Agreed, will look into it. What version is your toon's FW?It seems much more likely to me that this is due to a setting in an xml config file somewhere than the alternative; a different C program.
grtz,
marcelr
Re: Toon as a domotica controller?
So with a bit of messing around, based on a lot of information found in this topic, I managed to:
Thanks to all who contributed to this topic. I couldn't have done it without your valuable input. Keep up the good job.
- add a second bar graph to the current power tile, that shows the amount of Watts I'm returning to the electricity company
- display some basic weather information
- add the day of the week and seconds to the clock tile when it's not dimmed.
Thanks to all who contributed to this topic. I couldn't have done it without your valuable input. Keep up the good job.
Schelte
Re: Toon as a domotica controller?
My production toon passed away last night. For now, I have a 2.9.15 attached, so we're not left out in the cold.
I just opened it up to check, this is how far I get:
and there it stops ...
Dead as brown bread, if you ask me. Will try ro reflash it over JTAG, if any of you could send me a bunch of image files for mtd0 .. mtd4, fw 3.0.32 or higher?
See if I can get this machine resuscitated ...
grtz,
marcelr
I just opened it up to check, this is how far I get:
Code: Select all
Welcome to minicom 2.3
OPTIONS: I18n
Compiled on Aug 19 2010, 05:50:19.
Port /dev/ttyUSB0
Press CTRL-A Z for help on special keys
U-Boot 2010.09-R6 (
Dead as brown bread, if you ask me. Will try ro reflash it over JTAG, if any of you could send me a bunch of image files for mtd0 .. mtd4, fw 3.0.32 or higher?
See if I can get this machine resuscitated ...
grtz,
marcelr
Re: Toon as a domotica controller?
That's weird man. What did you do? Looks like the bootimage is screwed. I could send this if you need it, What kind of commands do you need.
But why don't you copy this from your other Toon? If you are still on 2.9 version, you can update the software afterwards right?
But why don't you copy this from your other Toon? If you are still on 2.9 version, you can update the software afterwards right?
Re: Toon as a domotica controller?
Hmm, I think the bootloader itself is screwed up. Don't know what happened. It's stored in the first MB on flash, not connected to an mtd device, so can't be recovered by dd.
Just reflashing the broken unit is much easier. Will attach the JTAG interface tonight (jtag config scripts were on another computer that died too, recovered them yesterday).
BTW the flashing of another toon's image will only succeed if both machines (donor and receptor) have no bad sectors in flash. Otherwise it's doomed to fail.
As a separate option, I'm trying to rebuild the bootloader from source now. Without much success, so far. The published u-boot code is incomplete (has no config information).
Ripping the mtd partitions is easy:
on toon:
Another option is to modprobe the codepage module I uploaded recently, mount a USB stick somewhere and drop the images on that stick.
grtz,
marcelr
Is lots of work, open another toon, rip, open the broken toon, reflash, update.But why don't you copy this from your other Toon?
Just reflashing the broken unit is much easier. Will attach the JTAG interface tonight (jtag config scripts were on another computer that died too, recovered them yesterday).
BTW the flashing of another toon's image will only succeed if both machines (donor and receptor) have no bad sectors in flash. Otherwise it's doomed to fail.
As a separate option, I'm trying to rebuild the bootloader from source now. Without much success, so far. The published u-boot code is incomplete (has no config information).
Ripping the mtd partitions is easy:
on toon:
drops the image to your home dir on <another_machine>. Not sure about punctuation, from the top of my head.dd if=/dev/mtd0 | ssh user@another_machine> "dd of=<image_name>"
Another option is to modprobe the codepage module I uploaded recently, mount a USB stick somewhere and drop the images on that stick.
grtz,
marcelr
Re: Toon as a domotica controller?
I got a bit further. U-Boot works again (no idea why), now it appears the kernel image and splash screen are screwed up:
Not sure what's wrong with it, could be the flash chip ...
, will try booting over network/serial line next.
grtz,
marcelr
Code: Select all
U-Boot 2010.09-R6 (Mar 14 2012 - 11:15:10)
CPU: Freescale i.MX27 at 400.168 MHz
Prodrive B.V. ED2.0
DRAM: 128 MiB
NAND: 128 MiB
LCD: Initializing LCD frambuffer at a1400000
LCD: 800x480, pbb 4
LCD: Drawing the logo...
In: serial
Out: serial
Err: serial
Error: no valid bmp image at a1d214a8 (signature 0xbe 0xda)
Net: FEC
Warning: FEC MAC addresses don't match:
Address in SROM is 1f:56:1d:17:ee:22
Address in environment is 00:0f:11:01:9b:49
Enter password - autoboot in 2 sec...
NAND read: device 0 offset 0x300000, size 0x300000
3145728 bytes read: OK
Wrong Image Format for bootm command
ERROR: can't get kernel image!
U-Boot>

grtz,
marcelr
Re: Toon as a domotica controller?
Again, one more step:
Flash seems to be OK.
Had a look at the mtd partitions. Apart from the bootloader partitions (u-boot and u-boot-env) everything is screwed up.
Will need to set up the whole thing again, partitions splash-image, kernel, kernel-backup and rootfs. Can boot the machine through RARP/tftp or DHCP/tftp, dump the images in the rootfs that will be mounted over NFS, and then reflash with u-boot. My JTAG hardware gives me read errors all the time (what can you expect with cheap-ass china copies of proper hardware) so that's not going to cut it. Will need to rebuild the kernel for that. Last time I booted a linux box over RARP/tftp was 15 years ago. But it's like cycling, once you know how to do it, you'll never forget. This is going to be a trip down memory lane ...
So, if there's still someone willing to donate mtd-images for splash screen, kernel, kernel backup and rootfs, I'm ready to accept them (3.0.32 or later, please
). Drop me a PM if you're ready to send them.
Might also patch the splash image a little, see attach
grtz,
marcelr
Flash seems to be OK.
Had a look at the mtd partitions. Apart from the bootloader partitions (u-boot and u-boot-env) everything is screwed up.
Code: Select all
U-Boot> mtdparts
device nand0 <mxc_nand>, # parts = 6
#: name size offset mask_flags
0: u-boot 0x00100000 0x00000000 1
1: u-boot-env 0x00080000 0x00100000 1
2: splash-image 0x00180000 0x00180000 0
3: kernel 0x00300000 0x00300000 0
4: kernel-backup 0x00300000 0x00600000 0
5: rootfs 0x07700000 0x00900000 0
active partition: nand0,0 - (u-boot) 0x00100000 @ 0x00000000
defaults:
mtdids : none
mtdparts: none
U-Boot>
So, if there's still someone willing to donate mtd-images for splash screen, kernel, kernel backup and rootfs, I'm ready to accept them (3.0.32 or later, please

Might also patch the splash image a little, see attach

grtz,
marcelr
- Attachments
-
- idea for adapted splash image ;-)
- image-nl-bootsplash_3.0_hacked.png (44.87 KiB) Viewed 15169 times
Re: Toon as a domotica controller?
Hi there,hvxl wrote:Well, my toon doesn't communicate with the mothership (blocked on my router) and it shows the graphs.
Wich urls or ip adresses did you block? I want to try this also. My toon runs version 3.2.18.
I will report if it also works with this version.
Re: Toon as a domotica controller?
I blocked all external traffic. I tried opening up buienrader.nl to get the weather information, but unfortunately it doesn't work that way. So there's nothing the Toon needs from the internet (it pings a local server as a connectivity check and also gets its time from there).
Schelte
Re: Toon as a domotica controller?
Does anybody know if it is possible to start using the Toon (and then root it ofcourse) without activiting it first with Eneco? My unit isn't activated yet 

DomotiGa / Z-Wave / RFXCom / Visonic PowerMaster / Home Assistant / Zigbee2MQTT / DSMR Reader / Toon1 (rooted)
Re: Toon as a domotica controller?
The answer is: yes, you can.
Root it, and then see:
http://www.domoticaforum.eu/viewtopic.p ... 195#p78472
grtz,
marcelr
Root it, and then see:
http://www.domoticaforum.eu/viewtopic.p ... 195#p78472
grtz,
marcelr