I wasn´t trying to be offending. I was trying to understand and following this thread, as I have a Nilan Ventilation (Nilan Comfort 300LR) with the CTS 602 control.
This thread seemed to be focused on a Nilan heatpump and a modbus binding for this.
Not a single time is the Nilan ventilation mentioned. I´m not even sure if its the same or not. But reading the cts 602 controle in the thread, it made me think, perhaps this gona work as the Nilan ventilation system I have. I simply wasnt sure, and second could not find any description of how to do this using an Rpi3 and OpenHab2.
Thats why I´d asked. If i knew, or found it obvious, I wouldn´t have asked!
Allright, IMHO as the controller board is the same it could work seamlessly. Sorry, I didn’t get the point that you are owning a ‘Nilan Ventilation’ system.
First: To bring up the communication between your Rpi and the CTS602 please try the link from “How to bring up the modbus communication to the Nilan CTS 602 controller” from above.
Second_Pre: Activate legacy bindings in OH2, Install the modbus 1.11+ addon.
Second: As my suggested solution includes a legacy binding (i.e. from OH1), you need to manually add the items configuration and the modbus ‘things’ configuration to your OpenHAB2 config directory (potentially in /etc/openhab2).
I think I got it covered. I have found an USB to RS485 on amazon. I´ll give it a try when it arrives.
Looking at your screenshot in post #5 above it looks very simular to my Nilan Comfort 300LR readings. My Nilan do have an option to integrate a heatpump as well but its an option and there fore not available right now . So I think its the same CTS 602 controller.
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?
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.
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.
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"}
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
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) [?:?]