Solis Wechselrichter (S5-EH1P4.6K-L) via Modbus auslesen

Begonnen von macfly, 24 Mai 2023, 15:36:24

Vorheriges Thema - Nächstes Thema

macfly

Moin zusammen,

ich bin so ziemlich fertig mit dem Auslesen der Daten vom Solis Wechselrichter mit einer einfachen Zweidrahtleitung und einem rs485<->usb adapter. Falls Interesse besteht, kann ich die Definition des Devices hier gerne posten.

Allerdings habe ich noch eine Interpretationsfrage zu einigen Registern (lt. Doku vom 15.9.2020):

33151, S32, AC_Inverter_Power, "Inverter AC Grid Port Power - 1<-->1W, + to grid, - From grid"
33157, S16, AC_Inverting_Power, "Inverting Power/Rectifying Power - 1<-->10W"
33147, U16, AC_House_Power, "Household load power - 1<-->1W"

hat jemand verstanden, was diese Register genau bedeuten? Ab und zu ist AC_House_Power und AC_Inverter_Power identisch, ab und zu nicht. AC_Inverting_Power ist immer kleiner, manchmal auch 0 (tagsüber), manchmal ist auch AC_House_Power 0, niemals jedoch AC_Inverter_Power.

Würde mich freuen, wenn da jemand eine Idee zu hätte ..

liebe Grüße,
Friedhelm

macfly

achso, hier das device:

defmod WR_Solis ModbusAttr 1 60
attr WR_Solis dev-i-defPoll 1
attr WR_Solis dev-type-S16_0-expr $val/10
attr WR_Solis dev-type-S16_0-format %.1f
attr WR_Solis dev-type-S16_0-len 1
attr WR_Solis dev-type-S16_0-unpack S>
attr WR_Solis dev-type-S16_1-expr $val*10
attr WR_Solis dev-type-S16_1-len 1
attr WR_Solis dev-type-S16_1-unpack S>
attr WR_Solis dev-type-S16_11-expr $val*100
attr WR_Solis dev-type-S16_11-len 1
attr WR_Solis dev-type-S16_11-unpack S>
attr WR_Solis dev-type-S32-len 2
attr WR_Solis dev-type-S32-unpack l>
attr WR_Solis dev-type-S32_00-expr $val/100
attr WR_Solis dev-type-S32_00-format %.2f
attr WR_Solis dev-type-S32_00-len 2
attr WR_Solis dev-type-S32_00-unpack l>
attr WR_Solis dev-type-S32_000-expr $val/1000
attr WR_Solis dev-type-S32_000-format %.3f
attr WR_Solis dev-type-S32_000-len 2
attr WR_Solis dev-type-S32_000-unpack l>
attr WR_Solis dev-type-U16-len 1
attr WR_Solis dev-type-U16-unpack S>
attr WR_Solis dev-type-U16_0-expr $val/10
attr WR_Solis dev-type-U16_0-format %.1f
attr WR_Solis dev-type-U16_0-len 1
attr WR_Solis dev-type-U16_0-unpack S>
attr WR_Solis dev-type-U16_00-expr $val/100
attr WR_Solis dev-type-U16_00-format %.2f
attr WR_Solis dev-type-U16_00-len 1
attr WR_Solis dev-type-U16_00-unpack S>
attr WR_Solis dev-type-U32-len 2
attr WR_Solis dev-type-U32-unpack L>
attr WR_Solis dev-type-U32_00-expr $val/100
attr WR_Solis dev-type-U32_00-format %.2f
attr WR_Solis dev-type-U32_00-len 2
attr WR_Solis dev-type-U32_00-unpack L>
attr WR_Solis dev-type-U32_111-expr $val*1000
attr WR_Solis dev-type-U32_111-len 2
attr WR_Solis dev-type-U32_111-unpack L>
attr WR_Solis group PV-Anlage
attr WR_Solis icon measure_photovoltaic_inst
attr WR_Solis obj-i33029-reading AC_Generated_Energy_Total_kWh
attr WR_Solis obj-i33029-type U32
attr WR_Solis obj-i33031-reading AC_Generated_Energy_Month_kWh
attr WR_Solis obj-i33031-type U32
attr WR_Solis obj-i33033-reading AC_Generated_Energy_Lastmonth_kWh
attr WR_Solis obj-i33033-type U32
attr WR_Solis obj-i33035-reading AC_Generated_Energy_Today_kWh
attr WR_Solis obj-i33035-type U16_0
attr WR_Solis obj-i33036-reading AC_Generated_Energy_lastDay_kWh
attr WR_Solis obj-i33036-type U16_0
attr WR_Solis obj-i33037-reading AC_Generated_Energy_Year_kWh
attr WR_Solis obj-i33037-type U32
attr WR_Solis obj-i33039-reading AC_Generated_Energy_Lastyear_kWh
attr WR_Solis obj-i33039-type U32
attr WR_Solis obj-i33049-reading DC_1_Voltage
attr WR_Solis obj-i33049-type U16_0
attr WR_Solis obj-i33050-reading DC_1_Current
attr WR_Solis obj-i33050-type U16_0
attr WR_Solis obj-i33051-reading DC_2_Voltage
attr WR_Solis obj-i33051-type U16_0
attr WR_Solis obj-i33052-reading DC_2_Current
attr WR_Solis obj-i33052-type U16_0
attr WR_Solis obj-i33057-reading DC_Power
attr WR_Solis obj-i33057-type U32
attr WR_Solis obj-i33093-reading Inverter_Temperature
attr WR_Solis obj-i33093-type S16_0
attr WR_Solis obj-i33094-reading AC_Grid_Frequency
attr WR_Solis obj-i33094-type U16_00
attr WR_Solis obj-i33133-reading Battery_Voltage
attr WR_Solis obj-i33133-type U16_0
attr WR_Solis obj-i33134-reading Battery_Current
attr WR_Solis obj-i33134-type S16_0
attr WR_Solis obj-i33135-reading Battery_Current_Direction
attr WR_Solis obj-i33135-type U16
attr WR_Solis obj-i33137-reading AC_Backup_A_Voltage
attr WR_Solis obj-i33137-type U16_0
attr WR_Solis obj-i33138-reading AC_Backup_A_Current
attr WR_Solis obj-i33138-type U16_0
attr WR_Solis obj-i33139-reading Battery_SOC_pct
attr WR_Solis obj-i33139-type U16
attr WR_Solis obj-i33140-reading Battery_SOH_pct
attr WR_Solis obj-i33140-type U16
attr WR_Solis obj-i33141-reading Battery_BMS_Voltage
attr WR_Solis obj-i33141-type U16_00
attr WR_Solis obj-i33142-reading Battery_BMS_Current
attr WR_Solis obj-i33142-type S16_0
attr WR_Solis obj-i33143-reading Battery_BMS_Charge_lim
attr WR_Solis obj-i33143-type U16_0
attr WR_Solis obj-i33144-reading Battery_BMS_Discharge_lim
attr WR_Solis obj-i33144-type U16_0
attr WR_Solis obj-i33147-reading AC_House_Power
attr WR_Solis obj-i33147-type U16
attr WR_Solis obj-i33148-reading AC_Backup_Power
attr WR_Solis obj-i33148-type U16
attr WR_Solis obj-i33149-reading Battery_Power
attr WR_Solis obj-i33149-type S32
attr WR_Solis obj-i33151-reading AC_Inverter_Power
attr WR_Solis obj-i33151-type S32
attr WR_Solis obj-i33153-reading AC_Backup_B_Voltage
attr WR_Solis obj-i33153-type U16_0
attr WR_Solis obj-i33154-reading AC_Backup_B_Current
attr WR_Solis obj-i33154-type U16_0
attr WR_Solis obj-i33155-reading AC_Backup_C_Voltage
attr WR_Solis obj-i33155-type U16_0
attr WR_Solis obj-i33156-reading AC_Backup_C_Current
attr WR_Solis obj-i33156-type U16_0
attr WR_Solis obj-i33157-reading AC_Inverting_Power
attr WR_Solis obj-i33157-type S16_1
attr WR_Solis obj-i33161-reading Battery_Charge_Energy_Total_kWh
attr WR_Solis obj-i33161-type U32
attr WR_Solis obj-i33163-reading Battery_Charge_Energy_Today_kWh
attr WR_Solis obj-i33163-type U16_0
attr WR_Solis obj-i33164-reading Battery_Charge_Energy_lastDay_kWh
attr WR_Solis obj-i33164-type U16_0
attr WR_Solis obj-i33165-reading Battery_Discharge_Energy_Total_kWh
attr WR_Solis obj-i33165-type U32
attr WR_Solis obj-i33167-reading Battery_Discharge_Energy_Today_kWh
attr WR_Solis obj-i33167-type U16_0
attr WR_Solis obj-i33168-reading Battery_Discharge_Energy_lastDay_kWh
attr WR_Solis obj-i33168-type U16_0
attr WR_Solis obj-i33169-reading AC_Imported_Energy_Total_kWh
attr WR_Solis obj-i33169-type U32
attr WR_Solis obj-i33171-reading AC_Imported_Energy_Today_kWh
attr WR_Solis obj-i33171-type U16_0
attr WR_Solis obj-i33172-reading AC_Imported_Energy_lastDay_kWh
attr WR_Solis obj-i33172-type U16_0
attr WR_Solis obj-i33173-reading AC_Exported_Energy_Total_kWh
attr WR_Solis obj-i33173-type U32
attr WR_Solis obj-i33175-reading AC_Exported_Energy_Today_kWh
attr WR_Solis obj-i33175-type U16_0
attr WR_Solis obj-i33176-reading AC_Exported_Energy_lastDay_kWh
attr WR_Solis obj-i33176-type U16_0
attr WR_Solis obj-i33177-reading AC_Load_Energy_Total_kWh
attr WR_Solis obj-i33177-type U32
attr WR_Solis obj-i33179-reading AC_Load_Energy_Today_kWh
attr WR_Solis obj-i33179-type U16_0
attr WR_Solis obj-i33180-reading AC_Load_Energy_lastDay_kWh
attr WR_Solis obj-i33180-type U16_0
attr WR_Solis obj-i33251-reading Meter_AC_Voltage_A
attr WR_Solis obj-i33251-type U16_0
attr WR_Solis obj-i33252-reading Meter_AC_Current_A
attr WR_Solis obj-i33252-type U16_00
attr WR_Solis obj-i33253-reading Meter_AC_Voltage_B
attr WR_Solis obj-i33253-type U16_0
attr WR_Solis obj-i33254-reading Meter_AC_Current_B
attr WR_Solis obj-i33254-type U16_00
attr WR_Solis obj-i33255-reading Meter_AC_Voltage_C
attr WR_Solis obj-i33255-type U16_0
attr WR_Solis obj-i33256-reading Meter_AC_Current_C
attr WR_Solis obj-i33256-type U16_00
attr WR_Solis obj-i33257-reading Meter_Active_A_Power
attr WR_Solis obj-i33257-type S32_000
attr WR_Solis obj-i33259-reading Meter_Active_B_Power
attr WR_Solis obj-i33259-type S32_000
attr WR_Solis obj-i33261-reading Meter_Active_C_Power
attr WR_Solis obj-i33261-type S32_000
attr WR_Solis obj-i33263-reading Meter_Total_Active_Power
attr WR_Solis obj-i33263-type S32_000
attr WR_Solis obj-i33282-reading Meter_Grid_Frequency
attr WR_Solis obj-i33282-type U16_00
attr WR_Solis obj-i33283-reading Meter_Total_Active_from_Grid_Energy
attr WR_Solis obj-i33283-type U32_00
attr WR_Solis obj-i33285-reading Meter_Total_Active_to_Grid_Energy
attr WR_Solis obj-i33285-type U32_00

macfly

hoppla, kleiner Fehler in den Datentypen. Korrektur:

attr WR_Solis dev-type-S16_0-unpack s>
attr WR_Solis dev-type-S16_1-unpack s>
attr WR_Solis dev-type-S16_11-unpack s>

Guzzi-Charlie

Hallo Friedhelm,

ich wollte mich endlich auch mal daran versuchen die Daten von meinen Solis-Wechselrichtern (3 Stück) auszulesen um auch alle WR-internen Daten sehen/verarbeiten zu können. Die wichtigen Daten lese ich zur Zeit aus nachgeschalteten Stromzählern (auch Modbus) aus.

Ich habe schon einige Möglichkeiten gefunden wie man den Solis-WR'n ihre Daten entlocken können soll. Leider war bisher keiner meiner Versuche von Erfolg gekrönt.

Die folgenden Varianten habe ich bisher gefunden:
  • Im Solis WIFI-Stick einen zweiten Server (z.B. den RasPi auf dem FHem läuft) eintragen.
    => Das wäre bei meinem Stick wohl möglich, aber ich habe keine Ahnung was ich dann auf der FHEM-Seite machen müßte.
  • Per RS485/TTL-Konverter und D1-Mini (mit Tasmota-FW) die Daten mit MQTT senden.
    => Den Adapter habe ich gebaut (diese Variante habe ich schon bei vielen Modbus-Stromzählern erfolgreich im Einsatz)
    => Leider habe ich bisher nirgends korrekte Daten für die Erstellung des Scripts gefunden.
  • Die originale Solis-FW des WIFI-Sticks durch eine andere FW ersetzen
    => habe ich bisher nicht versucht.
  • Den Solis-WR an einen bereits vorhandenen Modbus hängen
    => hat auch nicht funktioniert, bekomme keine Daten
  • Den WR direkt über einen RS485/USB-Adapter an einen PC-anschließen (zu Testzwecken)
    => da bekomme ich immerhin eine Verbindung zum WR und der liefert bei Abfragen auch Daten, aber leider nur unsinnige Werte

Bei meinen Suchen bin ich dann auch auf Deinen Ansatz gestoßen. Leider bekomme ich auch damit dem WR keine Daten entlockt.

Kannst Du mir vielleicht mal genau sagen wie die Kopplung bei Dir im Detail aussieht?

Bei mir gibt es aktuell das folgende Setup:
  • Als zentrales Modul dient das Modbus-Modul mit dem sich dann die gerätespezifischen Module verbinden
  • SDM120M-Module
  • XTM100A-Module
  • RS485/D1Mini (mit Tasmota und passendem Script) zu MQTT für die EVU-Zähler
  • RS485/D1Mini (mit Tasmota und passendem Script) zu MQTT für ABB B23-Zähler

Desweiteren habe ich noch DS100B-Zähler von B+G E-Tech, die aber auch noch nicht auslesbar sind.
- RaspPI 4+: (Cuno V2 -2x KS300, JeeLink -13x EC3000)
- Stromzähler (B+G E-Tech): 6x SDM120M, 9x XTM100A, 38x DRS110M
- LAN: IT LAN-Gateway mit 34x RMF-R1 (Rohrmotor24)
- WLAN: 85x Shelly, 12x Gosund SP111, 16x D1-Mini, 15x Sonoff Basic
- DECT: 6x DECT200, 8x DECT301, - HmIP: 3x FalmotC12, 16x WTH2

macfly

Ich habe eine einfach 4-draht-Klingelleitung von meinem fhem-Server zum Wechselrichter gezogen. Am Server ist dieses Kabel mit einem RS485 Adapter angeschlossen.

in FHEM habe ich als Masterdevice

defmod ModbusLine Modbus /dev/serial/by-id/usb-FTDI_FT232R_USB_UART_A10MWZNO-if00-port0@9600

und für den Solis

defmod WR_Solis ModbusAttr 1 30

und dann natürlich die ganzen Register gemappt. Mehr nicht.

Guzzi-Charlie

Hallo Friedhelm,

vielen Dank für die schnelle Antwort. Genau so habe ich es ja auch versucht, aber ich bekomme leider keine Daten.

Hier das Masterdevice des funktionierenden Modbusses (an dem hängen ca. 10 verschiedene Stromzähler)
defmod Modbus_KG Modbus /dev/serial/by-id/usb-1a86_USB2.0-Serial-if00-port0@9600,8,E,1
attr Modbus_KG room Empfänger/Sender

setstate Modbus_KG opened
setstate Modbus_KG 2024-02-21 15:07:42 state opened

Hier das Solis-Device (das hatte ich 1:1 von Deiner Vorlage übernommen, bis auf die Adresse, mein Solis hat die Adr. 11):
defmod WR_Solis ModbusAttr 11 30
attr WR_Solis dev-i-defPoll 1
attr WR_Solis dev-type-S16_0-expr $val/10
attr WR_Solis dev-type-S16_0-format %.1f
attr WR_Solis dev-type-S16_0-len 1
attr WR_Solis dev-type-S16_0-unpack s>
attr WR_Solis dev-type-S16_1-expr $val*10
attr WR_Solis dev-type-S16_1-len 1
attr WR_Solis dev-type-S16_1-unpack s>
attr WR_Solis dev-type-S16_11-expr $val*100
attr WR_Solis dev-type-S16_11-len 1
attr WR_Solis dev-type-S16_11-unpack s>
attr WR_Solis dev-type-S32-len 2
attr WR_Solis dev-type-S32-unpack l>
attr WR_Solis dev-type-S32_00-expr $val/100
attr WR_Solis dev-type-S32_00-format %.2f
attr WR_Solis dev-type-S32_00-len 2
attr WR_Solis dev-type-S32_00-unpack l>
attr WR_Solis dev-type-S32_000-expr $val/1000
attr WR_Solis dev-type-S32_000-format %.3f
attr WR_Solis dev-type-S32_000-len 2
attr WR_Solis dev-type-S32_000-unpack l>
attr WR_Solis dev-type-U16-len 1
attr WR_Solis dev-type-U16-unpack s>
attr WR_Solis dev-type-U16_0-expr $val/10
attr WR_Solis dev-type-U16_0-format %.1f
attr WR_Solis dev-type-U16_0-len 1
attr WR_Solis dev-type-U16_0-unpack s>
attr WR_Solis dev-type-U16_00-expr $val/100
attr WR_Solis dev-type-U16_00-format %.2f
attr WR_Solis dev-type-U16_00-len 1
attr WR_Solis dev-type-U16_00-unpack s>
attr WR_Solis dev-type-U32-len 2
attr WR_Solis dev-type-U32-unpack L>
attr WR_Solis dev-type-U32_00-expr $val/100
attr WR_Solis dev-type-U32_00-format %.2f
attr WR_Solis dev-type-U32_00-len 2
attr WR_Solis dev-type-U32_00-unpack L>
attr WR_Solis dev-type-U32_111-expr $val*1000
attr WR_Solis dev-type-U32_111-len 2
attr WR_Solis dev-type-U32_111-unpack L>
attr WR_Solis icon measure_photovoltaic_inst
attr WR_Solis obj-i33029-reading AC_Generated_Energy_Total_kWh
attr WR_Solis obj-i33029-type U32
attr WR_Solis obj-i33031-reading AC_Generated_Energy_Month_kWh
attr WR_Solis obj-i33031-type U32
attr WR_Solis obj-i33033-reading AC_Generated_Energy_Lastmonth_kWh
attr WR_Solis obj-i33033-type U32
attr WR_Solis obj-i33035-reading AC_Generated_Energy_Today_kWh
attr WR_Solis obj-i33035-type U16_0
attr WR_Solis obj-i33036-reading AC_Generated_Energy_lastDay_kWh
attr WR_Solis obj-i33036-type U16_0
attr WR_Solis obj-i33037-reading AC_Generated_Energy_Year_kWh
attr WR_Solis obj-i33037-type U32
attr WR_Solis obj-i33039-reading AC_Generated_Energy_Lastyear_kWh
attr WR_Solis obj-i33039-type U32
attr WR_Solis obj-i33049-reading DC_1_Voltage
attr WR_Solis obj-i33049-type U16_0
attr WR_Solis obj-i33050-reading DC_1_Current
attr WR_Solis obj-i33050-type U16_0
attr WR_Solis obj-i33051-reading DC_2_Voltage
attr WR_Solis obj-i33051-type U16_0
attr WR_Solis obj-i33052-reading DC_2_Current
attr WR_Solis obj-i33052-type U16_0
attr WR_Solis obj-i33057-reading DC_Power
attr WR_Solis obj-i33057-type U32
attr WR_Solis obj-i33093-reading Inverter_Temperature
attr WR_Solis obj-i33093-type S16_0
attr WR_Solis obj-i33094-reading AC_Grid_Frequency
attr WR_Solis obj-i33094-type U16_00
attr WR_Solis obj-i33133-reading Battery_Voltage
attr WR_Solis obj-i33133-type U16_0
attr WR_Solis obj-i33134-reading Battery_Current
attr WR_Solis obj-i33134-type S16_0
attr WR_Solis obj-i33135-reading Battery_Current_Direction
attr WR_Solis obj-i33135-type U16
attr WR_Solis obj-i33137-reading AC_Backup_A_Voltage
attr WR_Solis obj-i33137-type U16_0
attr WR_Solis obj-i33138-reading AC_Backup_A_Current
attr WR_Solis obj-i33138-type U16_0
attr WR_Solis obj-i33139-reading Battery_SOC_pct
attr WR_Solis obj-i33139-type U16
attr WR_Solis obj-i33140-reading Battery_SOH_pct
attr WR_Solis obj-i33140-type U16
attr WR_Solis obj-i33141-reading Battery_BMS_Voltage
attr WR_Solis obj-i33141-type U16_00
attr WR_Solis obj-i33142-reading Battery_BMS_Current
attr WR_Solis obj-i33142-type S16_0
attr WR_Solis obj-i33143-reading Battery_BMS_Charge_lim
attr WR_Solis obj-i33143-type U16_0
attr WR_Solis obj-i33144-reading Battery_BMS_Discharge_lim
attr WR_Solis obj-i33144-type U16_0
attr WR_Solis obj-i33147-reading AC_House_Power
attr WR_Solis obj-i33147-type U16
attr WR_Solis obj-i33148-reading AC_Backup_Power
attr WR_Solis obj-i33148-type U16
attr WR_Solis obj-i33149-reading Battery_Power
attr WR_Solis obj-i33149-type S32
attr WR_Solis obj-i33151-reading AC_Inverter_Power
attr WR_Solis obj-i33151-type S32
attr WR_Solis obj-i33153-reading AC_Backup_B_Voltage
attr WR_Solis obj-i33153-type U16_0
attr WR_Solis obj-i33154-reading AC_Backup_B_Current
attr WR_Solis obj-i33154-type U16_0
attr WR_Solis obj-i33155-reading AC_Backup_C_Voltage
attr WR_Solis obj-i33155-type U16_0
attr WR_Solis obj-i33156-reading AC_Backup_C_Current
attr WR_Solis obj-i33156-type U16_0
attr WR_Solis obj-i33157-reading AC_Inverting_Power
attr WR_Solis obj-i33157-type S16_1
attr WR_Solis obj-i33161-reading Battery_Charge_Energy_Total_kWh
attr WR_Solis obj-i33161-type U32
attr WR_Solis obj-i33163-reading Battery_Charge_Energy_Today_kWh
attr WR_Solis obj-i33163-type U16_0
attr WR_Solis obj-i33164-reading Battery_Charge_Energy_lastDay_kWh
attr WR_Solis obj-i33164-type U16_0
attr WR_Solis obj-i33165-reading Battery_Discharge_Energy_Total_kWh
attr WR_Solis obj-i33165-type U32
attr WR_Solis obj-i33167-reading Battery_Discharge_Energy_Today_kWh
attr WR_Solis obj-i33167-type U16_0
attr WR_Solis obj-i33168-reading Battery_Discharge_Energy_lastDay_kWh
attr WR_Solis obj-i33168-type U16_0
attr WR_Solis obj-i33169-reading AC_Imported_Energy_Total_kWh
attr WR_Solis obj-i33169-type U32
attr WR_Solis obj-i33171-reading AC_Imported_Energy_Today_kWh
attr WR_Solis obj-i33171-type U16_0
attr WR_Solis obj-i33172-reading AC_Imported_Energy_lastDay_kWh
attr WR_Solis obj-i33172-type U16_0
attr WR_Solis obj-i33173-reading AC_Exported_Energy_Total_kWh
attr WR_Solis obj-i33173-type U32
attr WR_Solis obj-i33175-reading AC_Exported_Energy_Today_kWh
attr WR_Solis obj-i33175-type U16_0
attr WR_Solis obj-i33176-reading AC_Exported_Energy_lastDay_kWh
attr WR_Solis obj-i33176-type U16_0
attr WR_Solis obj-i33177-reading AC_Load_Energy_Total_kWh
attr WR_Solis obj-i33177-type U32
attr WR_Solis obj-i33179-reading AC_Load_Energy_Today_kWh
attr WR_Solis obj-i33179-type U16_0
attr WR_Solis obj-i33180-reading AC_Load_Energy_lastDay_kWh
attr WR_Solis obj-i33180-type U16_0
attr WR_Solis obj-i33251-reading Meter_AC_Voltage_A
attr WR_Solis obj-i33251-type U16_0
attr WR_Solis obj-i33252-reading Meter_AC_Current_A
attr WR_Solis obj-i33252-type U16_00
attr WR_Solis obj-i33253-reading Meter_AC_Voltage_B
attr WR_Solis obj-i33253-type U16_0
attr WR_Solis obj-i33254-reading Meter_AC_Current_B
attr WR_Solis obj-i33254-type U16_00
attr WR_Solis obj-i33255-reading Meter_AC_Voltage_C
attr WR_Solis obj-i33255-type U16_0
attr WR_Solis obj-i33256-reading Meter_AC_Current_C
attr WR_Solis obj-i33256-type U16_00
attr WR_Solis obj-i33257-reading Meter_Active_A_Power
attr WR_Solis obj-i33257-type S32_000
attr WR_Solis obj-i33259-reading Meter_Active_B_Power
attr WR_Solis obj-i33259-type S32_000
attr WR_Solis obj-i33261-reading Meter_Active_C_Power
attr WR_Solis obj-i33261-type S32_000
attr WR_Solis obj-i33263-reading Meter_Total_Active_Power
attr WR_Solis obj-i33263-type S32_000
attr WR_Solis obj-i33282-reading Meter_Grid_Frequency
attr WR_Solis obj-i33282-type U16_00
attr WR_Solis obj-i33283-reading Meter_Total_Active_from_Grid_Energy
attr WR_Solis obj-i33283-type U32_00
attr WR_Solis obj-i33285-reading Meter_Total_Active_to_Grid_Energy
attr WR_Solis obj-i33285-type U32_00
attr WR_Solis room Solis

setstate WR_Solis active
setstate WR_Solis 2024-02-20 17:21:51 state active


Wie gesagt hatte ich auch schon andere Möglichkeiten versucht, auch mit einem separaten RS485/USB-Stick und auch mal direkt an einen PC mit Modbus-Tool.
  • Mit der Verbindung zu FHEM bekomme ich überhaupt keine Daten.
  • Mit der Verbindung direkt zum PC bekomme ich zwar eine Verbindung und es kommen auch irgendwelche Daten, aber bisher konnte ich nichts Plausibles zuordnen.

Falls Du Ideen/Vorschläge hast, dann freue ich mich über weitere Antworten.
- RaspPI 4+: (Cuno V2 -2x KS300, JeeLink -13x EC3000)
- Stromzähler (B+G E-Tech): 6x SDM120M, 9x XTM100A, 38x DRS110M
- LAN: IT LAN-Gateway mit 34x RMF-R1 (Rohrmotor24)
- WLAN: 85x Shelly, 12x Gosund SP111, 16x D1-Mini, 15x Sonoff Basic
- DECT: 6x DECT200, 8x DECT301, - HmIP: 3x FalmotC12, 16x WTH2

Guzzi-Charlie

kurzer Zwischenstand:

Ich bin etwas weiter gekommen. Das Grundproblem war, daß Solis offensichtlich unterschiedliche Modbustabellen für die verschiedenen WR/WR-Serien verwendet. Ich habe inzwischen mindestens drei verschiedene gefunden. Die von Dir verwendete ist eine Andere als die welche ich für meinen WR (4.6K-4G) benötige. Dann kann es natürlich nicht funktionieren. Inzwischen habe ich eine passende Tabelle der Modbusregisterbelegung gefunden und konnte mit dem PC-Programm auch plausible Daten auslesen.

Als nächstes werde ich nun die Registerbelegung im ModbusAttr-Device anpassen und dann wieder versuchen den WR in mein vorhandenes Modbus-Netzwerk zu hängen.
- RaspPI 4+: (Cuno V2 -2x KS300, JeeLink -13x EC3000)
- Stromzähler (B+G E-Tech): 6x SDM120M, 9x XTM100A, 38x DRS110M
- LAN: IT LAN-Gateway mit 34x RMF-R1 (Rohrmotor24)
- WLAN: 85x Shelly, 12x Gosund SP111, 16x D1-Mini, 15x Sonoff Basic
- DECT: 6x DECT200, 8x DECT301, - HmIP: 3x FalmotC12, 16x WTH2

Guzzi-Charlie

So, hier nun die Erfolgsmeldung:

der Solis-WR ist nun in FHEM per Modbus eingebunden. Es gab noch eine kleine Schwierigkeit mit dem Modbus Protokolleinstellungen. Mein vorhandener Modbus (angeschlossen über einen RS485 USB-Adapter) hatte die Einstellung "9600,8,E,1". Beim Solis-WR ließ sich aber die Parity-Einstellung nicht ändern. Diese war fix auf "None" eingestellt. Ich hätte deshalb alle anderen (>10) Modbusteilnehmer umstellen müssen. Das wollte ich aber nicht. Deshalb habe ich einen weiteren RS485 USB-Adapter verwendet. Dabei stellte sich dann die nächste Schwierigkeit heraus. Das war ein "Billig-Teil" der keine eigene ID hatte. Stattdessen war diese identisch mit einem der anderen Adapter. Da ich aber alle meine USB-Adapter per "ID" einbinde mußte ich mir einen weiteren RS485-Adapter (mit FTDI-Chip) mit individueller ID kaufen. Und als letztes gab es auch noch ein Spannungsversorgungsproblem des USB-HUB's. Nachdem alles lief stellte ich plötzlich fest das der Jeelink-Adapter und ein HmIP-Relais nicht mehr funktionierten. Erst dachte ich das etwas defekt sei, aber tatsächlich war das verwendete 2A-Netzteil für die an den HUB angeschlossene Last nicht ausreichend. Erst als ich dieses durch ein 3,5A-Netzeil ersetzt hatte funktionierte alle einwandfrei.

Hier nun die Konfi für den Solis 4.6K-4G mit der es jetzt funktioniert:
defmod WR_T11 ModbusAttr 11 60
attr WR_T11 IODev Modbus_KG2
attr WR_T11 alias WR PV1 (Solis 4.6)
attr WR_T11 dev-i-defPoll 1
attr WR_T11 dev-type-S16_0-expr $val/10
attr WR_T11 dev-type-S16_0-format %.1f
attr WR_T11 dev-type-S16_0-len 1
attr WR_T11 dev-type-S16_0-unpack s>
attr WR_T11 dev-type-SN-expr sprintf("%X", $val)
attr WR_T11 dev-type-SN-unpack s>
attr WR_T11 dev-type-U16-len 1
attr WR_T11 dev-type-U16-unpack s>
attr WR_T11 dev-type-U16_0-expr $val/10
attr WR_T11 dev-type-U16_0-format %.1f
attr WR_T11 dev-type-U16_0-len 1
attr WR_T11 dev-type-U16_0-unpack s>
attr WR_T11 dev-type-U16_00-expr $val/100
attr WR_T11 dev-type-U16_00-format %.2f
attr WR_T11 dev-type-U16_00-len 1
attr WR_T11 dev-type-U16_00-unpack s>
attr WR_T11 dev-type-U32-len 2
attr WR_T11 dev-type-U32-unpack L>
attr WR_T11 event-min-interval .*:300
attr WR_T11 event-on-change-reading .*
attr WR_T11 group PV-Wechselrichter ML20
attr WR_T11 icon measure_photovoltaic_inst
attr WR_T11 obj-h3005-expr sprintf("%X", $val)
attr WR_T11 obj-h3005-reading Modbus_ID
attr WR_T11 obj-h3005-unpack s>
attr WR_T11 obj-i3004-reading AC_Active_power__W
attr WR_T11 obj-i3004-type U32
attr WR_T11 obj-i3006-reading DC_Total_output_power__W
attr WR_T11 obj-i3006-type U32
attr WR_T11 obj-i3008-reading AC_Generated_Energy_Total__kWh
attr WR_T11 obj-i3008-type U32
attr WR_T11 obj-i3010-reading AC_Generated_Energy_Month__kWh
attr WR_T11 obj-i3010-type U32
attr WR_T11 obj-i3012-reading AC_Generated_Energy_Lastmonth__kWh
attr WR_T11 obj-i3012-type U32
attr WR_T11 obj-i3014-reading AC_Generated_Energy_Today__kWh
attr WR_T11 obj-i3014-type U16_0
attr WR_T11 obj-i3015-reading AC_Generated_Energy_LastDay__kWh
attr WR_T11 obj-i3015-type U16_0
attr WR_T11 obj-i3016-reading AC_Generated_Energy_Year__kWh
attr WR_T11 obj-i3016-type U32
attr WR_T11 obj-i3018-reading AC_Generated_Energy_Lastyear__kWh
attr WR_T11 obj-i3018-type U32
attr WR_T11 obj-i3021-reading DC_1_Voltage__V
attr WR_T11 obj-i3021-type U16_0
attr WR_T11 obj-i3022-reading DC_1_Current__A
attr WR_T11 obj-i3022-type U16_0
attr WR_T11 obj-i3023-reading DC_2_Voltage__V
attr WR_T11 obj-i3023-type U16_0
attr WR_T11 obj-i3024-reading DC_2_Current__A
attr WR_T11 obj-i3024-type U16_0
attr WR_T11 obj-i3041-reading Inverter_Temp___C
attr WR_T11 obj-i3041-type U16_0
attr WR_T11 obj-i3042-reading Grid-Frequency__Hz
attr WR_T11 obj-i3042-type U16_0
attr WR_T11 obj-i3060-reading Serial_No_a
attr WR_T11 obj-i3060-type SN
attr WR_T11 obj-i3061-reading Serial_No_b
attr WR_T11 obj-i3061-type SN
attr WR_T11 obj-i3062-reading Serial_No_c
attr WR_T11 obj-i3062-type SN
attr WR_T11 obj-i3063-reading Serial_No_d
attr WR_T11 obj-i3063-type SN
attr WR_T11 room Solis
attr WR_T11 stateFormat {"P DC: ".ReadingsVal($name,"DC_Total_output_power__W",0)." W          ".\
 "P AC: ".ReadingsVal($name,"AC_Active_power__W",0)." W          ".\
 "E: ".sprintf("%.2f",ReadingsVal($name,"AC_Generated_Energy_Total__kWh",0))." kWh          "\
 }
attr WR_T11 userReadings Serial_No {substr(ReadingsVal("$name", "Serial_No_a", ""),15,1).\
substr(ReadingsVal("$name", "Serial_No_a", ""),14,1).\
substr(ReadingsVal("$name", "Serial_No_a", ""),13,1).\
substr(ReadingsVal("$name", "Serial_No_a", ""),12,1).\
substr(ReadingsVal("$name", "Serial_No_b", ""),15,1).\
substr(ReadingsVal("$name", "Serial_No_b", ""),14,1).\
substr(ReadingsVal("$name", "Serial_No_b", ""),13,1).\
substr(ReadingsVal("$name", "Serial_No_b", ""),12,1).\
substr(sprintf("%04d",ReadingsVal("$name", "Serial_No_c", "")),3,1).\
substr(sprintf("%04d",ReadingsVal("$name", "Serial_No_c", "")),2,1).\
substr(sprintf("%04d",ReadingsVal("$name", "Serial_No_c", "")),1,1).\
substr(sprintf("%04d",ReadingsVal("$name", "Serial_No_c", "")),0,1).\
substr(ReadingsVal("$name", "Serial_No_d", ""),2,1).\
substr(ReadingsVal("$name", "Serial_No_d", ""),1,1).\
substr(ReadingsVal("$name", "Serial_No_d", ""),0,1)\
}
Bei der Seriennummer habe ich ein wenig "gebastelt" um die richtig darstellen zu können. Das geht sicher auch eleganter, aber das war sowieso mehr Spielerei als Notwendigkeit.

Und hier die Konfi für den Solis S6-GR1P 1.0K-M:
defmod WR_T42 ModbusAttr 39 30
attr WR_T42 IODev Modbus_KG2
attr WR_T42 alias WR PV4.1 (Solis 1.0)
attr WR_T42 dev-i-defPoll 1
attr WR_T42 dev-type-S16_0-expr $val/10
attr WR_T42 dev-type-S16_0-format %.1f
attr WR_T42 dev-type-S16_0-len 1
attr WR_T42 dev-type-S16_0-unpack s>
attr WR_T42 dev-type-SN-expr sprintf("%X", $val)
attr WR_T42 dev-type-SN-unpack s>
attr WR_T42 dev-type-U16-len 1
attr WR_T42 dev-type-U16-unpack s>
attr WR_T42 dev-type-U16_0-expr $val/10
attr WR_T42 dev-type-U16_0-format %.1f
attr WR_T42 dev-type-U16_0-len 1
attr WR_T42 dev-type-U16_0-unpack s>
attr WR_T42 dev-type-U16_00-expr $val/100
attr WR_T42 dev-type-U16_00-format %.2f
attr WR_T42 dev-type-U16_00-len 1
attr WR_T42 dev-type-U16_00-unpack s>
attr WR_T42 dev-type-U32-len 2
attr WR_T42 dev-type-U32-unpack L>
attr WR_T42 event-min-interval .*:300
attr WR_T42 event-on-change-reading .*
attr WR_T42 group PV-Wechselrichter ML20
attr WR_T42 icon measure_photovoltaic_inst
attr WR_T42 obj-h03006-reading scan-h03006
attr WR_T42 obj-h3005-reading Modbus_ID
attr WR_T42 obj-h3005-type U16
attr WR_T42 obj-i3004-reading AC_Active_power__W
attr WR_T42 obj-i3004-type U32
attr WR_T42 obj-i3006-reading DC_Total_output_power__W
attr WR_T42 obj-i3006-type U32
attr WR_T42 obj-i3008-reading AC_Generated_Energy_Total__kWh
attr WR_T42 obj-i3008-type U32
attr WR_T42 obj-i3010-reading AC_Generated_Energy_Month__kWh
attr WR_T42 obj-i3010-type U32
attr WR_T42 obj-i3012-reading AC_Generated_Energy_Lastmonth__kWh
attr WR_T42 obj-i3012-type U32
attr WR_T42 obj-i3014-reading AC_Generated_Energy_Today__kWh
attr WR_T42 obj-i3014-type U16_0
attr WR_T42 obj-i3015-reading AC_Generated_Energy_LastDay__kWh
attr WR_T42 obj-i3015-type U16_0
attr WR_T42 obj-i3016-reading AC_Generated_Energy_Year__kWh
attr WR_T42 obj-i3016-type U32
attr WR_T42 obj-i3018-reading AC_Generated_Energy_Lastyear__kWh
attr WR_T42 obj-i3018-type U32
attr WR_T42 obj-i3021-reading DC_1_Voltage__V
attr WR_T42 obj-i3021-type U16_0
attr WR_T42 obj-i3022-reading DC_1_Current__A
attr WR_T42 obj-i3022-type U16_0
attr WR_T42 obj-i3041-reading Inverter_Temp__C
attr WR_T42 obj-i3041-type U16_0
attr WR_T42 obj-i3042-reading Grid-Frequency__Hz
attr WR_T42 obj-i3042-type U16_00
attr WR_T42 obj-i3060-reading Serial_No_a
attr WR_T42 obj-i3060-type SN
attr WR_T42 obj-i3061-reading Serial_No_b
attr WR_T42 obj-i3061-type SN
attr WR_T42 obj-i3062-reading Serial_No_c
attr WR_T42 obj-i3062-type SN
attr WR_T42 obj-i3063-reading Serial_No_d
attr WR_T42 obj-i3063-type SN
attr WR_T42 room Solis
attr WR_T42 stateFormat {"P DC: ".ReadingsVal($name,"DC_Total_output_power__W",0)." W          ".\
 "P AC: ".ReadingsVal($name,"AC_Active_power__W",0)." W          ".\
 "E: ".sprintf("%.2f",ReadingsVal($name,"AC_Generated_Energy_Total__kWh",0))." kWh          "\
 }
attr WR_T42 userReadings Serial_No {substr(ReadingsVal("$name", "Serial_No_a", ""),3,1).\
substr(ReadingsVal("$name", "Serial_No_a", ""),2,1).\
substr(ReadingsVal("$name", "Serial_No_a", ""),1,1).\
substr(ReadingsVal("$name", "Serial_No_a", ""),0,1).\
substr(ReadingsVal("$name", "Serial_No_b", ""),3,1).\
substr(ReadingsVal("$name", "Serial_No_b", ""),2,1).\
substr(ReadingsVal("$name", "Serial_No_b", ""),1,1).\
substr(ReadingsVal("$name", "Serial_No_b", ""),0,1).\
substr(sprintf("%04d",ReadingsVal("$name", "Serial_No_c", "")),3,1).\
substr(sprintf("%04d",ReadingsVal("$name", "Serial_No_c", "")),2,1).\
substr(sprintf("%04d",ReadingsVal("$name", "Serial_No_c", "")),1,1).\
substr(sprintf("%04d",ReadingsVal("$name", "Serial_No_c", "")),0,1).\
substr(ReadingsVal("$name", "Serial_No_d", ""),3,1).\
substr(ReadingsVal("$name", "Serial_No_d", ""),2,1).\
substr(ReadingsVal("$name", "Serial_No_d", ""),1,1).\
substr(ReadingsVal("$name", "Serial_No_d", ""),0,1)\
}

Ich hoffe das die Konfi's nun auch Anderen weiterhelfen werden.
- RaspPI 4+: (Cuno V2 -2x KS300, JeeLink -13x EC3000)
- Stromzähler (B+G E-Tech): 6x SDM120M, 9x XTM100A, 38x DRS110M
- LAN: IT LAN-Gateway mit 34x RMF-R1 (Rohrmotor24)
- WLAN: 85x Shelly, 12x Gosund SP111, 16x D1-Mini, 15x Sonoff Basic
- DECT: 6x DECT200, 8x DECT301, - HmIP: 3x FalmotC12, 16x WTH2

Mr.1000V

Steuerung des Solis Wechselrichters

Ich habe einen Solis S6-GR1P 1,5kw. Soweit habe ich die Sache genauso auch am laufen, ich sehe die relevanten Daten in fhem.
Doch nun kommt irgendwann der Wunsch, den Wechselrichter so zu steuern, dass man keine Energie ins Netz einspeist. Nulleinspeisung quasi, denn dann kann ich meine Anlage größer als 600W wählen.

Welche Befehle muss ich in welcher Syntax an den Wr senden um z.Bsp. nur 50% Ausgangsleistung zu generieren?
Im WR kann man das im Menü ja sauber begrenzen... aber wer sitzt schon dauernd vor dem WR?  :o