Jump to content

Retrieve Goodwe data using RPI/ Openhab


Niel

Recommended Posts

Be warned, I am very new to this and may need a lot of hand holding...

I'm busy building a home automation system using Openhab on a Raspberry Pi.  One of the rules I want to incorporate is switching the pool pump on or off depending on the SOC and total load readings from the Goodwe.  I can get these from the app when I'm on the home wifi so it should be possible for OH to ask for the information but I can't seem to find any information on how to do this.

I found some guidance on pulling this from the SEMS portal but I'm concerned about delays.  I want the pool pump to switch off as soon as total draw reaches 4kW or higher.

Has anyone tried something like this or know how to go about it?  Maybe someone has hacked the app? 

Thanks

Link to comment
Share on other sites

  • 4 weeks later...

Hi, I'm keen for exactly the same! I also have an EV which I would like to charge when there is surplus PV. I've come across some posts where it was done - so it must be possible. We need to hack the protocol of the inverter publishing its data to the server portal. Apparently it pushes data every minute, which should be fine for most applications.

Anybody out there with some pointers?

Link to comment
Share on other sites

18 hours ago, PJJ said:

If you had a Victron system this wouldn't even take you a afternoon to implement.

Sorry I'll see myself out :P

Jaja! I know! I have a smaller Victron MPPT and inverter I use when camping - so know all about that - hence my Goodwe frustration - but the Goodwe is quite a useful combo - and accepted my City of Cape Town. One day we'll figure it out. Will be very easy to do once we hacked the network protocol ;) It send raw data over the internet to the central server once a minute - which is good enough for me.

Link to comment
Share on other sites

That statement of "It send raw data over the internet to the central server once a minute - which is good enough for me." has me interested, and I should try this myself. If you can install Wireshark AND find an effective way to tap the line (data interception) than you will see the raw packets going out on your link. You might have to ask a IT networking type to help you with the data capture and then the snipping of the parts that includes the metrics that goes to SEMS portal. 

The logical layout will look like this : Inverter Wireless -> Wireless Router ->HUB

Hub splits the traffic to Internet Router and to PC running Wireshark.

Just a warming. You will see all of the traffic that is "clear text " on Wireshark (No do not tell me about your privacy concerns, I deal with that from 8 - 4 every weekday!)

If you do this on Linux you might find a way to do local logging of that data, or buy a new Wifi chip and load your own redirect addressing into in, rather than to Sems Portal. I have my old chip at hand from Replus if there is someone that wants to do that data set compare of the config data within the EPROM.

IMG_20200116_091929_5.jpg

Link to comment
Share on other sites

4 minutes ago, P1000 said:

I'd be very surprised if the data is actually raw and unencrypted.

Sadly Modbus and most IOT protocols were defined for industrial application within closed communities, and therefore did not consider the overhead of encryption. Now you also know that the FieldBus and Modbus traffic that Eksdom sends around from many many places in AssZainia is clear text. Commands send to SCADA systems remains in the clear as well. The City of Adelaide in AsStralia as had a small matter of a knowledgeable employee, opening the valves if the affluent treatment plant to the river. The untreated matter cased a bit of a stink... Some day we will see such abuse noted next to the Wet Coal stories by Eksdom.

<< Vitek Boden used computer equipment, two way radios, and his laptop to hack into the Maroochy Shire Council waste management system, and released millions of litres of raw sewage into the local environment after his job application was rejected by the council.>>

Link to comment
Share on other sites

2 hours ago, P1000 said:

This might be a start:

https://github.com/jantenhove/GoodWeLogger

It connects to the inverter over RS485 (Modbus RTU IIRC). It might also not be applicable to your inverter model, but maybe it is a start?

I looked at that - apparently does not work on the latest 4.5kW inverters - and, as stated in the article "Pay attention, RS485 will only work if you disconnect the WiFi module and restart the inverter. They cannot work simultaneously." This means that your SEMS portal info will disappear. I'd prefer to keep SEMS going - but I'm also keen to have finer grained unfiltered real time data for load control. On we march :)

Link to comment
Share on other sites

2 hours ago, Octerain said:

That statement of "It send raw data over the internet to the central server once a minute - which is good enough for me." has me interested, and I should try this myself. If you can install Wireshark AND find an effective way to tap the line (data interception) than you will see the raw packets going out on your link. You might have to ask a IT networking type to help you with the data capture and then the snipping of the parts that includes the metrics that goes to SEMS portal. 

The logical layout will look like this : Inverter Wireless -> Wireless Router ->HUB

Hub splits the traffic to Internet Router and to PC running Wireshark.

Just a warming. You will see all of the traffic that is "clear text " on Wireshark (No do not tell me about your privacy concerns, I deal with that from 8 - 4 every weekday!)

If you do this on Linux you might find a way to do local logging of that data, or buy a new Wifi chip and load your own redirect addressing into in, rather than to Sems Portal. I have my old chip at hand from Replus if there is someone that wants to do that data set compare of the config data within the EPROM.

IMG_20200116_091929_5.jpg

I also looked at this route. I'm no network expert (know enough to be dangerous) and haven't spent much time on this yet. I scanned the connections on the local network, but missed finding the inverter as a connected device (unless I'm missing some point). Perhaps I must look at the router's connections? I wanted to do this to scan the traffic from the inverter node. With up to 10 people busy with their PCs, phones etc. on the LAN makes a generic traffic scan quite hectic :). I like your idea of creating a kind of gateway (additional APN) to route the inverter data to SEMS - in that way it would be a breeze to sniff. I have a few ESP8266 modules waiting for something to do. A quick search revealed this https://runtimeprojects.com/2017/03/extend-wifi-with-an-esp8266/. Looks like this might be a starting point. It allows packet filtering, has MQTT etc. Any hackers keen to give it a bash? Unless it is a lot easier than this!

Link to comment
Share on other sites

2 hours ago, P1000 said:

I'd be very surprised if the data is actually raw and unencrypted.

My statement of "raw real time once a minute" are based on assumptions made from what I've read on some other posts. By raw I mean actual data (not filtered or smoothed - which introduces a time delay) which I can use to turn on and off discretionary loads automatically - such as pool pump, dishwasher, tumble drier, EV charging.

The data might be encrypted, but I'm guessing it is not. Just yesterday I saw a friend's data (via the internet) of his Victron installation. My jaw dropped and I was green with envy in terms of what he has access to. Come to the party Goodwe!

Link to comment
Share on other sites

32 minutes ago, ckies said:

I looked at that - apparently does not work on the latest 4.5kW inverters - and, as stated in the article "Pay attention, RS485 will only work if you disconnect the WiFi module and restart the inverter. They cannot work simultaneously." This means that your SEMS portal info will disappear. I'd prefer to keep SEMS going - but I'm also keen to have finer grained unfiltered real time data for load control. On we march :)

Hmmm. Perhaps you'll have the best luck listening in on the communications between the Wifi module and the inverter.

Link to comment
Share on other sites

""I also looked at this route. I'm no network expert (know enough to be dangerous) and haven't spent much time on this yet. I scanned the connections on the local network, but missed finding the inverter as a connected device (unless I'm missing some point)""

OK so remember that you Wireless Router is a switched device , with the wireless on one port and the other 4 posts all switched. Therefore if you sniffed traffic on one of the wired ports you will see only the broadcast traffic and not all traffic between the ports. Also why I unpack the old 10Mbps hub to do packet captures on, as that acts as a singe braodcast domain, will all traffic available on all ports for all device connected on it. This holds true unless you are doing wireless traffic sniffing on a wireless port of say a laptop, as wireless on its own is again like a hub, a single broadcast domain (yes yes, and hardly any security).

Oh how you long for the days when ckies was a network ninja!

Link to comment
Share on other sites

Ok, I'm kinda following what you guys are trying to do and will love it if it works.  But I'm still wondering whether it's possible to hack the PV Master app.  It updates a lot more often than once a minute and somehow gets all the data from the inverter that I'm looking for so the solution must be in there somewhere.

 

Link to comment
Share on other sites

9 hours ago, ckies said:

Thanks for the hint Mike - who did you engage with to sign the NDA?

Goodwe in China, as i was working directly with them wrt to what you guys are trying and i was the initial importer into SA of Goodwe about 7 years back the blue then yellow now cream....

Link to comment
Share on other sites

  • 3 weeks later...
  • 1 year later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...