Arduino Interface for cheap 2.4ghz RF enabled Solar Micro Inverters

Overview

NETSGPClient

Arduino Interface for cheap 2.4ghz RF enabled Solar Micro Inverters using the so-called NETSGP protocol for communication.

Here is a YouTube video that shows the general function https://youtu.be/uA2eMhF7RCY YoutubeVideo

Examples

The PollDemo shows how to request a status from the Micro Inverter synchronously. Input your inverter id to get status updates.

The AsyncDemo shows how to get a status from multiple Micro Inverters asynchronously. Input one or more inverter identifiers to get status updates inside the callback.

Supported Devices

Model Tested Compatible Notes ID starting with
SG200MS 200W model 11000001
SG300MS 300W model 19000001
SG600MD 600W model 38000001
SG700MD 700W model 41000001
SG1000MQ 1.0kW model 48000001
SG1200MQ 1.2kW model 52000001
Comments
  • snapshot/capture of databox signals to inverter on changing output power

    snapshot/capture of databox signals to inverter on changing output power

    Hello,

    I dont have a Databox and would like to change the output power with an esp32 and the LC12S.

    Can anyone who does have a databox provide a snapshot/capture of the signal the databox sends to the inverter when changing the output power of the inverter to maybe 25%?

    I already tried to send a message according to https://solaranzeige.de/phpBB3/viewtopic.php?f=23&t=1681, but this are the messages sent between the databox and the PC and it seems the PIC Controller of the databox does send something different to the inverter, or at least i do not get the inverter to reduce its output power that way. Btw i am using a SG-700W inverter.

    I would appreciate it if someone could help me there. If if finally works i can provide the code via pull request or similar.

    Thanks very much in advance!

    opened by WeareGermans 50
  • Solder an ESP directly to the inverter

    Solder an ESP directly to the inverter

    As far as I understood it, the wireless modules creating a raw bridge. So it would be possible to remove the rf module from the inverter and directly replace it with an ESP32? The only requirement would be, that the 3.3 V LDO is delivering enough current.

    opened by majuss 33
  • Issue with SG500md

    Issue with SG500md

    Hello,

    I did the test for my SG500MD, it seems that I have strange values (see attachment).

    400w of panel with two panels on each side of 16v (that is to say 32v by entry)

    img

    ESP32 with LC12S

    16-17-4 => RX - TX - SET of LC12S CS => GROUND of LC12S

    Sorry for my speak english

    bug 
    opened by anth039 23
  • question: is it possible to use an nRF24L01

    question: is it possible to use an nRF24L01

    Good day,

    sorry im a noob, in this tech ;)

    Can use an nRF24L01 in combination with an esp32 to query the data?

    If it is possible, how do I have to adapt the script and connect the nRF24L01 to the esp32?

    Thanks very much :)

    question 
    opened by heiko1988 16
  • Pin Out Diagram

    Pin Out Diagram

    Hi Aaron,

    Is there any chance you could provide a pinout wiring diagram please. I'm struggling to see which pins on the mcu connect to which on the rf module

    It looks like 3v3 to vcc gnd to gnd d8 to rx d7 to tx d6 to set

    The code references Pin 16 and 17 for rx and tx and 4 got enable

    Just getting myself a little confused.

    Any help appreciated

    Thank you Damian

    opened by damianburrin 15
  • Try to use with mqtt

    Try to use with mqtt

    Good day,

    I'm trying to integrate a mqtt client that I can use the data in the smart home. in my case it would be iobroker

    I've tried a bit to integrate it. Unfortunately, I lack expertise

    I hope one of you can help me

    The demo with the serial output runs great :)

    My hardware:

    Esp32 Wroom

    The code where not working:

    #include "NETSGPClient.h"
    #include "EspMQTTClient.h"
    
    EspMQTTClient client(
      "wifi_test",
      "password_test",
      "192.168.0.119",  // MQTT Broker server ip
      "iobroker",   // Can be omitted if not needed
      "Passwort",   // Can be omitted if not needed
      "SG600MD"      // Client name that uniquely identify your device
    );
    
    constexpr const uint8_t PROG_PIN = 4; /// Programming enable pin of RF module
    constexpr const uint8_t RX_PIN = 17; /// RX pin of RF module
    constexpr const uint8_t TX_PIN = 16; /// TX pin of RF module
    constexpr const uint32_t inverterID = 0x38004044; /// Identifier of your inverter (see label on inverter)
    
    
    
    
    NETSGPClient client(Serial2, PROG_PIN); /// NETSGPClient instance
    
    void setup()
    {
        Serial.begin(115200);
        Serial2.begin(9600, SERIAL_8N1, RX_PIN, TX_PIN);
    //    pinMode(LED_BUILTIN, OUTPUT);
        delay(1000);
        Serial.println("Welcome to Micro Inverter Interface by ATCnetz.de and enwi.one");
    
        // Make sure the RF module is set to the correct settings
        if (!client.setDefaultRFSettings())
        {
            Serial.println("Could not set RF module to default settings");
        }
    }
    
    
    
    void onConnectionEstablished() {
    
      client.subscribe("mytopic/test", [] (const String &payload)  {
        Serial.println(payload);
      });
    
      client.publish("mytopic/test", "This is a message");
    }
    
    
    uint32_t lastSendMillis = 0;
    void loop()
    {
        const uint32_t currentMillis = millis();
        if (currentMillis - lastSendMillis > 2000)
        {
            lastSendMillis = currentMillis;
    
    //        digitalWrite(LED_BUILTIN, !digitalRead(LED_BUILTIN));
            Serial.println("");
            Serial.println("Sending request now");
    
            const NETSGPClient::InverterStatus status = client.getStatus(inverterID);
            if (status.valid)
            {
                Serial.println("*********************************************");
                Serial.println("Received Inverter Status");
                Serial.print("Device: ");
                Serial.println(status.deviceID, HEX);
                Serial.println("Status: " + String(status.state));
                Serial.println("DC_Voltage: " + String(status.dcVoltage) + "V");
                Serial.println("DC_Current: " + String(status.dcCurrent) + "A");
                Serial.println("DC_Power: " + String(status.dcPower) + "W");
                Serial.println("AC_Voltage: " + String(status.acVoltage) + "V");
                Serial.println("AC_Current: " + String(status.acCurrent) + "A");
                Serial.println("AC_Power: " + String(status.acPower) + "W");
                Serial.println("Power gen total: " + String(status.totalGeneratedPower));
                Serial.println("Temperature: " + String(status.temperature));
            }
        }
    }
    

    the error description from the compiler:

    PollDemo:21:21: error: conflicting declaration 'NETSGPClient client'
     NETSGPClient client(Serial2, PROG_PIN); /// NETSGPClient instance
                         ^
    C:\Users\chaos\Desktop\NETSGPClient-1.1.0 (1)\NETSGPClient-1.1.0\examples\PollDemo\PollDemo.ino:4:15: note: previous declaration as 'EspMQTTClient client'
     EspMQTTClient client(
                   ^
    C:\Users\chaos\Desktop\NETSGPClient-1.1.0 (1)\NETSGPClient-1.1.0\examples\PollDemo\PollDemo.ino: In function 'void setup()':
    PollDemo:32:17: error: 'class EspMQTTClient' has no member named 'setDefaultRFSettings'
         if (!client.setDefaultRFSettings())
                     ^
    C:\Users\chaos\Desktop\NETSGPClient-1.1.0 (1)\NETSGPClient-1.1.0\examples\PollDemo\PollDemo.ino: In function 'void loop()':
    PollDemo:62:60: error: 'class EspMQTTClient' has no member named 'getStatus'
             const NETSGPClient::InverterStatus status = client.getStatus(inverterID);
                                                                ^
    Mehrere Bibliotheken wurden für "WiFi.h" gefunden
     Benutzt: C:\Users\chaos\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.6\libraries\WiFi
     Nicht benutzt: C:\Program Files (x86)\Arduino\libraries\WiFi
    exit status 1
    conflicting declaration 'NETSGPClient client'
    
    opened by heiko1988 7
  • Daisy chaining UART of inverters

    Daisy chaining UART of inverters

    Hey, your work is so great. I cant wait to test your project in the future. Is it posible to get rid of the RF modul an daisy chain the UART between the inverters?

    Originally posted by @detobsen in https://github.com/atc1441/NETSGPClient/issues/2#issuecomment-1188312946

    question 
    opened by enwi 5
  • Hoymiles (HM-600) Support

    Hoymiles (HM-600) Support

    Hi, I'm trying to read out the hoymiles HM-600 and got somehow stuck with my knowledge.

    How did you manage to find out the meaning of received values and how to shift and calculate them? How did you found out the correct value for the "command" 0xc0, 0xc1, 0xc3..? Magic Byte?

    regards, Eule01x

    wontfix 
    opened by Eule01x 4
  • Problem Compiling Node MCU

    Problem Compiling Node MCU

    HI I can't get this to compile on a nodeMCU . Getting an error about serial2 beiing used out of scope..

    When i look at the ino file it does seem to try an call the object with serial2 but not declare this until the setup function. Am i misunderstanding

    Thanks Damian

    image

    opened by damianburrin 3
  • Dependencies

    Dependencies "StandardCplusplus" not existing ?!

    While installing the Library from the Library manager it asks to also install also the dependencies which list is empty. But would normaly contain the StandardCplusplus which is not in my lists of librarys

    Dependencies

    Trying to install it ends up in an error, the "NETSGPClient" Library gets still installed.

    LogMSGS

    The issue seems that the "StandardCplusplus" lib is not in the Arduino library list so will fail to install

    Should we maybe remove the dependencie ?

    bug 
    opened by atc1441 3
  • Can not configure LC12S

    Can not configure LC12S

    I am using an ESP32 and an SG600MD. I connected the LC12S like that: ESP 3V3 <-> VCC ESP TX <-> RX ESP RX <-> TX ESP GPIO4 <-> SET ESP GND <-> CS ESP GND <-> GND

    But I get the message "Could not set RF module to default settings". Some debugging reveals that after sending the settings to the LC12S, the read command returns only one zero byte instead of expected 18 bytes.

    I verified that the RX and TX pins are setup correctly. The LED on the LC12S lights up on reset for ~2 seconds, then it flashes shortly once per second. What could be wrong here?

    bug wontfix 
    opened by cody82 3
  • Problem with Chipkit Max32

    Problem with Chipkit Max32

    How do change your source with arduino 1.8 because I have this probleme: AsyncNETSGPClient.h:48:5: error: 'set' in namespace 'std' does not name a type std::set<uint32_t> mDevices; /// All devices to poll

    opened by goliath51 12
Releases(2.0.0)
  • 2.0.0(Aug 3, 2022)

    Changes

    • Add function for changing the power grade (bool setPowerGrade(const uint32_t deviceID, const PowerGrade pg);)
    • Add function for activating and deactivating inverters (bool activate(const uint32_t deviceID, const bool activate);)
    • Add function for rebooting inverters (bool reboot(const uint32_t deviceID);)
    • Rename findAndReadStatusMessage to findAndReadReply and make it also find and read control and power grade messages
    • Improve debug logging

    Bugfixes

    • None
    Source code(tar.gz)
    Source code(zip)
  • 1.1.1(Jul 19, 2022)

    Changes

    • Add SG800MD to supported devices (d77df1b5fb07a9fa73673872ff8d43e7ee526acd)

    Bugfixes

    • Fix comments for RX and TX pins in examples (d77df1b5fb07a9fa73673872ff8d43e7ee526acd)
    • Remove StandardCplusplus from properties (#10, d0300c7962f7df140d0193e8e8bed14c0d22f20a)
    Source code(tar.gz)
    Source code(zip)
  • 1.1.0(Feb 28, 2022)

    Changes

    • 056f554c02c40c2776770fb9c738c9e049412635 Add compile time debug messages that can be turned off
    • 056f554c02c40c2776770fb9c738c9e049412635 Use CRC to determine validity of received messages
    • 9fff49afe961a39b667f05feae412526344d715b Make library compliant with Arduino 1.5 format

    Bugfixes

    • 853e8a316eb388d408f84953170af182a2b87a16
      • Fix float data being 0 due to integer division
      • Fix AsyncNETSGPClient to correctly send data at a minimal interval of 1 message every 1010ms so inverters can answer in time
    • 056f554c02c40c2776770fb9c738c9e049412635
      • Fix timing of AsyncNETSGPClient
      • Fix rx buffer overflowing if no callback is setup for AsyncNETSGPClient

    Full Changelog: https://github.com/atc1441/NETSGPClient/compare/1.0.0...1.1.0

    Source code(tar.gz)
    Source code(zip)
  • 1.0.0(May 31, 2021)

Owner
null
A cheap,simple,Ongeki controller Use Keyboard Simulation and Mouse Simulation to controller the ongeki game. Using Pro-micro control.

N.A.G.E.K.I. PLEASE CHECK Main Project A cheap,simple,Ongeki controller Use Keyboard Simulation and Mouse Simulation to controller the ongeki game. Us

NanaNana 11 Dec 30, 2021
A simple example for 'Arduino' compatible boards to interface with I2C to the MPU-6050, a 6-axis micro-electromechanical IC

Arduino-MPU-6050 A simple example for 'Arduino' compatible boards to interface with I2C to the MPU-6050, a 6-axis micro-electromechanical IC ==About==

Ivan 1 Oct 19, 2021
ESP32 firmware to read and control EMS and Heatronic compatible equipment such as boilers, thermostats, solar modules, and heat pumps

EMS-ESP is an open-source firmware for the Espressif ESP8266 and ESP32 microcontroller that communicates with EMS (Energy Management System) based equipment from manufacturers like Bosch, Buderus, Nefit, Junkers, Worcester and Sieger.

EMS-ESP 197 Oct 5, 2022
Grafana/Prometheus exporter for EPEVER/EPSOLAR Tracer solar charge controllers

epever_exporter epever_exporter is a standalone program written in C that can query Epever/Epsolar Tracer solar charge controllers and output metrics

Cédric Félizard 1 Nov 23, 2021
CC1312R1 Sub-G Solar power asset tracker

Sub-G Solar Power Asset Tracker TOP BOTTOM Sub-G Solar Power Asset Tracker 은 AxDen 의 Aggregator Platform 를 이용하여 온도, 가속도, GPS 위치와 같은 Asset tracking 에 필

AXDEN 4 Sep 23, 2022
Cheap 3D Printed Absolute Encoder Knob

A cheap, 3D printed absolute position encoder knob based on a low-cost AS5600 breakout module. Demo firmware using a TTGO T-Display ESP32 board is pro

Scott Bezek 151 Sep 25, 2022
A large mechanical 7-segment clock using cheap stepper motors.

mechanical-7-segment-clock A large mechanical 7-segment clock using cheap stepper motors. Each digit requires its own controller board. The seconds di

null 45 Aug 11, 2022
Tiny and cheap robot car for inspecting sewer pipes >= 125 mm. With pan servo for the ESP32-Cam module

ESP32-Cam Sewer inspection car Version 1.0.0 - work in progress Based on esp32-cam-webserver by Owen Carter. Additional Features Pan servo for the ESP

Armin 3 Feb 17, 2022
Is this hardware solution the ultimate in switch bounce elimination? Simple PCB, cheap components = final solution!

#230 Ultimate Switch Bounce Eliminator Direct link to video: https://youtu.be/b2uUYiGrS5Y It's time to try a final, alternative approach to the ubiqui

Ralph Bacon 5 Mar 25, 2022
A simple, cheap, and somewhat secure USB Key for SSH authentication, costs < $5

44Key A simple, cheap, and somewhat secure ed25519 USB Key for SSH authentication, costs < $5 Hardware: https://oshwhub.com/44670/miniusbkey PC Softwa

null 21 Sep 21, 2022
Let's upgrade cheap off-the-shelf robotic mowers to modern, smart RTK GPS based lawn mowing robots!

OpenMower Join the Discord server for OpenMower discussion: HERE About the Project ⚠️ DISCLAIMER: IF YOU ARE NOT 100% SURE WHAT YOU ARE DOING, PLEASE

Clemens Elflein 3.3k Oct 1, 2022
Timed reminder lights using Adafruit NeoPixels and Arduino Micro (3.3v ATMEGA 32U4)

SmartCoaster When I'm working, I get so focused that I forget to drink water. It's not that I'm not thirsty—oh, I am—but I'll get a glass of water, pu

Steven M. Caruso 17 Dec 21, 2021
Boilerplate to create a project with: STM32 + Ethernet + micro-ROS + FreeRTOS + Arduino + PlatformIO

micro_ros_stm32_template Boilerplate to create a project with: STM32 + Ethernet + micro-ROS + FreeRTOS + Arduino + PlatformIO Default config STM32F407

Husarion 14 Aug 29, 2022
Simple EFI runtime driver that hooks GetVariable function and returns data expected by Windows to make it think that it's running with secure boot enabled (faking secure boot)

SecureFakePkg is a simple EFI runtime driver that hooks GetVariable function and returns data expected by Windows to make it think that it's running with secure boot enabled. In other words, it fakes secure boot status.

Samuel Tulach 79 Oct 1, 2022
Arduino code to interface with quadrature-encoder mice, specifically the Depraz mouse

Depraz Mice on USB via Arduino This code lets you connect a Depraz mouse to a modern computer via USB. The Depraz mouse has a male DE-9 connector but

John Floren 6 Aug 12, 2022
Project uses an Arduino Leonardo to interface an A1UP Street Fighter Table controller boards with a pc.

Street Fighter Arcade1Up Table Arduino Interface Goal of this project Arcade1Up uses proprietary circuit boards to interface with the game's circuit b

Christopher Perkins 1 Oct 27, 2021
Projeto pessoal: Obter a temperatura ambiente e através de um termistor ligado a um arduino e disponibilizar esses dados em tempo real via API NodeJS. No front-end os dados são acessados por uma interface em React JS.

INTEGRAÇÃO DA API COM OS DADOS DO ARDUINO FORNECIDOS PELO TERMISTOR Código Desenvolvido por Lucas Muffato. MATERIAIS 1 Placa de Arduino; 1 Cabo de con

Lucas Muffato 35 Aug 16, 2022
Raspberry Pi Pico (RP2040) and Micro-ROS (ROS 2) Integration

The Pico is an amazing microcontroller and I couldn't wait for ROS 2 support or Arduino Core, so here is my approach. Once the Arduino Core for RP2040 is out it will be easier to use micro_ros_arduino.

Darko Lukić 19 Jun 19, 2022
split89 keyboard - a 3d printed 89 key split TKL keyboard base powered by ATmega32U4 Pro Micro controllers with QMK Configurator support.

split89 keyboard - a 3d printed 89 key split TKL keyboard base powered by ATmega32U4 Pro Micro controllers with QMK Configurator support. This keyboar

null 43 Aug 7, 2022