Modbus connection to Amtron Wallbox

Hi @all

i hope that somebody from the Modbus experts can help me to establish a connection to my Amtron Wallbox.
I’ve read a lot of the post about to establish a Modbus connection but i don’t know exactely what i have to enter in the different ‘Things’ and ‘Items’.

First I have a document that describes the Modbus Data for my Wallbox (Coils, Input Register, Holding Register)

First i tested the Modbus connection with Modbus-Tool to verfiy that i can reach my Wallbox over Ethernet

as you can see the connection ans read out worked as described in the document from Amtron, expect that i only need to enter three digit’s for the address ( 774 instead of 30774)

than i created in Openhab 3.2 a Thing ‘Modbus Slave TCP’ from the Binding

than i created a Modbus Poll Thing

and last i created a Modbus Data Thing for the Data

and last i created an Item in items file

Number Amtron_State “State [%d]” {channel=“modbus:data:afaee27397:d5bf26d9f8:number”}

but i receive only ‘NULL’ in the Item (what i expect like the doc is 0: Idle or 3: Charging

i have changed the ‘Start Address’ in Poller and Data Thing from 769 to 30769 with the right lenght to reach 774 or 30774 but there is no change.
I have no errors in event.log or openhab.log and all Things as you can see are green and online.

What i am doing wrong

cu Holger

That’s good :smiley:

Would you use the [code] tab and paste the text for us to see, instead of screenshots?


yes of course here it is

Modbus Thing:

UID: modbus:tcp:ea8bc1d24c
label: Modbus TCP Slave
thingTypeUID: modbus:tcp
rtuEncoded: false
connectMaxTries: 1
reconnectAfterMillis: 0
timeBetweenTransactionsMillis: 60
port: 502
timeBetweenReconnectMillis: 0
connectTimeoutMillis: 10000
host: localhos192.168.178.39
id: 255
enableDiscovery: true

Modbus Poller:

UID: modbus:poller:ea8bc1d24c:afaee27397
label: Wallbox
thingTypeUID: modbus:poller
length: 8
start: 769
refresh: 500
maxTries: 3
cacheMillis: 50
type: input
bridgeUID: modbus:tcp:ea8bc1d24c

Modbus Data:

UID: modbus:data:afaee27397:d5bf26d9f8
label: Amtron State
thingTypeUID: modbus:data
readValueType: uint16
readTransform: default
writeTransform: default
readStart: “774”
updateUnchangedValuesEveryMillis: 1000
writeMultipleEvenWithSingleRegisterOrCoil: false
writeMaxTries: 3
bridgeUID: modbus:poller:ea8bc1d24c:afaee27397

hope it’s better now

cu Holger

This is mangled.

I know this worked in your Radzio tool, but it tastes bad. ID above 250 are usually considered “reserved” for stuff like gateway management, so you do not see them used very often.
If you are able to change your device ID (slave ID number) you might do that.

To exactly duplicate your Radzio example, I think you would need to set 768. openHAB binding counts addresses from 0, Radzio counts register numbers from 1.
See your example - ask for 769, get 30768. (3xxxx just means “input” type)

From my Amtron Documentation

And i think Unit Identifier 0xFF = 255

I have changed it to 768 restart my Modbus data Thing, but the same

Have you fixed that yet?

I should say so, yes. Suppliers do not always follow good practice with Modbus, and it looks like you cannot change that and are stuck with it.

I am a stupid idiot , i haven’t seen that i forgot to remove the ‘localhost’ i frontb of the IP, but when you search all over the other things you got blind for that.

I removed the bullshit in front of the IP and every thing is working fine

Thank you for the hint.

Cu Holger

1 Like

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.