Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

For some of our customers there is a need for manual manipulating charging settings via modbus. Bellow you can find attached python script, that should be a good start what can you do with modbus on our Inch products. Script is written, with both Duo and Inch, in mind.

List of supported registers can be found here - Modbus TCP Registers

Prerequsites:

PC with Windows/Linux, MacOS or other device capable running Python

...

Python editor - we suggest https://code.visualstudio.com/

Installation:

First you need to install Python and add it to you path. On Windows, path is found in Enviroment variables settings.

...

Code Block
-----------------------------------------------------------------
Please enter connector number 1 or 2 for 172.25.2.250 (e to exit): 1
-----------------------------------------------------------------
AVAILABLE WRITING OPTIONS for 172.25.2.250
-----------------------------------------------------------------
>>> CONNECTOR 1 COMMANDS <<<
1.  Stop charging
2.  Pause charging
3.  Set departure time
4.  Set current setpoint
5.  Cancel current setpoint
6.  Set power setpoint
7.  Cancel power setpoint

 

>>> CHARGER COMMANDS <<<
8.  Set time
9.  Restart charger

 

>>> CLUSTER COMMANDS <<<
10.  Cluster - set limit L1
11.  Cluster - set limit L2
12.  Cluster - set limit L3
-----------------------------------------------------------------
Please enter option number (1 to 12 or e to exit): 4
-----------------------------------------------------------------
Connection: ModbusTcpClient(172.25.2.250:502)
-----------------------------------------------------------------
>>> CONNECTOR COMMANDS <<<
-----------------------------------------------------------------
Please enter current setpoint in A (e.g. 6.6): 8
[8]Set current setpoint to: 8A
-----------------------------------------------------------------
AVAILABLE WRITING OPTIONS for 172.25.2.250
-----------------------------------------------------------------
>>> CONNECTOR 1 COMMANDS <<<
1.  Stop charging
2.  Pause charging
3.  Set departure time
4.  Set current setpoint
5.  Cancel current setpoint
6.  Set power setpoint
7.  Cancel power setpoint

 

>>> CHARGER COMMANDS <<<
8.  Set time
9.  Restart charger

 

>>> CLUSTER COMMANDS <<<
10.  Cluster - set limit L1
11.  Cluster - set limit L2
12.  Cluster - set limit L3
-----------------------------------------------------------------
Please enter option number (1 to 12 or e to exit): 

View file
nameINCHDUO_modbus_writeread.py
View file
nameEtrel INCH (Duo) SmartHome Modbus TCPRegisters.xlsx
View file
nameDUO_modbus_readwrite.py

Article on how to enable Modbus and its fallback functionalities: /wiki/spaces/EH/pages/3224338453