SmartEVSE / SmartEVSE-2

Smart Electric Vehicle Charging Station (EVSE)
80 stars 41 forks source link

Read / Write Modbus #15

Open TonKro opened 3 years ago

TonKro commented 3 years ago

I am trying ro read / write registers via modbus but the EVSE does not answer.

Send out: [1,4,0,1,0,1,96,10]

Also tried as other Unit-ID like 2: [2,4,0,1,0,1,96,57] (this data is showed as decimal)

No answer from the Smart EVSE.

When enable Smart / Loadbalancing. The data is there and working correct between the EVSE and Sensorbox.

What am I doing wrong? What does the EVSE expect?

bobosch commented 3 years ago

Which version of SmartEVSE do you use?

TonKro commented 3 years ago

Good question, the specific version I do not know, I did purchase it via stegen.com on the website like 1-2 Months ago assuming I got the most recent version by then.

BTW: The invoice does show v2.2

mstegen commented 3 years ago

When you enter the setup menu, the software version should be visible on the LCD. The version is also shown when powering up the controller for two seconds.

TonKro commented 3 years ago

Thanks. Just checked, it is indeed v 2.20

bobosch commented 3 years ago

Please use this modbus manual https://github.com/SmartEVSE/SmartEVSE-2/tree/b8b6a1a2def22a2bfc3cc30be2f2ef639e2d4389#register-for-external-devices

Try to read register 0x00A0

TonKro commented 3 years ago

Which Unit ID should be used?

bobosch commented 3 years ago

It should be 0

TonKro commented 3 years ago

As far as I am aware of could the unit id only from 1-255?

TonKro commented 3 years ago

Maybe you can share a serial read and write command of a certain register of the EVSE?

bobosch commented 3 years ago

Yes, 0 is broadcast address, in version 2.20 the load balancing option defines the modbus address (0=disabled, 1=master, 2=node 1....). will be fixed in next release.

TonKro commented 3 years ago

The problem is that Unit-ID 0 is not supported in Modbus...

You mean to say: [0,4,0,a0,0,1,96,10]

Unit ID = 0 Read register = 4 Address = 00 A0 Number of bytes = 1

TonKro commented 3 years ago

What does the unit expect with read and write command on the serial bus?

For writing one register the next works: [1,6,0,192,0,1,72,54] (decimal) Unit ID: 1 Function (Single register): 6 Address: 00C0 (192) Data: 01 CRC