OpenHAB1/2 Nilan heatpump

Where did you get the password, can you tell?

Nickma82
I have received the RS485 USB device today.
Anyway,

I just came to think. I have a picture of the CTS 602 controller print located inside of my Nilan Comfort 300LR.
It´s not quite the same as yours as far as I can tell. Perhaps a newer revision.
So I wondered if you could take a short look at it, and tell me if I´m correct, the interface/pins to use is located at the top left corner of the picture. And there are already 6 wires connected?
(Those wires are probably those connected to a pin interface located on the outside of the Comfort 300. This is where the CTS 602 display panel is connected. And if that is correct the modbus interface is available as well).

I agree.
The datasheet [page 2-3] hasn’t changed since then. I’d check where the wires blue and yellow wire’s (next to the USB plug) are going to.
I guess that they just connected it on the CTS602 board and left it open on the other side.
If that’s the case, check the 12V on the same screw terminal. If that’s ok too I’d give it a go connecting it.

If that’s not the case you can do two things (as the RS485 port is an official one): Call your installing electrician for datasheets or ask at Nilan headquarters.

Got it all wired up now. Trying to setup the connection using nickma´s config file only changig the host IP. But end up with connection and refuse error. Now what?

2018-02-08 23:58:52.350 [ERROR] [ing.ModbusSlaveConnectionFactoryImpl] - connect try 1/3 error: Connection refused (Connection refused). Connection TCPMasterConnection@1838ae[socket=Socket[unconnected]]. Endpoint ModbusTCPSlaveEndpoint@12d9e4f[address=10.4.28.237,port=502]

2018-02-08 23:58:52.416 [ERROR] [ing.ModbusSlaveConnectionFactoryImpl] - connect try 2/3 error: Connection refused (Connection refused). Connection TCPMasterConnection@1838ae[socket=Socket[unconnected]]. Endpoint ModbusTCPSlaveEndpoint@12d9e4f[address=10.4.28.237,port=502]

2018-02-08 23:58:52.481 [ERROR] [ing.ModbusSlaveConnectionFactoryImpl] - connect try 3/3 error: Connection refused (Connection refused). Connection TCPMasterConnection@1838ae[socket=Socket[unconnected]]. Endpoint ModbusTCPSlaveEndpoint@12d9e4f[address=10.4.28.237,port=502]

2018-02-08 23:58:52.485 [ERROR] [ing.ModbusSlaveConnectionFactoryImpl] - re-connect reached max tries 3, throwing last error: Connection refused (Connection refused). Connection TCPMasterConnection@1838ae[socket=Socket[unconnected]]. Endpoint ModbusTCPSlaveEndpoint@12d9e4f[address=10.4.28.237,port=502]

2018-02-08 23:58:52.490 [ERROR] [ing.ModbusSlaveConnectionFactoryImpl] - Error connecting connection TCPMasterConnection@1838ae[socket=Socket[unconnected]] for endpoint ModbusTCPSlaveEndpoint@12d9e4f[address=10.4.28.237,port=502]: Connection refused (Connection refused)

2018-02-08 23:58:52.503 [WARN ] [.binding.modbus.internal.ModbusSlave] - ModbusSlave (nilan_fans): Error getting a new connection for endpoint ModbusTCPSlaveEndpoint@12d9e4f[address=10.4.28.237,port=502]. Error was: Unable to validate object

2018-02-08 23:58:52.507 [WARN ] [.binding.modbus.internal.ModbusSlave] - ModbusSlave (nilan_fans) not connected -- aborting read request net.wimpi.modbus.msg.ReadMultipleRegistersRequest@15e915a. Endpoint ModbusTCPSlaveEndpoint@12d9e4f[address=10.4.28.237,port=502]

Changed to use serial insted. Got a new problem. Seems like something hangs or something… baud rate is wrong. But according to my cfg, it´s set to 19200.
Will follow up tomorrow.

2018-02-09 00:55:22.536 [ERROR] [inding.modbus.internal.ModbusBinding] - Exception when parsing configuration parameter tcp.nilan.connection = 10.4.28.237:502:60:0:0:3  --  java.lang.IllegalArgumentException invalid baud rate: 502

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

2018-02-09 00:55:22.542 [ERROR] [org.apache.felix.configadmin        ] - [org.osgi.service.cm.ManagedService, org.osgi.service.event.EventHandler, id=367, bundle=234/mvn:org.openhab.binding/org.openhab.binding.modbus/1.11.0]: Updating property tcp.nilan.connection of configuration org.openhab.modbus caused a problem: Exception when parsing configuration parameter tcp.nilan.connection = 10.4.28.237:502:60:0:0:3  --  java.lang.IllegalArgumentException invalid baud rate: 502

org.osgi.service.cm.ConfigurationException: tcp.nilan.connection : Exception when parsing configuration parameter tcp.nilan.connection = 10.4.28.237:502:60:0:0:3  --  java.lang.IllegalArgumentException invalid baud rate: 502

	at org.openhab.binding.modbus.internal.ModbusBinding.updated(ModbusBinding.java:702) [234:org.openhab.binding.modbus:1.11.0]

	at org.apache.felix.cm.impl.helper.ManagedServiceTracker.updated(ManagedServiceTracker.java:189) [7:org.apache.felix.configadmin:1.8.16]

	at org.apache.felix.cm.impl.helper.ManagedServiceTracker.updateService(ManagedServiceTracker.java:152) [7:org.apache.felix.configadmin:1.8.16]

	at org.apache.felix.cm.impl.helper.ManagedServiceTracker.provideConfiguration(ManagedServiceTracker.java:85) [7:org.apache.felix.configadmin:1.8.16]

	at org.apache.felix.cm.impl.ConfigurationManager$ManagedServiceUpdate.provide(ConfigurationManager.java:1479) [7:org.apache.felix.configadmin:1.8.16]

	at org.apache.felix.cm.impl.ConfigurationManager$ManagedServiceUpdate.run(ConfigurationManager.java:1435) [7:org.apache.felix.configadmin:1.8.16]

	at org.apache.felix.cm.impl.UpdateThread.run0(UpdateThread.java:141) [7:org.apache.felix.configadmin:1.8.16]

	at org.apache.felix.cm.impl.UpdateThread.run(UpdateThread.java:109) [7:org.apache.felix.configadmin:1.8.16]

	at java.lang.Thread.run(Thread.java:748) [?:?]

Hi Kim,
you bought an USB->RS485 dongle right? If true you can NOT connect to that device via TCP/IP, you have to use the serial version!
I would recommend you give my bringup (via python). Ultimatelly you probably need a config like this.

Nick

Hi NickMa.

Yeah, I bought the InCircut RS485 dongle. (simular to the one you have with the four dip-switches)
I figured out that it couldnt do the TPC/IP connection, så I changed the config to using serial insted. But that just gave me a new, another error.

I have no idea how to execute this .py script you referering to. I´m relative new to Rpi, Linux and OpenHab2. Infact I´m not even sure if the Rpi is plug&play ready regarding the RS485 dongle, and have no idea how to test it.
I just, wired the Nilan to the dongle according to the explanation, pluged in the dongle, installed the binding, and then trying to set it up ind the modbus.cfg with a few test items in the nilan.items file.

My modbud.cfg looks like this:

serial.nilan.connection=/dev/ttyUSB0:19200:8:even:1:rtu
serial.nilan.id=30
serial.nilan.start=200
serial.nilan.length=16
serial.nilan.type=input
serial.pollinterval=2000

serial.nilan.valuetype=int16

# write out nilan connection
writemultipleregisters=true
serial.nilan2.connection=/dev/ttyUSB0:19200:8:even:1:rtu
serial.nilan2.id=30
serial.nilan2.start=1001
serial.nilan2.length=4
serial.nilan2.type=holding

And this is my nilan.items

Number nilan_t0		"temporary variable will be processed in .rules file" 		<temperature> (heat_nilan)		{modbus="nilan:0"}
Number nilan_t1		"temporary variable will be processed in .rules file" 		<temperature> (heat_nilan)		{modbus="nilan:1"}
Number nilan_t2		"t2_tmp variable [%2.2f °C]" 		<temperature> (heat_nilan)		{modbus="nilan:2"}
Number nilan_t3		"temporary variable will be processed in .rules file" 		<temperature> (heat_nilan)		{modbus="nilan:3"}
Number nilan_t4		"temporary variable will be processed in .rules file" 		<temperature> (heat_nilan)		{modbus="nilan:4"}
Number nilan_t5		"temporary variable will be processed in .rules file" 		<temperature> (heat_nilan)		{modbus="nilan:5"}
Number nilan_t6		"temporary variable will be processed in .rules file[%2.2f °C]" 		<temperature> (heat_nilan)	{modbus="nilan:6"}
Number nilan_t7		"temporary variable will be processed in .rules file" 		<temperature> (heat_nilan)		{modbus="nilan:7"}
Number nilan_t8		"temporary variable will be processed in .rules file" 		<temperature> (heat_nilan)		{modbus="nilan:8"}
Number nilan_t9		"temporary variable will be processed in .rules file" 		<temperature> (heat_nilan)		{modbus="nilan:9"}
Number nilan_t10	"temporary variable will be processed in .rules file" 		<temperature> (heat_nilan)		{modbus="nilan:10"}
Number nilan_t11	"temporary variable will be processed in .rules file" 		<temperature> (heat_nilan)		{modbus="nilan:11"}
Number nilan_t12	"temporary variable will be processed in .rules file[%2.2f °C]" 		<temperature> (heat_nilan)	{modbus="nilan:12"}
Number nilan_t13	"temporary variable will be processed in .rules file" 		<temperature> (heat_nilan)		{modbus="nilan:13"}
Number nilan_t14	"temporary variable will be processed in .rules file" 		<temperature> (heat_nilan)		{modbus="nilan:14"}
Number nilan_t15	"temporary variable will be processed in .rules file" 		<temperature> (heat_nilan)		{modbus="nilan:15"}

Both examples have been copied from https://github.com/openhab/openhab1-addons/wiki/Samples-Binding-Config#serial-modbus-nilan-heatpump-configuration

Check the dongle - open a terminal and execute the following four commands

sudo dmesg | grep ttyUSB

wget https://raw.githubusercontent.com/nickma82/nilan_communication_bringup/master/src/nilan.py
chmod u+x ./nilan.py
./nilan.py

post all output here

Ahh that simple…
Thx NickMa… Will give it a try as soon as I get home this evening.

What I´m trying to achieve isn´t quite rocketscience :slight_smile: Or at least, I think it isn´t :grin:

This is the output of your .py:

[18:30:10] openhabian@openHABianPi:~$ sudo dmesg | grep ttyUSB
[    3.938890] usb 1-1.2: FTDI USB Serial Device converter now attached to ttyUSB0
[18:30:24] openhabian@openHABianPi:~$
[18:30:24] openhabian@openHABianPi:~$ wget https://raw.githubusercontent.com/nickma82/nilan_communication_bringup/master/src/nilan.py
--2018-02-09 18:30:24--  https://raw.githubusercontent.com/nickma82/nilan_communication_bringup/master/src/nilan.py
Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 151.101.36.133
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|151.101.36.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 2065 (2.0K) [text/plain]
Saving to: ‘nilan.py’

nilan.py                             100%[=====================================================================>]   2.02K  --.-KB/s   in 0s

2018-02-09 18:30:24 (10.2 MB/s) - ‘nilan.py’ saved [2065/2065]

[18:30:24] openhabian@openHABianPi:~$ chmod u+x ./nilan.py
[18:30:24] openhabian@openHABianPi:~$ ./nilan.py
Traceback (most recent call last):
  File "./nilan.py", line 4, in <module>
    import minimalmodbus
ImportError: No module named minimalmodbus

Looks very good, your USB dongle is attachted to /dev/ttyUSB0

That was correct too, you are just missing the module minimalmodbus. Install it and run nilan.py again…

sudo apt-get -y install python-pip
sudo pip install pyserial minimalmodbus
./nilan.py

You should see something like that

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

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: 1518207950131.8 ms, minimum silent period: 2.01 ms.
MinimalModbus debug mode. Response from instrument: '\x1e\x03\x02\x00\x01\xecF' (7 bytes), roundtrip time: 18.1 ms. Timeout setting: 1000.0 ms.

old userVentSet:             1
new userVentSet:             2
Connection to the Nilan instrument looks good!

Get some errors when trying to install pyserial minimalmodbus

[00:58:28] openhabian@openHABianPi:~$  sudo apt-get -y install python-pip
Reading package lists... Done
Building dependency tree
Reading state information... Done
python-pip is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

[00:58:49] openhabian@openHABianPi:~$ sudo pip install pyserial minimalmodbus
Traceback (most recent call last):
  File "/usr/bin/pip", line 9, in <module>
    load_entry_point('pip==1.5.6', 'console_scripts', 'pip')()
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 356, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2476, in load_entry_point
    return ep.load()
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2190, in load
    ['__name__'])
  File "/usr/lib/python2.7/dist-packages/pip/__init__.py", line 74, in <module>
    from pip.vcs import git, mercurial, subversion, bazaar  # noqa
  File "/usr/lib/python2.7/dist-packages/pip/vcs/mercurial.py", line 9, in <module>
    from pip.download import path_to_url
  File "/usr/lib/python2.7/dist-packages/pip/download.py", line 25, in <module>
    from requests.compat import IncompleteRead
ImportError: cannot import name IncompleteRead

Never saw that before, quick lookup; Just following them doing:

sudo apt-get remove python-pip
sudo easy_install pip

# and then once again
sudo pip install pyserial minimalmodbus
./nilan.py

Yes, that seem to do the trick…

Now I would suspect getting some readings from the Nilan? But it doesnt seem like it does. Will try an reboot first,

[11:52:12] openhabian@openHABianPi:~$ sudo apt-get remove python-pip
[sudo] password for openhabian:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
  python-chardet python-colorama python-distlib python-html5lib python-ndg-httpsclient
  python-openssl python-pkg-resources python-pyasn1 python-requests python-setuptools
  python-six python-urllib3 python-wheel
Use 'apt-get autoremove' to remove them.
The following packages will be REMOVED:
  python-pip
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
After this operation, 481 kB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 43268 files and directories currently installed.)
Removing python-pip (1.5.6-5) ...
Processing triggers for man-db (2.7.5-1~bpo8+1) ...
Updating FireMotD available updates count ...
[11:53:48] openhabian@openHABianPi:~$ sudo easy_install pip
Searching for pip
Reading https://pypi.python.org/simple/pip/
Best match: pip 9.0.1
Downloading https://pypi.python.org/packages/11/b6/abcb525026a4be042b486df43905d6893fb04f05a     ac21c32c638e939e447/pip-9.0.1.tar.gz#md5=35f01da33009719497f01a4ba69d63c9
Processing pip-9.0.1.tar.gz
Writing /tmp/easy_install-CXvfq1/pip-9.0.1/setup.cfg
Running pip-9.0.1/setup.py -q bdist_egg --dist-dir /tmp/easy_install-CXvfq1/pip-9.0.1/egg-di     st-tmp-fXvSSJ
/usr/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'python_     requires'
  warnings.warn(msg)
warning: no previously-included files found matching '.coveragerc'
warning: no previously-included files found matching '.mailmap'
warning: no previously-included files found matching '.travis.yml'
warning: no previously-included files found matching '.landscape.yml'
warning: no previously-included files found matching 'pip/_vendor/Makefile'
warning: no previously-included files found matching 'tox.ini'
warning: no previously-included files found matching 'dev-requirements.txt'
warning: no previously-included files found matching 'appveyor.yml'
no previously-included directories found matching '.github'
no previously-included directories found matching '.travis'
no previously-included directories found matching 'docs/_build'
no previously-included directories found matching 'contrib'
no previously-included directories found matching 'tasks'
no previously-included directories found matching 'tests'
Adding pip 9.0.1 to easy-install.pth file
Installing pip script to /usr/local/bin
Installing pip2.7 script to /usr/local/bin
Installing pip2 script to /usr/local/bin

Installed /usr/local/lib/python2.7/dist-packages/pip-9.0.1-py2.7.egg
Processing dependencies for pip
Finished processing dependencies for pip
[11:54:06] openhabian@openHABianPi:~$ sudo pip install pyserial minimalmodbus
Collecting pyserial
  Downloading pyserial-3.4-py2.py3-none-any.whl (193kB)
    100% |████████████████████████████████| 194kB 928kB/s
Collecting minimalmodbus
  Downloading MinimalModbus-0.7.tar.gz (102kB)
    100% |████████████████████████████████| 112kB 1.5MB/s
Building wheels for collected packages: minimalmodbus
  Running setup.py bdist_wheel for minimalmodbus ... done
  Stored in directory: /root/.cache/pip/wheels/6c/9c/c0/2d288da7dfa4d23bc82dec9eb7c38e356bf7     9f5f3c07d1e9a1
Successfully built minimalmodbus
Installing collected packages: pyserial, minimalmodbus
Successfully installed minimalmodbus-0.7 pyserial-3.4
[11:54:37] openhabian@openHABianPi:~$ ./nilan.py
TESTING Nilan Connection
__main__.Nilan<id=0x76890d28, address=30, mode=rtu, close_port_after_each_call=False, precal     culate_read_size=True, debug=True, serial=Serial<id=0x768b4470, open=True>(port='/dev/ttyUSB     0', baudrate=19200, bytesize=8, parity='E', stopbits=1, timeout=1.0, xonxoff=False, rtscts=F     alse, dsrdtr=False)>

MinimalModbus debug mode. Writing to instrument (expecting 7 bytes back): '\x1e\x03\x03\xeb\     x00\x01\xf6\x15' (1E 03 03 EB 00 01 F6 15)
MinimalModbus debug mode. No sleep required before write. Time since previous read: 15182600     86269.5 ms, minimum silent period: 2.01 ms.
MinimalModbus debug mode. Response from instrument: '\x1e\x03\x02\x00\x01\xecF' (1E 03 02 00      01 EC 46) (7 bytes), roundtrip time: 17.3 ms. Timeout setting: 1000.0 ms.

old userVentSet:             1
new userVentSet:             2
Connection to the Nilan instrument looks good!
[11:54:46] openhabian@openHABianPi:~$

Hmm still get this odd error… It looks like it´s still trying to establish an TCP/IP connection, even though I have changed the config file to be using serial insted.

2018-02-10 11:59:50.284 [ERROR] [inding.modbus.internal.ModbusBinding] - Exception when parsing configuration parameter tcp.nilan.connection = 10.4.28.237:502:60:0:0:3  --  java.lang.IllegalArgumentException invalid baud rate: 502

2018-02-10 11:59:50.333 [ERROR] [org.apache.felix.configadmin        ] - [org.osgi.service.cm.ManagedService, org.osgi.service.event.EventHandler, id=366, bundle=234/mvn:org.openhab.binding/org.openhab.binding.modbus/1.11.0]: Updating property tcp.nilan.connection of configuration org.openhab.modbus caused a problem: Exception when parsing configuration parameter tcp.nilan.connection = 10.4.28.237:502:60:0:0:3  --  java.lang.IllegalArgumentException invalid baud rate: 502

org.osgi.service.cm.ConfigurationException: tcp.nilan.connection : Exception when parsing configuration parameter tcp.nilan.connection = 10.4.28.237:502:60:0:0:3  --  java.lang.IllegalArgumentException invalid baud rate: 502

	at org.openhab.binding.modbus.internal.ModbusBinding.updated(ModbusBinding.java:702) [234:org.openhab.binding.modbus:1.11.0]

	at org.apache.felix.cm.impl.helper.ManagedServiceTracker.updated(ManagedServiceTracker.java:189) [7:org.apache.felix.configadmin:1.8.16]

	at org.apache.felix.cm.impl.helper.ManagedServiceTracker.updateService(ManagedServiceTracker.java:152) [7:org.apache.felix.configadmin:1.8.16]

	at org.apache.felix.cm.impl.helper.ManagedServiceTracker.provideConfiguration(ManagedServiceTracker.java:85) [7:org.apache.felix.configadmin:1.8.16]

	at org.apache.felix.cm.impl.ConfigurationManager$ManagedServiceUpdate.provide(ConfigurationManager.java:1479) [7:org.apache.felix.configadmin:1.8.16]

	at org.apache.felix.cm.impl.ConfigurationManager$ManagedServiceUpdate.run(ConfigurationManager.java:1435) [7:org.apache.felix.configadmin:1.8.16]

	at org.apache.felix.cm.impl.UpdateThread.run0(UpdateThread.java:141) [7:org.apache.felix.configadmin:1.8.16]

	at org.apache.felix.cm.impl.UpdateThread.run(UpdateThread.java:109) [7:org.apache.felix.configadmin:1.8.16]

	at java.lang.Thread.run(Thread.java:748) [?:?]

Your USB dongle plus the connection is good, would be nice if you shared you wiring …

That doesn’t mean, that there is an error with the serial connection too.

openhab-cli console
#default password is habopen

# inside the openhab CLI (command line interface)
items list | grep nilan

# Strg+D to quit

Concerning your config:
Have you changed each and every entry in /etc/openhab2/services/modbus.cfg?
Please also take a look in the userdata directory /var/lib/openhab2/config/org/openhab/modbus.config

Here are pictures of the wireing.

  1. Picture is the InCircut USB RS485 dongle.
    PINs from left to right: (Should be simular to the same in your InCircut dongle I found in your links).
    PIN 1. (GND) - Blue
    PIN 2 (A1) - Yellow
    PIN 3 (B1) - Brown

  2. Picture is the interface located on the outside (right side) of the Nilan Comfort 300LR (notic there are two cables. The lower is for the User Panel). Previous I´d supply a picture of the inside of the CTS 602 controller, noticing that all pins have been wired.

PIN 2 (A1) - Yellow
PIN 3 (B1) - Brown
PIN 6 (GND) - Blue

1 Like

item list returned with an error:

[13:33:07] openhabian@openHABianPi:~$ items list | grep nilan
-bash: items: command not found
[13:33:11] openhabian@openHABianPi:~$ ^C

/var/lib/openhab2/config/org/openhab/modbus.config result:

poll="8000"
serial.nilan.connection="/dev/ttyUSB0:19200:8:even:1:rtu"
serial.nilan.id="30"
serial.nilan.length="16"
serial.nilan.start="200"
serial.nilan.type="input"
serial.nilan.valuetype="int16"
serial.nilan2.connection="/dev/ttyUSB0:19200:8:even:1:rtu"
serial.nilan2.id="30"
serial.nilan2.length="4"
serial.nilan2.start="1001"
serial.nilan2.type="holding"
serial.nilan_holding_airflow.connection="/dev/ttyUSB0:19200:8:even:1:rtu"
serial.nilan_holding_airflow.id="30"
serial.nilan_holding_airflow.length="2"
serial.nilan_holding_airflow.start="1100"
serial.nilan_holding_airflow.type="holding"
serial.nilan_holding_airqualco2.connection="/dev/ttyUSB0:19200:8:even:1:rtu"
serial.nilan_holding_airqualco2.id="30"
serial.nilan_holding_airqualco2.length="3"
serial.nilan_holding_airqualco2.start="1920"
serial.nilan_holding_airqualco2.type="holding"
serial.nilan_holding_airqualrh.connection="/dev/ttyUSB0:19200:8:even:1:rtu"
serial.nilan_holding_airqualrh.id="30"
serial.nilan_holding_airqualrh.length="4"
serial.nilan_holding_airqualrh.start="1910"
serial.nilan_holding_airqualrh.type="holding"
serial.nilan_holding_airtemp.connection="/dev/ttyUSB0:19200:8:even:1:rtu"
serial.nilan_holding_airtemp.id="30"
serial.nilan_holding_airtemp.length="6"
serial.nilan_holding_airtemp.start="1200"
serial.nilan_holding_airtemp.type="holding"
serial.nilan_holding_alarm.connection="/dev/ttyUSB0:19200:8:even:1:rtu"
serial.nilan_holding_alarm.id="30"
serial.nilan_holding_alarm.length="1"
serial.nilan_holding_alarm.start="400"
serial.nilan_holding_alarm.type="holding"
serial.nilan_holding_analogio.connection="/dev/ttyUSB0:19200:8:even:1:rtu"
serial.nilan_holding_analogio.id="30"
serial.nilan_holding_analogio.length="6"
serial.nilan_holding_analogio.start="200"
serial.nilan_holding_analogio.type="holding"
serial.nilan_holding_centheat.connection="/dev/ttyUSB0:19200:8:even:1:rtu"
serial.nilan_holding_centheat.id="30"
serial.nilan_holding_centheat.length="1"
serial.nilan_holding_centheat.start="1800"
serial.nilan_holding_centheat.type="holding"
serial.nilan_holding_control.connection="/dev/ttyUSB0:19200:8:even:1:rtu"
serial.nilan_holding_control.id="30"
serial.nilan_holding_control.length="8"
serial.nilan_holding_control.start="1000"
serial.nilan_holding_control.type="holding"
serial.nilan_holding_device.connection="/dev/ttyUSB0:19200:8:even:1:rtu"
serial.nilan_holding_device.id="30"
serial.nilan_holding_device.length="1"
serial.nilan_holding_device.start="0"
serial.nilan_holding_device.type="holding"
serial.nilan_holding_discreteio.connection="/dev/ttyUSB0:19200:8:even:1:rtu"
serial.nilan_holding_discreteio.id="30"
serial.nilan_holding_discreteio.length="28"
serial.nilan_holding_discreteio.start="100"
serial.nilan_holding_discreteio.type="holding"
serial.nilan_holding_hotwater.connection="/dev/ttyUSB0:19200:8:even:1:rtu"
serial.nilan_holding_hotwater.id="30"
serial.nilan_holding_hotwater.length="2"
serial.nilan_holding_hotwater.start="1700"
serial.nilan_holding_hotwater.type="holding"
serial.nilan_holding_time.connection="/dev/ttyUSB0:19200:8:even:1:rtu"
serial.nilan_holding_time.id="30"
serial.nilan_holding_time.length="6"
serial.nilan_holding_time.start="300"
serial.nilan_holding_time.type="holding"
serial.nilan_holding_user1functions.connection="/dev/ttyUSB0:19200:8:even:1:rtu"
serial.nilan_holding_user1functions.id="30"
serial.nilan_holding_user1functions.length="6"
serial.nilan_holding_user1functions.start="600"
serial.nilan_holding_user1functions.type="holding"
serial.nilan_holding_user2functions.connection="/dev/ttyUSB0:19200:8:even:1:rtu"
serial.nilan_holding_user2functions.id="30"
serial.nilan_holding_user2functions.length="6"
serial.nilan_holding_user2functions.start="610"
serial.nilan_holding_user2functions.type="holding"
serial.nilan_holding_userpanel.connection="/dev/ttyUSB0:19200:8:even:1:rtu"
serial.nilan_holding_userpanel.id="30"
serial.nilan_holding_userpanel.length="1"
serial.nilan_holding_userpanel.start="2000"
serial.nilan_holding_userpanel.type="holding"
serial.nilan_holding_weekprogram.connection="/dev/ttyUSB0:19200:8:even:1:rtu"
serial.nilan_holding_weekprogram.id="30"
serial.nilan_holding_weekprogram.length="1"
serial.nilan_holding_weekprogram.start="500"
serial.nilan_holding_weekprogram.type="holding"
serial.nilan_input_airtemp.connection="/dev/ttyUSB0:19200:8:even:1:rtu"
serial.nilan_input_airtemp.id="30"
serial.nilan_input_airtemp.length="7"
serial.nilan_input_airtemp.start="1200"
serial.nilan_input_airtemp.type="input"
serial.nilan_input_alarm.connection="/dev/ttyUSB0:19200:8:even:1:rtu"
serial.nilan_input_alarm.id="30"
serial.nilan_input_alarm.length="10"
serial.nilan_input_alarm.start="400"
serial.nilan_input_alarm.type="input"
serial.nilan_input_analogio.connection="/dev/ttyUSB0:19200:8:even:1:rtu"
serial.nilan_input_analogio.id="30"
serial.nilan_input_analogio.length="23"
serial.nilan_input_analogio.start="200"
serial.nilan_input_analogio.type="input"
serial.nilan_input_control.connection="/dev/ttyUSB0:19200:8:even:1:rtu"
serial.nilan_input_control.id="30"
serial.nilan_input_control.length="4"
serial.nilan_input_control.start="1000"
serial.nilan_input_control.type="input"
serial.nilan_input_device.connection="/dev/ttyUSB0:19200:8:even:1:rtu"
serial.nilan_input_device.id="30"
serial.nilan_input_device.length="4"
serial.nilan_input_device.start="0"
serial.nilan_input_device.type="input"
serial.nilan_input_discreteio.connection="/dev/ttyUSB0:19200:8:even:1:rtu"
serial.nilan_input_discreteio.id="30"
serial.nilan_input_discreteio.length="14"
serial.nilan_input_discreteio.start="100"
serial.nilan_input_discreteio.type="input"
serial.nilan_input_userpanel.connection="/dev/ttyUSB0:19200:8:even:1:rtu"
serial.nilan_input_userpanel.id="30"
serial.nilan_input_userpanel.length="12"
serial.nilan_input_userpanel.start="2000"
serial.nilan_input_userpanel.type="input"
serial.pollinterval="2000"
serial.slave1.id="30"
service.pid="org.openhab.modbus"
tcp.nilan.connection="10.4.28.237:502:60:0:0:3"
tcp.nilan.id="30"
tcp.nilan.length="1"
tcp.nilan.start="211"
tcp.nilan.type="input"
tcp.nilan.valuetype="uint16"
tcp.nilan_boiler_setpoint.connection="10.4.28.237:502:60:0:0:3"
tcp.nilan_boiler_setpoint.id="30"
tcp.nilan_boiler_setpoint.length="2"
tcp.nilan_boiler_setpoint.start="1700"
tcp.nilan_boiler_setpoint.type="holding"
tcp.nilan_comp.connection="10.4.28.237:502:60:0:0:3"
tcp.nilan_comp.id="30"
tcp.nilan_comp.length="1"
tcp.nilan_comp.start="109"
tcp.nilan_comp.type="holding"
tcp.nilan_el_heater.connection="10.4.28.237:502:60:0:0:3"
tcp.nilan_el_heater.id="30"
tcp.nilan_el_heater.length="1"
tcp.nilan_el_heater.start="116"
tcp.nilan_el_heater.type="holding"
tcp.nilan_fans.connection="10.4.28.237:502:60:0:0:3"
tcp.nilan_fans.id="30"
tcp.nilan_fans.length="2"
tcp.nilan_fans.start="200"
tcp.nilan_fans.type="holding"
tcp.nilan_modes.connection="10.4.28.237:502:60:0:0:3"
tcp.nilan_modes.id="30"
tcp.nilan_modes.length="4"
tcp.nilan_modes.start="1001"
tcp.nilan_modes.type="holding"
tcp.nilan_state.connection="10.4.28.237:502:60:0:0:3"
tcp.nilan_state.id="30"
tcp.nilan_state.length="1"
tcp.nilan_state.start="1002"
tcp.nilan_state.type="input"
tcp.nilan_t.connection="10.4.28.237:502:60:0:0:3"
tcp.nilan_t.id="30"
tcp.nilan_t.length="16"
tcp.nilan_t.start="200"
tcp.nilan_t.type="input"
writemultipleregisters="true"

I suspect this is the cached version. And I notice this is NOT simular til my modbus.cfg inside /openhab2/services/

serial.nilan.connection=/dev/ttyUSB0:19200:8:even:1:rtu
serial.nilan.id=30
serial.nilan.start=200
serial.nilan.length=16
serial.nilan.type=input
serial.pollinterval=2000

serial.nilan.valuetype=int16

# write out nilan connection
writemultipleregisters=true
serial.nilan2.connection=/dev/ttyUSB0:19200:8:even:1:rtu
serial.nilan2.id=30
serial.nilan2.start=1001
serial.nilan2.length=4
serial.nilan2.type=holding

This only works from within the openhab-cli console (you forgot a command) (aka the console)

pi@raspberrypiOpenHab ~/openhab2_conf/items % openhab-cli console
Logging in as openhab
Password:

                          __  _____    ____
  ____  ____  ___  ____  / / / /   |  / __ )
 / __ \/ __ \/ _ \/ __ \/ /_/ / /| | / __  |
/ /_/ / /_/ /  __/ / / / __  / ___ |/ /_/ /
\____/ .___/\___/_/ /_/_/ /_/_/  |_/_____/
    /_/                        2.2.0
                               Release Build

Hit '<tab>' for a list of available commands
and '[cmd] --help' for help on a specific command.
Hit '<ctrl-d>' or type 'system:shutdown' or 'logout' to shutdown openHAB.

openhab> items list | grep -i nilan
Nilan_Control_VentSet (Type=NumberItem, State=1, Label=User ventilation step select, Category=fan_ceiling, Groups=[gNilan])
[ ... a lot of items ... ]

Exit with Strg+D.

delete every line starting with tcp.nilan.

I think (60% sure) that it’s the user to openhab understandable transformed version. So yes, quasi cached.