diy solar

diy solar

Getting Data DIRECTLY from a Tigo TAP - is it possible ?

Which firmware version do you have ?
On that german forum they mention 3.7.7 broke something and workaround is being prepared.
 
Some tips that helped me get through this:

Reboot the Tigo first (You can do this from the physical interface on the unit). For some systems like mine, the web interface becomes inaccessible after 2 hours.

Run this command from your computer (I assume all current systems these days have curl installed) to get the firmware version:
Code:
curl --silent --basic --user USERNAME:PASSWORD --header 'Accept-Encoding: gzip, deflate' --header 'X-Requested-With: com.tigoenergy.smart' --header 'Origin: file://' --header 'Connection: keep-alive' --header 'Accept: application/json, text/plain, */*' http://YOUR_TIGO_IP/cgi-bin/mobile_api -d 'cmd=DEVICE_INFO&dev=2&ver=1'

In my case, I'm running 2.8.5-nd-bin which uses the older web "user:tigo1" USERNAME: PASSWORD for the web interface instead of Tigo:$olar


Add this to your computer's ~/.ssh/config file:
Code:
Host YOUR_TIGO_IP
    KexAlgorithms +diffie-hellman-group1-sha1,diffie-hellman-group14-sha1
    Ciphers +aes128-cbc,aes256-cbc
    HostKeyAlgorithms +ssh-rsa,ssh-dss
    User root

Current versions of client side ssh disabled some of the older kex and ciphers, and this will tell the client to use ones that the Tigo is still using. YMMV here -- the firmware version I'm running is dated 2013, so it's possible that you'll need to use something else. The error you get should tell you as much.

It looks like different versions of the firmware contains different binaries and cgi-bin executable scripts. For instance, there is no iptables binary with this version of the firmware. 'http://YOUR_TIGO_IP/cgi-bin/gwfwupui' also doesn't exist.
 
More details that might help others:

If you want to use your rsa public key to ssh authenticate into Tigo instead of using a password, add this to your client's ~/.ssh/config Host block:
Code:
    PubkeyAcceptedAlgorithms +ssh-rsa

(This assumes you know how to create the ~/.ssh/authorized_keys file on the Tigo unit and chmod it appropriately.)

If you want ssh to start automatically, comment out
START_SSH=n
in
/mnt/ffs/etc/system.conf
(/etc/rc.defaults should have that set to "y" already, and normally system.conf overrides those settings as part of the inittab flow.)

If you want to disable the code that disables the httpd server after two hours, move this file into the preexisting disabled folder. Apparently they do this for security reasons, so consider changing both the root and web user passwords if you feel similarly. Given the age of the firmware, there may be open vulnerabilities to consider for both dropbear and httpd too.

Code:
mv /mnt/ffs/etc/rc.d/S800_StopAccessPoint /mnt/ffs/etc/rc.d/disabled/
 
Ok first of thanks to everyone that's contributed with code on both this and Photovoltaikform.

I've had my CCA now running without cloud connection for nearly a month now (firmware 3.6.7), I have 14 panels nicely displayed in the summary page with the calendar fully working, also I've written an index.html page showing current panel power outputs in watts and each panel changing colour with % output. All the basic coding is available on the German forum.

However what I quickly noticed was the system was getting bogged down with high cpu activity due to compression - Bzip2 in the main
Although this didn't seam to effect my html page operation and summary it was slowing refreshing and opening of status to the point it was almost unusable, also CPU was running quite hot.

I think I've now sorted this and everything is running snappy with CPU usage in the 8-20% region.

First of i'm old school from the times of basic- machine code and pascal and although I can program in C Linux is new to me so please bare with me.

I've fitted a 32Gb USB flash drive, formatted, mounted and moved daqs, daqs_avg and netrouting to this drive.
This has now freed up the internal nand and seams to have stopped compression from running all the time. Also this massive storage should holds years of data.

First insert you USB flash and find it - /dev/sda1
Format-
Bash:
mkfs.vfat /dev/sda1
make a new directory, my one -

Bash:
/mnt/ffs/bin # mkdir USB1

mount drive-

Code:
mount /dev/sda1 /mnt/ffs/bin/USB1

copy over as required -
Bash:
cp-r /mnt/ffs/data/daqs /mnt/ffs/bin/Usb1

Check your data has copied over ok
Then delete the old copy in /data
Next add a symlink to /data

Bash:
ln -s /mnt/ffs/bin/Usb1/daqs /mnt/ffs/data

You will find this should all run well and top will show a reduction of cpu load etc.

Finally you will need to add mount to the crontab otherwise once you reboot the USB drive will not be mounted.
I have done this with a one line script and a crontab pointed to it

/mnt/ffs/etc/Usb1_mount

Bash:
#!/bin/sh

# mount sda1 (usb drive to Usb1)

mount /dev/sda1 /mnt/ffs/bin/Usb1

crontab-

@reboot sleep 15 && /mnt/ffs/etc/Usb1_mount


There are other changes you will need to run your CCA offline like giving access to a local NTP server for time sync, don't forget you will be be voiding your warrantee. I have logged all my changes so that I can always reverse and changes I've made although going back and allowing Tigo access always comes with the risk of new firmware updates etc.
 
Last edited:

diy solar

diy solar
Back
Top