Vallox SE Binding

Hopefully during this week :muscle:

1 Like

Can you already estimate when you will have finished testing the OH3 version?

@gitMiguel Hi Miika have you been able to make it work with OH3?

I would be willing to test it (I noticed you asked for someone at times) but have a couple hardware beginner questions first.
I have a MV model available for testing (also controlled via the valloxmv binding). It has a connection box like below

I also have an USB RS485 adapter that I believe (but do not know for sure, never used it) I can connect there.
It has two wires only and identifies as a
Bus 001 Device 005: ID 1a86:7523 QinHeng Electronics HL-340 USB-Serial adapter

I connected the right hand side RS_A and RS_B to the adapter (it has 2 wire inputs labelled A and B).
OH and binding are configure and the thing is up but nothing works.
When I do smarthome:send FanSpeed 2 to the FanSpeed channel for a test I get

2021-03-01 13:48:29.572 [DEBUG] [al.se.connection.ValloxBaseConnector] - Wrote 01-21-11-29-03-5F
2021-03-01 13:48:30.075 [DEBUG] [al.se.connection.ValloxBaseConnector] - Wrote 01-21-11-29-03-5F
2021-03-01 13:48:30.578 [DEBUG] [al.se.connection.ValloxBaseConnector] - Wrote 01-21-11-29-03-5F
2021-03-01 13:48:31.080 [DEBUG] [al.se.connection.ValloxBaseConnector] - Wrote 01-21-11-29-03-5F
2021-03-01 13:48:31.583 [DEBUG] [al.se.connection.ValloxBaseConnector] - Wrote 01-21-11-29-03-5F
2021-03-01 13:48:32.086 [DEBUG] [.internal.se.handler.ValloxSEHandler] - Reconnecting after error: Ack byte not received for telegram: 01-21-11-29-03-5F

and the thing drops offline and reconnects.

At times (some interval presumably) I’m seeing

2021-03-01 13:49:39.101 [DEBUG] [.internal.se.handler.ValloxSEHandler] - Refreshing channels: 
[FAN_SPEED, FAN_SPEED_MAX, FAN_SPEED_MIN, SELECT, PROGRAM_2, HUMIDITY, FLAGS_4]
2021-03-01 13:49:39.162 [DEBUG] [al.se.connection.ValloxBaseConnector] - Wrote 01-21-11-00-29-5C
2021-03-01 13:49:39.665 [DEBUG] [al.se.connection.ValloxBaseConnector] - Wrote 01-21-11-00-A5-D8
2021-03-01 13:49:40.168 [DEBUG] [al.se.connection.ValloxBaseConnector] - Wrote 01-21-11-00-A9-DC
2021-03-01 13:49:40.671 [DEBUG] [al.se.connection.ValloxBaseConnector] - Wrote 01-21-11-00-A3-D6
2021-03-01 13:49:41.174 [DEBUG] [al.se.connection.ValloxBaseConnector] - Wrote 01-21-11-00-B5-E8
2021-03-01 13:49:41.677 [DEBUG] [al.se.connection.ValloxBaseConnector] - Wrote 01-21-11-00-2A-5D
2021-03-01 13:49:42.180 [DEBUG] [al.se.connection.ValloxBaseConnector] - Wrote 01-21-11-00-6F-A2

I assume the serial connection is not properly working yet.

On a sidenote: I ultimately will want to control 3 units.
Does anyone know if I can daisy chain the RS_A and RS_B ports ? If so, how do I set the RS485 addresses of a unit ?

Could anyone to read this thread please tell me how to debug serial communication ?
I noticed I didn’t/ didn’t have to set serial parameters such as baud rate.

Also, to restate, this is a MV unit which is already accessible via modbus/TCP and I’m trying to
connect via serial in addition to this.
Does the binding support this (there was a mention of MV support being dropped) ?

On my box, I have not seen any configuration option about RS485 I would need to enable or set.
What did I miss ?

Sorry for such a late reply, @mstormi. I noticed your email too.

There are multiple differences between SE and MV models. For starters SE models only have a RS485 serial interface (those RS_A and RS_B connectors) with a “special” protocol defined by Vallox. This is used for control panels and some sensors for communication. In MV models they added Modbus RTU (MB_A and MB_B connectors) and presumably changed the “control panel protocol” someway so my binding doesn’t work there. Your best option to chain your units is with that modbus RTU and use modbus binding. I’m assuming that you are after a cloud free setup. Vallox Modbus register listing can be found online or I can send you them.

You can find a 3.x version here: Updated build avilable · Discussion #8 · gitMiguel/openhab-addons · GitHub

1 Like

Is this guessing of yours or do you have any indication?
I tried with different RS485 adapters, with or without termination resistor but no luck on my MV unit
(I only have that accessible for testing).
Ultimately I want to control a set of SE units so there I cannot ‘enter’ via Modbus.
Do you think my setup (see post above) that didn’t do with my MV could still work with those SEs ?
Can I daisy chain their RS ports and use a single adapter on just one of them ?
Vendor told me you cannot set RS bus addresses on SE units so they all have the same by default, but from my understanding of the RS485 serial bus they would all react to commands. Not sure what happens if your binding command is ACK’ed 3 times though.

Thanks for all your work and for getting back with me/us.

I’ll do a combined answer here and not only to to your latest post. Hopefully it doesn’t get too messy…

I also have an USB RS485 adapter that I believe (but do not know for sure, never used it) I can connect there.
It has two wires only and identifies as a
Bus 001 Device 005: ID 1a86:7523 QinHeng Electronics HL-340 USB-Serial adapter


(it has 2 wire inputs labelled A and B).

Well, first things first. You somehow need to verify the device that it actually is the right kind of adapter. I googled and found some topics about wrong linux usb drivers getting installed. So nothing definite there. On the other hand, A and B connectors that you are seeing definitely suggests that it is a RS485 adapter.

When I do smarthome:send FanSpeed 2 to the FanSpeed channel for a test I get

and the thing drops offline and reconnects.

At times (some interval presumably) I’m seeing

I assume the serial connection is not properly working yet.

There is a retry count of 5 (500ms apart) for sending commands to the unit and if it fails, it reconnects. Made to recover from possible connection problems/drops. Things happening in the last log snippet does indeed happen at fixed rate and refreshes all channels linked at that time. And no, it is not working. Serial port is opened properly but no vallox telegrams is seen. Did you have log level set to TRACE or only DEBUG?

Also, to restate, this is a MV unit which is already accessible via modbus/TCP and I’m trying to
connect via serial in addition to this.
Does the binding support this (there was a mention of MV support being dropped) ?

I have never tried connecting to a MV model unit with this binding so I don’t know. I dropped the support for MV models because at that time when I had a PR open reviewers said it should be done later because of backward compatibility. After that I never got to the point that it would be merged. And as an unofficial binding I think this should not overlap with a official binding so I left it as is. But let’s figure out if it can be done?

I tried with different RS485 adapters, with or without termination resistor but no luck on my MV unit

Ok. I think after this we can be sure that it’s not a question about wrong adapters. It just is not using the same protocol.

Is this guessing of yours or do you have any indication?

Based on what you wrote here and what I found in both models manuals. MB_A and MB_B connectors are for external connection and RS_A and RS_B is for internal communication for sensors and control panels. Both use modbus RTU. So if you want to connect your home automation system to your MV unit you use that external connection. And for example humidity sensors connect to the internal RS485 interface. To verify this you could take a dump of the serial traffic seen by your adapter when connected to RS_A and RS_B connectors. We should see modbus traffic there.

Do you think my setup (see post above) that didn’t do with my MV could still work with those SEs ?
Can I daisy chain their RS ports and use a single adapter on just one of them ?

Yes if you connect your adapter to a SE model and use this binding it sure will work. Assuming that all hardware stuff is connected and working properly.
Chaining multiple SE units to one adapter will most likely not work (now I’m kind of guessing). I would setup your three units with three adapters and create three things with the binding. Totally separate units.

Vendor told me you cannot set RS bus addresses on SE units so they all have the same by default, but from my understanding of the RS485 serial bus they would all react to commands. Not sure what happens if your binding command is ACK’ed 3 times though.

Your vendor is correct. The protocol states that a telegrams first byte is domain byte that is always 01 and is not changeable. So multiple units in one bus was first planned but newer implemented by vallox.
I’m not sure either how things would go. I’m just thinking of the situation when three different units try to send different values for example temperatures when heat recovery cell is at different melting points in each unit. I think there will too much conflicts and at least control panels will enter in failed state.

Thanks Miika for getting back with me.

Oh. That I didn’t know and I have not tried yet to connect my adapter into the MB_A/B ports. Will try once more.
Do you mean to say that your binding speaks modbus RTU and that the same protocol is spoken on BOTH, the MB_A/B meant for external as well as on RS_A/B for internal connections ?

On a sidenote, did you have to terminate the bus (120 Ohm resistor) ? I have not found a clear statement if this is needed for short cables and just 1:1 communication like we have.

Right, this and other scenarios will probably mess up the overall state(s) and confuse the binding so will stick to your recommendation and go with 3 adapters. However need to get the first one to work first. Sadly I cannot experiment with the SE unit just my MV one.

Yes and after that you could test your connection and adapter with some modbus tester software. Here’s a link to vallox modbus documentation if you havn’t already seen it. For example connection parameters and all registers can be found there: https://www.vallox.com/files/1092/Manual_Modbus_ENG_Colour_20200420.pdf

My binding speaks only the older vallox protocol found in SE models. What I meant and described there was the connections and function of MV models. And yes both seem to speak modbus rtu.

Hello Miika,
I had to upgrade to Oh 3.1 because of a different binding, since the last version that still worked in OH3.0 no longer works. The jar file is no longer loaded. Do you already have a version that works with oh3.1?

I’m afraid no. I’m stil running OH 3.0 version and havn’t got time to upgrade and test new versions. I do wonder tho has there been so significant change between minor versions that this binding won’t load.

Can some one else perhaps test with 3.1?

I will test that tomorrow with a fresh openhab 3.1 with only your vallox 3.1 binding test and give a response

Hi Miika,
Today I tested various new openHAB 3.1 instances. With all 3.1 versions, whether M4 or snapshot, the binding does not start (see log).

2021-05-21 06:54:08.437 [WARN ] [org.apache.felix.fileinstall ] - Error while starting bundle: file:/C:/Temp/openHAB/openhab-3.1.0-SNAPSHOT/addons/org.openhab.binding.vallox-3.1.0-SNAPSHOT.jar
org.osgi.framework.BundleException: Could not resolve module: org.openhab.binding.vallox [235]
Unresolved requirement: Import-Package: org.openhab.core.io.transport.serial

at org.eclipse.osgi.container.Module.start(Module.java:463) ~[org.eclipse.osgi-3.16.200.jar:?]
at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:440) ~[org.eclipse.osgi-3.16.200.jar:?]
at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundle(DirectoryWatcher.java:1260) [bundleFile:3.6.8]
at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundles(DirectoryWatcher.java:1233) [bundleFile:3.6.8]
at org.apache.felix.fileinstall.internal.DirectoryWatcher.doProcess(DirectoryWatcher.java:520) [bundleFile:3.6.8]
at org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:365) [bundleFile:3.6.8]
at org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:316) [bundleFile:3.6.8]

You sure you have serial transport feature installed?

feature:install openhab-transport-serial

And please see my github for updated version including a dependency fix for snapshot version.

Yes I did that, then I get this error:

2021-05-30 11:04:04.067 [ERROR] [Events.Framework                    ] - FrameworkEvent ERROR
org.osgi.framework.BundleException: Could not resolve module: org.openhab.binding.vallox [235]
  Unresolved requirement: Import-Package: org.apache.commons.io; version="[2.2.0,3.0.0)"

	at org.eclipse.osgi.container.Module.start(Module.java:463) ~[org.eclipse.osgi-3.16.200.jar:?]
	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel$2.run(ModuleContainer.java:1845) ~[org.eclipse.osgi-3.16.200.jar:?]
	at org.eclipse.osgi.internal.framework.EquinoxContainerAdaptor$1$1.execute(EquinoxContainerAdaptor.java:136) ~[org.eclipse.osgi-3.16.200.jar:?]
	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1838) ~[org.eclipse.osgi-3.16.200.jar:?]
	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1781) ~[org.eclipse.osgi-3.16.200.jar:?]
	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1743) ~[org.eclipse.osgi-3.16.200.jar:?]
	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1665) ~[org.eclipse.osgi-3.16.200.jar:?]
	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1) ~[org.eclipse.osgi-3.16.200.jar:?]
	at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:234) [org.eclipse.osgi-3.16.200.jar:?]
	at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:345) [org.eclipse.osgi-3.16.200.jar:?]
2021-05-30 11:04:04.513 [INFO ] [ab.ui.habpanel.internal.HABPanelTile] - Started HABPanel at /habpanel
2021-05-30 11:04:10.865 [INFO ] [e.automation.internal.RuleEngineImpl] - Rule engine started.

Hello with the newest version I got the following error (3.1.0.M4 - Milestone Build):

2021-05-31 10:58:30.387 [WARN ] [org.apache.felix.fileinstall        ] - Error while starting bundle: file:/usr/share/openhab/addons/org.openhab.binding.vallox-3.1.0-SNAPSHOT.jar
org.osgi.framework.BundleException: Could not resolve module: org.openhab.binding.vallox [232]
  Unresolved requirement: Import-Package: javax.measure; version="[2.1.0,3.0.0)"
	at org.eclipse.osgi.container.Module.start(Module.java:463) ~[org.eclipse.osgi-3.16.200.jar:?]
	at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:440) ~[org.eclipse.osgi-3.16.200.jar:?]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundle(DirectoryWatcher.java:1260) [bundleFile:3.6.8]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundles(DirectoryWatcher.java:1233) [bundleFile:3.6.8]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.startAllBundles(DirectoryWatcher.java:1221) [bundleFile:3.6.8]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.doProcess(DirectoryWatcher.java:515) [bundleFile:3.6.8]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:365) [bundleFile:3.6.8]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:316) [bundleFile:3.6.8]

try M5

Hello with the newest version I got the following error (3.1.0.M5 - Milestone Build):

2021-05-31 14:32:49.443 [WARN ] [org.apache.felix.fileinstall        ] - Error while starting bundle: file:/usr/share/openhab/addons/org.openhab.binding.sony-3.1.0-alpha.andan-SNAPSHOT.jar
org.osgi.framework.BundleException: Could not resolve module: org.openhab.binding.sony [235]
  Unresolved requirement: Import-Package: javax.measure; version="[1.0.0,2.0.0)"
	at org.eclipse.osgi.container.Module.start(Module.java:463) ~[org.eclipse.osgi-3.16.200.jar:?]
	at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:440) ~[org.eclipse.osgi-3.16.200.jar:?]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundle(DirectoryWatcher.java:1260) [bundleFile:3.6.8]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundles(DirectoryWatcher.java:1233) [bundleFile:3.6.8]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.startAllBundles(DirectoryWatcher.java:1221) [bundleFile:3.6.8]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.doProcess(DirectoryWatcher.java:515) [bundleFile:3.6.8]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:365) [bundleFile:3.6.8]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:316) [bundleFile:3.6.8]

Oh right I forgot it’s a jar compiled on 3.0
OSGi dependencies have changed so it needs to be recompiled on 3.1M4 or newer (@gitMiguel).