hektiker1983 / openhab

Automatically exported from code.google.com/p/openhab
0 stars 0 forks source link

No connection with ModbusTcpBinding to WAGO PLC #403

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
I have an issue, that openHAB is not able to connect with the ModbusTcpBinding 
to my Wago 750-881 plc.
I have a marker defined at 12290 and I can read it with the modbus monitoring 
tool QModMaster as well as with a HTTP request:
http://192.168.2.10/READPI?ADR=MX0.2&FORMAT=%d

I have defined the plc in openhab.cfg with

    modbus:poll=300
    modbus:tcp.slave1.host=192.168.2.10
    modbus:tcp.slave1.type=coil
    modbus:tcp.slave1.port=502
    modbus:tcp.slave1.id=1
    modbus:tcp.slave1.start=12290
    modbus:tcp.slave1.length=1

and I defined an item with

    Contact1 "C1" (TEST) { modbus="slave1:0" }

Unfortunatly it doesn't show any changes. After starting the runtime with

    ./start_debug.sh

I got the debug message:

     DEBUG o.o.b.m.i.ModbusTcpSlave[:94] - ModbusSlave: Error connecting to master: Verbindungsaufbau abgelehnt

I am running openHAB runtime on Linux Ubuntu 13.04. ModbusTcpBinding version is 
1.2.0.

Does anyone have an idea why this is not working or what I am doing wrong?

Many thanks in advance,

Christian

Original issue reported on code.google.com by chrif...@gmail.com on 17 Aug 2013 at 8:55

GoogleCodeExporter commented 8 years ago
Hello again,

I was able to solve it by my own. I found in the source code, that the 
structure for the binding has been changed and it is not documented on the web 
pages.

With following settings it works for me (instead of "host"+"Port" there is now 
a "connection" setting:

modbus:poll=300
modbus:tcp.slave1.connection=192.168.2.10:502
modbus:tcp.slave1.type=coil
modbus:tcp.slave1.id=1
modbus:tcp.slave1.start=12288
modbus:tcp.slave1.length=2

I propose that the developer updates also the user documentation, wiki etc.

Best regards and thanks for all your work!

Christian

Original comment by chrif...@gmail.com on 17 Aug 2013 at 11:48

GoogleCodeExporter commented 8 years ago

Original comment by teichsta on 5 Nov 2013 at 10:53

GoogleCodeExporter commented 8 years ago
This issue has been migrated to Github. If this issue id is greater than103 its 
id has been preserved on Github. You can open your issue by calling the URL 
https://github.com/openhab/openhab/issues/<issueid>. Issues with ids less or 
equal 103 new ids were created.

Original comment by teichsta on 17 Nov 2013 at 8:08

GoogleCodeExporter commented 8 years ago
see above!

Issue has been migrated to Github and should be discussed there.

Original comment by teichsta on 21 Nov 2013 at 1:51