[Solved]Modbus & Pokeys57E - connection refused

Hi there,

Following a comment on another thread -

I’ve purchased said device and I’m now trying to get it working.

I’ve setup the pokey57e with full access security and fully unlocked (I had to set a password here), and have the following config:

modbus:tcp.slave1.host=192.168.1.250
modbus:tcp.slave1.type=coil
modbus:tcp.slave1.port=502
modbus:tcp.slave1.id=1
modbus:tcp.slave1.start=0
modbus:tcp.slave1.length=55

but I’m getting “connection refused” :

2015-10-10 18:19:49.394 [DEBUG] [modbus.internal.ModbusTcpSlave] - ModbusSlave: Error connecting to master: Connection refused
2015-10-10 18:19:49.395 [INFO ] [.b.modbus.internal.ModbusSlave] - ModbusSlave not connected

Anyone seen this, or know where else to look?

Cheers
James

Solved - I had an old/out of date openhab.cfg file with the incorrect config parameters.

modbus:tcp.slave1.host=[host]
modbus:tcp.slave1.port=[port]

Are NOT Valid, they should in fact be:

modbus:tcp.slave1.connection=[host]

Cheers
James

Hi James,
can you please share other openhab settings concerning pokeys57e?
Thank you.
Frantisek

What are you looking for?

Hi Nathan,
thank you for all your answers.
I am still getting switch ON and still doing update.
So if I want to switch it OFF its again switched ON
Do I need some Rules or Scripts ?
my settings are:
Switch Garage_Door_A_Relay “Garage Door A” (gWater) {modbus=“slave1:45”, autoupdate=“FALSE”}

It looks like this:
2015-12-13 16:50:21.926 [INFO ] [runtime.busevents ] - Garage_Door_A_Relay state updated to ON
2015-12-13 16:50:22.930 [INFO ] [runtime.busevents ] - Garage_Door_A_Relay state updated to ON
2015-12-13 16:50:23.934 [INFO ] [runtime.busevents ] - Garage_Door_A_Relay state updated to ON
2015-12-13 16:50:24.947 [INFO ] [runtime.busevents ] - Garage_Door_A_Relay state updated to ON
2015-12-13 16:50:25.586 [INFO ] [runtime.busevents ] - Garage_Door_A_Relay received command OFF
2015-12-13 16:50:25.949 [INFO ] [runtime.busevents ] - Garage_Door_A_Relay state updated to ON
2015-12-13 16:50:26.958 [INFO ] [runtime.busevents ] - Garage_Door_A_Relay state updated to ON
2015-12-13 16:50:27.973 [INFO ] [runtime.busevents ] - Garage_Door_A_Relay state updated to ON
2015-12-13 16:50:29.291 [INFO ] [runtime.busevents ] - Garage_Door_A_Relay state updated to ON
2015-12-13 16:50:30.305 [INFO ] [runtime.busevents ] - Garage_Door_A_Relay state updated to ON

Not sure I understand, it looks like your able to toggle from ON to OFF.

If I press switch to OFF it again goes automaticaly to ON.
I want that it stays on OFF and goes to ON if I press tjhe switch to ON.

You can try my old Modbus that has the patched repeating of last event.

http://share.robotics.net/org.openhab.binding.modbus-1.7.0-SNAPSHOT.jar

modbus:tcp.basement.connection=10.71.129.36
modbus:tcp.basement.length=55
modbus:tcp.basement.type=coil

does the item actually switch the relay or is it just OpenHab reporting the events.
In the past I have had the situation where it toggles back to default because it didn’t actually work due to the modbus link not actually working. Usually due to some comm problem or config on your devices etc.
Andy