All Projects → jantenhove → GoodWeLogger

jantenhove / GoodWeLogger

Licence: GPL-3.0 license
ESP8266 based logger for GoodWe inverters. Can upload to pvoutput and publishes MQTT topics

Programming Languages

C++
36643 projects - #6 most used programming language
c
50402 projects - #5 most used programming language

Projects that are alternatives of or similar to GoodWeLogger

SolPipLog
Logger for the PIP Inverter series ( USB / RS232 version )
Stars: ✭ 72 (-8.86%)
Mutual labels:  pvoutput, inverter
ABB Aurora Solar Inverter Library
Arduino, esp32 and esp8266 library for ABB (ex PowerOne) Aurora Inverter, implement a full methods to retrieve data from the Inverter via RS-485
Stars: ✭ 22 (-72.15%)
Mutual labels:  rs485, inverter
pygoodwe
Python library for querying Goodwe API
Stars: ✭ 20 (-74.68%)
Mutual labels:  goodwe
cdnet
CDNET Protocol and CDBUS / CDNET C Library (The library is MCU-oriented.)
Stars: ✭ 67 (-15.19%)
Mutual labels:  rs485
sunnyportal-py
Python module to access PV systems in Sunny Portal
Stars: ✭ 35 (-55.7%)
Mutual labels:  pvoutput
tinnymodbus
RS485 ModBus tiny multi-sensor module
Stars: ✭ 75 (-5.06%)
Mutual labels:  rs485
Powerwall2PVOutput
Send Tesla Powerwall data to PVOutput
Stars: ✭ 23 (-70.89%)
Mutual labels:  pvoutput
rs485-moist-sensor
Digital (RS485 - based) soil moisture and temperature sensor
Stars: ✭ 51 (-35.44%)
Mutual labels:  rs485
cdbus bridge
UART to RS485 adapter for CDBUS, or pass-through raw data of UART port
Stars: ✭ 18 (-77.22%)
Mutual labels:  rs485
Home Assistant EDP Box
Integração das EDP Box com Home Assistant Core
Stars: ✭ 91 (+15.19%)
Mutual labels:  rs485
part5
IEC 60870-5 — transmission protocols
Stars: ✭ 37 (-53.16%)
Mutual labels:  rs485
pi485
An open-source TTL UART <-> RS485 converter, intended for a Raspberry Pi or Arduino
Stars: ✭ 29 (-63.29%)
Mutual labels:  rs485
EnphaseCollector
Enphase Solar Metrics Collector
Stars: ✭ 31 (-60.76%)
Mutual labels:  pvoutput
pvoutput
Python code for downloading PV data from PVOutput.org
Stars: ✭ 22 (-72.15%)
Mutual labels:  pvoutput
solaredge modbus
SolarEdge Modbus data collection library
Stars: ✭ 49 (-37.97%)
Mutual labels:  inverter
python-rctclient
Python client for RCTs Serial Communication Protocol
Stars: ✭ 27 (-65.82%)
Mutual labels:  inverter
ioBroker.plenticore
ioBroker Adapter for the KOSTAL Plenticore
Stars: ✭ 15 (-81.01%)
Mutual labels:  inverter
solar-logger
A datalogger for a solar inverter. Stores data in influxdb and displays it in grafana. Has load diverting capability, to use the inverter's excess power
Stars: ✭ 53 (-32.91%)
Mutual labels:  inverter
home-assistant-goodwe-inverter
Experimental version of Home Assistant integration for Goodwe solar inverters
Stars: ✭ 80 (+1.27%)
Mutual labels:  goodwe

GoodWe Solar inverter logger based on ESP8266

This ESP8266 firmware enables you to read information from a GoodWe solar inverter through it's RS485 bus.
Sending information to a MQTT broker is supported, as well as uploading information to PVOutput.

Requirements

  • GoodWe inverter with a RS485 connector (this software has been tested with GW3000-NS, GW3600D-NS, GW10KN-DT, but other inverters might also work)
  • ESP8266 module (like NodeMCU or WeMos D1 mini)
  • RS485 converter (can be found on sites like AliExpress, search for SCM TTL to RS485 Adapter 485 to UART Serial Port 3.3V 5V Level Converter Module). For example the XY-017 board is suitable
  • Computer with Arduino IDE installed to flash the firmware

Flashing firmware

  • To flash this firmware, you will need to install the Arduino IDE and configure it for the board you are using (NodeMCU / WeMos)
  • You will also need the following libraries, placed into the libraries folder belonging to Arduino on your system:
  • Clone/download this repository
  • Rename the Settings.example.h to Settings.h and configure it to match your preferred settings
  • Compile and upload the firmware to your ESP8266 using the Arduino IDE

Diagnostics information is sent over serial at 115200 baud (wifi status, MQTT status, inverter connection status)

Connecting hardware

The RS485 connector on the inverter is located at the bottom of the inverter, visible when you remove the original GoodWe wifi-module. It could also be hidden behind a small metal plate (for inverters without WiFi). It is a 6 pin green terminal (male), the female counterpart is probably part number CTB92HE/6 (3.81mm pitch) but this hasn't been confirmed yet. You can order the female counterpart on eBay/AliExpress/Farnell or similar sites. Using female-female jumper wires that you insert directly into the connector and ESP8266 also works.

Above information applies to the GWxxxxD-NS range of inverters. Other models might use a different method of connecting. Consult your inverter manual.

The green 6 pin connector inside the inverter looks like this:

   +------------+    +---+---+---+---+---+---+
   |------------|    | . | . | . | . | . | . | 
   +------------+    +---+---+---+---+---+---+ 
        USB            1   2   3   4   5   6

Connecting to the inverter

Inverter RS485 converter
pin 1 (485_TX-) A+
pin 2 (485_TX+) B-

Pay attention, RS485 will only work if you disconnect the WiFi module and restart the inverter. They cannot work simultaneously.

Connecting RS485 converter to ESP8266

RS485 converter ESP8266
GND G / GND
RXD D1
TXD D2
VCC 5V / 3V3

(D1 (receive) and D2 (transmit) can be configured to different pins in Settings.h). It might look weird to connect RXD of the module to the receive pin of the ESP8266, but this is how the XY-017 RS485 converter is labeled.

Powering ESP8266 from the GoodWe inverter

Instead of supplying power to the ESP8266 with a separate USB power adapter, it is also possible to 'steal' power from the GoodWe inverter. This can be done by tapping in to the white cable with 5 pin connector (JST-XH) that is normally connected to the original GoodWe wifi-module. Do not use this method if you want to use MQTT! For MQTT to show the correct values, the counters are reset to zero at midnight, which obviously won't work if the ESP8266 doesn't have power (inverter turns off when the sun is down). If you only use PVOutput you can use this method.

Use this method at your own risk, and measure/check first before attempting this method! See here for more information. Confirmed to be working with at least GW3000-NS.

Retrieving information via MQTT

Subscribe to the goodwe/ topic in your MQTT client. Information will be posted there and will look like this:

goodwe/93600DVA295R148/vpv1 242.6
goodwe/93600DVA295R148/vpv2 235.7
goodwe/93600DVA295R148/ipv1 4.9
goodwe/93600DVA295R148/ipv2 5.5
goodwe/93600DVA295R148/vac1 240.6
goodwe/93600DVA295R148/iac1 10.7
goodwe/93600DVA295R148/fac1 49.99
goodwe/93600DVA295R148/pac 2582
goodwe/93600DVA295R148/temp 38.6
goodwe/93600DVA295R148/eday 6.40
goodwe/93600DVA295R148/workmode 1
goodwe/93600DVA295R148/online 1
Field Description Unit
vpv1 Voltage of first string of solarpanels V
vpv2 Voltage of second string of solarpanels V
ipv1 Current of first string of solarpanels A
ipv2 Current of second string of solarpanels A
vac1 Voltage mains side inverter V
iac1 Current mains side inverter A
fac1 Frequency mains side inverter Hz
pac Current power production in Watt W
temp Internal temperature of inverter °C
eday Energy produced today kWh
workmode Undocumented parameter. Default=1 binary
online Inverter status (1=on, 0=off) binary

PVOutput

When you have your PVOutput API key and System ID configured correctly in Settings.h, production data from the inverter will be uploaded to PVOutput every 5 minutes (interval is configurable in Settings.h, but don't go lower than the minimal interval of every 5 minutes as specified by PVOutput). When multiple inverters are connected, by daisy-chaining the RS485 cable, be aware that only the production data of the first inverter will be uploaded!

For the PVOutput upload function to work, it is important that the ESP8266 has access to the internet. Apart from connections being made to PVOutput, you will also see that the ESP8266 talks with pool.ntp.org every hour. This is done to retrieve the current time, which is needed to post data to PVOutput.

If you plan to use only MQTT, internet access for the ESP8266 is not needed.

TODO

  • Webpage to configure parameters that are now hardcoded in Settings.h
  • Extract other parameters from inverter(s)
  • Detect if inverter is single phase or three phase model
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].