Support for Velbus Home Automation

I’m getting a lot of these errors lately

Logger: velbus-protocol
Source: deps/lib/python3.12/site-packages/velbusaio/protocol.py:91
First occurred: 7:55:09 AM (512 occurrences)
Last logged: 9:19:08 AM

Velbus connection lost: RuntimeError(‘get_buffer() returned an empty buffer’)

Also seems like my integration is not working anymore unless I reload it fully. Afterwards it’s working again for a random amount of time after which this happens again.

Any ideas ?

Note: I still need to update to the latest HA version but had issues with it last few days so reverted to older version with older Velbus integration as well (so if this is a known issue and it already got fixed in a newer version, I apologize and that would be good news… then I just need to figure out what’s going on with the new HA version because when I upgrade it doesn’t start up anymore and gives a 404 error)

Stop your HA instance and in the file system in configuration you’ll find a Velbus folder with all configuration, you can delete that and restart everything for new scans

I was wondering if there were plans to integrate VMB8IN-20 into Home Assistant. This is the only module I have that lacks support. It would be nice to add sensors this way and would open up the possibility to add energy monitoring to my smart home. Thanks!

1 Like

If you offer temporary remote access to the Velbus developer for HomeAssistant, to evaluate and test support, I’m sure it’ll happen quickly.

Especially if you offer a few cups of coffee etc

i received a vmb8in module so i will indeed integrate it in the coming weeks.

it should make the 2025.2 release

3 Likes

Hi All, longterm Velbus user but novice debugger. I’m running HA on a PI with Velbus Direct via USB connected. When upgrading from 2025.1.0 to 2025.1.2 most of the time the Velbus integration fails to load. After reloading the integration sometimes the error message seems to go away but the entities remain unavailable. Already tried clearing the cache via the developer tools and manually from the system but no dice.

Logger: homeassistant.config_entries
Source: config_entries.py:640
First occurred: 10:33:41 PM (3 occurrences)
Last logged: 10:34:24 PM

Error setting up entry nestje for velbus
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 640, in __async_setup_with_context
    result = await component.async_setup_entry(hass, self)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/velbus/__init__.py", line 90, in async_setup_entry
    await controller.connect()
  File "/usr/local/lib/python3.13/site-packages/velbusaio/controller.py", line 147, in connect
    await self._handler.read_protocol_data()
  File "/usr/local/lib/python3.13/site-packages/velbusaio/handler.py", line 62, in read_protocol_data
    self.broadcast = json.loads(await protocol_file.read())
                                ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/site-packages/aiofile/utils.py", line 298, in read
    return await self.__read(length)
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/site-packages/aiofile/utils.py", line 279, in __read
    part_offset, part = await unicode_reader(
                        ^^^^^^^^^^^^^^^^^^^^^
        self.file, length, offset, self.encoding,
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "/usr/local/lib/python3.13/site-packages/aiofile/utils.py", line 26, in unicode_reader
    chunk_bytes = await afp.read_bytes(-1, offset)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/site-packages/aiofile/aio.py", line 233, in read_bytes
    return await self.__context.read(size, self.fileno(), offset)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/site-packages/caio/asyncio_base.py", line 47, in submit
    if self.context.submit(op) != 1:
       ~~~~~~~~~~~~~~~~~~~^^^^
ValueError: The AIO context specified by ctx_id is invalid. nr is less than 0. The iocb at *iocbpp[0] is not properly initialized, the operation specified is invalid for the file descriptor in the iocb, or the value in the aio_reqprio field is invalid. [EINVAL]

This is the error thrown when reloading the integration.
I’ve tried removing the integration all together and adding it again but I get an Unknown error on the integration config after entering my connection string.

Restoring backup of 2025.1.0 immediately brings back Velbus connectivity. Anyone has an idea on what is going wrong with the update?

hmm nothing changed in velbus between these releases …

2025.2 will have a lot of bigger changes

Hello fellow Velbus enthusiasts, I am using multiple Velbus sensors with an integrated thermometer like VMBPIRO and several VMBELO-20. The problem is that the value is not automatically updated. This is solved by reloading the Velbus integration every x minutes.


The issue with this is that every entity of the Velbus integration is reloaded and the motion sensors are reset which is not the intention. Does someone know a workaround for this, am I doing something wrong, is this a bug in the integration?
Thanks in advance!

we do not poll for sensor changes, you should set the update interval via velbuslink for each sensor.

i set it to 180 seconds for all my sensors. But you also have the option to set this to ‘every time it changes’.

if this is enable then velbus will broadcast the sensor values on the buss, hass will read these and will update the entities.

Do not reload the integration every X minuts, reloading the integration will give a massive load on your bus and this can cause problems or delays.

2 Likes

Ok I’ll hold out for that one then and check if it makes a difference for my setup.

I received this warning after upgrading to 2025.2:

The ‘interface’ parameter in the Velbus actions is deprecated. The ‘config_entry’ parameter should be used going forward.

Please adjust your automations or scripts to fix this issue.

I’m not sure where to look for this parameter. Can anyone guide me?

look at your actions for velbus, you will have to edit them

Hello, does this implementation include the inputs for energy monitoring (consumption and injection)? I was not able to make this work yet if it does. If you need help with the testing part, I would like to offer my assistance. Have a good one!

Just an FYI, the new release didn’t make a difference either but since I was planning to move to a TCP connection in any case I sped up that process and now connect via Velserv succesfully and I don’t get the error message anymore.

However I did notice something else though with my VMBMETEO. Some of the entities get trailed by some strange characters. I can change the entity name in the settings but in the module overview these never seem to be going away.
Any ideas? I don’t see the same in VelbusLink.

Maybe just one addition to the previous comment. Is there anyway we can match the units used in HA with the ones in Velbus directly? Apart from Temperature being the same the other values seem to be coming in differently and I’ve not being able to use them consistently for my automations.

the problem with vmbmeteo is that i do not have access to a test device, so its really hard to implement this correctly.

it seems to be a parsing problem in the names of the channels, and the units are just not implemented …

Is there anything I can send over that might help you with that challenge? Or something else we could do?

1 Like

some people gave me tcp access to there bus to debug issues like this …

1 Like

Do you want to access mine?

I updated from HA 2025.1.2 to 2025.3.2 today and got following Velbus error from the logs:

2025-03-14 09:27:23.893 ERROR (MainThread) [homeassistant.components.velbus] Migrating from version 2.1
2025-03-14 09:27:23.893 ERROR (MainThread) [homeassistant.components.velbus] Migration to version 2.2 successful

The ‘Error’ probably must be something less severe, because everything looks to be working.

Another thing is that most (not all) entities got their names prefixed with the modulename and channel name. This results in:
image
The name before the update was ‘Pomp living’.
Some entities are not recognized anymore in the interface. I had to change it to the new name.
Is this renaming of entities a new feature of the Velbus integration ?
BTW: I tried today’s update to 2025.3.3 too, but same result.