Limiter inverter with RS485 load setting

Actually, the status message can be requested by changing byte 6 in the message to the soyo.
This will provoke a status every 10 messages:
Python:
if msgct >= 10:
        GTN1000_bytes[6] = 40
        msgct = 0
else:
        GTN1000_bytes[6] = 128
        msgct += 1
We can use "volts x amps" to estimate the real output and react rapidly to a dropping load.

We can do this on byte 6 with with all numbers except 128. Doesent have to be "40".
We can also do this with GTN1000 bytes 1, 2 or 3. Only tested "40".

The GTN1000 does not react to the "set power" command if we request a status!

Note the soyo has a nasty input filter which averages the last 4 messages (this is speculative). A work-around ist to send the soyo multiple messages to rapidly scale back power. A better way would be to analyze the filter and counteract it.
 
Last edited:
Hello, i am using also an soyo Inverter and reading with interest this thread. I want to replace the limiter with an software solution. I have an shelly 3EM and all the values in IO-Broker.

How can i write via IO Broker or Home Assistant the values to the soyo inverter ? That really is confusing me because i am not to expericened with coding. Ist there any How to ? I did not find anything yet.

I found this but still not clear how to build that.

Would be happy for support. Thank you
 
G'Day Pepe

Sorry to be so picky !!!


Actually, the status message can be requested by changing byte 6 in the message to the soyo.

[ S N I P ]

Python:
        GTN1000_bytes[6] = 40

We can do this on byte 6 with with all numbers except 128. Doesent have to be "40".


[6] is not a byte it is an index for an array

 
That is my control loop attempting at using constant 20W from grid. Green is soyo produced power, blue grid power, orange control term.
The time to recover from dropping load is due to the soyo reacting very slowly.
 

Attachments

  • Clipboard02.jpg
    Clipboard02.jpg
    43.2 KB · Views: 169
Last edited:
Hi, I just saw this other version:

No display, but a 'USB TTL' port - it looks like the dongle use an ESP module for wifi. Maybe we can decode the traffic on that 'usb port' and make our own interface with a Raspberry or something like that...
From the screens it looks like they can configure other parameters and also read other settings, so, wondering if they share part of a common codebase and whatever protocol is being applied can then be partly be used with some of the older units ?

With a WiFi unit plugged in and wireshark the commands could then be seen and tried with older units to see if they are just using different message header bytes.

Would be interesting if the voltage ranges can be changed and the temperature read (switching of external cooling fans)

The one very big curiosity I still have with these is the voltage range "recommended" for batter mode as the PV range is listed with OC voltage tollerance and yet the battery range tends to just follow or be lower than the MPPT range. I suspect that they can cope with higher voltages and the 39-62V OC unit would work ok with 42-54V operation. This is also because with the "battery" ranges of 35-45V and 47-70V none of them are capable of working fully with my setup as the lower end can see 44V (discharged and underload + volt drops).
 
Actually, the status message can be requested by changing byte 6 in the message to the soyo.
This will provoke a status every 10 messages:
Python:
if msgct >= 10:
        GTN1000_bytes[6] = 40
        msgct = 0
else:
        GTN1000_bytes[6] = 128
        msgct += 1
We can use "volts x amps" to estimate the real output and react rapidly to a dropping load.

We can do this on byte 6 with with all numbers except 128. Doesent have to be "40".
We can also do this with GTN1000 bytes 1, 2 or 3. Only tested "40".

The GTN1000 does not react to the "set power" command if we request a status!

Note the soyo has a nasty input filter which averages the last 4 messages (this is speculative). A work-around ist to send the soyo multiple messages to rapidly scale back power. A better way would be to analyze the filter and counteract it.

"We can do this on byte 6 with with all numbers except 128. Doesent have to be "40".
We can also do this with GTN1000 bytes 1, 2 or 3. Only tested "40".

This could be that any "invalid" message is just dumped and a default status is output every 10 error messages.

The above 40 (as byte6) could make the requested power output leve above thier "valid" upper bound and it then becomes and invalid request.

More curious is the 128 as this may be a valid bitmap with one flag for a particular purpose ?
 
More curious is the 128 as this may be a valid bitmap with one flag for a particular purpose ?

Very difficult to know without any input from soyo.

default status is output every 10 error messages.

You did misunderstand that.

It could be that the checksum is calculated over all bytes, not only byte 4 and 5. By changing another byte we send a "wrong checksum" and soyo reacts with status message? Not tested.
 
Last edited:
Very difficult to know without any input from soyo.



You did misunderstand that.

It could be that the checksum is calculated over all bytes, not only byte 4 and 5. By changing another byte we send a "wrong checksum" and soyo reacts with status message? Not tested.
Hello to all :)
First a Big thank you to completelycharged and all other for that amazing Work :)

i have 1 Soyo 2 weeks now with version(to see in about menu) Version: 2021-301
a second one become yesterday , its the same version as the first
these Soyo Versions sends status NOT automaticly

I testet the command(with informations from here) what I need in minimum.
and the winner is :
Send in Hex : "24 00 00 00 00 00 00 00" 8 Bytes and then the soyo sends the status
I think , we don't need any checksum for state , we dont change anything with that command!
i only say with 24 hello to the soyo and he answere :)

i made now a esp8266 firmware as CTController for the Soyo with Web and Rest interface , that runs very stable in the moment.

.
 

Attachments

  • 2021-08-19 08_59_49-HTerm 0.8.1beta.jpg
    2021-08-19 08_59_49-HTerm 0.8.1beta.jpg
    42.7 KB · Views: 432
  • 2021-08-19 09_06_10-SOYOSOURCE Controller.jpg
    2021-08-19 09_06_10-SOYOSOURCE Controller.jpg
    63.7 KB · Views: 412
Last edited:
Hello to all :)
First a Big thank you to completelycharged and all other for that amazing Work :)

i have 1 Soyo 2 weeks now with version(to see in about menu) Version: 2021-301
a second one become yesterday , its the same version as the first
these Soyo Versions sends status NOT automaticly

I testet the command(with informations from here) what I need in minimum.
and the winner is :
Send in Hex : "24 00 00 00 00 00 00 00" 8 Bytes and then the soyo sends the status
I think , we don't need any checksum for state , we dont change anything with that command!
i only say with 24 hello to the soyo and he answere :)

i made now a esp8266 firmware as CTController for the Soyo with Web and Rest interface , that runs very stable in the moment.

...as soon as it works properly, I will release the software for everyone
...manual ? no way! i made then a simple config video on youtube, i hope...
###########################################################################################################
?Hat jemand Lust mit nem 4Mbyte esp12 und seinem Soyo Wechselrichter meine Esp8266 Firmware "SOYOSOURCE CONTROLLER" zu testen?
###########################################################################################################

Ich schreibs in Deutsch , hoffe mir ist niemand böse.

Was kann der ESP :


Grundlegend ist FAKT: wann der SOYO Wechselrichter keine Signale gesendet bekommt hört er auf einzuspeisen(Safety)!

- Der Esp nimmt die Leistung die er Regeln soll über Mqtt und Webschnittstelle auf.
- Zu übergebenes Zahlenformat 200 oder 200.00
- Der ESp nimmt die Leistung an und übergibt Sie dem Soyo , danach ist eine 3Sekunden Pause
- Erst dann wird der zuletzt empfangene Leistungswert dem Soyo übergeben dann wieder 3 sekunden Pause...
- Damit geschieht eine saubere einpendelung gegen ~0watt Verbrauch
- In der Web Seite kann man per Button die Einspeisung beenden(Notaus), schicke explizit 0watt an SOYO , geht schneller als zu warten bis er selbst beendet da er anschliessend auch keine Signale mehr bekommt.
- In der Web Seite kann man per Button die maximale Einspeiseleistung eingestellt werden(MaxPower)
- Die blinkende Überschrift in der Webseite ist ein Alive zeichen , solange die Überschrift "ESP Herzschlag" blinkt , ist alles gut
-Derzeit pendelt der Esp sich im Toleranz Bereich -20 |0| +5 Watt ein , geplant ist die Toleranzwerte einzustellen zu können wann jemand gar keine -watts(Einspeisung ins Netz) sehen will.
- Doppelreset implementierung um wieder ins Configportal im eigenen Esp AP zu kommen
- ElegantOta Implementierung für FirmwareUpdates
- ...




RS485 ttl Adaper
- dein rs485 adapter a an Rot von soyo Kabel anschliessen , schwarz ist B
- bei meinem rs485 adapter habe ich Rs485TX mit EspTX verbinden müssen , also nicht kreuzen
- rx brauchz du derzeit noch nicht


ESP:

EINRICHTUNG##############################################################################################
0.Bei Nutzung von Mqtt: Mqtt.fx Client öffnen mit Broker verbinden und Topic : 'Soyosource/#' abonnieren
0.1 Es kommt nach Schritt 8. ein Info Publish vom Esp mit der IP adresse.
0.2 Man kann die Ip Adresse nat. auch auf dem herkömmlichen Weg herausfinden
1.Firmware auf den gelöschten Esp8266 flashen
2.Esp Neustart
3.Im Wlan nach SOYO_... suchen
4.Wlan mit Pwd 12345678 verbinden
5.Es öffnet sich automatisch Browser Fenster mit 192.168.4.1
6.Unter Configuration
6.1 Wifi auswählen oder eingeben und Passwort eingeben
6.2 Mqtt kann derzeit nur ohne ssl und ohne Benutzer/Passwort benutzt werden
7.Speichern mit dem Button ganz unten
8.Esp Neustart
9.Ipadresse in Mqtt Client oder Router ausfindig machen
EINRICHTUNG#############################################################################################

INBETRIEBNAHME##########################################################################################
1.Ipaddresse im browser aufrufen
2.L1L2L3 Topic von geöffneter Webseite in deinen iobroker/nodered ... übernehmen
ODER wann Nutzung von Mqtt aus ist :
3.IPADRESS:80/L1L2L3?Value=200.66
3.1 IPADRESS durch die ip vom ESP ersetzen, 200.66 stellt den kummulierten Wert deiner 2/3 phasen da
INBETRIEBNAHME##########################################################################################

Tip:
nur leistungsdaten über L1L2L3 (egal welches Interface) senden
wann sich was geändert hat !
1.Mqtt L1L2L3 Publish Setting : Qos2 und Retain!
2.Wenn WebInterface L1L2L3?Value=... genutzt wird dann schon alle sekunden senden
Der esp ansich schickt schon jede sekunde den zuletzt angenommenen Wert.

Falls also jemand Lust hat , bitte PN , wegen Firmware .

RS485MODUL !!!! Einschränkung
vorerst gehen nur solche Module die mit TX ansprechbar sind, wie solche, dabei wird es aber nicht bleiben , da ich damit derzeit die daten vom SOYO nicht empfangen kann https://www.amazon.de/gp/product/B07RKY1G71/ref=ppx_yo_dt_b_asin_title_o05_s00?ie=UTF8&psc=1
Mit einem USB Adapter am Pc funktioniert es sehr gut.
Wann jemand weiss wie ich das von mir verlinkte rs485 Modul modifizieren muss (Terminierung...) , bitte keine Scheu , schreibt es mir ! :)
 
Last edited:
###########################################################################################################
?Hat jemand Lust mit nem 4Mbyte esp12 und seinem Soyo Wechselrichter meine Esp8266 Firmware "SOYOSOURCE CONTROLLER" zu testen?
###########################################################################################################

Ich schreibs in Deutsch , hoffe mir ist niemand böse.

Was kann der ESP :


Grundlegend ist FAKT: wann der SOYO Wechselrichter keine Signale gesendet bekommt hört er auf einzuspeisen(Safety)!

- Der Esp nimmt die Leistung die er Regeln soll über Mqtt und Webschnittstelle auf.
- Zu übergebenes Zahlenformat 200 oder 200.00
- Der ESp nimmt die Leistung an und übergibt Sie dem Soyo , danach ist eine 3Sekunden Pause
- Ersta dann wird der zuletzt empfangene Leistungswert dem Soyo übergeben dann wieder 3 sekunden Pause...
- Damit geschieht eine saubere einpendelung gegen ~0watt Verbrauch
- In der Web Seite kann man per Button die Einspeisung beenden(Notaus)
- In der Web Seite kann man per Button die maximale Einspeiseleistung eingestellt werden(MaxPower)
- Die blinkende Überschrift in der Webseite ist ein Alive zeichen , solange die Überschrift "ESP Herzschlag" blinkt , ist alles gut
-Derzeit pendelt der Esp sich im Toleranz Bereich -20 |0| +5 Watt ein , geplant ist die Toleranzwerte einzustellen zu können wann jemand gar keine -watts(Einspeisung ins Netz) sehen will.
- ...




RS485 ttl Adaper
- dein rs485 adapter a an Rot von soyo Kabel anschliessen , schwarz ist B
- bei meinem rs485 adapter habe ich Rs485TX mit EspTX verbinden müssen , also nicht kreuzen
- rx brauchz du derzeit noch nicht


ESP:

EINRICHTUNG##############################################################################################
0.Bei Nutzung von Mqtt: Mqtt.fx Client öffnen mit Broker verbinden und Topic : 'Soyosource/#' abonnieren
0.1 Es kommt nach Schritt 8. ein Info Publish vom Esp mit der IP adresse.
0.2 Man kann die Ip Adresse nat. auch auf dem herkömmlichen Weg herausfinden
1.Firmware auf den gelöschten Esp8266 flashen
2.Esp Neustart
3.Im Wlan nach SOYO_... suchen
4.Wlan mit Pwd 12345678 verbinden
5.Es öffnet sich automatisch Browser Fenster mit 192.168.4.1
6.Unter Configuration
6.1 Wifi auswählen oder eingeben und Passwort eingeben
6.2 Mqtt kann derzeit nur ohne ssl und ohne Benutzer/Passwort benutzt werden
7.Speichern mit dem Button ganz unten
8.Esp Neustart
9.Ipadresse in Mqtt Client oder Router ausfindig machen
EINRICHTUNG#############################################################################################

INBETRIEBNAHME##########################################################################################
1.Ipaddresse im browser aufrufen
2.L1L2L3 Topic von geöffneter Webseite in deinen iobroker/nodered ... übernehmen
ODER wann Nutzung von Mqtt aus ist :
3.IPADRESS:80/L1L2L3?Value=200.66
3.1 IPADRESS durch die ip vom ESP ersetzen, 200.66 stellt den kummulierten Wert deiner 2/3 phasen da
INBETRIEBNAHME##########################################################################################

Tip:
nur leistungsdaten(egal welches Interface) senden
wann sich was geändert hat !
1.Mqtt Publish Setting : Qos2 und Retain!
Wenn WebInterface L1L2L3?Value=... genutzt wird dann schon alle sekunden senden
Der esp ansich schickt schon jede sekunde den zuletzt angenommenen Wert.

Falls also jemand Lust hat , bitte PN , wegen Firmware .

RS485MODUL !!!! Einschränkung
vorerst gehen nur solche Module die mit TX ansprechbar sind, wie solche, dabei wird es aber nicht bleiben , da ich damit derzeit die daten vom SOYO nicht empfangen kann https://www.amazon.de/gp/product/B07RKY1G71/ref=ppx_yo_dt_b_asin_title_o05_s00?ie=UTF8&psc=1
Ja, wütend, lol. Nein, nein. Jedes Feedback ist ein gutes Feedback.

Google Translate ist, als würde man Bambi zum Metzger bringen.

Arm, Bein, links, rechts, dann kreisen Sie zurück und sehen Sie, wie sich das übersetzt.

Ich sagte zu einer sehr lieben Person, übersetze über Google und dann nimm diese Übersetzung und übersetze sie noch einmal zurück und schau, ob sie dem entspricht, was du gesagt hast.

Normalerweise nicht so nah.

Allen Übersetzungen fehlt derzeit die wahre Kontextbedeutung, was bedeutet, dass der Übersetzung im Allgemeinen die Fähigkeit fehlt, unvergleichliche Bedeutungswörter zu artikulieren.
 
da ich damit derzeit die daten vom SOYO nicht empfangen kann

Das teil hab ich früher auch gebraucht und das kann durchaus empfangen. Hab damit meine drei DDS238 meter ausgelesen.
Heute hab ich ein USB dongle dazu. Das geht am PC oder auch am orangepi.
 

Attachments

  • Clipboard01.jpg
    Clipboard01.jpg
    70.6 KB · Views: 170
Last edited:
Das teil hab ich früher auch gebraucht und das kann durchaus empfangen. Hab damit meine drei DDS238 meter ausgelesen.
Heute hab ich ein USB dongle dazu. Das geht am PC oder auch am orangepi.
Hallo Pepe
Ja den Usb Adapter hab ich auch , der funktioniert auch gut , am Pc :) , der funktioniert auch mit dem Soyo.
Ich versuchs mit Terminierungs widerstand bei meinem jetztigen ttl Adaper.
Das wird hoffentlich Licht ins Dunkel bringen. :)
 
Ich versuchs mit Terminierungs widerstand bei meinem jetztigen ttl Adaper.

Hast du das mit einen usb-seriell adapter am PC probiert? Dass rx und tx vertauscht sind weisst du ja.
Ich finde das ganze MQTT zeugs ist aufwendig und kompliziert. Ich hätte lieber wenn man den soyo wie bei tasmota mit "http://192.x.x.x/power=200" steuern könnte.

Hab heute gelesen dass ich "nach anmeldung beim EW" legal 600W einspeisen darf. Brief genügt. Mit "konformitätserklärung" und "FI type B" aber die werden kaum kontrollieren. Heisst "plug & play solar". DE hat was ähnliches. Ganz neue perspektive.

Englisch:
Today i read i am actually allowed to feed 600W into the grid after informing the electric company. Was not aware of that. They ask for "compliant hardware" and "$300 safety devices" but who is going to check this? Nobody. Means i do not have to limit the soyo that precisely.
Further my meter allows to consume 600W on one phase and feed back 600W on another phase and this will count as zero. Means i do not need 3 soyo but only one :)
 
Last edited:
Hast du das mit einen usb-seriell adapter am PC probiert? Dass rx und tx vertauscht sind weisst du ja.
Ich finde das ganze MQTT zeugs ist aufwendig und kompliziert. Ich hätte lieber wenn man den soyo wie bei tasmota mit "http://192.x.x.x/power=200" steuern könnte.
am pc funktionerts, ich fange immer mit der funktionierenden seite an :)

mit
http://192.x.x.x/L1L2L3?Value=200
kannst du das ja machen in meiner fimware :)
Mqtt kann aus bleiben


ich schreibe nun wieder in english , wir sind ja schliesslich keinen Deutschen ;-) , hab alles bei Google übersetzt ins deutsche ... :)
 
Last edited:
without much words... create with amass(new english word, amass-stands for many) of Beer :LOL::ROFLMAO:

have a nice day
 
Last edited:
Hello, there have been a number of great programs posted here to control the inverter, however none of them performed the function I was looking for so I created my own which borrows the work of some of the programs published here, therefore I think it only fair to publish back here should my work be useful for anyone else. There is nothing particularly sophisticated about what I have done!! Note I started this back in June 2021 and there have been some other programs published since then, so apologies if there is some confusion or overlap between my work and others.

Note this is designed to solve the particular problem I had, it purposely makes some compromises suitable to my installation that may not suit yours and is intentionally feature limited. In particular all configuration is done in code at compile time so the board must be re-flashed to change things like output limit.

I run this on a Heltec WiFi Kit 32 development board, which is a cheap ESP32 board with integrated OLED screen. The code should work with any ESP32 or ESP8266 microcontroller if the OLED parts of the code are commented out but I have not tested this. I have used Arduino IDE to compile this, use the library manager to import the required libraries. It requires you to also be running an emonpi electricity consumption monitor or some other monitor that can output suitable MQTT messages, I have used the default configuration options in emonpi.

Emonpi uses 100Amp current clamp sensors and a 7 second sampling rate, I have a grid tied solar installation and a "solar diverter" which also uses a current clamp sensor, these all introduce inaccuracies into the electricity consumption reading so the default buffer value in this program is quite generous to ensure the system is never exporting energy or backfeeding into the solar diverter.

https://github.com/ChrisHomewood/MQTT_to_Soyosource-Inverter_RS485

Purpose:
Connect to soyosource grid tie inverter RS485 limiter connection and provide it with a demand signal based on grid import readings from emonpi published on MQTT. This replaces the current sensing limiter device provided with the inverter and duplicates its RS485 output signal.

Features:
- Will send a demand signal to Inverter that attempts to keep electricity imported from Grid at 0 + importbuffer
- Integration with emonpi via the MQTT communication protocol. Code could be modified to support other sources of grid import power measurement, either via MQTT or direct connection of current sensor to microcontroller.
- Performs connectivity check with MQTT broker and handles lost connectivity with MQTT, will attempt to reconnect and will default the Inverter to zero output.
- Performs connectivity check of WiFi and will initiate reconnect if disconnected.
- Uses ESP32 watchdog timer to reset microcontroller if no MQTT packet recieved for 20 seconds. (this provides some tollerance of bad power supply issues to ESP32)
- Supports output of status messages via an OLED display screen

Excluded functionality:
- Does not implement any "safety" features, relies on inverter to implement low input voltage shutdown and have an appropriate power limit set (this is the normal operating mode for the Inverter and how it is designed to behave).
- Does not have input bounds checking, will respond to any integer value passed on the subscribed MQTT topic.
- Does not implement any ramp function for large changes in demand signal, this is not required as the inverter implements its own smoothing algorithm (this is the normal operating mode for the Inverter and how it is designed to behave).
- Does not have a setting for multiple inverters on same RS485 bus, this can be implemented by modifying code to divide the demand signal by the number of inverters. Without this modification I think this code would follow grid demand but with more oscillation. I do not have multiple inverters so am unable to develop and test this functionality.
- Older firmware versions of this Inverter output a periodic status message, this program ignores that message. The inverter I have does not output the message so I am unable to test this functionality.
 
Last edited:
Wow Chris, well done. I'm hoping to investigate you post further when i have some more time. I also have a emonpi that I use to relay an MQTT signal for control using a Rpi at the inverter. I've also been able to update the refresh rate of the emonpi to around 700ms without it crashing. If you are interested I left some details here:

 
Back
Top