Support for Velbus Home Automation

here at home i always use a tcp connection to connect to the velbus sytem.
Maybe there is a bug in the serial communication part, and because of this its not working with a plain device …
can you guys try to use a tcp connection? and see if that fixes your problem?

i use this one: http://leachy.homeip.net/velbus/velserv.c

Hi Cereal2nd!
Big thanks for the reply.
Today I updated to latest (0.88.1) and this is the output from the log:

Imho the communication is fine, it seems to be between the serial connection and Lovelace that the entities don’t come through/get generated. (my Lovelace frontend is totally empty now :frowning: )

I can install velserv of course, but anyway, who is creating the velbus component for hassio? Maybe he/she can shed some light on the situation.

Best regards,
/Ward

as far as i know Hassio and HA are the same code …

Thomas Delaet and me did most of the work in HA, i have the last version of the velbus code running here at home and here it works.

i once started to debug this problem, its has something todo with the modules names that are not fully loaded by the python-velbus code, and if this happens they will not be registered to HA/hassio.
But i can not reproduce this here at home, so its hard to debug for me …

Impressive!
Between the error messages and what you tell regarding module names, I will try to do some investigation.
I found this link on how to get access outside the /config share: https://developers.home-assistant.io/docs/en/hassio_debugging.html
Any other pointers you can give me for debugging this problem?
Thanks in advance
/Ward

from what i could find out when i previously debugged this. the problem is inside the python velbus lib.

some modules never get the loaded flag set to True, because of this we never call the callback to register them with HA. and that is the reason they do not show up in HA

Hi Cereal2nd,
Update: Velbus is playing nicely with Openhab2.
I suspect there is indeed a bug, but I can’t tell if it is in the Python lib, but Openhab2 recognizes all modules, also the ones that HA gives an error for.
There definitely seem to be differences between the Component and the binding.

Best regards

1 Like

the bug is in the python-velbus lib, i’m 100% sure about that :slight_smile:

Openhab2 = java so it uses a completely different lib

if you want i can have a look at your install?
if you can let me login i can try to debug the problem and i may find a good solution for everyone

i think i found a potential bug.

do you have a vmbgp1/2 or 4 in your install?

Dear Cereal2nd,

Thank you for your reply! So sorry, I didn’t seem to get notifications of your messages!
I actually just came back here to inform that I tried a clean install of 0.90.1, and only edited the configuration.yaml file with

velbus:
      port: '192.168.0.10:3788'

This resulted in more or less the same: entities don’t show up in lovelace yet (nor in the entities list), but the log shows it has trouble with a few modules.

I would have no problem letting you access that machine, it’s remotely accessible. I’ve sent you details via PM!

Sorry again,
best regards,
Ward

the PR was created today, so i hope that it will be included in the next version of HA/HASS

Dear Cereal2nd,
In this last version of Home Assistant I can’t get a connection. In the previous version everything worked correctly.
Is there any possibility of correcting this situation?
Best regards.
Rui Oliveira

Configuration.yaml in Raspberry Pi

velbus:
port: ‘/dev/ttyACM0’

Home Assistant
0.92.1

Log Details (ERROR)

Sun Apr 28 2019 10:46:05 GMT+0100 (Hora de verão da Europa Ocidental)
Error during setup of component velbus

Traceback (most recent call last):
File “/usr/local/lib/python3.7/site-packages/homeassistant/setup.py”, line 153, in _async_setup_component
hass, processed_config)
File “/usr/local/lib/python3.7/site-packages/homeassistant/components/velbus/init.py”, line 25, in async_setup
import velbus
File “/config/deps/lib/python3.7/site-packages/velbus/init.py”, line 158, in
from velbus.controller import Controller, VelbusConnection
File “/config/deps/lib/python3.7/site-packages/velbus/controller.py”, line 8, in
from velbus.connections.socket import SocketConnection
File “/config/deps/lib/python3.7/site-packages/velbus/connections/socket.py”, line 13, in
class SocketConnection(velbus.VelbusConnection):
AttributeError: module ‘velbus’ has no attribute ‘VelbusConnection’

it seems that there is a problem in the python-velbus package …

Good evening,

I followed your instructions exactly but it is still not working. Do you have any other suggestions?

Best regards,

Rui Oliveira

Log Details (ERROR)
Fri May 03 2019 09:51:15 GMT+0100 (GMT+01:00)
Error during setup of component velbus
Traceback (most recent call last):
File “/usr/local/lib/python3.7/site-packages/homeassistant/setup.py”, line 153, in _async_setup_component
hass, processed_config)
File “/usr/local/lib/python3.7/site-packages/homeassistant/components/velbus/init.py”, line 25, in async_setup
import velbus
File “/config/deps/lib/python3.7/site-packages/velbus/init.py”, line 158, in
from velbus.controller import VelbusConnection, Controller
File “/config/deps/lib/python3.7/site-packages/velbus/controller.py”, line 8, in
from velbus.connections.socket import SocketConnection
File “/config/deps/lib/python3.7/site-packages/velbus/connections/socket.py”, line 13, in
class SocketConnection(velbus.VelbusConnection):
AttributeError: module ‘velbus’ has no attribute ‘VelbusConnection’

With the 0.94 release all of these problems should be fixed.

I hope to get covers/blinds in before the 1.0 release

hello, i have the same problem as DRACO but i am on 0.94

Log Details (ERROR)
Sat Jun 08 2019 12:58:07 GMT+0200 (Central European Summer Time)
Error during setup of component velbus
Traceback (most recent call last):
File “/usr/src/homeassistant/homeassistant/setup.py”, line 153, in _async_setup_component
hass, processed_config)
File “/usr/src/homeassistant/homeassistant/components/velbus/init.py”, line 25, in async_setup
import velbus
File “/usr/local/lib/python3.7/site-packages/velbus/init.py”, line 158, in
from velbus.controller import Controller, VelbusConnection
File “/usr/local/lib/python3.7/site-packages/velbus/controller.py”, line 8, in
from velbus.connections.socket import SocketConnection
File “/usr/local/lib/python3.7/site-packages/velbus/connections/socket.py”, line 13, in
class SocketConnection(velbus.VelbusConnection):
AttributeError: module ‘velbus’ has no attribute ‘VelbusConnection’

how can i fix this?

thanks

Hello, problem on 0.94.1

Sat Jun 08 2019 15:19:04 GMT+0100 (Hora de verão da Europa Ocidental)
Error during setup of component velbus
Traceback (most recent call last):
File “/usr/src/homeassistant/homeassistant/setup.py”, line 153, in _async_setup_component
hass, processed_config)
File “/usr/src/homeassistant/homeassistant/components/velbus/init.py”, line 25, in async_setup
import velbus
File “/usr/local/lib/python3.7/site-packages/velbus/init.py”, line 158, in
from velbus.controller import Controller, VelbusConnection
File “/usr/local/lib/python3.7/site-packages/velbus/controller.py”, line 8, in
from velbus.connections.socket import SocketConnection
File “/usr/local/lib/python3.7/site-packages/velbus/connections/socket.py”, line 13, in
class SocketConnection(velbus.VelbusConnection):
AttributeError: module ‘velbus’ has no attribute ‘VelbusConnection’

Best regards,

it seems that the PR was just to late for 0.94 :frowning:

0.94 still uses the bad python-velbus 2.0.24 and this should be 2.0.26
so if you install the correct one it should work (as it does here)

Hi Cereal2nd,
I installed version 0.96.5 and as far as the Velbus covers are concerned, some modules are detected, others aren’t. The functions up and down are working properly. Stop doesn’t work and neither does the status of the covers (shutters and sunscreens).
Best regards
Rui Oliveira

Hi
I also have a problem discovering modules with velbus. Velbus does not detect any modules. But in the log he sees the modules.


I tried it with usb connection and the velserv but get the same results. I run the velserv on a raspberry with openHab where it does work. I don’t know why he doesn’t discover modules on Home Assistant.

Can anyone help me with this? thank you