ioBroker / AdapterRequests

This Place is used to track the status of new Adapter-Requests.
248 stars 36 forks source link

Kostal Smart Energy Meter (KSEM) #672

Open SpezialAgent opened 2 years ago

SpezialAgent commented 2 years ago

Kostal Smart Energy Meter (KSEM). Messwerte für die Kostal Wechselrichter

Hier die Doku: https://forum.iobroker.net/assets/uploads/files/1628289601496-ba_kostal_interface_ksem_de.pdf

Bisher lässt sich der KSEM nur per Modbus auslesen. Das ist mühselig und fehleranfällig. Bestimmte Messwerte liefert nur der KSEM. Aktuell gibt es Adapter für Kostal Plenticore und Kostal Piko_Ba.

In Zusammenhang mit einem KSEM fehlen Messwerte für den Piko. Der Plenticore-Adapter arbeitet leider nicht mit dem Piko Wechselrichter. Die Scriptlösungen per http_Aufruf der API liefern nur maximal 25Werte,

SpezialAgent commented 2 years ago

@Apollon77 Ich kann gerne testen. Aktuell lese ich die Register mit Modbus aus:

_address name description unit type len factor offset formula role room poll wp cw isScale 40071 M_AC_Current AC Current (sum of active phases) A int16be 1 1 0 value true 40072 M_AC_Current_A Phase A AC current A int16be 1 1 0 value true 40073 M_AC_Current_B Phase B AC current A int16be 1 1 0 value true 40074 M_AC_Current_C Phase C AC current A int16be 1 1 0 value true 40075 M_AC_Current_SF AC Current Scale Factor int16be 1 1 0 value true 40076 M_AC_Voltage_LN Line to Neutral AC Voltage (average of active phases) V int16be 1 1 0 value true 40077 M_AC_Voltage_LA Phase A to Neutral AC Voltage V int16be 1 1 0 value true 40078 M_AC_Voltage_LB Phase B to Neutral AC Voltage V int16be 1 1 0 value true 40079 M_AC_Voltage_CN Phase C to Neutral AC Voltage V int16be 1 1 0 value true 40080 M_AC_Voltage_LL Line to Line AC Voltage (average of active phases) V int16be 1 1 0 value true 40081 M_AC_Voltage_AB Phase A to Phase B AC Voltage V int16be 1 1 0 value true 40082 M_AC_Voltage_BC Phase B to Phase C AC Voltage V int16be 1 1 0 value true 40083 M_AC_Voltage_CA Phase C to Phase A AC Voltage V int16be 1 1 0 value true 40084 M_AC_Voltage_SF AC Voltage Scale Factor int16be 1 1 0 value true 40085 M_AC_Freq AC Frequency Hz int16be 1 1 0 value true 40086 M_AC_Freq_SF AC Frequency Scale Factor int16be 1 1 0 value true 40087 M_AC_Power Total Real Power (sum of active phases) W int16be 1 1 0 value true 40088 M_AC_Power_A Phase A AC Real Power W int16be 1 1 0 value true 40089 M_AC_Power_B Phase B AC Real Power W int16be 1 1 0 value true 40090 M_AC_Power_C Phase C AC Real Power W int16be 1 1 0 value true 40091 M_AC_Power_SF AC Real Power Scale Factor int16be 1 1 0 value true 40092 M_AC_VA Total AC Apparent Power (sum of active phases) VA int16be 1 1 0 value true 40093 M_AC_VA_A Phase A AC Apparent Power VA int16be 1 1 0 value true 40094 M_AC_VA_B Phase B AC Apparent Power VA int16be 1 1 0 value true 40095 M_AC_VA_C Phase C AC Apparent Power VA int16be 1 1 0 value true 40096 M_AC_VA_SF AC Apparent Power Scale Factor int16be 1 1 0 value true 40097 M_AC_VAR Total AC Reactive Power (sum of ac- tive phases) var int16be 1 1 0 value true 40098 M_AC_VAR_A Phase A AC Reactive Power var int16be 1 1 0 value true 40099 M_AC_VAR_B Phase B AC Reactive Power var int16be 1 1 0 value true 40100 M_AC_VAR_C Phase C AC Reactive Power var int16be 1 1 0 value true 40101 M_AC_VAR_ SF AC Reactive Power Scale Factor int16be 1 1 0 value true 40102 M_AC_PF Average Power Factor (average of active phases) % int16be 1 1 0 value true 40103 M_AC_PF_A Phase A Power Factor % int16be 1 1 0 value true 40104 M_AC_PF_B Phase B Power Factor % int16be 1 1 0 value true 40105 M_AC_PF_C Phase C Power Factor % int16be 1 1 0 value true 40106 M_AC_PF_SF AC Power Factor Scale Factor int16be 1 1 0 value true 40107 M_Exported Total Exported Real Energy Wh uint32sw 2 1 0 value true 40109 M_Exported_A Phase A Exported Real Energy Wh uint32sw 2 1 0 value true 40111 M_Exported_B Phase B Exported Real Energy Wh uint32sw 2 1 0 value true 40113 M_Exported_C Phase C Exported Real Energy Wh uint32sw 2 1 0 value true 40115 M_Imported Total Imported Real Energy Wh uint32sw 2 1 0 value true 40117 M_Imported_A Phase A Imported Real Energy Wh uint32sw 2 1 0 value true 40119 M_Imported_B Phase B Imported Real Energy Wh uint32sw 2 1 0 value true 40121 M_Imported_C Phase C Imported Real Energy Wh uint32sw 2 1 0 value true 40123 M_Energy_W_SF Real Energy Scale Factor3 int16be 1 1 0 value true 40124 M_Exported_VA Total Exported Apparent Energy VAh uint32sw 2 1 0 value true 40126 M_Exported_VA_A Phase A Exported Apparent Energy VAh uint32sw 2 1 0 value true 40128 M_Exported_VA_B Phase B Exported Apparent Energy VAh uint32sw 2 1 0 value true 40130 M_Exported_VA_C Phase C Exported Apparent Energy VAh uint32sw 2 1 0 value true 40132 M_Imported_VA Total Imported Apparent Energy VAh uint32sw 2 1 0 value true 40134 M_Imported_VA_A Phase A Imported Apparent Energy VAh uint32sw 2 1 0 value true 40136 M_Imported_VA_B Phase B Imported Apparent Energy VAh uint32sw 2 1 0 value true 40138 M_Imported_VA_C Phase C Imported Apparent Energy VAh uint32sw 2 1 0 value true 40140 M_Energy_ VA_SF Apparent Energy Scale Factor int16be 1 1 0 value true 40141 M_Import_ VARh_Q1 Quadrant 1: Tota Imported Reactive Energy VARh uint32sw 2 1 0 value true 40143 M_Import_ VARh_Q1A Phase A – Quadrant 1: Imported Reac- tive Energy VARh uint32sw 2 1 0 value true 40145 M_Import_ VARh_Q1B Phase B – Quadrant 1: Imported Reac- tive Energy VARh uint32sw 2 1 0 value true 40147 M_Import_ VARh_Q1C Phase C – Quadrant 1: Imported Reac- tive Energy VARh uint32sw 2 1 0 value true 40149 M_Import_ VARh_Q2 Quadrant 2: Total Imported Reactive Energy VARh uint32sw 2 1 0 value true 40151 M_Import_ VARh_Q2A Phase A – Quadrant 2: Imported Reac- tive Energy VARh uint32sw 2 1 0 value true 40153 M_Import_ VARh_Q2B Phase B – Quadrant 2: Imported Reac- tive Energy VARh uint32sw 2 1 0 value true 40155 M_Import_ VARh_Q2C Phase C – Quadrant 2: Imported Reac- tive Energy VARh uint32sw 2 1 0 value true 40157 M_Export_ VARh_Q3 Quadrant 3: Total Imported Reactive Energy VARh uint32sw 2 1 0 value true 40159 M_Export_ VARh_Q3A Phase A – Quadrant 3: Imported Reac- tive Energy VARh uint32sw 2 1 0 value true 40161 M_Export_ VARh_Q3B Phase B – Quadrant 3: Imported Reac- tive Energy VARh uint32sw 2 1 0 value true 40163 M_Export_ VARh_Q3C Phase C – Quadrant 3: Imported Reac- tive Energy VARh uint32sw 2 1 0 value true 40165 M_Export_ VARh_Q4 Quadrant 4: Tota Imported Reactive Energy VARh uint32sw 2 1 0 value true 40167 M_Export_ VARh_Q4A Phase A – Quadrant 4: Imported Reac- tive Energy VARh uint32sw 2 1 0 value true 40169 M_Export_ VARh_Q4B Phase B – Quadrant 4: Imported Reac- tive Energy VARh uint32sw 2 1 0 value true 40171 M_Export_ VARh_Q4C Phase C – Quadrant 4: Imported Reac- tive Energy VARh uint32sw 2 1 0 value true 40173 M_Energy_ VAR_SF Reactive Energy Scale Factor int16be 1 1 0 value true 40174 M_Events Event flags uint32sw 2 1 0 value true

Diginix commented 2 years ago

Hat der KSEM denn noch eine API außer Modbus? Was ist an Modbus fehleranfällig? Ich nutze Modbus seit Jahren für mein Kostal WR parallel neben dem Plenticore Adapter, den es anfangs noch nicht gab und die Werte war in der gesamten Zeit immer korrekt.

SpezialAgent commented 2 years ago

Modbus ist schwer zu konfigurieren, gerade bei den Sunspec Registern gibt es Verschiebungen (Start bei 40071 etc.). Auch fehlen mir einfach Werte, wie z.B. der Eigenverbrauch etc. Die Werte sind einfach Null und werden nicht aktualisiert.

Weiterhin gibt es das Problem, dass in Verbindung mit dem KSEM (der als Modbus Master läuft) der Kostal Piko nicht per Modbus ausgelesen werden kann. Das ist irgendeine Kostal Sache. Ich habe im Forum ein Script gefunden, dass die Web-Schnittstelle per API auslesen kann, aber auch nur 25 Werte.

Alle Werte liegen (leider) nur im Kostal Smart Energy Meter vor. Die werden dann sauber in das Kostal Solar Portal übertragen (Eigenverbrauch, Einspeisung, Eigennutzung etc.).

Der Plenticore scheint da einfacher als der Piko zu sein. Ich habe eine 21,6 Kwp Anlage, das schafft der Plenticore nicht.

Gruß Martin

Am 10.10.2021 um 20:30 schrieb Diginix @.***>:

Hat der KSEM denn noch eine API außer Modbus? Was ist an Modbus fehleranfällig? Ich nutze Modbus seit Jahren für mein Kostal WR parallel neben dem Plenticore Adapter, den es anfangs noch nicht gab und die Werte war in der gesamten Zeit immer korrekt.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ioBroker/AdapterRequests/issues/672#issuecomment-939530607, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKYHXI4CEQT7WMHL5BR2VGTUGHLSTANCNFSM5FWRWB7Q. Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

menkej commented 2 years ago

Aktuell lese ich die Register mit Modbus aus:

@SpezialAgent Ich würde das auch gern machen, kann aber dein Mapping nicht importieren. Vermutlich werden die Tabs im Post gefressen (oder ich bin zu blöd es rauszukopieren). Kannst du deinen Mapping Export vielleicht als Attachment anhängen?

menkej commented 2 years ago

Ok, es sind die Zeilenvorschübe die drauf gehen... Habe mir mal die SourceCode-Ansicht im Browser gekrallt und vor " 40" einen Zeilenvorschub (\r , weil Mac) eingefügt. So konnte ich sie importieren. Mal schauen, ob die Werte plausibel sind... Es wird aktuell nur ein Teil gefüllt..

modbus ksem.txt .

DooMMasteR commented 1 year ago

Das KSEM schickt Total Exported Real Energy usw. als sInt32 anstatt als acc32/uInt32. Sehr ärgerlich, dass Kostal das bis heute, auch mit Software Version 2.0 und dem neuen G2 KSEM nicht gefixed hat.