jantenhove / GoodWeLogger

ESP8266 based logger for GoodWe inverters. Can upload to pvoutput and publishes MQTT topics
GNU General Public License v3.0
96 stars 24 forks source link

GW8K-DT inverter #35

Open dirksenrdh opened 3 years ago

dirksenrdh commented 3 years ago

This is a very interesting project, thankt for all the information. I own since last week a Goodwe GW8K-DT but the connections are completely different from what I see in this project. and non of the manuals I found is completly concurrent with my hardware. On the front I have the 2 line LCD display with only ONE button. On the bottom I have this. 2021-01-23 17 14 51 In the USB port is a usb-wifi dongle which opens the route to the SEMS portal and my information is loaded there. the other two COM connectors shoud ben RS485 but why is one of them bridged whith a jumper?

I'd rather not dig into the ESP route but I'd rather use a RS485 to Ethernet converter and run the programs on my Pi 4B. does anyone has experiance with this route?

davevleugel commented 3 years ago

This project is based to read out the serial communication. Ill also read your intressed to use an Rpi. Maby this project (side project of this one, is maby interresting?: https://github.com/sircuri/GoodWeUSBLogger

ThinkPadNL commented 3 years ago

Do NOT plugin a cable to the USB port without first verifying its pinout! The pinout/polarity may be different, which could damage devices. Actually it is not even USB protocol, but they thought a USB-connector would be handy, see #28

dirksenrdh commented 3 years ago

I'm a little further on this. the lower connector is a remote enable/disable inverter. if you remove the bridge the inverter switches off. the upper connector should be RS485 with a modbus protocol. if anyone knows the type and make of the connector I am very interested. furthermore if the upper connector is a RS485 it is interesting to know which is the A and which is the B line.

ThinkPadNL commented 3 years ago

I don't think having the polarity wrong will damage anything. If i read here the signal will just be inverted. So i think that if it won't work, you can just swap around the wires.

For testing i would just put in the bare copper wire ends. Finding the right connector will be difficult i think, haven't seen this type earlier.

dirksenrdh commented 3 years ago

Got a message from Goodwe BNL, they are setting up a webshop where users can order parts like the connectors. should be operational beginning of march. (no information march what year ;-) )

mletenay commented 2 years ago

@dirksenrdh I don't know if you have succeeded with your inverter, but maybe this reference will help. I happen to be author of this HomeAssistant plugin, out of which was this python library extracted. So if you search for non-rs485 solution, the DT can be easily communicated with via WIFI and UDP protocol.

dirksenrdh commented 2 years ago

@mletenay Yep, I bought the connector at a local dealer. then I bought a HF2211 RS485 <> ethernet converter and I wrote some Python code to retrieve the actual data about every 2 seconds. Next I push the data in a set virtual devices in my Domoticz system. In Domotics I also read every second my P1 SmartMeter so I have an up to date view of my energy situation. I use the wifi connection to communicate with the SEMS portal so that my PV supplier can do his health checks om my PV installation.

frankhommers commented 2 years ago

@dirksenrdh or @mletenay Do you have more info about the connector? Brand/Part number - I need this as well.

dirksenrdh commented 2 years ago

Yes, In the netherlands sold by PV Care (solarservicedesk@gmail.com) , brand is Exceedconn article 910001501 and if you need a lot of these connectors you can look here https://exceedconn.en.alibaba.com/product/62133478391-811550881/connectors_led_strip_ip68_2_pin_male_plug_waterproof_connector.html

dirksenrdh commented 2 years ago

or here: http://www.exceedconn.com/e_products_detail.asp?id=136 EP020-1224-00

frankhommers commented 2 years ago

Thanks! Great. Can I just hook up an RS485 to USB connector or does it need to be terminated somehow?

dirksenrdh commented 2 years ago

I think you have to read the RS485 specs. I have a 5 meter 2 wire twisted pair between de inverter and my HF2211 converter. no termination on either side, no problems at all. the connection is only 9600 baud so less vulnerable to noise and reflections than the super high baudrate connections.

dirksenrdh commented 2 years ago

eehhh, no you can't hook up an RS485 bus to a USB bus. RS485 is a hardware specification for a mult-drop bus. is specifies electrical values. USB is a complete different hardware specification and although both are bus protocols, you can't combine them. Unless you use a USB formfactor connector to connect RS485 cabling. but that would be very unwise. My inverter has an USB formfactor connector which is not an USB bus. you only can plug in the Goodwe WIFI or Ethernet dongles. besides this "USB" connector I have the two round plugs als shown in the picture. One of these round plugs is holding the A and B lines of a RS485 bus. so on the other end of the RS485 cable you need to attacht a RS485 tranceiver (like the HF2211) and on top of that you need the software to handle the MODbus protocol that talks to the Goodwe inverter.

frankhommers commented 2 years ago

Oh, I wrote connector, but I meant converter :| Ofcourse I know USB is a different beast than RS485. This one to be specific: https://nl.aliexpress.com/item/32428596578.html

BTW: I did not get response from PV Care yet.

So what I will do is this:

GoodWe Inverter -> RS485 USB Converter -> Raspberry Pi with Ser2Net Installed -> Ethernet

dirksenrdh commented 2 years ago

yeah, ok. I wanted to be safe. My config is Goodwe -> HF2211 RS485 ethernet converter -> Pi with Python program and Domoticz the HF2211 is located close to the inverter. the location of the pi is completely irrelevant als long as it can connect tot ethernet. I find the drawback of you solution that RS485 and USB are both limited cable lenths. And although 485 can stretch to 1 km you have to install a dedicated cable.

frankhommers commented 2 years ago

Yeah, I have two inverters actually, already both already having ethernet there. They are connected to the LAN modules now. So ethernet is already there.

dirksenrdh commented 2 years ago

so you can connect both inverters on the RS485 bus to the 485 -> USB converter. do not forget tot change the MODbus address of at least one of the 2 units, both are default on 247 (decimal) and ofcourse your software should be able to handle multiple modbus subscribers.

frankhommers commented 2 years ago

I think I will just connect them to each adapter individually.

dirksenrdh commented 2 years ago

which device in your setup is handling the MODbus communication to the inverters? is that the adapter? that would surprise me. or is it the pi with Ser2Net or is it a device furter upstream. because the MODbus software is interrogating the inverters. if you don't change the MODbus address you will experience collisions.

frankhommers commented 2 years ago

Ser2Net will expose two TCP ports. I will not use one consuming program/tool for it but two instances.

frankhommers commented 2 years ago

@dirksenrdh I think I have the wrong connectors.

image

I also have the GW8K-DT Inverter, but it might be a newer one. I don't know the pinout.

dirksenrdh commented 2 years ago

I have 2 the same connectors, 2 pin. You have the two pin and a 6 pin, which is just an other version. it is either a DRED or a double RS485 connector. the documentation of your device should point out what is is. afbeelding

dirksenrdh commented 2 years ago

but the strange thing is that the bridged 2 pin connector on your picture is the DRED so the 6 pin must be a double RS485

frankhommers commented 2 years ago

I don't know how to proceed... I'll write to GoodWe Support.

karolzarebski commented 2 years ago

@frankhommers Did you get any response? I have the same inverter with 6 pins and I think about creating my own meter. Provided WiFi adapter still emits SSID and I cannot turn it off which is anoying for me D: