EVSE-WB Modbus nur eine Antwort

Fragen und Antworten zur Hardware
Antworten
weluan
Beiträge: 2
Registriert: Di 15. Aug 2023, 14:57

EVSE-WB Modbus nur eine Antwort

Beitrag von weluan »

Hallo,

ich habe eine Stark in Strom Easy Wallbox aus 2021 die ich gerne smart machen würde. Hierzu wollte ich zuerst testen ob Modbus funktioniert. In der Wallbox ist ein EVSE-WB Modul verbaut, das jedoch selbst kein Modbus hat. Wie es scheint wurde damals eine UART -> RS485 Adapterplatine mitgeliefert. Am PC/Raspberry verwende ich einen USB -> RS485 Stick von Amazon (https://www.amazon.de/Greluma-Konverter ... 09P8CX69G/). Verkabelt wurde das ganze mit einem ca 40cm langen twisted-pair billig Lan Kabel, also bei der Schrimung etc bin ich mir nicht ganz sicher. Ich habe nichts getan um Modbus zu aktivieren (AN->GND 5x in 3sec) da zumindest die erste Abfrage auch ohne ging und Modbus damit aktiv sein musste.

Nun zu meinem Problem. Nach dem (Neu-)Start der Wallbox (via Sicherung oder Schalter vorn) ist es möglich genau einmal die Register auszulesen, alle darauf folgenden Versuche schlagen leider fehl. Habe das ganze unter Windows mit QModBus und unter Linux/Python mit pymodbus versucht.

Anbei mal logs vom auslesen direkt nach dem Einschalten:

Code: Alles auswählen

>>> import pymodbus
>>> pymodbus.pymodbus_apply_logging_config("DEBUG")
>>> from pymodbus.client import ModbusSerialClient
>>> c = ModbusSerialClient(method = "rtu", port="/dev/ttyUSB0", baudrate=9600, stopbits=1, bytesize=8, timeout=1)
>>> rq = c.read_holding_registers(2000,count=8,slave=1)
2023-08-15 13:13:37,273 DEBUG logging:102 Current transaction state - TRANSACTION_COMPLETE
2023-08-15 13:13:37,274 DEBUG logging:102 Running transaction 28
2023-08-15 13:13:37,275 DEBUG logging:102 SEND: 0x1 0x3 0x7 0xd0 0x0 0x8 0x44 0x81
2023-08-15 13:13:37,275 DEBUG logging:102 Changing state to IDLE - Last Frame End - None Current Time stamp - 1692098677.275312
2023-08-15 13:13:37,279 DEBUG logging:102 New Transaction state "SENDING"
2023-08-15 13:13:37,280 DEBUG logging:102 Changing transaction state from "SENDING" to "WAITING FOR REPLY"
2023-08-15 13:13:37,431 DEBUG logging:102 Changing transaction state from "WAITING FOR REPLY" to "PROCESSING REPLY"
2023-08-15 13:13:37,432 DEBUG logging:102 RECV: 0x1 0x3 0x10 0x0 0x10 0x0 0x1 0x0 0x5 0x0 0x1 0x0 0x0 0x2 0x9 0x0 0x0 0x0 0x10 0x36 0xa7
2023-08-15 13:13:37,432 DEBUG logging:102 Got response!!!
2023-08-15 13:13:37,432 DEBUG logging:102 Processing: 0x1 0x3 0x10 0x0 0x10 0x0 0x1 0x0 0x5 0x0 0x1 0x0 0x0 0x2 0x9 0x0 0x0 0x0 0x10 0x36 0xa7
2023-08-15 13:13:37,433 DEBUG logging:102 Getting Frame - 0x3 0x10 0x0 0x10 0x0 0x1 0x0 0x5 0x0 0x1 0x0 0x0 0x2 0x9 0x0 0x0 0x0 0x10
2023-08-15 13:13:37,433 DEBUG logging:102 Factory Response[ReadHoldingRegistersResponse': 3]
2023-08-15 13:13:37,433 DEBUG logging:102 Frame advanced, resetting header!!
2023-08-15 13:13:37,434 DEBUG logging:102 Adding transaction 1
2023-08-15 13:13:37,434 DEBUG logging:102 Getting transaction 1
2023-08-15 13:13:37,434 DEBUG logging:102 Changing transaction state from "PROCESSING REPLY" to "TRANSACTION_COMPLETE"
>>> print(rq.registers)
[16, 1, 5, 1, 0, 521, 0, 16]
Wie man sieht war hier das auslesen der Register 1000 und 1001 also erfolgreich. Der Versuch danach nochmal Register auszulesen schlägt dann aber fehl:

Code: Alles auswählen

>>> c.read_holding_registers(1000,7,unit=1)
2023-08-15 13:14:37,219 DEBUG logging:102 Current transaction state - TRANSACTION_COMPLETE
2023-08-15 13:14:37,219 DEBUG logging:102 Running transaction 2
2023-08-15 13:14:37,220 DEBUG logging:102 SEND: 0x0 0x3 0x3 0xe8 0x0 0x7 0x85 0xa9
2023-08-15 13:14:37,220 DEBUG logging:102 Changing state to IDLE - Last Frame End - None Current Time stamp - 1692097057.220476
2023-08-15 13:14:37,225 DEBUG logging:102 New Transaction state "SENDING"
2023-08-15 13:14:37,225 DEBUG logging:102 Changing transaction state from "SENDING" to "WAITING FOR REPLY"
2023-08-15 13:14:39,231 DEBUG logging:102 No response received, Expected 19 bytes Received 0 bytes !!!!
2023-08-15 13:14:39,231 DEBUG logging:102 Changing transaction state from "WAITING FOR REPLY" to "PROCESSING REPLY"
2023-08-15 13:14:39,232 DEBUG logging:102 RECV:
2023-08-15 13:14:39,232 DEBUG logging:102 Processing:
2023-08-15 13:14:39,232 DEBUG logging:102 Getting transaction 0
2023-08-15 13:14:39,234 DEBUG logging:102 Changing transaction state from "PROCESSING REPLY" to "TRANSACTION_COMPLETE"
ModbusIOException()
Hier ein voller Auszug aller Register (Register 2001 mit Slave ID = 1 war wohl gesetzt):

Code: Alles auswählen

   EVSE runtime variables:
1000 | actual amps [A]                                    : 16
1001 | amps on PWM driver output [A]                      : 16
1002 | vehicle state 1=ready,2=present,3=chg,4=vent,5=err : 3
1003 | cable limit detected [A]                           : 16
1004 | commands                                           : 0
  b0 | turn off charging now                              : False
  b1 | run RCD test procedure                             : False
  b2 | clear RCD error                                    : False
  .. | reserved
1005 | firmware revision                                  : 18
1006 | EVSE state 1=12V,2=pwm,3=off                       : 2
1007 | status and fails                                   : 1
  b0 | relay on/off                                       : True
  b1 | diode check fail                                   : False
  b2 | vent required fail                                 : False
  b3 | waiting for pilot release (err recovery delay)     : False
  b4 | RCD test in progress                               : False
  b5 | RCD check error                                    : False
  .. | reserved
1008 | error timeout countdown                            : 0

2000 | default amps [A]                                  : 16
2001 | modbus address                                    : 1
2002 | minimum amps [A]                                  : 5
2003 | analog input config (0=0-5V input, 1,2,...=button): 1
2004 | save / not save amps by button                    : 0
2005 | config bits                                       : 521
  b0 | enable button (on AN input) for current change    : True
  b1 | stop charging when button pressed                 : False
  b2 | pilot ready state LED is not blinking             : False
  b3 | enable charging on STATUS D                       : True
  b4 | enable RCD feedback (MCLR pin)                    : False
  b5 | autoclear RCD error (short timeout)               : False
  .. | reserved
 b13 | disable EVSE after charge                         : False
 b14 | EVSE is disabled (no charge)                      : False
 b15 | enable bootloader mode                            : False
2006 | reserved                                          : 0
2007 | PP detection limit [A]                            : 16
2008 | reserved                                          : 65535
2009 | bootloader FW revision                            : 3
2010 | amps value  6A [A]                                : 6
2011 | amps value 10A [A]                                : 10
2012 | amps value 16A [A]                                : 16
2013 | amps value 25A [A]                                : 16
2014 | amps value 32A [A]                                : 32
2015 | amps value 48A [A]                                : 48
2016 | amps value 63A [A]                                : 63
2017 | amps value 80A [A]                                : 80
Das selbe passiert auch unter Windows, die erste Abfrage ist erfolgreich:
qmodbus.png
qmodbus.png (172.69 KiB) 2439 mal betrachtet
Und danach nur noch Fehler:
qmodbus-error.png
qmodbus-error.png (203.81 KiB) 2439 mal betrachtet
Hat jemand eine Ahnung woran dies liegen könnte? Ohne funktionierendes Modbus macht es ja wenig Sinn ein EVSE-WiFi anzuschließen..

Bin für jegliche Hilfe oder Anregungen dankbar!
LG
Dateianhänge
uart-modbus-modul2.jpg
uart-modbus-modul2.jpg (580.53 KiB) 2439 mal betrachtet
uart-modbus-modul1.jpg
uart-modbus-modul1.jpg (593.25 KiB) 2439 mal betrachtet

aiole
Beiträge: 1153
Registriert: Di 12. Mai 2020, 10:54

Re: EVSE-WB Modbus nur eine Antwort

Beitrag von aiole »

Ich bin mir nicht ganz sicher, aber m.E. musste man zuerst ein Reg. >=2000 beschreiben, damit Modbus dauerhaft aktiv bleibt.

Bei den EVSE gibt es etliche unterschiedliche Versionen. Da musst Du bei SiS nach Details fragen. Wir können nur für die smartWB supporten, weil wir deren Hard- und Software entwickelt haben..

weluan
Beiträge: 2
Registriert: Di 15. Aug 2023, 14:57

Re: EVSE-WB Modbus nur eine Antwort

Beitrag von weluan »

Danke, dann werde ich mal versuchen auf >2000 zu schreiben mit 0x16. Habe parallel auch mal bei SIS angefragt und werde berichten ob und was ich dort höre.

Antworten