Issue of the topic:
I had OpenHab 2.4 and Velbus and it worked well(I don’t remember if I had this issue).
I updated my system to OpenHab 2.5 and since this moment I’m having temporaries issues, that I can not connect OpenHab to my velbus bridge.
Status: OFFLINE - COMMUNICATION_ERROR Port already used: /dev/ttyACM0
‘’’ LOG
2020-07-02 11:43:34.849 [hingStatusInfoChangedEvent] - ‘velbus:bridge:bfa41595’ changed from INITIALIZING to OFFLINE (COMMUNICATION_ERROR): Port already used: /dev/ttyACM0
2020-07-02 11:44:32.801 [hingStatusInfoChangedEvent] - ‘velbus:bridge:bfa41595’ changed from OFFLINE (COMMUNICATION_ERROR): Port already used: /dev/ttyACM0 to UNINITIALIZED
2020-07-02 11:44:32.829 [hingStatusInfoChangedEvent] - ‘velbus:bridge:bfa41595’ changed from UNINITIALIZED to UNINITIALIZED (HANDLER_MISSING_ERROR)
2020-07-02 11:44:33.645 [hingStatusInfoChangedEvent] - ‘velbus:bridge:bfa41595’ changed from UNINITIALIZED (HANDLER_MISSING_ERROR) to INITIALIZING
2020-07-02 11:44:35.683 [hingStatusInfoChangedEvent] - ‘velbus:bridge:bfa41595’ changed from INITIALIZING to OFFLINE (COMMUNICATION_ERROR): Port already used: /dev/ttyACM0
2020-07-02 11:45:31.011 [hingStatusInfoChangedEvent] - ‘velbus:bridge:bfa41595’ changed from OFFLINE (COMMUNICATION_ERROR): Port already used: /dev/ttyACM0 to UNINITIALIZED
2020-07-02 11:45:31.037 [hingStatusInfoChangedEvent] - ‘velbus:bridge:bfa41595’ changed from UNINITIALIZED to UNINITIALIZED (HANDLER_MISSING_ERROR)
2020-07-02 11:45:31.507 [hingStatusInfoChangedEvent] - ‘velbus:bridge:bfa41595’ changed from UNINITIALIZED (HANDLER_MISSING_ERROR) to INITIALIZING
2020-07-02 11:45:33.554 [hingStatusInfoChangedEvent] - ‘velbus:bridge:bfa41595’ changed from INITIALIZING to OFFLINE (COMMUNICATION_ERROR): Port already used: /dev/ttyACM0
‘’’
Thank you in advance for your help.
Did you try to reboot the system ?
In case a reboot does not help run this command with root privileges:
lsof /dev/ttyACM0
This should result in an output similar to:
lsof: WARNING: can't stat() fuse.gvfsd-fuse file system /run/user/119/gvfs
Output information may be incomplete.
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
java 7214 openhab 54u CHR 166,1 0t0 16628 /dev/ttyACM0
In this case it would mean that the java program running with PID 7214 with user openhab privileges uses the ttyACM0 device.
1 Like
MDAR
(Stuart Hanlon, UK importer of Velbus hardware)
3
By any chance, do you have other Serial devices attached to your setup?
I would strongly advise moving to using the /dev/serial/by-id/usb-Velleman_Projects_VMB1USB_Velbus_USB_interface-if00 method of addressing the USB interface, or use a TCP server application which addresses the interface by the by-id method.
This will also allow you to connect to your Velbus hardware with VelbusLink at the same time as anything else and means you don’t have to be tethered to the USB port while you’re configuring.
This subject is covered in great detail on the Velbus forum.
This thread is very long, but I promise it covers 99% of the questions that come up.
Including how to move from a Velbus Serial Bridge to a Velbus Network bridge.
You might even find it easier if you create the Velbus Network Bridge and give it the same unique ID as the Serial Bridge (which you’d have to delete first)
This Thing file would adopt the same unique ID as your current Serial Bridge, which mean all of your existing Velbus Things & Items will continue to function.
// Network bridge, for use with TCP servers like Velserv, Velbus_PB_Server or the upcoming Velbus TCP gateway. Running on the same machine
Bridge velbus:networkbridge:bfa41595 "Velbus Network Bridge - Loopback" @ "Cabinet" [ address="127.0.0.1", port=6000 , timeUpdateInterval="360", reconnectionInterval="15" ]