Python Plugin: Solar Inverter via TCP Shine v2 protocol (Growatt, Gaia)

Python and python framework

Moderator: leecollings

devros
Posts: 183
Joined: Saturday 29 October 2016 20:55
Target OS: -
Domoticz version:
Contact:

Re: Python Plugin: Solar Inverter via TCP Shine v2 protocol (Growatt, Gaia)

Post by devros »

hello, thanks
tried, but have this error (waiting for a connection and after 10 +/- seconds error)
im using script with sudo command

waiting for a connection
error setting server socket to listen mode
^CTraceback (most recent call last):
File "mobdus.py", line 1107, in <module>
time.sleep(2)
devros
Posts: 183
Joined: Saturday 29 October 2016 20:55
Target OS: -
Domoticz version:
Contact:

Re: Python Plugin: Solar Inverter via TCP Shine v2 protocol (Growatt, Gaia)

Post by devros »

hi found this,
it looks that Godwee is using same protocol to comunicate... (every 5 minutes, no open port) and its not modbus... weird

http://www.domoticz.com/forum/viewtopic.php?t=6714
Ferno2000
Posts: 7
Joined: Friday 08 January 2016 16:22
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Python Plugin: Solar Inverter via TCP Shine v2 protocol (Growatt, Gaia)

Post by Ferno2000 »

Hi I am very interested in what you are doing here, I myself used this construct here:

https://www.vromans.org/johan/software/sw_growatt.html

And managed to get it working, now just have to figure out how to get the data it generates into domoticz.
maybe going to the stuff on this site helps you getting on the right track.
zoriander
Posts: 1
Joined: Thursday 31 August 2017 8:16
Target OS: -
Domoticz version:
Contact:

Re: Python Plugin: Solar Inverter via TCP Shine v2 protocol (Growatt, Gaia)

Post by zoriander »

Ferno2000 wrote: Sunday 30 July 2017 0:17 Hi I am very interested in what you are doing here, I myself used this construct here:

https://www.vromans.org/johan/software/sw_growatt.html

And managed to get it working, now just have to figure out how to get the data it generates into domoticz.
maybe going to the stuff on this site helps you getting on the right track.
I am trying to do the same, however I haven't gotten the perl script to work nicely. Did you do any configurations on the growatt?
pwhooftman
Posts: 75
Joined: Monday 11 November 2013 18:04
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Python Plugin: Solar Inverter via TCP Shine v2 protocol (Growatt, Gaia)

Post by pwhooftman »

It has been quite a while since i have been thinkering with this. I'm using a similar approach to vromas for a few years now: the growatt stick is sending the data to my Synology NAS. My Sunology passes the traffic trough to the Growatt servers, but its also captures traffic to data files, which are broken down to energy produced etc, and collected into Domoticz. Domoticz sends it to PvOutput through the PVOutput plugin.

I have been logging the RS232 traffic and found the inverter is sending live data to the Growatt wifi stick continiously (actual power, energy produces that day, energy total, etc). Its the wifi stick that sends data to the Growatt Server every 5 minutes.

I really would like to gather live data (especially live actual power) so i can calculate energy consumption in my house real time, by substracting power return to the grid from the solar power produced, but i never succeeded firing commands to the wifi stick to get live values. I once managed to break down the serial stick and locate power values etc at certain locations in the string, but after rebooting the wifi stick, those locations changed again so i gave up.

I'm really interested if a solution comes up where traffic to Growatt servers remains intact but extracting live traffic is possible also.
Domoticz v 1.16xx
1X RFXtrx433 USB 433.92MHz Transceiver Firmware version: 71
1X Synology Nas DS918+ DSM 7 (12Gb RAM mod)
Ferno2000
Posts: 7
Joined: Friday 08 January 2016 16:22
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Python Plugin: Solar Inverter via TCP Shine v2 protocol (Growatt, Gaia)

Post by Ferno2000 »

zoriander wrote: Thursday 31 August 2017 8:19
Ferno2000 wrote: Sunday 30 July 2017 0:17 Hi I am very interested in what you are doing here, I myself used this construct here:

https://www.vromans.org/johan/software/sw_growatt.html

And managed to get it working, now just have to figure out how to get the data it generates into domoticz.
maybe going to the stuff on this site helps you getting on the right track.
I am trying to do the same, however I haven't gotten the perl script to work nicely. Did you do any configurations on the growatt?
Hi,

Yes, you have to configure the ip address of the host running the perl webserver made by Johan as the growatt server. The perlproxy will relay the info to the actual girowatt shine server after scraping the info to a DAT file.
There is a script included to convert the DAT file to a csv. I managed to create a rudimentary script that greps and awks the value a I need and send it to a influx DB.
I still have to do a lot of work on it but I have a start. The same approach could be used to trigger a virtual switch in domoticz.
User avatar
pgielen
Posts: 90
Joined: Monday 18 February 2019 14:44
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Location: Boxmeer
Contact:

Re: Python Plugin: Solar Inverter via TCP Shine v2 protocol (Growatt, Gaia)

Post by pgielen »

The last post in this thread is from 2017. DId someone ever finish this work? What is the best way, now in 2019, to capture data from the Growatt Wifi stick, use it in Domoticz and forward it (or not) to server.growatt.com? :?
https://robothuis.nl, RPi4B, RFXCOM XL, Aeotec Z-Stick, ESP Easy, Weatherstation, several switches and sensors, Ikea Trädfri, Philips Hue, Foscam, Reolink, Lyric T6, Ring
Tristan
Posts: 8
Joined: Sunday 30 June 2019 23:55
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Python Plugin: Solar Inverter via TCP Shine v2 protocol (Growatt, Gaia)

Post by Tristan »

I still not have implemented a P1 meter (if that is possible) and the correction if the inverter goes down (no sun/manual switch onoff) and reset the today counter to 0...

But I get
Screen Shot 2019-08-25 at 10.54.57.jpg
Screen Shot 2019-08-25 at 10.54.57.jpg (199.47 KiB) Viewed 2798 times
https://github.com/Tristan79/Growatt-WiFi-Tools

note that the newer wifi adapters with the new protocol does not work...
and i do not implemented all the data points (since I got no second string of panels)

It's a total hack but it works for me...

https://www.domoticz.com/forum/viewtopic.php?t=28586
User avatar
sincze
Posts: 1300
Joined: Monday 02 June 2014 22:46
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.4
Location: Netherlands / Breda Area
Contact:

Re: Python Plugin: Solar Inverter via TCP Shine v2 protocol (Growatt, Gaia)

Post by sincze »

@Tristan, what is the idea behind the P1 meter, the goal you want to achieve?

I guess...by reading through the posts you want to create a realtime meter.
I have been logging the RS232 traffic and found the inverter is sending live data to the Growatt wifi stick continiously (actual power, energy produces that day, energy total, etc). Its the wifi stick that sends data to the Growatt Server every 5 minutes.

I really would like to gather live data (especially live actual power) so i can calculate energy consumption in my house real time, by substracting power return to the grid from the solar power produced, but i never succeeded firing commands to the wifi stick to get live values. I once managed to break down the serial stick and locate power values etc at certain locations in the string, but after rebooting the wifi stick, those locations changed again so i gave up.
Pass2php
LAN: RFLink, P1, OTGW, MySensors
USB: RFXCom, ZWave, Sonoff 3
MQTT: ZIgbee2MQTT,
ZWAVE: Zwave-JS-UI
WIFI: Mi-light, Tasmota, Xiaomi Shelly
Solar: Omnik, PVOutput
Video: Kodi, Harmony HUB, Chromecast
Sensors: You name it I got 1.
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests