API integration for Solplanet inverter (AISWEI)

Cześć, przeglądam wątek dotyczący integracji falowników Solplanet.
Czy jest możliwość, jakąkolwiek metodą komunikacji (rest api, modbus), sterowanie nie tylko trybami współpracy falownik-magazyn, ale też mocą ładowania/rozładowywania?

Czesc, z tego co wiem to w modbusie jest rejestr ktory umozliwia ustawienie czegos takiego. Jest to jedna z rzeczy którą będę dodawał do swojej integracji, jednak musze najpierw ogarnac tam temat samej komunikacji po modbusie (tworzenie/odczytywanie ramek rtu) a jako że nigdy nie mialem z tym styczności to potrzebuje chwili.
Jesli chodzi o sam rejest to odsylam do komentarza: User input · Issue #27 · zbigniewmotyka/home-assistant-solplanet · GitHub jeśli masz komunikacje po modbusie to mozesz to wykorzystac.

  1. Tak, mam ten dokument z mapą rejestrów modbusowych, właśnie ten sugerowany przez Ciebie rejestr bym o to podejrzewał. Miałem nadzieję, że ktoś już to przetestował. Niestety dopiero w weekend będę instalował mój nowy T2. A integracja modbus z testami to pewnie kolejny weekend. Podzielę się wynikami.
  2. Za mną kilkanaście udanych integracji modbusowych RTU i TCP/IP innych urządzeń z ha. Jakby coś to mogę służyć pomocą/podpowiedziami.
  3. Przepraszam, że piszę to na forum ogólnym, ale chyba nie mam dostępu do wysyłania prywatnych wiadomości.

I made a small script to query and set values to the modbus registers using the fdbg.cgi endpoint, here

This doesn’t require any hardware modification if the inverter is already connected via the dongle (or any other way it can be connected to the network).

It can be used to set the battery into charging/discharging; first set the mode into custom mode:

python3 mb_rtu.py --host <inverter_ip> --port 8484 --slave 3 \
    --data-type int16 --address 1103 --type holding \
    --query --write --value 4

Status: ok
Request: 0306044f0004b90c
Response: 0306044f0004b90c
Decoded value: {'address': 1103, 'value': 4}

Than set the charge/discharge values (w)

discharge 1000w

python3 mb_rtu.py --host <inverter_ip> --port 8484 --slave 3 \
    --data-type int16 --address 1152 --type holding \
    --query --write --value 1000

Status: ok
Request: 0306048003e8884e
Response: 0306048003e8884e

charge 1000w

python3 mb_rtu.py --host <inverter_ip> --port 8484 --slave 3 \
    --data-type int16 --address 1152 --type holding \
    --query --write --value -1000

Status: ok
Request: 03060480fc18c9fa
Response: 03060480fc18c9fa

I’ve spent some time figuring out the scheduling charge/discharge system the app has in place. It’s possible to manage it via a POST request on the setting.cgi endpoint. I also created a little helper script, which you can find here.

I’m not entirely sure if the decoding of the information is 100% correct, but I’ve run random tests, and it seems to add up.

I’m trying to imagine how this could be tuned into something useful in the Home Assistant Dashboard. Maybe a sensor that shows the time to the next scheduled event as its status, and has the full dictionary of the weekdays with the slots as an attribute… but than what kind of entity could be setup to edit the schedule?