Transition from Modbus1 to Modbus2. OpenHab2

for here:

modbus:tcp.slave1.connection=10.1.1.184
modbus:tcp.slave1.length=21
modbus:slave1.valuetype=bit
modbus:tcp.slave1.type=coil

convert to:

Bridge modbus:tcp:ADAM6050_01 [ host="10.1.1.184", port=502, id=1 ]
{
    // These correspond to input register numbers 00001 - 00012
    // documentation not clear for me, if I use discrete if always start by 0
    // and discrete means read only
    Bridge poller coilsClears [ start=0, length=21, refresh=500, type="coil" ]
    {
        Thing data cl00 [ readStart="0",  readValueType="bit", writeStart="0", writeValueType="bit", writeType="coil" ]
        Thing data cl01 [ readStart="1",  readValueType="bit" , writeStart="1", writeValueType="bit", writeType="coil" ]
     }
}

Switch ADAM6050_01_CL00             "light-1  [%s]"   { channel="modbus:data:ADAM6050_01:coilsClears:cl00:switch" }
Switch ADAM6050_01_CL01             "light-2  [%s]"   { channel="modbus:data:ADAM6050_01:coilsClears:cl01:switch" }

I’m working on the same problem, Modbus TCP with OpenHAB 2.
As I understod, there is only a “things”-file nessecary.

Is really no binding or other add-on nessecary?
The only binding I found is binding-modbus1 - 1.12.0 but i work with OH 2.3.0

Because my modbus is not working yet and I don’t know where to start to find the problem :wink:

Modus v2 binding is only included from OH 2.4 onwards

Download the modbus binding 2.4 from the source above (of this post). Create a thing file as mentioned in the documentation.

Post thing content and item content here and some hints about the device you use. Good if you post some register/adress documentations of the modbus device too. Maybe I can help you.

Thank you very much!
I updated to 2.4 (I found no link above, but in the internet ;-))
And I found then the modbus 2.4 binding.
And then, my Integer is on the sitemap… So I will manage to read the float number well… :slight_smile:
Thanks again!

Could someone please help me get from modbus1 to modbus2 binding…
I´m using a serial dongle, but I simply cant get the connection to work. The doc´s are NOT very helpfull (to be honest), and there is no example of a setting up an serial. And how to set the parameters dont relly make any sense to me. I guess one will have to know, to be able to understand…

This is my modbus1 cfg.:

poll=3000
serial.pollinterval="6000"
writemultipleregisters=true


serial.nilan_input_device.connection=/dev/ttyUSB-RS486:19200:8:even:1:rtu
serial.nilan_input_device.id=30
serial.nilan_input_device.start=0
serial.nilan_input_device.length=4
serial.nilan_input_device.type=input

serial.nilan_holding_device.connection=/dev/ttyUSB-RS486:19200:8:even:1:rtu
serial.nilan_holding_device.id=30
serial.nilan_holding_device.start=0
serial.nilan_holding_device.length=1
serial.nilan_holding_device.type=holding

Notice , I use symlinks for serial port. I cant chose symlinks in paperUI, so I have to create the .things file manually.

I don’t know the Serial-Connection.
I did it with TCP. For this i had to update my Openhab to version 2.4
And then, no cfg-File is neccesary.
I have only a things-file:

Bridge modbus:tcp:TwinCat [ host=“192.168.1.99”, port=502, id=1 ] {
Bridge poller holding [ start=0, length=26, refresh=1000, type=“holding” ] {
Thing data holding0000 [ readStart=“0”, readValueType=“float32_swap” ]
Thing data holding0002 [ readStart=“2”, readValueType=“float32_swap” ]
Thing data holding0004 [ readStart=“4”, readValueType=“float32_swap” ]
Thing data holding0006 [ readStart=“6”, readValueType=“float32_swap” ]
Thing data holding0008 [ readStart=“8”, readValueType=“float32_swap” ]
Thing data holding0010 [ readStart=“10”, readValueType=“float32_swap” ]
Thing data holding0012 [ readStart=“12”, readValueType=“float32_swap” ]
Thing data holding0014 [ readStart=“14”, readValueType=“float32_swap” ]
Thing data holding0016 [ readStart=“16”, readValueType=“float32_swap” ]
Thing data holding0018 [ readStart=“18”, readValueType=“float32_swap” ]
Thing data holding0020 [ readStart=“20”, readValueType=“float32_swap” ]
Thing data holding0022 [ readStart=“22”, readValueType=“float32_swap” ]
Thing data holding0024 [ readStart=“24”, readValueType=“float32_swap” ]
}
}

and a items-file with lines like this…

Number ModbusWert1 “Aussen Temperatur [%.1f °C]” { channel=“modbus:data:TwinCat:holding:holding0000:number” }
Number ModbusWert2 “Aussen Feuchte [%.0f %%]” { channel=“modbus:data:TwinCat:holding:holding0002:number” }
Number ModbusWert3 “Zimmer Temperatur [%.1f °C]” { channel=“modbus:data:TwinCat:holding:holding0004:number” }
Number ModbusWert4 “Zimmer Feuchte [%.0f %%]” { channel=“modbus:data:TwinCat:holding:holding0006:number” }
Number ModbusWert5 “Zimmer VOC [%.0f %%]” { channel=“modbus:data:TwinCat:holding:holding0008:number” }

and the sitemap contains for example lines like this:

      Frame label="Temperatur und Feuchte Aussen" {
            Text item=ModbusWert1       //Aussentemperatur
            Text item=ModbusWert2       //Aussenfeuchte

That’s fine, xxx.things file is probably easier to manage.

Okay, so you want a serial bridge Thing to represent your device

Bridge modbus:serial:myNilan [ port="ttyUSB-RS486", id=30, baud=19200, stopBits=1, parity="even", daaBits=8, encoding="rtu" ] {
   // here will go any pollers
}

Next you want to read some input data regularly, so you’ll need a poller bridge Thing to describe what and when

   Bridge poller inputRegisters [ start=0, length=4, refresh=6000, type="input" ] {
   // here will go data thing(s)
}

Then you’ll want a data Thing to describe how to handle the raw Modbus registers

Thing data input01 [ readStart=0, readValueType="uint16" ]

The data Thing will create channels that we can link to Items.

Putting it together -

Bridge modbus:serial:myNilan [ port="ttyUSB-RS486", id=30, baud=19200, stopBits=1, parity="even", dataBits=8, encoding="rtu" ] {
   Bridge poller inputRegisters [ start=0, length=4, refresh=6000, type="input" ] {
      Thing data inp00 [ readStart=0, readValueType="uint16" ]
      Thing data inp01 [ readStart=1, readValueType="uint16" ]
      // inp02, inp03 similar
   }
}

EDIT - serial Thing has an error, use stopBits=“1” with quotemarks.
MORE EDIT - use stopBits=“1.0” to have it neatly visible in PaperUI as well

myNilan, inputRegisters, inp00 are all names that we have chosen to suit ourselves

Linking an Item, using the channel selector :number (as opposed to :switch for example)

Number myItem "blah" { channel="modbus:data:myNilan:inputRegisters:inp00:number"

See how far you can get from there.
For your holding registers, you will want to add another poller under the same serial bridge, and add data things with write parameters as well as read.

Please tell us what you think is missing from the docs. I can see there is no serial bridge example, but it does follow the TCP type closely.

1 Like

I get an error in the Bridge settings (.things file).

This is the thing file:

Bridge modbus:serial:myNilan [ port="ttyUSB-RS486", id=30, baud=19200, stopBits=1, parity="even", dataBits=8, encoding="rtu" ] {
   // here will go any pollers
}

This is the error:

018-12-16 00:01:18.434 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'nilan.things'
==> /var/log/openhab2/events.log <==
2018-12-16 00:01:18.541 [hingStatusInfoChangedEvent] - 'modbus:serial:myNilan' changed from UNINITIALIZED to INITIALIZING
==> /var/log/openhab2/openhab.log <==
2018-12-16 00:01:18.542 [WARN ] [me.config.core.internal.ConfigMapper] - Could not set field value for field 'stopBits': Can not set java.lang.String field org.openhab.binding.modbus.internal.config.ModbusSerialConfiguration.stopBits to java.math.BigDecimal
java.lang.IllegalArgumentException: Can not set java.lang.String field org.openhab.binding.modbus.internal.config.ModbusSerialConfiguration.stopBits to java.math.BigDecimal
	at sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(UnsafeFieldAccessorImpl.java:167) ~[?:?]
	at sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(UnsafeFieldAccessorImpl.java:171) ~[?:?]
	at sun.reflect.UnsafeObjectFieldAccessorImpl.set(UnsafeObjectFieldAccessorImpl.java:81) ~[?:?]
	at java.lang.reflect.Field.set(Field.java:764) ~[?:?]
	at org.apache.commons.lang.reflect.FieldUtils.writeField(FieldUtils.java:523) ~[38:org.apache.commons.lang:2.6.0]
	at org.apache.commons.lang.reflect.FieldUtils.writeField(FieldUtils.java:500) ~[38:org.apache.commons.lang:2.6.0]
	at org.apache.commons.lang.reflect.FieldUtils.writeField(FieldUtils.java:560) ~[38:org.apache.commons.lang:2.6.0]
	at org.eclipse.smarthome.config.core.internal.ConfigMapper.as(ConfigMapper.java:102) [97:org.eclipse.smarthome.config.core:0.10.0.oh240M8]
	at org.eclipse.smarthome.config.core.Configuration.as(Configuration.java:85) [97:org.eclipse.smarthome.config.core:0.10.0.oh240M8]
	at org.eclipse.smarthome.core.thing.binding.BaseThingHandler.getConfigAs(BaseThingHandler.java:274) [109:org.eclipse.smarthome.core.thing:0.10.0.oh240M8]
	at org.openhab.binding.modbus.internal.handler.ModbusSerialThingHandler.configure(ModbusSerialThingHandler.java:38) [274:org.openhab.binding.modbus:2.4.0.M8]
	at org.openhab.binding.modbus.internal.handler.AbstractModbusEndpointThingHandler.initialize(AbstractModbusEndpointThingHandler.java:65) [274:org.openhab.binding.modbus:2.4.0.M8]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
	at java.lang.reflect.Method.invoke(Method.java:498) ~[?:?]
	at org.eclipse.smarthome.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:153) [102:org.eclipse.smarthome.core:0.10.0.oh240M8]
	at org.eclipse.smarthome.core.internal.common.Invocation.call(Invocation.java:53) [102:org.eclipse.smarthome.core:0.10.0.oh240M8]
	at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:?]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:?]
	at java.lang.Thread.run(Thread.java:748) [?:?]

==> /var/log/openhab2/events.log <==

2018-12-16 00:01:18.555 [hingStatusInfoChangedEvent] - 'modbus:serial:myNilan' changed from INITIALIZING to OFFLINE (CONFIGURATION_ERROR): Exception during initialization: port, baud, flowControlIn, flowControlOut, stopBits, parity, encoding all must be non-null! (ModbusConfigurationException)

Ahh found the error… stopBits was missing “”

1 Like

Yep, that’s in the documentation


I think it’s the possibility of 1.5 that makes that numeric parameter an oddball.

You´re right…
And thanks alot for all your help… This has given me alot more to go for now.

See how you get on with the writable registers. I think you’ll need
writeMultipleEvenWithSingleRegisterOrCoil
to reproduce your old setup.

Keep us posted on any docu suggestions. Modbus is odd, everyone’s setup is very different so examples are not always helpful, but a working setup at the end would be god to share here.

Thats my worse problem, cause I really know very little about modbus. My previous setup was a copy from the OpenHAB1/2 Nilan heatpump. And I really struggle to understand how things works…
This new modbus did not make things any better for my understanding :face_with_raised_eyebrow:

I can see from you help, I was actually on the right track regarding setting up the USB stick… What I was missing and doing wrong was the commas… And second, I was using full path to the device ie /dev/ttyUSB-RS486…
An example in the doc´s would be a great help to others, I would say.

Hmm… I believe I have some USB/symlinks problems here…
When I add an poller, I get an error:

2018-12-16 12:04:54.816 [ERROR] [ing.ModbusSlaveConnectionFactoryImpl] - connect try 1/1 error: Modbus serial device ttyUSB-RS486 doesn't exist!. Connection SerialConnection@6295d1[portName=ttyUSB-RS486,port=<null>]. Endpoint ModbusSerialSlaveEndpoint@354c92[portName=ttyUSB-RS486]
==> /var/log/openhab2/events.log <==
2018-12-16 12:04:54.818 [hingStatusInfoChangedEvent] - 'modbus:poller:myNilan:inputRegisters' changed from INITIALIZING to ONLINE
==> /var/log/openhab2/openhab.log <==
2018-12-16 12:04:54.820 [ERROR] [ing.ModbusSlaveConnectionFactoryImpl] - re-connect reached max tries 1, throwing last error: Modbus serial device ttyUSB-RS486 doesn't exist!. Connection SerialConnection@6295d1[portName=ttyUSB-RS486,port=<null>]. Endpoint ModbusSerialSlaveEndpoint@354c92[portName=ttyUSB-RS486]
2018-12-16 12:04:54.822 [ERROR] [ing.ModbusSlaveConnectionFactoryImpl] - Error connecting connection SerialConnection@6295d1[portName=ttyUSB-RS486,port=<null>] for endpoint ModbusSerialSlaveEndpoint@354c92[portName=ttyUSB-RS486]: Modbus serial device ttyUSB-RS486 doesn't exist!
2018-12-16 12:04:54.824 [WARN ] [rt.modbus.internal.ModbusManagerImpl] - Could not connect to endpoint ModbusSerialSlaveEndpoint@354c92[portName=ttyUSB-RS486] -- aborting request ModbusPollerThingHandlerImpl.ModbusPollerReadRequest@19a2231[slaveId=30,functionCode=READ_INPUT_REGISTERS,start=0,length=4,maxTries=3] [operation ID 10e406f6-337a-4da5-9d63-68296dfb0e90]
==> /var/log/openhab2/events.log <==
2018-12-16 12:04:54.831 [hingStatusInfoChangedEvent] - 'modbus:poller:myNilan:inputRegisters' changed from ONLINE to OFFLINE (COMMUNICATION_ERROR): Error with read: org.openhab.io.transport.modbus.ModbusConnectionException: Error connecting to endpoint ModbusSerialSlaveEndpoint@354c92[portName=ttyUSB-RS486]
2018-12-16 12:04:54.874 [hingStatusInfoChangedEvent] - 'modbus:data:myNilan:inputRegisters:inp00' changed from UNINITIALIZED to INITIALIZING

I´m getting really tired of this USB/Linux stuff. :face_with_symbols_over_mouth:
With 2.3 setup and the old modbus, it was working rock steady!! (config showed in earlier msg). Then I added a new USB stick (WirelessMbus) and things went bananas… I had to create symlinks to get things working again…
Since then, I´ve struggled with the symlinks. First the Wireless Mbus stick wouldn´t connect. And now this RS486 stick is given a problem as well.
But my Zigbee and a z-wave stick´s are working just fine, just as well as my USB SSD.

This is really killing me!

Well at least we get a clear message!
I know nowt about symlinks. Might be help here

This is the tutorial I followed when I created the symlinks. And I have check them about hundreds of times now.

But I have an theory that my problems is not regarding the symlinks itself, it more about the RS486 USB stick, cause 3 out of 4 symlinks works just fine…
I have a sligt feeling that the old modbus never actually checked all serial settings, which is why it worked fine. I just cant figure out, what it is… Its an Incircut RS486 USB stick… I need to digger more into this. It´s really driven my mad!!

To keep you posted on this one… I think I just got a step futher…
I changed the Bridge settings parity from “even” to “none”. And now it seems like it accept my RS486 stick, (I had a feeling this might be the case… Dont ask why)…

However, I seem to be stuck on the Modbus Data thing now. This is where I suspected I would run into problems, cause this is where I need to understand modbus for my device (Nilan Comfort 300LR), which I simply dont.
I kinda hoped I could take the old data settings, and just insert the data into the thing configuration… But like with the stick, I fear that these may be wrong as well…

This is my old full setup filled with Input and Holding registers:

poll=3000
serial.pollinterval="6000"
writemultipleregisters=true


serial.nilan_input_device.connection=/dev/ttyUSB-RS486:19200:8:even:1:rtu
serial.nilan_input_device.id=30
serial.nilan_input_device.start=0
serial.nilan_input_device.length=4
serial.nilan_input_device.type=input

serial.nilan_holding_device.connection=/dev/ttyUSB-RS486:19200:8:even:1:rtu
serial.nilan_holding_device.id=30
serial.nilan_holding_device.start=0
serial.nilan_holding_device.length=1
serial.nilan_holding_device.type=holding

serial.nilan_input_discreteio.connection=/dev/ttyUSB-RS486:19200:8:even:1:rtu
serial.nilan_input_discreteio.id=30
serial.nilan_input_discreteio.start=100
serial.nilan_input_discreteio.length=14
serial.nilan_input_discreteio.type=input

serial.nilan_holding_discreteio.connection=/dev/ttyUSB-RS486:19200:8:even:1:rtu
serial.nilan_holding_discreteio.id=30
serial.nilan_holding_discreteio.start=100
serial.nilan_holding_discreteio.length=28
serial.nilan_holding_discreteio.type=holding

serial.nilan_input_analogio.connection=/dev/ttyUSB-RS486:19200:8:even:1:rtu
serial.nilan_input_analogio.id=30
serial.nilan_input_analogio.start=200
serial.nilan_input_analogio.length=23
serial.nilan_input_analogio.type=input

serial.nilan_holding_analogio.connection=/dev/ttyUSB-RS486:19200:8:even:1:rtu
serial.nilan_holding_analogio.id=30
serial.nilan_holding_analogio.start=200
serial.nilan_holding_analogio.length=6
serial.nilan_holding_analogio.type=holding

#serial.nilan_input_time.connection=/dev/ttyUSB-RS486:19200:8:even:1:rtu
#serial.nilan_input_time.id=30
#serial.nilan_input_time.start=300
#serial.nilan_input_time.length=x
#serial.nilan_input_time.type=input

serial.nilan_holding_time.connection=/dev/ttyUSB-RS486:19200:8:even:1:rtu
serial.nilan_holding_time.id=30
serial.nilan_holding_time.start=300
serial.nilan_holding_time.length=6
serial.nilan_holding_time.type=holding

serial.nilan_input_alarm.connection=/dev/ttyUSB-RS486:19200:8:even:1:rtu
serial.nilan_input_alarm.id=30
serial.nilan_input_alarm.start=400
serial.nilan_input_alarm.length=10
serial.nilan_input_alarm.type=input

serial.nilan_holding_alarm.connection=/dev/ttyUSB-RS486:19200:8:even:1:rtu
serial.nilan_holding_alarm.id=30
serial.nilan_holding_alarm.start=400
serial.nilan_holding_alarm.length=1
serial.nilan_holding_alarm.type=holding

#serial.nilan_input_weekprogram.connection=/dev/ttyUSB-RS486:19200:8:even:1:rtu
#serial.nilan_input_weekprogram.id=30
#serial.nilan_input_weekprogram.start=500
#serial.nilan_input_weekprogram.length=x
#serial.nilan_input_weekprogram.type=input

serial.nilan_holding_weekprogram.connection=/dev/ttyUSB-RS486:19200:8:even:1:rtu
serial.nilan_holding_weekprogram.id=30
serial.nilan_holding_weekprogram.start=500
serial.nilan_holding_weekprogram.length=1
serial.nilan_holding_weekprogram.type=holding


#serial.nilan_input_user1functions.connection=/dev/ttyUSB-RS486:19200:8:even:1:rtu
#serial.nilan_input_user1functions.id=30
#serial.nilan_input_user1functions.start=600
#serial.nilan_input_user1functions.length=x
#serial.nilan_input_user1functions.type=input

serial.nilan_holding_user1functions.connection=/dev/ttyUSB-RS486:19200:8:even:1:rtu
serial.nilan_holding_user1functions.id=30
serial.nilan_holding_user1functions.start=600
serial.nilan_holding_user1functions.length=6
serial.nilan_holding_user1functions.type=holding

#serial.nilan_input_user2functions.connection=/dev/ttyUSB-RS486:19200:8:even:1:rtu
#serial.nilan_input_user2functions.id=30
#serial.nilan_input_user2functions.start=600
#serial.nilan_input_user2functions.length=x
#serial.nilan_input_user2functions.type=input

serial.nilan_holding_user2functions.connection=/dev/ttyUSB-RS486:19200:8:even:1:rtu
serial.nilan_holding_user2functions.id=30
serial.nilan_holding_user2functions.start=610
serial.nilan_holding_user2functions.length=6
serial.nilan_holding_user2functions.type=holding

serial.nilan_input_control.connection=/dev/ttyUSB-RS486:19200:8:even:1:rtu
serial.nilan_input_control.id=30
serial.nilan_input_control.start=1000
serial.nilan_input_control.length=4
serial.nilan_input_control.type=input

serial.nilan_holding_control.connection=/dev/ttyUSB-RS486:19200:8:even:1:rtu
serial.nilan_holding_control.id=30
serial.nilan_holding_control.start=1000
serial.nilan_holding_control.length=8
serial.nilan_holding_control.type=holding

#serial.nilan_input_airflow.connection=/dev/ttyUSB-RS486:19200:8:even:1:rtu
#serial.nilan_input_airflow.id=30
#serial.nilan_input_airflow.start=1100
#serial.nilan_input_airflow.length=x
#serial.nilan_input_airflow.type=input

serial.nilan_holding_airflow.connection=/dev/ttyUSB-RS486:19200:8:even:1:rtu
serial.nilan_holding_airflow.id=30
serial.nilan_holding_airflow.start=1100
serial.nilan_holding_airflow.length=2
serial.nilan_holding_airflow.type=holding

serial.nilan_input_airtemp.connection=/dev/ttyUSB-RS486:19200:8:even:1:rtu
serial.nilan_input_airtemp.id=30
serial.nilan_input_airtemp.start=1200
serial.nilan_input_airtemp.length=7
serial.nilan_input_airtemp.type=input

serial.nilan_holding_airtemp.connection=/dev/ttyUSB-RS486:19200:8:even:1:rtu
serial.nilan_holding_airtemp.id=30
serial.nilan_holding_airtemp.start=1200
serial.nilan_holding_airtemp.length=6
serial.nilan_holding_airtemp.type=holding

#serial.nilan_input_airbypass.connection=/dev/ttyUSB-RS486:19200:8:even:1:rtu
#serial.nilan_input_airbypass.id=30
#serial.nilan_input_airbypass.start=1300
#serial.nilan_input_airbypass.length=x
#serial.nilan_input_airbypass.type=input

#serial.nilan_input_airheat.connection=/dev/ttyUSB-RS486:19200:8:even:1:rtu
#serial.nilan_input_airheat.id=30
#serial.nilan_input_airheat.start=1400
#serial.nilan_input_airheat.length=x
#serial.nilan_input_airheat.type=input

#serial.nilan_input_compressor.connection=/dev/ttyUSB-RS486:19200:8:even:1:rtu
#serial.nilan_input_compressor.id=30
#serial.nilan_input_compressor.start=1500
#serial.nilan_input_compressor.length=x
#serial.nilan_input_compressor.type=input

#serial.nilan_input_defrost.connection=/dev/ttyUSB-RS486:19200:8:even:1:rtu
#serial.nilan_input_defrost.id=30
#serial.nilan_input_defrost.start=1600
#serial.nilan_input_defrost.length=x
#serial.nilan_input_defrost.type=input

#serial.nilan_input_hotwater.connection=/dev/ttyUSB-RS486:19200:8:even:1:rtu
#serial.nilan_input_hotwater.id=30
#serial.nilan_input_hotwater.start=1700
#serial.nilan_input_hotwater.length=x
#serial.nilan_input_hotwater.type=input

serial.nilan_holding_hotwater.connection=/dev/ttyUSB-RS486:19200:8:even:1:rtu
serial.nilan_holding_hotwater.id=30
serial.nilan_holding_hotwater.start=1700
serial.nilan_holding_hotwater.length=2
serial.nilan_holding_hotwater.type=holding

#serial.nilan_input_centheat.connection=/dev/ttyUSB-RS486:19200:8:even:1:rtu
#serial.nilan_input_centheat.id=30
#serial.nilan_input_centheat.start=1800
#serial.nilan_input_centheat.length=1
#serial.nilan_input_centheat.type=input

serial.nilan_holding_centheat.connection=/dev/ttyUSB-RS486:19200:8:even:1:rtu
serial.nilan_holding_centheat.id=30
serial.nilan_holding_centheat.start=1800
serial.nilan_holding_centheat.length=1
serial.nilan_holding_centheat.type=holding

#serial.nilan_input_airqualrh.connection=/dev/ttyUSB-RS486:19200:8:even:1:rtu
#serial.nilan_input_airqualrh.id=30
#serial.nilan_input_airqualrh.start=1900
#serial.nilan_input_airqualrh.length=x
#serial.nilan_input_airqualrh.type=input

serial.nilan_holding_airqualrh.connection=/dev/ttyUSB-RS486:19200:8:even:1:rtu
serial.nilan_holding_airqualrh.id=30
serial.nilan_holding_airqualrh.start=1910
serial.nilan_holding_airqualrh.length=4
serial.nilan_holding_airqualrh.type=holding

#serial.nilan_input_airqualco2.connection=/dev/ttyUSB-RS486:19200:8:even:1:rtu
#serial.nilan_input_airqualco2.id=30
#serial.nilan_input_airqualco2.start=1900
#serial.nilan_input_airqualco2.length=x
#serial.nilan_input_airqualco2.type=input

serial.nilan_holding_airqualco2.connection=/dev/ttyUSB-RS486:19200:8:even:1:rtu
serial.nilan_holding_airqualco2.id=30
serial.nilan_holding_airqualco2.start=1920
serial.nilan_holding_airqualco2.length=3
serial.nilan_holding_airqualco2.type=holding

serial.nilan_input_userpanel.connection=/dev/ttyUSB-RS486:19200:8:even:1:rtu
serial.nilan_input_userpanel.id=30
serial.nilan_input_userpanel.start=2000
serial.nilan_input_userpanel.length=12
serial.nilan_input_userpanel.type=input

serial.nilan_holding_userpanel.connection=/dev/ttyUSB-RS486:19200:8:even:1:rtu
serial.nilan_holding_userpanel.id=30
serial.nilan_holding_userpanel.start=2000
serial.nilan_holding_userpanel.length=1
serial.nilan_holding_userpanel.type=holding

#serial.nilan_input_preheat.connection=/dev/ttyUSB-RS486:19200:8:even:1:rtu
#serial.nilan_input_preheat.id=30
#serial.nilan_input_preheat.start=2100
#serial.nilan_input_preheat.length=x
#serial.nilan_input_preheat.type=input


New update - Problems with the RS486 stick is not solved. As soon as I add data, i get the same error again, USB-RS486 doesnt exsist…
I guess there isn´t any real check to this beeing online and working correct.

Just to clear, modbus bindings v1 & v2 won’t coexist and share the RS485 dongle.

Serial Modbus is usually run without parity these days, but as usual every device is different and its the Nilan you need to enquiring of.