Toon as a domotica controller?

Everything about rooting Toons 1 and 2.

Moderators: marcelr, TheHogNL, Toonz

al_n
Member
Member
Posts: 52
Joined: Tue Jun 02, 2015 7:51 pm

Re: Toon as a domotica controller?

Post by al_n »

look at my post from 23/1 on how to enable modules.
cygnusx
Starting Member
Starting Member
Posts: 48
Joined: Tue Apr 14, 2015 10:12 am

Re: Toon as a domotica controller?

Post by cygnusx »

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.
hvxl
Senior Member
Senior Member
Posts: 1966
Joined: Sat Jun 05, 2010 11:59 am
Contact:

Re: Toon as a domotica controller?

Post by hvxl »

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.
toongraphs.png
toongraphs.png (37.86 KiB) Viewed 14312 times
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
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 »

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.
Agreed, will look into it. What version is your toon's FW?

grtz,

marcelr
hvxl
Senior Member
Senior Member
Posts: 1966
Joined: Sat Jun 05, 2010 11:59 am
Contact:

Re: Toon as a domotica controller?

Post by hvxl »

marcelr wrote:What version is your toon's FW?
3.0.29
Schelte
hvxl
Senior Member
Senior Member
Posts: 1966
Joined: Sat Jun 05, 2010 11:59 am
Contact:

Re: Toon as a domotica controller?

Post by hvxl »

So with a bit of messing around, based on a lot of information found in this topic, I managed to:
  • 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.
The necessary data is obtained in JSON format from my domotica system.

Thanks to all who contributed to this topic. I couldn't have done it without your valuable input. Keep up the good job.
Schelte
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 »

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:

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 (     
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
cygnusx
Starting Member
Starting Member
Posts: 48
Joined: Tue Apr 14, 2015 10:12 am

Re: Toon as a domotica controller?

Post by cygnusx »

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

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.
But why don't you copy this from your other Toon?
Is lots of work, open another toon, rip, open the broken toon, reflash, update.

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:
dd if=/dev/mtd0 | ssh user@another_machine> "dd of=<image_name>"
drops the image to your home dir on <another_machine>. Not sure about punctuation, from the top of my head.

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
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 got a bit further. U-Boot works again (no idea why), now it appears the kernel image and splash screen are screwed up:

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>  
Not sure what's wrong with it, could be the flash chip ... :-(, will try booting over network/serial line next.

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 »

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.

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> 
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
Attachments
idea for adapted splash image ;-)
idea for adapted splash image ;-)
image-nl-bootsplash_3.0_hacked.png (44.87 KiB) Viewed 13939 times
SD123
Starting Member
Starting Member
Posts: 6
Joined: Wed Feb 17, 2016 6:53 pm

Re: Toon as a domotica controller?

Post by SD123 »

hvxl wrote:Well, my toon doesn't communicate with the mothership (blocked on my router) and it shows the graphs.
Hi there,

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.
hvxl
Senior Member
Senior Member
Posts: 1966
Joined: Sat Jun 05, 2010 11:59 am
Contact:

Re: Toon as a domotica controller?

Post by hvxl »

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
uAlex73
Member
Member
Posts: 218
Joined: Sun Jan 01, 2012 3:42 pm
Contact:

Re: Toon as a domotica controller?

Post by uAlex73 »

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 :D
DomotiGa / Z-Wave / RFXCom / Visonic PowerMaster / Home Assistant / Zigbee2MQTT / DSMR Reader / Toon1 (rooted)
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 »

The answer is: yes, you can.
Root it, and then see:
http://www.domoticaforum.eu/viewtopic.p ... 195#p78472

grtz,

marcelr
Post Reply

Return to “Toon Rooting”