All Projects → jkairys → growatt-esp8266

jkairys / growatt-esp8266

Licence: MIT license
Growatt Inverter monitoring via MQTT using ESP8266 modbus interface

Programming Languages

PLSQL
303 projects
C++
36643 projects - #6 most used programming language

Projects that are alternatives of or similar to growatt-esp8266

Emodbus
Modbus library for both RTU and TCP protocols. Primarily developed on and for ESP32 MCUs.
Stars: ✭ 29 (-14.71%)
Mutual labels:  esp8266, modbus
ninja automator
Acquire data with honour and wisdom — using the way of the ninja.
Stars: ✭ 21 (-38.24%)
Mutual labels:  solar
NModbus4.NetCore
Simply NModbus4 but targeting .NET instead of .NET Framework
Stars: ✭ 25 (-26.47%)
Mutual labels:  modbus
esp8266-esp32-sdk
Library for https://sinric.pro - simple way to connect your device to Alexa, Google Home, SmartThings and cloud
Stars: ✭ 147 (+332.35%)
Mutual labels:  esp8266
MicroPython Examples
MicroPython Examples For 01Studio Development Board
Stars: ✭ 86 (+152.94%)
Mutual labels:  esp8266
MQTT-MotorizeBlinds
Code for ESP8266 Microcontrollers that control DIY motorized blids made from IKEA TUPPLUR blinds. Code in this repo is intentionaly to use with Homebridge MQTT plugin on raspberry Pi
Stars: ✭ 17 (-50%)
Mutual labels:  esp8266
WebPixelFrame
Code to control a ESP8266 and a matrix of ws2812b pixels
Stars: ✭ 19 (-44.12%)
Mutual labels:  esp8266
weather-station
Everything you need to run and monitor your own open source weather station. ⛅
Stars: ✭ 38 (+11.76%)
Mutual labels:  esp8266
esphome-phsensor
ESP8266 with analog pH sensor
Stars: ✭ 45 (+32.35%)
Mutual labels:  esp8266
SmartLEDLamp
A smart, web-enabled floor lamp with nice visual effects based on IKEA Vidja powered by ESP8266 and WS2801.
Stars: ✭ 22 (-35.29%)
Mutual labels:  esp8266
home-assistant-opentherm-thermostat
Home Assistant OpenTherm Thermostat
Stars: ✭ 26 (-23.53%)
Mutual labels:  esp8266
imrc-datetime-picker
(Improved) React component datetime picker by momentjs 📆
Stars: ✭ 21 (-38.24%)
Mutual labels:  solar
esp8266-oled-ssd1306-font-creator
Font creator for the esp8266-oled-ssd1306 library
Stars: ✭ 22 (-35.29%)
Mutual labels:  esp8266
Three.js-Solar-Exploration
🚀 Exploration the solar system created by Three.js
Stars: ✭ 24 (-29.41%)
Mutual labels:  solar
DotMatrixDisplay
Display any messages to a LED Matrix Display
Stars: ✭ 19 (-44.12%)
Mutual labels:  esp8266
ebusd-esp
Firmware for ESP8266 allowing eBUS communication for ebusd (https://github.com/john30/ebusd)
Stars: ✭ 68 (+100%)
Mutual labels:  esp8266
MySQL MariaDB Generic
This MySQL_MariaDB_Generic library helps you connect your boards directly to a MySQL / MariaDB server, either local or cloud-based, so that you can store / retrieve data to / from the server. Supported boards are ESP8266/ESP32, WT32_ETH01 (ESP32 + LAN8720A), nRF52, SAMD21/SAMD51, STM32F/L/H/G/WB/MP1, Teensy, SAM DUE, Mega, RP2040-based boards, P…
Stars: ✭ 35 (+2.94%)
Mutual labels:  esp8266
EasyUI
ESP8266 User Interface Library.
Stars: ✭ 63 (+85.29%)
Mutual labels:  esp8266
low-power-wifi
Experiments in low-power-wifi on esp8266, esp32, and ...
Stars: ✭ 35 (+2.94%)
Mutual labels:  esp8266
ESPNtpClient
High accuracy NTP library for ESP32 and ESP8266
Stars: ✭ 81 (+138.24%)
Mutual labels:  esp8266

growatt-esp8266

A library to monitor a Growatt MTL-5000 using an ESP8266 (Wemos D1) via a modbus over RS232 interface.

Software

The library uses a software serial port to connect to the inverter to retrieve data using its Modbus interface. Modbus provides a set of predefined parameters available at certain addresses, which can be queried using a "read register" commmand. This library will:

  • Create a software serial port on the pins you specify
  • Create a modbus master using this serial port
  • Read data from the modbus client (the inverter) registers, decode it and make it available via the library

Using the library

#include <GrowattInverter.h>
#define PIN_TX D5
#define PIN_RX D6
#define SLAVE_ADDRESS 1
GrowattInverter inverter(PIN_RX, PIN_TX, SLAVE_ADDRESS);

void setup(){
  Serial.begin(9600);
}

void loop(){
  inverter.read();
  if(inverter.valid){
    // Power output from the PV panels
    Serial.println(inverter.Ppv);
    // Power output from the inverter
    Serial.println(inverter.Pac1);
  }else{
    Serial.println("Inverter read failed");
  }
  delay(1000);
}

Hardware

See the hardware/ directory for EAGLE schematic and circuit board design. To simplify board design and fabrication, the board uses a module for the esp8266 and all through hole components beyond this.

The board itself is comprised of:

  • Wemos D1 Mini
  • LM7805 voltage regulator
  • 1x330uF capacitor (for main power)
  • MAX232 level converter
  • 3x 1uF capacitors (for MAX232)
  • 3x 3mm leds + 1/4W resistors (optional)

Pinout

The growatt inverter I have has a DB9 connector for an RS232 connection, which has the pinout:

    FROM INVERTER
-----------------------   2 = TX
\ (5) (4) (3) (2) (1) /   3 = RX
 \  (9) (8) (7) (6)  /    5 = GND
  \_________________/     9 = V+ (about 8 volts)


  Inverter DB9           Our DB9       PCB         Wemos
    (female)              (male)       (J4)        (pins)
       2 ---(TX)----(RX)--- 2 --------- 3 ---(RX)--- D6
       3 ---(RX)----(TX)--- 3 --------- 4 ---(TX)--- D5
       5 ---(GND)---------- 5 --------- 1 ---------- GND
       9 ---(V+)----------- 9 --------- 2 -- VREG -- VCC 

Sample project

I've included a complete sample project using the board and software library if you just want to get this running on your own inverter. It uses an MQTT + WiFi wrapper library I put together a while ago called iot-thing but you should be easily able to rip this out and use your own code for the internet / wifi connectivity side of things.

Enclosure

Coming soon...

Todo

  • Example project should use self configuring captive portal for wifi setup
  • Add a simple web UI to show present values from the inverter
  • WiFi Serial debugging using socket
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].