Someone has reported that there was an issues with his virtualization environment. Are you running your OH in a container (VMWare, VirtualBox, Docker)?
Yes, but i ran it before on a raspberry and had the same problems
Iām quite serious, someone on my thread reported that his vertualization environment steals/confuse serial ports, he switched back to host and looks like it was resolved.
OK, i will check that during the xmas holidays
Hi Thomas,
I do have the same situation here in combination of Bluegiga transport and Zigbee (not zwave).
@vkolotov has filed an issue about it:
I circumvent the issue currently by starting Zigbee first and then installing the Bluetooth binding.
Well - quite ugly. But I havenāt found any other solution so farā¦
It was me
FTR: This is the post in which I describe the issue on my side:
Yes, it seems like this. But maybe by chance the serial ports had a different order on the bare metal system and/or the bindings started in a ābetterā order.
Back on the ESXi, the issue re-appeared instantly.
Unfortunately i have no zigbee so that i cannot check if the same problem occurs between zigbee and zwave.
In addition i am not aware of the mechanism to get a list of serial ports and then select one.
Iāve tried with both: zwave controller and/or zigbee coordinator in combination with Bluegiga/Bluetooth.
Could you de-install the (yet configured) Bluetooth binding and the Bluegiga transport.
Then restart openhab and let the zwave open itās serial port.
Then re-install Bluetooth and Bluegiga (it is still configured and should work instantly).
Check, if this more reliable than before?
What was the result with zwave and zigbee without bluegiga?
I will check that
It is working, but i did not see the zwave network in Habmin and all Battery devices ar in the Request_NIF state after a restart. I quit for today
IIRC, both have worked as expected as long as the Bluegiga transport wasānt enabled.
Unfortunately, I canāt re-check this right now.
I did some more testing this morning:
- removed the (virtual) USB-ports from the openHAB VM
- re-added in a different order (first zigbee, then the Bluegigas)
- re-startet openHAB
- rebooted whole VM
After Step #3, I have all four serial adapters running. But after reboot (Step #4) is zigbee missing itās adapter again.
So the most promising way to get all the serial adapters accessible from the different bindings at the same time is:
- de-install Bluetooth and Bluegiga.
- restart openHAB and let the other bindings open their respective serial adaptor
- install Bluetooth and Bluegiga (using the yet-existing configuration)
Well, this is just a workaround and not suitable for ādaily operationā.
@vkolotov: May I ask you to provide some option for a ādelayed startā of the Bluegiga transport? As long as we donāt really understand the root cause of the issue, this might be a way of mitigating the hurt for nowā¦
From the user point of view the main difference ist that zwaver presents a drop down list to select a serail port and the bluetooth binding selects the serial ports using a regex. So both binding need to read all available ports.
Currently i am setting up a new Raspi 3 and see what come. Maybe i try to understand the code for selecting the ports
Just had another thought:
When we are running openHAB in a VM, we are on a much more powerful system than when we are testing on SBCās (Raspberry Pi etc.).
So the question is:
When (in time) do the bindings collect the available serial ports? Is it during start of the binding or when we open the configuration dialog in PaperUI?
In the first case ALL bindings could ask the same bundle/library at almost the very same point in time especially on very fast hardware. If the specific library/function (āgive me all available serial portsā) is not safe for beeing called reentrantly - this might cause the odd/incomplete output.
Have to admit: Iām not a developer and I do not understand how the underlaying libs are working. So please be tolerant with me if this complete nonsense
I just moved from a vm to a raspi, now i am setting up everything. maybe tomorrow i am able to check if thing are happen on the raspi as in the VM
I did another test: Iāve moved the usb/serial dongles from the ESXi to a separate system (tiny SBC with Armbian Stretch). This guy runs ser2net to provide remote access to the four serial ports which I currently have in this test setup (three Bluegigaās and one Zigbee CC2531).
In the openHAB VM on the ESXi Iāve startet a couple of socatās to provide local serial ports as /dev/something* which in is in turn redirected to the remote SBC running ser2net. So itās now a typical socat/ser2net setupā¦
Surprisingly, this setup shows almost the same behaviour as with the āvirtualā local USB ports on the ESXi host: When I start the configuration page for the Zigbee coordinator, just one single serial port is listed (instead of four existing ports). Same as Thomas had with the Zwave and I had with my former tests on the ESXi with locally attached USB2Serial dongles. So I still cannot configure the Zigbee stuff while the Bluetooth binding(Bluegiga transport is running because the right dongle is just not listed.
BUT: Once configured (e.g. while Bluetooth was deinstalled) the Bindings can open all their respective ports. Thatās different to the local setup. Both Bindings are happy with their dongles now. I can restart openHAB and the Bindings initialize well again.
So beside the configuration quirk, this could work for me.
Nevertheless, there is some oddity in some used serial library, some timing and/or reentrance issue etc. which is worth to look after.
Ok, now i moved from my VM to a Raspberry pi 3. And get the same behavior. Without bluegiga all serial ports are shown in zwave binding. The after installing the blugiga binding only one port is show, but this port ist not the zwave port. Uninstalling bluegiga does not change anything, but after a restart all ports ar shown for zwave.
So i would say that that has definitly has nothing to do with a VM by the way i do not use ESX for virtualisation i use the Synology virtualisation
Wow. Thatās interesting. Thankās for checking!
And: Have you checked the behaviour when
- Zwave controller has been configured to use itās port (while Bluetooth/Blugiga is removed)
- installing Bluetooth/Blugiga and configure it too
- restart openHAB
Are both bindings able to open all their ports or is zwave unable to open the controller?
Checked it both binding are able to open the ports. Seems that the is a Problem in paper ui?
I am having the same issue with z-wave binding, Bluetooth Binding binding-bluetooth - 2.5.0.M1, and Bluetooth Binding TinyB Transport market:binding-3769218 - 1.0.
If I have the z-wave binding by itself with no bluetooth it works. If I have both bluetooth bindings installed with no z-wave they work. The second I install both bindings and reboot, everything goes crazy and neither of them seem to work correctly. I assume they are both trying to use the /dev/ttyACM0 port. Thatās what I have configured for z-wave but bluetooth doesnāt seem to let you configure a port. It seems when the machine comes up, it does iterate through what is connected and assigns ports randomly.