Nilan CTS602 & Openhab % Modbus binding

1,342 views
Skip to first unread message

Tomi Kinnari

unread,
Feb 25, 2015, 12:27:55 PM2/25/15
to ope...@googlegroups.com
Hello,

I'm totaly noobie with Openhab and with modbus protocol.

Thing is that i try to get my Nilan and Openhab together but no success yet and I have no idea what is wrong.

Nilan support modbus RTU protocol

I have openhab running on my laptop and i have usb to serial converter like this http://www.ebay.com/itm/200969195861?_trksid=p2060778.m2749.l2649&ssPageName=STRK%3AMEBIDX%3AIT

Serial converter is working, i can communicate with Nilan with modbus poll.

My settings are,

Modbus Binding:

modbus:poll=1000
modbus:serial.slave1.connection=COM3:19200:8:even:1
modbus:serial.slave1.type=input
modbus:serial.slave1.start=201
modbus:serial.slave1.length=21

When i start Openhab I think Openhab is connected to Nilan because TX and RX leds are blinking and if I take wires of i get "error I/O expextion - failed to read" and "Modbusslave error getting responce from slave"
Openhab request is 1e 04 00 c9 00 15 e3 94 and its same as modbus poll is requesting

My sitemap is:

}
Frame label="Lämmitys" {
Text label=Nilan {
Text label=nykytila {
Frame {
Text item=T1
Text item=T2
Text item=T5
Text item=T6
Text item=T11
Text item=T12
Text item=T15
Text item=RH
}

and items:

Group Nilan (ALL)
Group Nykytila (Nilan)
Number T1 "T1 Raitisilma [%.1f °C]" <temperature> (Nykytila) { Modbus="slave1:201" } //201
Number T2 "T2 Tuloilma [%.1f °C]" <temperature> (Nykytila) { Modbus="slave1:202" } //202
Number T5 "T5 Lauhdutin [%.1f °C]" <temperature> (Nykytila) { Modbus="slave1:205" } //205
Number T6 "T6 Höyrystin [%.1f °C]" <temperature> (Nykytila) { Modbus="slave1:206" } //206
Number T11 "T11 Vesi ylä [%.1f °C]" <temperature> (Nykytila) { Modbus="slave1:211" } //211
Number T12 "T12 Vesi ala [%.1f °C]" <temperature> (Nykytila) { Modbus="slave1:212" } //212
Number T15 "T15 Sisälämpötila [%.1f °C]" <temperature> (Nykytila) { Modbus="slave1:215" } //215
Number RH "Kosteus [%.1f %%]" <temperature> (Nykytila) { Modbus="slave1:221" } //221



Problem is that I cant see temperatures all I get is
T1 Raitisilma -C
T2 Tuloilma   -C
T5 Lauhdutin -C

And so on.....

Why is this happening?

-Tomi-



Nick AtNick

unread,
Mar 14, 2015, 1:07:25 PM3/14/15
to ope...@googlegroups.com
Hi Tomi,
funny thing I started working on openhab and a nilan device in february too.. ;)

I started with a bringup, because I had initial hardware problems with my USB-to-RS485 dongle...
https://github.com/nickma82/nilan_communication_bringup

Afterwards I modifyed the openhab binding, such that it supports RTU communication
https://github.com/openhab/openhab/issues/2148#issuecomment-76625450

IMHO the wrong things for you concerning openhab are:
  • modbus:serial.slave1.connection=COM3:19200:8:even:1:rtu - precondition is openhab version 1.7.x or higher
  • { Modbus="slave1:201" } should be: { Modbus="slave1:0" } and so on, because of the internal mapping of the modbus binding your reading out length=21 registers makes [slave1:0 to slave1:20]

let me know about your process, good luck

Nick AtNick

unread,
May 27, 2015, 8:31:12 AM5/27/15
to ope...@googlegroups.com


On Wednesday, 25 February 2015 18:27:55 UTC+1, Tomi Kinnari wrote:
Hello,

I'm totaly noobie with Openhab and with modbus protocol.

Thing is that i try to get my Nilan and Openhab together but no success yet and I have no idea what is wrong.
-Tomi-

Hi Tomi,
have you made any progresses with the Nilan device yet?

I'm able to display some values of the Nilan device in openHAB and since the day before yesterday I am able to control the fan speed and switches and so on...
Best

Tomi Kinnari

unread,
May 27, 2015, 9:58:40 AM5/27/15
to ope...@googlegroups.com
Hello,
I have, I can read all the values from Nilan, I can also send commands with this https://github.com/nickma82/nilan_communication_bringup

How do you control fan speed, witches, etc.?

Nick AtNick

unread,
May 27, 2015, 10:16:10 AM5/27/15
to ope...@googlegroups.com

On Wednesday, 27 May 2015 15:58:40 UTC+2, Tomi Kinnari wrote:
Hello,
I have, I can read all the values from Nilan, I can also send commands with this https://github.com/nickma82/nilan_communication_bringup

Nice, are you able to read that data into openHAB yet?
 
How do you control fan speed, witches, etc.?
Because the Nilan device doesn't support writing single registers (seen in the datasheet), modbus:writemultipleregisters=true [1] in the openhab.cfg does the trick. It forces the modbus module to write multiple registers which is supported by Nilan. I'm gonna post you the item configuration in the next couple of days.

[1] https://github.com/openhab/openhab/blob/master/bundles/binding/org.openhab.binding.modbus/src/main/java/org/openhab/binding/modbus/internal/ModbusBinding.java#L257

Tomi Kinnari

unread,
May 27, 2015, 11:11:22 AM5/27/15
to ope...@googlegroups.com
Yes, I can read data into openhab. My problem (stupid one) was the capital M in "{ Modbus="slave1:201" }"
Thank you for posting that item configuration, it will make things much easier.

Nick AtNick

unread,
May 27, 2015, 11:25:39 AM5/27/15
to ope...@googlegroups.com


On Wednesday, 27 May 2015 17:11:22 UTC+2, Tomi Kinnari wrote:
Yes, I can read data into openhab. My problem (stupid one) was the capital M in "{ Modbus="slave1:201" }"
Ah... One of that failures. :)
 
Thank you for posting that item configuration, it will make things much easier.
No problem, maybe you could post yours too afterwards so we don't have to do the work two times?

Nick AtNick

unread,
May 27, 2015, 2:48:01 PM5/27/15
to ope...@googlegroups.com


On Wednesday, 27 May 2015 17:11:22 UTC+2, Tomi Kinnari wrote:
Thank you for posting that item configuration, it will make things much easier.

Hi again, I added the config to the wiki page, please search for "write out nilan connection" and "nilan_onoff","nilan_vent" [1].
Please let me know if you have good ideas or solutions :)
Nick

[1] https://github.com/openhab/openhab/wiki/Samples-Binding-Config#serial-modbus-nilan-heatpump-configuration

Tomi Kinnari

unread,
May 27, 2015, 3:14:58 PM5/27/15
to ope...@googlegroups.com
Thank you, I will look those at weekend and post my configurations here.

Tomi Kinnari

unread,
May 28, 2015, 11:26:25 AM5/28/15
to ope...@googlegroups.com
This is my configuration at the moment.

openhab.cfg, modbus binding:

#200=T0, 201=T1, 202=T2
modbus:poll=10000
modbus:serial.slave1.connection=/dev/ttyUSB0:19200:8:even:1:rtu
modbus:serial.slave1.type=input
modbus:serial.slave1.start=200
modbus:serial.slave1.length=3

#205=T5, 206=T6, 207=T7
modbus:poll=10000
modbus:serial.slave2.connection=/dev/ttyUSB0:19200:8:even:1:rtu
modbus:serial.slave2.type=input
modbus:serial.slave2.start=205
modbus:serial.slave2.length=3

#211=T11, 212=T12
modbus:poll=10000
modbus:serial.slave3.connection=/dev/ttyUSB0:19200:8:even:1:rtu
modbus:serial.slave3.type=input
modbus:serial.slave3.start=211
modbus:serial.slave3.length=2

#215=T15
modbus:poll=10000
modbus:serial.slave4.connection=/dev/ttyUSB0:19200:8:even:1:rtu
modbus:serial.slave4.type=input
modbus:serial.slave4.start=215
modbus:serial.slave4.length=1

#221=RH
modbus:poll=10000
modbus:serial.slave5.connection=/dev/ttyUSB0:19200:8:even:1:rtu
modbus:serial.slave5.type=input
modbus:serial.slave5.start=221
modbus:serial.slave5.length=1

#1002=Nykytila
modbus:poll=10000
modbus:serial.slave6.connection=/dev/ttyUSB0:19200:8:even:1:rtu
modbus:serial.slave6.type=input
modbus:serial.slave6.start=1002
modbus:serial.slave6.length=1

#109=Kompressori_on/off
modbus:poll=10000
modbus:serial.slave7.connection=/dev/ttyUSB0:19200:8:even:1:rtu
modbus:serial.slave7.type=holding
modbus:serial.slave7.start=109
modbus:serial.slave7.length=1

#116=Vastus_on/off
modbus:poll=10000
modbus:serial.slave8.connection=/dev/ttyUSB0:19200:8:even:1:rtu
modbus:serial.slave8.type=holding
modbus:serial.slave8.start=116
modbus:serial.slave8.length=1

#100=Etäkäyttö_on/off
modbus:poll=10000
modbus:serial.slave9.connection=/dev/ttyUSB0:19200:8:even:1:rtu
modbus:serial.slave9.type=input
modbus:serial.slave9.start=100
modbus:serial.slave9.length=1

#200=poistopuhallin, 201=tulopuhallin
modbus:poll=10000
modbus:serial.slave10.connection=/dev/ttyUSB0:19200:8:even:1:rtu
modbus:serial.slave10.type=holding
modbus:serial.slave10.start=200
modbus:serial.slave10.length=2

#1000=nilan on/off 
modbus:poll=10000
modbus:serial.slave11.connection=/dev/ttyUSB0:19200:8:even:1:rtu
modbus:serial.slave11.type=input
modbus:serial.slave11.start=1000
modbus:serial.slave11.length=1

#1001=nykytila
modbus:poll=10000
modbus:serial.slave12.connection=/dev/ttyUSB0:19200:8:even:1:rtu
modbus:serial.slave12.type=input
modbus:serial.slave12.start=1001
modbus:serial.slave12.length=1

#1001=on/off, 1002=Valittu nykytila, 1003=puhalllusteho, 1004=Lämpötilapyynti, 
modbus:poll=10000
modbus:serial.slave13.connection=/dev/ttyUSB0:19200:8:even:1:rtu
modbus:serial.slave13.type=holding
modbus:serial.slave13.start=1001
modbus:serial.slave13.length=4

Sitemap:

Frame label="Lämmitys" {
Group item=ll label="Lattialämmitykset"
Text item=nilan {  
Group item=nilan_data label="Data" icon="info"
Group item=nilan_asetukset label="Asetukset" icon="settings"{
Setpoint item=nilan_puhallusteho  minValue=0 maxValue=4 step=1 
}
Switch item=test label="Pika asetus" mappings=[0=Kevat, 1=Kesa, 2=Talvi, 3=Syksy]
}}

and items:

Group Nilan (All)

// Nilan Data //
Group nilan_data (nilan)
Number nilan "Nilan [MAP(nilan.map):%s]" <nilan> (nilan) { modbus="slave6:0" } //1001
Number T0 "T0 Nilan EC [%.1f °C]" { modbus="slave1:0" } //200
Number T1 "T1 Ulkolämpötila [%.1f °C]" { modbus="slave1:1" } //201
Number T2 "T2 Tuloilma [%.1f °C]" { modbus="slave2:2" } //202
Number T5 "T5 Lauhdutin [%.1f °C]" { modbus="slave2:0" } //205
Number T6 "T6 Höyrystin [%.1f °C]" { modbus="slave2:1" } //206
Number T11 "T11 Vesi ylä [%.1f °C]" { modbus="slave3:0" } //211
Number T12 "T12 Vesi ala [%.1f °C]" { modbus="slave3:1" } //212
Number T15 "T15 Sisälämpötila [%.1f °C]" { modbus="slave4:0" } //215
Number RH "Kosteus [%.1f %%]" { modbus="slave5:0" } //221
Number poistopuhallin "Poistopuhallin [%.0f %%]" { modbus="slave10:0" } //holding 200
Number tulopuhallin "Tulopuhallin [%.0f %%]" { modbus="slave10:1" } //holding 201

Number T0_div "T0 Nilan EC [%.1f °C]" <temperature> (nilan_data)
Number T1_div "T1 Ulkolämpötila [%.1f °C]" <temperature> (nilan_data)
Number T2_div "T2 Tuloilma [%.1f °C]" <temperature> (nilan_data)
Number T5_div "T5 Lauhdutin [%.1f °C]" <temperature> (nilan_data)
Number T6_div "T6 Höyrystin [%.1f °C]" <temperature> (nilan_data)
Number T11_div "T11 Vesi ylä [%.1f °C]" <temperature> (nilan_data)
Number T12_div "T12 Vesi ala [%.1f °C]" <temperature> (nilan_data)
Number T15_div "T15 Sisälämpötila [%.1f °C]" <temperature> (nilan_data)
Number RH_div "Kosteus [%.1f %%]" <kosteus> (nilan_data)
Number nilanec "Nilan EC [MAP(nilanon_off.map):%s]" <on_off> (nilan_data) { modbus="slave11:0" } // input 1000
Number nykytila "Nykytila [MAP(nilannykytila.map):%s]" <on_off> (nilan_data) { modbus="slave12:0" } // input 1001
Number poistopuhallin_div "Poistopuhallin [%.0f %%]" <puhallin> (nilan_data)
Number tulopuhallin_div "Tulopuhallin [%.0f %%]" <puhallin> (nilan_data)
Number kompressori "Kompressori [MAP(nilankompressori.map):%s]" <on_off> (nilan_data) { modbus="slave7:0" } // holding 109
Number vastus "Vastus [MAP(nilanvastus.map):%s]" <on_off> (nilan_data) { modbus="slave8:0" } // holding 116
Number etakaytto "Etäkäyttö [MAP(nilanetakaytto.map):%s]" <on_off> (nilan_data) { modbus="slave9:0" } //input 100

// Nilan Asetukset //
Number nilan_puhallusteho "Puhallusteho [MAP(nilanpuhallusteho.map):%s]" { modbus="slave13:2" } //holding 603

There is lot of Finish language, i can translate if need.

Nick AtNick

unread,
May 29, 2015, 8:32:36 AM5/29/15
to ope...@googlegroups.com


On Thursday, 28 May 2015 17:26:25 UTC+2, Tomi Kinnari wrote:

There is lot of Finish language, i can translate if need.
Hi,
Finish is ok for me, google is gonna do it... spells funny.. ;)

But I wonder how did you get rid of the comma (displaying 22.0°C as 2200 °C) problem?
I had to do this ugly rule "nilan t0-15 sensor division", which I would like not to use.

Tomi Kinnari

unread,
May 29, 2015, 12:25:51 PM5/29/15
to ope...@googlegroups.com
I didn't get rid of problem, I have rule fore each data.

Nick AtNick

unread,
May 31, 2015, 4:36:49 AM5/31/15
to ope...@googlegroups.com
Allright, I see. :)
Thanks

Carsten Madsen

unread,
Jun 7, 2015, 1:26:05 PM6/7/15
to ope...@googlegroups.com
Hi.

I have some trouble getting it to work.
I have set it op the same way as in this link, bu it does not work.

Here is a sample of the log:
2015-06-05 23:18:11.418 [ERROR] [i.modbus.io.ModbusRTUTransport] - awaited 34 bytes, but received 33
2015-06-05 23:18:11.421 [ERROR] [i.modbus.io.ModbusRTUTransport] - Last request: 1e 04 00 c8 00 10 72 57
2015-06-05 23:18:11.422 [ERROR] [i.modbus.io.ModbusRTUTransport] - failed to read: CRC Error in received frame: 34 bytes: 1e 04 20 41 54 00 00 00 09 3c 06 b3 00 00 00 00 09 22 06 47 f0 60 f0 60 00 00 00 00 00 00 00 00 08 5b 
2015-06-05 23:18:11.424 [ERROR] [w.m.io.ModbusSerialTransaction] - execute try 1 error: I/O exception - failed to read
2015-06-05 23:18:11.948 [ERROR] [i.modbus.io.ModbusRTUTransport] - awaited 34 bytes, but received 33
2015-06-05 23:18:11.950 [ERROR] [i.modbus.io.ModbusRTUTransport] - Last request: 1e 04 00 c8 00 10 72 57
2015-06-05 23:18:11.952 [ERROR] [i.modbus.io.ModbusRTUTransport] - failed to read: CRC Error in received frame: 34 bytes: 1e 04 20 41 54 00 00 00 09 3c 06 b3 00 00 00 00 09 22 06 47 f0 60 f0 60 00 00 00 00 00 00 00 00 08 5b 
2015-06-05 23:18:11.954 [ERROR] [w.m.io.ModbusSerialTransaction] - execute try 2 error: I/O exception - failed to read
2015-06-05 23:18:12.488 [ERROR] [i.modbus.io.ModbusRTUTransport] - awaited 34 bytes, but received 33
2015-06-05 23:18:12.491 [ERROR] [i.modbus.io.ModbusRTUTransport] - Last request: 1e 04 00 c8 00 10 72 57
2015-06-05 23:18:12.492 [ERROR] [i.modbus.io.ModbusRTUTransport] - failed to read: CRC Error in received frame: 34 bytes: 1e 04 20 41 54 00 00 00 09 3c 06 b3 00 00 00 00 09 21 06 47 f0 60 f0 60 00 00 00 00 00 00 00 00 08 5b 
2015-06-05 23:18:12.496 [INFO ] [.b.modbus.internal.ModbusSlave] - ModbusSlave error getting responce from slave
2015-06-05 23:18:13.028 [ERROR] [i.modbus.io.ModbusRTUTransport] - awaited 10 bytes, but received 9
2015-06-05 23:18:13.030 [ERROR] [i.modbus.io.ModbusRTUTransport] - Last request: 1e 03 03 e9 00 04 97 d6
2015-06-05 23:18:13.031 [ERROR] [i.modbus.io.ModbusRTUTransport] - failed to read: CRC Error in received frame: 10 bytes: 1e 03 08 01 00 01 00 01 08 98 
2015-06-05 23:18:13.033 [ERROR] [w.m.io.ModbusSerialTransaction] - execute try 1 error: I/O exception - failed to read
2015-06-05 23:18:13.550 [ERROR] [i.modbus.io.ModbusRTUTransport] - awaited 10 bytes, but received 9
2015-06-05 23:18:13.552 [ERROR] [i.modbus.io.ModbusRTUTransport] - Last request: 1e 03 03 e9 00 04 97 d6
2015-06-05 23:18:13.553 [ERROR] [i.modbus.io.ModbusRTUTransport] - failed to read: CRC Error in received frame: 10 bytes: 1e 03 08 01 00 01 00 01 08 98 
2015-06-05 23:18:13.554 [ERROR] [w.m.io.ModbusSerialTransaction] - execute try 2 error: I/O exception - failed to read


Nick AtNick

unread,
Jun 20, 2015, 2:56:40 PM6/20/15
to ope...@googlegroups.com
Hi,
  • have you done the communication bringup test mentioned earlier in that thread?
I modified it, to fit the second request sent out by your openHAB "Last request: 1e 03 03 e9 00 04 97 d6", you can find that version at [1]
(Precondition see: https://github.com/nickma82/nilan_communication_bringup/blob/carsten/README.md#software-prerequirements) I also attached (see txt file) the output I got with that very bringup test.

Note: I chose to check the second message you posted, just simply because it's shorter.
  • OpenHAB Version; I guess 1.7.* ?

Ad "failed to read: CRC Error in received frame: 10 bytes: 1e 03 08 01 00 01 00 01 08 98":
It really looks like that there is really one byte missing between "08" and "01". Note that the first three bytes are added from the last request [2][3] and after that the read-in is following.

[1] https://github.com/nickma82/nilan_communication_bringup/tree/carsten/src
[2] https://github.com/openhab/openhab/blob/1.7/bundles/binding/org.openhab.binding.modbus/src/main/java/net/wimpi/modbus/io/ModbusRTUTransport.java#L127-L128
[3] https://github.com/openhab/openhab/blob/1.7/bundles/binding/org.openhab.binding.modbus/src/main/java/net/wimpi/modbus/io/ModbusRTUTransport.java#L214-L215
carsten_test_output.txt

Carsten Madsen

unread,
Jun 21, 2015, 2:20:09 PM6/21/15
to ope...@googlegroups.com
I have now tried the communication bring up test.

This is the output:

TESTING Nilan Connection
__main__.Nilan<id=0x76c869e0, address=30, mode=rtu, close_port_after_each_call=False, precalculate_read_size=True, debug=True, serial=Serial<id=0x76c8a530, open=True>(port='/dev/ttyRPC0', baudrate=19200, bytesize=8, parity='E', stopbits=1, timeout=0.1, xonxoff=False, rtscts=False, dsrdtr=False)>

MinimalModbus debug mode. Writing to instrument (expecting 7 bytes back): '\x1e\x04\x00\xd3\x00\x01\xc2\\'
MinimalModbus debug mode. No sleep required before write. Time since previous read: 1434910285752.7 ms, minimum silent period: 2.01 ms.
MinimalModbus debug mode. Response from instrument: '\x1e\x04\x02\x00\x00,\xf2' (7 bytes), roundtrip time: 13.5 ms. Timeout setting: 100.0 ms.

t11:                    0.0

MinimalModbus debug mode. Writing to instrument (expecting 13 bytes back): '\x1e\x03\x03\xe9\x00\x04\x97\xd6'
MinimalModbus debug mode. No sleep required before write. Time since previous read: 10.0 ms, minimum silent period: 2.01 ms.
MinimalModbus debug mode. Response from instrument: '\x1e\x03\x08\x00\x01\x00\x01\x00\x02\x08\x98{\xa9' (13 bytes), roundtrip time: 18.6 ms. Timeout setting: 100.0 ms.

carsten_test:           [1, 1, 2, 2200]
DONE!

And this is the output from the normal communication bring up test:

TESTING Nilan Connection
__main__.Nilan<id=0x76c9f788, address=30, mode=rtu, close_port_after_each_call=False, precalculate_read_size=True, debug=True, serial=Serial<id=0x76ca2630, open=True>(port='/dev/ttyRPC0', baudrate=19200, bytesize=8, parity='E', stopbits=1, timeout=0.1, xonxoff=False, rtscts=False, dsrdtr=False)>

MinimalModbus debug mode. Writing to instrument (expecting 7 bytes back): '\x1e\x04\x00\xd3\x00\x01\xc2\\'
MinimalModbus debug mode. No sleep required before write. Time since previous read: 1434885174884.6 ms, minimum silent period: 2.01 ms.
MinimalModbus debug mode. Response from instrument: '\x1e\x04\x02\x00\x00,\xf2' (7 bytes), roundtrip time: 12.5 ms. Timeout setting: 100.0 ms.

t11:                    0.0

MinimalModbus debug mode. Writing to instrument (expecting 7 bytes back): '\x1e\x03\x03\xeb\x00\x01\xf6\x15'
MinimalModbus debug mode. No sleep required before write. Time since previous read: 9.8 ms, minimum silent period: 2.01 ms.
MinimalModbus debug mode. Response from instrument: '\x1e\x03\x02\x00\x02\xacG' (7 bytes), roundtrip time: 15.0 ms. Timeout setting: 100.0 ms.

userVentSet:             2

MinimalModbus debug mode. Writing to instrument (expecting 8 bytes back): '\x1e\x10\x03\xeb\x00\x01\x02\x00\x02\x8f\xba'
MinimalModbus debug mode. No sleep required before write. Time since previous read: 11.7 ms, minimum silent period: 2.01 ms.
MinimalModbus debug mode. Response from instrument: '\x1e\x10\x03\xeb\x00\x01s\xd6' (8 bytes), roundtrip time: 19.0 ms. Timeout setting: 100.0 ms.


MinimalModbus debug mode. Writing to instrument (expecting 7 bytes back): '\x1e\x03\x03\xeb\x00\x01\xf6\x15'
MinimalModbus debug mode. No sleep required before write. Time since previous read: 10.4 ms, minimum silent period: 2.01 ms.
MinimalModbus debug mode. Response from instrument: '\x1e\x03\x02\x00\x02\xacG' (7 bytes), roundtrip time: 13.7 ms. Timeout setting: 100.0 ms.

userVentSet:             2
DONE!

Iam using openhab 1.7.0

Nick AtNick

unread,
Jun 21, 2015, 5:52:01 PM6/21/15
to ope...@googlegroups.com

The two two datasets from you compared with each other reveals that - indeed - there is a byte missing (marked blue), in the response fetched from openHAB. The question now is why?
I think that there is a problem with the readout, here [1]. Or its a bare java and or serial-port issue itself.
  • Do you have the openHAB IDE up and running?
  • java versions are up to date?
[1] https://github.com/openhab/openhab/blob/1.7/bundles/binding/org.openhab.binding.modbus/src/main/java/net/wimpi/modbus/io/ModbusRTUTransport.java#L214-L223


On Sunday, 21 June 2015 20:20:09 UTC+2, Carsten Madsen wrote:
I have now tried the communication bring up test.
[...]
MinimalModbus debug mode. Writing to instrument (expecting 13 bytes back): '\x1e\x03\x03\xe9\x00\x04\x97\xd6'
MinimalModbus debug mode. No sleep required before write. Time since previous read: 10.0 ms, minimum silent period: 2.01 ms.
MinimalModbus debug mode. Response from instrument: '\x1e\x03\x08\x00\x01\x00\x01\x00\x02\x08\x98{\xa9' (13 bytes), roundtrip time: 18.6 ms. Timeout setting: 100.0 ms.

carsten_test:           [1, 1, 2, 2200]
DONE!

On Sunday, 7 June 2015 19:26:05 UTC+2, Carsten Madsen wrote
Here is a sample of the log:
[...]

Carsten Madsen

unread,
Jun 22, 2015, 12:35:27 AM6/22/15
to ope...@googlegroups.com
Iam using java:

java version "1.8.0"
Java(TM) SE Runtime Environment (build 1.8.0-b132)
Java HotSpot(TM) Client VM (build 25.0-b70, mixed mode)

  • Do you have the openHAB IDE up and running?
I don't no what this mean, just using Openhab 1.7.0 runtime (downloaded from openhab.org) with modbus binding 1.7.0.

Nick AtNick

unread,
Jun 22, 2015, 9:58:14 AM6/22/15
to ope...@googlegroups.com

On Monday, 22 June 2015 06:35:27 UTC+2, Carsten Madsen wrote:
Iam using java:

java version "1.8.0"
Java(TM) SE Runtime Environment (build 1.8.0-b132)
Java HotSpot(TM) Client VM (build 25.0-b70, mixed mode)
Is there any possibility that you run it with java v1.7. ?
 
  • Do you have the openHAB IDE up and running?
I don't no what this mean, just using Openhab 1.7.0 runtime (downloaded from openhab.org) with modbus binding 1.7.0.
Never mind that then... 

Carsten Madsen

unread,
Jun 24, 2015, 3:05:02 PM6/24/15
to ope...@googlegroups.com
I have now tried to run both openhab 1.7.0 and 1.8.0 snapshot, with both java 1.7 and 1.8.0.
But I'am still getting the samme errors.

I'am also getting this RXTX warning when staring openhab?

RXTX Warning:  Removing stale lock file. /var/lock/LCK..ttyRPC0
2015-06-24 20:49:49.668 [INFO ] [.service.AbstractActiveService] - Modbus Polling Service has been started

Nick AtNick

unread,
Jun 27, 2015, 6:17:05 AM6/27/15
to ope...@googlegroups.com
Ok, I have no idea anymore, must be the low level openHAB driver.
It's best to take the collected information and file an issue via github. Please attach also system information and everything you thing it might make a difference for that very behavior.

If you'r not going to do that, I am going to do it next week.


On Wednesday, 24 June 2015 19:05:02 UTC, Carsten Madsen wrote:
I have now tried to run both openhab 1.7.0 and 1.8.0 snapshot, with both java 1.7 and 1.8.0.
But I'am still getting the samme errors.

I'am also getting this RXTX warning when staring openhab?

RXTX Warning:  Removing stale lock file. /var/lock/LCK..ttyRPC0
2015-06-24 20:49:49.668 [INFO ] [.service.AbstractActiveService] - Modbus Polling Service has been started
That doesn't look very special. Could it be that there is another program running, accessing the RS485 interface?
 

Carsten Madsen

unread,
Jun 28, 2015, 11:34:57 AM6/28/15
to ope...@googlegroups.com
it would be nice if you did it. :)
I run openhab from a raspberry pi  2 with raspicomm. but minimalmodbus runs fine so it's really strange.

Nick AtNick

unread,
Jul 3, 2015, 4:47:23 AM7/3/15
to ope...@googlegroups.com

Nick AtNick

unread,
Sep 16, 2015, 6:53:17 AM9/16/15
to openhab
On Wednesday, 24 June 2015 21:05:02 UTC+2, Carsten Madsen wrote:
I have now tried to run both openhab 1.7.0 and 1.8.0 snapshot, with both java 1.7 and 1.8.0.
But I'am still getting the samme errors.

Have you tried switching to a usb-to-rs485 dongle?

E.g.: http://shop.in-circuit.de/product_info.php?cPath=38&products_id=81 - worked immediately in my case (one other didn't)
Best
Reply all
Reply to author
Forward
0 new messages