Neues Modul - 70_KEBA.pm zur Steuerung Keba KeContect P20

Begonnen von marcus42, 29 November 2015, 12:38:12

Vorheriges Thema - Nächstes Thema

hasenhirn

Neee, das bekommen wir bestimmt hin ;-)
Funktioniert die Kommunikation grundsätzlich ?

hasenhirn

wie ist den der Status / was steht im Reading von:

AuthON
Authreq
Enablesys
Enableuser
Plug
State

maci

Die Kommunikation funktioniert.
In den Readings von:
AuthON: 0
Authreq: 0
Enablesys: enabled
Enableuser: enabled
Plug: plugged on wallbox, locked
State: not ready for charging

Derzeit ist die das Kabel nicht am Fahrzeug angeschlossen.
Fhem auf Dell Thinclient, Fhem auf Raspebrry Pi4,
UniPi Vers. 1.1 mit Raspberry Pi3, 1wire USB Adapter mit OWX
Netatmo Wetterstation + Regenmesser + Netatmo Thermostat
Homematic mit HMLan

hasenhirn

Den Stecker muss man auf jeden Fall einstecken, da bin ich mir ganz sicher  ;D ;D ;D

So sieht es bei mir aus wenn die Box auf 6A eingestellt ist, eingesteckt und über das stop-Kommando unterbrochen ist:

Zitat
AuthON         1   2021-05-24 16:27:01
Authreq         1   2021-05-24 16:27:01
Backend         0   2021-05-24 16:27:12
COM-module   0    2021-05-24 16:27:12
CurrFS         0   2021-05-24 16:27:01
CurrHW     32000   2021-05-24 16:27:01
Currtimer         0   2021-05-24 16:27:01
Curruser       6000   2021-05-24 16:27:01
DIP-Sw1       0x25   2021-05-24 16:27:12
DIP-Sw2       0x00   2021-05-24 16:27:12
Enablesys    disabled   2021-05-24 16:27:01
Enableuser  enabled   2021-05-24 16:27:01
Epres    106150   2021-05-24 16:27:01
Error1         0   2021-05-24 16:27:01
Error2         0   2021-05-24 16:27:01
Etotal       46307403   2021-05-24 16:27:01
Firmware   P30 v 3.10.27 (210105-174852)   2021-05-24 16:27:12
I1                 0   2021-05-24 16:27:01
I2                 0   2021-05-24 16:27:01
I3                 0   2021-05-24 16:27:01
ID                 1   2021-05-24 16:27:12
Input              0   2021-05-24 16:27:01
Maxcurr         0   2021-05-24 16:27:01
Maxcurr-Percent    1000   2021-05-24 16:27:01
Output       open   2021-05-24 16:27:01
P                 0   2021-05-24 16:27:01
PF                 0   2021-05-24 16:27:01
Plug    plugged_on_wallbox_ev_and_locked   2021-05-24 16:27:01
Product   KC-P30-EC240422-M0R   2021-05-24 16:27:12
Sec            4078138   2021-05-24 16:27:12
Serial    19257922   2021-05-24 16:27:12
Setenergy         0   2021-05-24 16:27:01
State    charging process temporarily interrupted   2021-05-24 16:27:01
TmoCT         0   2021-05-24 16:27:01
TmoFS         0   2021-05-24 16:27:01
U1                 0   2021-05-24 16:27:01
U2                 0   2021-05-24 16:27:01
U3                 0   2021-05-24 16:27:01
timeQ         2   2021-05-24 16:27:12

So sieht es bei mir aus wenn die Box auf 6A eingestellt ist, eingesteckt und über das start-Kommando am laden ist:

Zitat
AuthON           1   2021-05-24 16:35:43
Authreq           0   2021-05-24 16:35:43
Backend           0   2021-05-24 16:35:53
COM-module   0   2021-05-24 16:35:53
CurrFS           0   2021-05-24 16:35:43
CurrHW        32000   2021-05-24 16:35:43
Currtimer           0   2021-05-24 16:35:43
Curruser        6000   2021-05-24 16:35:43
DIP-Sw1        0x25   2021-05-24 16:35:53
DIP-Sw2       0x00   2021-05-24 16:35:53
Enablesys     enabled   2021-05-24 16:35:43
Enableuser  enabled   2021-05-24 16:35:43
Epres    106548   2021-05-24 16:36:22
Error1         0   2021-05-24 16:35:43
Error2         0   2021-05-24 16:35:43
Etotal   46307438   2021-05-24 16:35:48
Firmware   P30 v 3.10.27 (210105-174852)   2021-05-24 16:35:53
I1              4017   2021-05-24 16:35:48
I2              3959   2021-05-24 16:35:48
I3              5580   2021-05-24 16:35:48
ID                 1   2021-05-24 16:35:53
Input         0   2021-05-24 16:35:43
Maxcurr      6000   2021-05-24 16:35:43
Maxcurr-Percent   100   2021-05-24 16:35:43
Output    open   2021-05-24 16:35:43
P          3179132   2021-05-24 16:35:48
PF             986   2021-05-24 16:35:48
Plug    plugged_on_wallbox_ev_and_locked   2021-05-24 16:35:43
Product   KC-P30-EC240422-M0R   2021-05-24 16:35:53
Sec          4078658   2021-05-24 16:35:53
Serial   19257922   2021-05-24 16:35:53
Setenergy         0   2021-05-24 16:35:43
State   charging   2021-05-24 16:35:43
TmoCT         0   2021-05-24 16:35:43
TmoFS         0   2021-05-24 16:35:43
U1               235   2021-05-24 16:35:48
U2               234   2021-05-24 16:35:48
U3               234   2021-05-24 16:35:48
timeQ         2   2021-05-24 16:35:53


sorry dass die Werte hier etwas durcheinander angezeigt werden.
Ich habe hier 10min. in der Vorschau alles in eine Reihe gebracht und dann ist im Post doch alles zerschossen  >:( >:(
Ich hoffe mit den Werten kommst Du einen Schritt weiter.
Wenn nicht einfach noch mal melden ;-=

Gruß
Thomas

maci

Fhem auf Dell Thinclient, Fhem auf Raspebrry Pi4,
UniPi Vers. 1.1 mit Raspberry Pi3, 1wire USB Adapter mit OWX
Netatmo Wetterstation + Regenmesser + Netatmo Thermostat
Homematic mit HMLan


Humbs

#96
Zitat von: hasenhirn am 16 Mai 2021, 20:00:24
Hallo Humbs,

wie äußert sich denn das "hakeln" ?
Ich habe vor einem Monat auch eine zweite KEBA bestellt.
Leider ist aus der Lieferzeit von 7-15Tagen die KW 29 geworden :-/
Würde mich freuen wenn wir das Problem bis dahin lösen könnten ;-)

LG
Thomas

Hallo Thomas,

bist Du schon klüger in Sachen 2 KEBAs im Netzwerk?
An den IPs liegts sicher nicht, denn die Web GUIs funktionieren einwandfrei.

Wie äußert sich das Problem bei mir:
Der STATE der zweiten Wallbox bleibt auf drei Fragezeichen

Grüße

hasenhirn

Danke für die Info.
Meine 2te Wallbox liegt noch im Keller und wartet auf ihren Anschluss :-)
Bin mal gespannt wie es läuft.  :o

hasenhirn

Moin,

die 2te Wallbox ist jetzt auch installiert und läuft bis auf die Anbindung an FHEM.
Hier habe ich natürlich das gleiche Problem wie alle mit dem Standartmodul für die Keba von Marcus42/sido.
Hat schon jemand das Modul von heiko73 oder ein selbst getuntes im Einsatz welches funktioniert?
Für eine Zusendung oder am besten Veröffentlichung wäre ich sehr dankbar.
Mit meinen bescheidenen Programmierkenntnissen würde ich vermutlich Wochen oder Monate für eine Anpassung benötigen  :(

LG

Thomas

Ralli

Gruß,
Ralli

Proxmox 8.1 Cluster mit HP ED800G2i7, Intel NUC11TNHi7+NUC7i5BNH, virtualisiertes fhem 6.3 dev, virtualisierte RaspberryMatic (3.75.6.20240316) mit HB-RF-ETH 1.3.0 / RPI-RF-MOD, HM-LAN-GW (1.1.5) und HMW-GW, FRITZBOX 7490 (07.57), FBDECT, Siri und Alexa

hasenhirn

#100
Moin,

ich habe mal auf der Basis von marcus42 den Anpassungen von sido und der Erweiterung von heiko73 was zusammen genagelt.
Als Info vorab, ich bin gelernter Schlosser und kein Programmierer  :o 
Also alles ohne Gewähr und auf eigene Gefahr.
Die meiste Arbeit ist von den 3 Jungs, ich habe da nur etwas daran rumgemurkst  ::)
Seit ein paar Tagen habe ich das Modul im Einsatz und bis jetzt noch nicht alles getestet, aber das was ich so täglich brauche funktioniert schon mal  :D
Zur Zeit ist bei mir viel los und ich komme nicht so richtig dazu alles zu Testen.
Vor allem bei der Read/Write Funktion die von heiko73 angepasst wurde blicke ich noch nicht so ganz durch wie das funktioniert.
Vielleicht kann es ja so schon jemand gebrauchen oder es hat einer ein paar gute Tipps für mich und kann mir das erklären.
Im Moment lese ich mir die Developerseiten von FHEM durch und versuche das alles zu verstehen - schau ma mal was daraus wird  ;) 

LG

Thomas

Ralli

#101
ich habe jetzt nur einmal ein wenig recherchiert und gelesen. Das hier sind die aktuellen Dokumentationen:

https://www.keba.com/download/x/4a925c4c61/kecontactp30udp_pgen.pdf
https://www.keba.com/download/x/dea7ae6b84/kecontactp30modbustcp_pgen.pdf

Dementsprechend kann eine Kommunikation mit einer KEBA entweder über UDP oder über Modbus TCP erfolgen. In der UDP-Dokumentation steht mehr oder weniger klar drin, dass  eine Kommunikation über UDP nicht die präferierte Methode darstellt. Zusammen mit dem Broadcast-Thema, dem fest verdrahteten Port für das von Keba aus gesehene Ziel, sollte m.E. eine solche Wallbox eher über Modbus TCP angesprochen werden - vor allem dann, wenn man mehrere Wallboxen integrieren möchte.

Sollte es etwas geben, was nur über UDP und nicht über Modbus TCP abgefragt oder gesteuert werden kann, so wäre tatsächlich m.E. wie an anderer Stelle hier im Thread schon einmal geschrieben in ein IO-Device und die Wallbox(en) als Client-Device zu splitten, um eine saubere Auftrennung bei Nutzung mehrerer Wallboxen zu erreichen.
Gruß,
Ralli

Proxmox 8.1 Cluster mit HP ED800G2i7, Intel NUC11TNHi7+NUC7i5BNH, virtualisiertes fhem 6.3 dev, virtualisierte RaspberryMatic (3.75.6.20240316) mit HB-RF-ETH 1.3.0 / RPI-RF-MOD, HM-LAN-GW (1.1.5) und HMW-GW, FRITZBOX 7490 (07.57), FBDECT, Siri und Alexa

hasenhirn

Hallo Ralli,

als meine zweite Wallbox kam hatte ich auch versucht die Probleme mit Modbus zu umschiffen.
Positiv ist bei Modbus dass man die Werte ganz einfach Formatieren kann.
Direkt im Device können die angezeigten Daten z.B. von mA ( so genau braucht es wohl keiner ) in A umformatiert und dem Ergebniss auch gleich die Einheit hinzugefügt werden.
Leider konnte ich die Box nicht zum Laden bewegen  :o
Ich hatte hier https://forum.fhem.de/index.php/topic,75638.msg1182211.html#msg1182211 mit dem Entwickler des Modbus-Moduls geschrieben der sehr hilfsbereit war aber auch keinen Fehler bei dem Modul feststellen konnte.
Eine Mail an den KEBA-Support blieb bis heute ohne Antwort  ???
Des weiteren kommen über Modbus auch viel weniger Daten als über UDP.
Daher habe ich das KEBA-UDP-Modul mit viel Arbeit ( da wenig Ahnung ) soweit angepasst dass es für meine Ansprüche im Moment funktioniert.
Vor allem die Möglichkeit einzustellen dass er z.B. nur 10kW zum Auto schickt und sich dann abschaltet gefällt mir richtig gut.
Der BMW kann das Ladelimit nicht einstellen und der Tesla geht erst bei 50% los.
So lade ich immer nur was ich brauche und wenn es mal Strom für umme gibt ist noch Platz im Akku  ;D ;D ;D ;D

LG

Thomas


hasenhirn

@Ralli

ich habe gerade mein Laptop aufgeräumt und noch etwas zu dem Thema Modbus gefunden.
Vielleicht kannst du ja etwas davon gebrauchen.

LG Thomas

defmod Keba_Stellplatz ModbusAttr 255 10 192.168.1.22:502 TCP
attr Keba_Stellplatz dev-h-defPoll 1
attr Keba_Stellplatz event-min-interval .*:60
attr Keba_Stellplatz event-on-change-reading .*
attr Keba_Stellplatz obj-h01000-len 2
attr Keba_Stellplatz obj-h01000-map 0:booting, 1:not ready for charging, 2:ready for chargin, 3:charging, 4:error, 5:charging process interrupted
attr Keba_Stellplatz obj-h01000-reading Chargingstate
attr Keba_Stellplatz obj-h01000-unpack N
attr Keba_Stellplatz obj-h01004-len 2
attr Keba_Stellplatz obj-h01004-map 0:no cable is plugged, 1:Cable is connected to charging station, 3:Cabel is connected to the charging station and locked, 5:Cable is connected to the charging station and the EV, 7:Cable is connected to the charging station and the EV an locked
attr Keba_Stellplatz obj-h01004-reading Cablestate
attr Keba_Stellplatz obj-h01004-unpack N
attr Keba_Stellplatz obj-h01006-len 2
attr Keba_Stellplatz obj-h01006-map 0:No error
attr Keba_Stellplatz obj-h01006-reading Error_code
attr Keba_Stellplatz obj-h01006-unpack N
attr Keba_Stellplatz obj-h01008-expr $val / 1000
attr Keba_Stellplatz obj-h01008-format %.3f A
attr Keba_Stellplatz obj-h01008-len 2
attr Keba_Stellplatz obj-h01008-reading Charging_current_phase_1
attr Keba_Stellplatz obj-h01008-unpack N
attr Keba_Stellplatz obj-h01010-expr $val / 1000
attr Keba_Stellplatz obj-h01010-format %.3f A
attr Keba_Stellplatz obj-h01010-len 2
attr Keba_Stellplatz obj-h01010-reading Charging_current_phase_2
attr Keba_Stellplatz obj-h01010-unpack N
attr Keba_Stellplatz obj-h01012-expr $val / 1000
attr Keba_Stellplatz obj-h01012-format %.3f A
attr Keba_Stellplatz obj-h01012-len 2
attr Keba_Stellplatz obj-h01012-reading Charging_current_phase_3
attr Keba_Stellplatz obj-h01012-unpack N
attr Keba_Stellplatz obj-h01014-len 2
attr Keba_Stellplatz obj-h01014-reading Serialnumber
attr Keba_Stellplatz obj-h01014-unpack N
attr Keba_Stellplatz obj-h01016-len 2
attr Keba_Stellplatz obj-h01016-reading Producttype
attr Keba_Stellplatz obj-h01016-unpack N
attr Keba_Stellplatz obj-h01018-len 2
attr Keba_Stellplatz obj-h01018-reading Firmwareversion
attr Keba_Stellplatz obj-h01018-unpack N
attr Keba_Stellplatz obj-h01020-expr $val / 1000000
attr Keba_Stellplatz obj-h01020-format %.3f kWh
attr Keba_Stellplatz obj-h01020-len 2
attr Keba_Stellplatz obj-h01020-reading Active_power
attr Keba_Stellplatz obj-h01020-unpack N
attr Keba_Stellplatz obj-h01036-expr $val / 10000
attr Keba_Stellplatz obj-h01036-format %.3f kWh
attr Keba_Stellplatz obj-h01036-len 2
attr Keba_Stellplatz obj-h01036-reading Total_energy
attr Keba_Stellplatz obj-h01036-unpack N
attr Keba_Stellplatz obj-h01040-format %.1f V
attr Keba_Stellplatz obj-h01040-len 2
attr Keba_Stellplatz obj-h01040-reading Voltage_phase_1
attr Keba_Stellplatz obj-h01040-unpack N
attr Keba_Stellplatz obj-h01042-format %.1f V
attr Keba_Stellplatz obj-h01042-len 2
attr Keba_Stellplatz obj-h01042-reading Voltage_phase_2
attr Keba_Stellplatz obj-h01042-unpack N
attr Keba_Stellplatz obj-h01044-format %.1f V
attr Keba_Stellplatz obj-h01044-len 2
attr Keba_Stellplatz obj-h01044-reading Voltage_phase_3
attr Keba_Stellplatz obj-h01044-unpack N
attr Keba_Stellplatz obj-h01046-expr $val / 10
attr Keba_Stellplatz obj-h01046-format %.1f %
attr Keba_Stellplatz obj-h01046-len 2
attr Keba_Stellplatz obj-h01046-reading Powerfactor
attr Keba_Stellplatz obj-h01046-unpack N
attr Keba_Stellplatz obj-h01100-expr $val / 1000
attr Keba_Stellplatz obj-h01100-format %d A
attr Keba_Stellplatz obj-h01100-len 2
attr Keba_Stellplatz obj-h01100-reading Max_charging_current
attr Keba_Stellplatz obj-h01100-unpack N
attr Keba_Stellplatz obj-h01110-expr $val / 1000
attr Keba_Stellplatz obj-h01110-format %d A
attr Keba_Stellplatz obj-h01110-len 2
attr Keba_Stellplatz obj-h01110-reading Max_supported_current
attr Keba_Stellplatz obj-h01110-unpack N
attr Keba_Stellplatz obj-h05004-expr $val / 1000
attr Keba_Stellplatz obj-h05004-format %d A
attr Keba_Stellplatz obj-h05004-max 63
attr Keba_Stellplatz obj-h05004-min 6
attr Keba_Stellplatz obj-h05004-reading Set_charging_current
attr Keba_Stellplatz obj-h05004-set 1
attr Keba_Stellplatz obj-h05004-setexpr $val * 1000
attr Keba_Stellplatz obj-h05010-reading Set_energy
attr Keba_Stellplatz obj-h05010-set 1
attr Keba_Stellplatz obj-h05010-unpack N
attr Keba_Stellplatz obj-h05012-reading Unlock_plug
attr Keba_Stellplatz obj-h05012-set 1
attr Keba_Stellplatz obj-h05014-reading Enable/Disable_charging_station
attr Keba_Stellplatz obj-h05014-set 1
attr Keba_Stellplatz verbose 5

setstate Keba_Stellplatz opened
setstate Keba_Stellplatz 2021-10-24 16:57:18 Active_power 4.242 kWh
setstate Keba_Stellplatz 2021-10-24 16:57:28 Cablestate Cable is connected to the charging station and the EV an locked
setstate Keba_Stellplatz 2021-10-24 16:57:28 Charging_current_phase_1 6.106 A
setstate Keba_Stellplatz 2021-10-24 16:57:28 Charging_current_phase_2 6.101 A
setstate Keba_Stellplatz 2021-10-24 16:57:18 Charging_current_phase_3 6.097 A
setstate Keba_Stellplatz 2021-10-24 16:57:28 Chargingstate charging
setstate Keba_Stellplatz 2021-10-24 15:52:50 Enable/Disable_charging_station 0
setstate Keba_Stellplatz 2021-10-24 16:57:28 Error_code No error
setstate Keba_Stellplatz 2021-10-24 16:57:18 Firmwareversion 50993920
setstate Keba_Stellplatz 2021-10-24 16:57:19 Max_charging_current 6 A
setstate Keba_Stellplatz 2021-10-24 16:57:19 Max_supported_current 16 A
setstate Keba_Stellplatz 2021-10-24 16:57:19 Powerfactor 99.7 %
setstate Keba_Stellplatz 2021-10-24 16:57:18 Producttype 314121
setstate Keba_Stellplatz 2021-10-24 16:57:18 Serialnumber 22218033
setstate Keba_Stellplatz 2021-10-24 16:56:48 Set_charging_current 6 A
setstate Keba_Stellplatz 2021-10-24 16:57:18 Total_energy 138.070 kWh
setstate Keba_Stellplatz 2021-10-24 16:57:18 Voltage_phase_1 231.0 V
setstate Keba_Stellplatz 2021-10-24 16:57:19 Voltage_phase_2 232.0 V
setstate Keba_Stellplatz 2021-10-24 16:57:19 Voltage_phase_3 232.0 V
setstate Keba_Stellplatz 2021-10-24 15:50:51 state opened

Hauswart

Hallo, wird das Modul noch aktiv bewirtschaftet? Laut Github gab es in den letzten drei Jahren keine Anpassung mehr.

Da ich die Tage eine Keba P30 DE 440 installieren werde, schaue ich mir gerne dein Modul an und werde es eventuell überarbeiten/weiterführen.
1. Installation:
KNX, Tasmota (KNX), Sonos, Unifi

2. Installation:
HM-CFG-USB, Unifi (, SIGNALduino 868, MySensors, SIGNALduino 433)