tronghuyict56 / openhab

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

Modbus documentation is outdated #434

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
According to the wiki pages and the default documentation, the Modbus binding 
only supports TCP. But apparently the binding now supports RTU interface as 
well. I could, with some help from a mailing list thread and by looking at the 
source figure out how to set it up and I actually got most of it running. But 
it would be awesome if the wiki and default conf could be updated to reflect 
what is now possible. 

Original issue reported on code.google.com by patrik.a...@gmail.com on 9 Sep 2013 at 6:04

GoogleCodeExporter commented 8 years ago
I'd be more than happy to update the documentation. Any proposals how to update 
the page and default config?

Original comment by teichsta on 9 Sep 2013 at 7:02

GoogleCodeExporter commented 8 years ago
I guess best would be if the author of the binding would update the 
documentation, since he/she knows best what's possible or not. So I can't 
really help with this. At least not yet, maybe later when I've used the binding 
even more.

Original comment by patrik.a...@gmail.com on 9 Sep 2013 at 7:04

GoogleCodeExporter commented 8 years ago
Hi,

I use modbus RTU and can provide working and tested examples of openhab 
configuration. It took me some time to understand how to define it properly...

And also I can show how to test it together with Arduino using simplest 
program. If somebody is interested in it of course.

Original comment by igor.zel...@gmail.com on 9 Sep 2013 at 10:48

GoogleCodeExporter commented 8 years ago
Hello,
examples will be a great help.

Original comment by barczyk....@gmail.com on 10 Sep 2013 at 5:45

GoogleCodeExporter commented 8 years ago
Hi,

this is example of modbus RTU usage with Arduino. 

Openhab part.

Modbus master is attached to /dev/ttyUSB0 serial port. Baudrate is 115200. 
There is one slave. Its id is 1. And this slave has one register.

Configuration file openhab.cfg:

modbus:poll=100
modbus:serial.slave1.connection=/dev/ttyUSB0:115200
modbus:serial.slave1.id=1
modbus:serial.slave1.start=0
modbus:serial.slave1.length=1
modbus:serial.slave1.type=holding

And this is example of item binding.

Configuration file demo.items:

Switch Light_GF_Corridor_Ceiling    "Ceiling"       (GF_Corridor, Lights)       
    {modbus="slave1:<0:>0"}

Arduino part.

Example of Arduino code for modbus slave: 
https://github.com/svarozhych/arduinoExamples/blob/master/modbusExample.ino
I'm using ModbusSlave library 
(https://sites.google.com/site/jpmzometa/arduino-mbrt/arduino-modbus-slave).

Original comment by igor.zel...@gmail.com on 17 Sep 2013 at 9:42

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