Support for Velbus Home Automation

for the first probem, can you enable dbeug log for velbus?
then all velbus messages will be printed and there parsed version also.
then tigger the motion and have a look at the logs to see what happens there.

logger:
  default: info
  logs:
    velbus-parser: debug
    velbus-module: debug
    velbus-packet: debug
    velbus-protocol: debug
    velbus: debug
    homeassistant.components.velbus: debug

for the second item you can use the “button.press” service in homeassistant, this will trigger a button press.

Hi,

I will get you the debug log for the sensor asap.
For the button problem, the velbus input modules (be it touch pannel, VMB6PBN or VMB2PBN) don’t create pressable buttons in HA, only binary_sensors and led state switches.
With the button.press service I can’t simulate a velbus button press it seems.


where in velbuslink you have this:

Kind regards,
Jeroen

For the debug log:

I enabled debugging, ran downstairs to trigger the carport sensor, ran back up to see in velbus link that the sensor indeed there changed state to tirggered.
this is the log:

2022-06-06 14:15:25 DEBUG (MainThread) [velbus-protocol] Received 7 bytes from Velbus: b'0f fb 24 01 d7 fa 04'
2022-06-06 14:15:25 DEBUG (MainThread) [velbus-protocol] RX: RawMessage(priority=fb, address=24, rtr=False, command=215, data=b'd7')
2022-06-06 14:15:25 DEBUG (MainThread) [velbus-packet] Received {"name": "RealtimeClockStatusRequest", "priority": 251, "address": "24", "rtr": false}
2022-06-06 14:15:25 DEBUG (MainThread) [velbus-protocol] Received 10 bytes from Velbus: b'0f fb 24 04 d8 00 0e 10 d8 04'
2022-06-06 14:15:25 DEBUG (MainThread) [velbus-protocol] RX: RawMessage(priority=fb, address=24, rtr=False, command=216, data=b'd8 00 0e 10')
2022-06-06 14:15:25 DEBUG (MainThread) [velbus-packet] Received {"name": "SetRealtimeClock", "priority": 251, "address": "24", "rtr": false, "wday": 0, "hour": 14, "min": 16}
2022-06-06 14:15:25 DEBUG (MainThread) [velbus-protocol] Received 11 bytes from Velbus: b'0f fb 24 05 b7 06 06 07 e6 1d 04'
2022-06-06 14:15:25 DEBUG (MainThread) [velbus-protocol] RX: RawMessage(priority=fb, address=24, rtr=False, command=183, data=b'b7 06 06 07 e6')
2022-06-06 14:15:25 DEBUG (MainThread) [velbus-packet] Received {"name": "SetDate", "priority": 251, "address": "24", "rtr": false, "day": 6, "mon": 6, "year": 2022}
2022-06-06 14:15:25 DEBUG (MainThread) [velbus-protocol] Received 8 bytes from Velbus: b'0f fb 24 02 af 00 21 04'
2022-06-06 14:15:25 DEBUG (MainThread) [velbus-protocol] RX: RawMessage(priority=fb, address=24, rtr=False, command=175, data=b'af 00')
2022-06-06 14:15:25 DEBUG (MainThread) [velbus-packet] Received {"name": "SetDaylightSaving", "priority": 251, "address": "24", "rtr": false, "ds": 0}
2022-06-06 14:15:25 DEBUG (MainThread) [velbus-protocol] Received 8 bytes from Velbus: b'0f fb 24 02 e5 00 eb 04'
2022-06-06 14:15:25 DEBUG (MainThread) [velbus-protocol] RX: RawMessage(priority=fb, address=24, rtr=False, command=229, data=b'e5 00')
2022-06-06 14:15:25 DEBUG (MainThread) [velbus-packet] Received {"name": "SensorTempRequest", "priority": 251, "address": "24", "rtr": false}
2022-06-06 14:15:25 DEBUG (MainThread) [velbus-protocol] Received 13 bytes from Velbus: b'0f fb 24 07 e6 1e 40 0e 00 33 00 46 04'
2022-06-06 14:15:25 DEBUG (MainThread) [velbus-protocol] RX: RawMessage(priority=fb, address=24, rtr=False, command=230, data=b'e6 1e 40 0e 00 33 00')
2022-06-06 14:15:25 DEBUG (MainThread) [velbus-packet] Received {"name": "SensorTemperatureMessage", "priority": 251, "address": "24", "rtr": false, "cur": 15.125, "min": 7.0, "max": 25.5}
2022-06-06 14:15:34 DEBUG (MainThread) [velbus-protocol] Received 8 bytes from Velbus: b'0f fb 24 02 fa ff d7 04'
2022-06-06 14:15:34 DEBUG (MainThread) [velbus-protocol] RX: RawMessage(priority=fb, address=24, rtr=False, command=250, data=b'fa ff')
2022-06-06 14:15:34 DEBUG (MainThread) [velbus-packet] Received {"name": "ModuleStatusRequestMessage", "priority": 251, "address": "24", "rtr": false}
2022-06-06 14:15:34 DEBUG (MainThread) [velbus-protocol] Received 14 bytes from Velbus: b'0f fb 24 08 ed 16 00 12 00 00 c1 05 ef 04'
2022-06-06 14:15:34 DEBUG (MainThread) [velbus-protocol] RX: RawMessage(priority=fb, address=24, rtr=False, command=237, data=b'ed 16 00 12 00 00 c1 05')
2022-06-06 14:15:34 DEBUG (MainThread) [velbus-packet] Received {"name": "ModuleStatusPirMessage", "priority": 251, "address": "24", "rtr": false}
2022-06-06 14:15:34 DEBUG (MainThread) [velbus-protocol] Received 13 bytes from Velbus: b'0f fb 24 07 e6 1e 40 0e 00 33 00 46 04'
2022-06-06 14:15:34 DEBUG (MainThread) [velbus-protocol] RX: RawMessage(priority=fb, address=24, rtr=False, command=230, data=b'e6 1e 40 0e 00 33 00')
2022-06-06 14:15:34 DEBUG (MainThread) [velbus-packet] Received {"name": "SensorTemperatureMessage", "priority": 251, "address": "24", "rtr": false, "cur": 15.125, "min": 7.0, "max": 25.5}
2022-06-06 14:15:34 DEBUG (MainThread) [velbus-protocol] Received 14 bytes from Velbus: b'0f fb 08 08 ed 1a 00 dd 04 00 c1 0a 33 04'
2022-06-06 14:15:34 DEBUG (MainThread) [velbus-protocol] RX: RawMessage(priority=fb, address=08, rtr=False, command=237, data=b'ed 1a 00 dd 04 00 c1 0a')
2022-06-06 14:15:34 DEBUG (MainThread) [velbus-packet] Received {"name": "ModuleStatusMessage", "priority": 251, "address": "8", "rtr": false}
2022-06-06 14:15:34 DEBUG (MainThread) [velbus-protocol] Received 10 bytes from Velbus: b'0f f8 10 04 00 02 00 00 e3 04'
2022-06-06 14:15:34 DEBUG (MainThread) [velbus-protocol] RX: RawMessage(priority=f8, address=10, rtr=False, command=0, data=b'00 02 00 00')
2022-06-06 14:15:34 DEBUG (MainThread) [velbus-packet] Received {"name": "PushButtonStatusMessage", "priority": 248, "address": "10", "rtr": false, "closed_channels": [2], "opened_channels": [], "closed_long_channels": []}
2022-06-06 14:15:34 DEBUG (MainThread) [velbus-protocol] Received 10 bytes from Velbus: b'0f f8 10 04 00 00 01 00 e4 04'
2022-06-06 14:15:34 DEBUG (MainThread) [velbus-protocol] RX: RawMessage(priority=f8, address=10, rtr=False, command=0, data=b'00 00 01 00')
2022-06-06 14:15:34 DEBUG (MainThread) [velbus-packet] Received {"name": "PushButtonStatusMessage", "priority": 248, "address": "10", "rtr": false, "closed_channels": [], "opened_channels": [1], "closed_long_channels": []}
2022-06-06 14:15:35 DEBUG (MainThread) [velbus-protocol] Received 7 bytes from Velbus: b'0f fb 24 01 d7 fa 04'
2022-06-06 14:15:35 DEBUG (MainThread) [velbus-protocol] RX: RawMessage(priority=fb, address=24, rtr=False, command=215, data=b'd7')
2022-06-06 14:15:35 DEBUG (MainThread) [velbus-packet] Received {"name": "RealtimeClockStatusRequest", "priority": 251, "address": "24", "rtr": false}
2022-06-06 14:15:35 DEBUG (MainThread) [velbus-protocol] Received 10 bytes from Velbus: b'0f fb 24 04 d8 00 0e 11 d7 04'
2022-06-06 14:15:35 DEBUG (MainThread) [velbus-protocol] RX: RawMessage(priority=fb, address=24, rtr=False, command=216, data=b'd8 00 0e 11')
2022-06-06 14:15:35 DEBUG (MainThread) [velbus-packet] Received {"name": "SetRealtimeClock", "priority": 251, "address": "24", "rtr": false, "wday": 0, "hour": 14, "min": 17}
2022-06-06 14:15:35 DEBUG (MainThread) [velbus-protocol] Received 11 bytes from Velbus: b'0f fb 24 05 b7 06 06 07 e6 1d 04'
2022-06-06 14:15:35 DEBUG (MainThread) [velbus-protocol] RX: RawMessage(priority=fb, address=24, rtr=False, command=183, data=b'b7 06 06 07 e6')
2022-06-06 14:15:35 DEBUG (MainThread) [velbus-packet] Received {"name": "SetDate", "priority": 251, "address": "24", "rtr": false, "day": 6, "mon": 6, "year": 2022}
2022-06-06 14:15:35 DEBUG (MainThread) [velbus-protocol] Received 8 bytes from Velbus: b'0f fb 24 02 af 00 21 04'
2022-06-06 14:15:35 DEBUG (MainThread) [velbus-protocol] RX: RawMessage(priority=fb, address=24, rtr=False, command=175, data=b'af 00')
2022-06-06 14:15:35 DEBUG (MainThread) [velbus-packet] Received {"name": "SetDaylightSaving", "priority": 251, "address": "24", "rtr": false, "ds": 0}
2022-06-06 14:15:35 DEBUG (MainThread) [velbus-protocol] Received 8 bytes from Velbus: b'0f fb 24 02 e5 00 eb 04'
2022-06-06 14:15:35 DEBUG (MainThread) [velbus-protocol] RX: RawMessage(priority=fb, address=24, rtr=False, command=229, data=b'e5 00')
2022-06-06 14:15:35 DEBUG (MainThread) [velbus-packet] Received {"name": "SensorTempRequest", "priority": 251, "address": "24", "rtr": false}
2022-06-06 14:15:35 DEBUG (MainThread) [velbus-protocol] Received 13 bytes from Velbus: b'0f fb 24 07 e6 1e 40 0e 00 33 00 46 04'
2022-06-06 14:15:35 DEBUG (MainThread) [velbus-protocol] RX: RawMessage(priority=fb, address=24, rtr=False, command=230, data=b'e6 1e 40 0e 00 33 00')

This is velbus link:
image
This is home assistant carport motion sensor: no trigger detected
image

Kind regards,
Jeroen

Another example of a VMBPIRC sensor not updating in HA: took a capture while triggering motion, HA log and VelbusLink instantly shows the trigger, but the HA sensor does not update:
pir_zolder

However, in HA it does update somtimes… but maybe much later? as the history indicates:

Kind regards,
Jeroen

issue is confirmed and i’m working on a fix

2 Likes

the pir motion detection problems are solved.

2 Likes

Hi Maikel,

Actually, I think the “ModuleStatusPirMessage” is indeed only meant for the Light value as you implemented. it is send whenever light value changes or when I open the VelbusLink to configure the module then it is actively polled for the status like this:

2022-06-08 14:31:54 DEBUG (MainThread) [velbus-protocol] RX: RawMessage(priority=fb, address=24, rtr=False, command=170, data=b'aa 05')
2022-06-08 14:31:54 DEBUG (MainThread) [velbus-packet] Received {"name": "LightValueRequest", "priority": 251, "address": "24", "rtr": false}
2022-06-08 14:31:54 DEBUG (MainThread) [velbus-protocol] RX: RawMessage(priority=fb, address=24, rtr=False, command=237, data=b'ed 16 00 15 00 00 c1 05')
2022-06-08 14:31:54 DEBUG (MainThread) [velbus-packet] Received {"name": "ModuleStatusPirMessage", "priority": 251, "address": "24", "rtr": false}

But as I said, for the VMBPIRO (outdoor sensor) this is working perfectly in HA. for the PIRC it is not as it uses a different message for the light value.

The thing that is not working for the outdoor sensor is motion trigger updates which are these messages:

for motion:

2022-06-08 14:29:59 DEBUG (MainThread) [velbus-protocol] RX: RawMessage(priority=f8, address=24, rtr=False, command=0, data=b'00 14 00 00')
2022-06-08 14:29:59 DEBUG (MainThread) [velbus-packet] Received {"name": "PushButtonStatusMessage", "priority": 248, "address": "24", "rtr": false, "closed_channels": [3, 5], "opened_channels": [], "closed_long_channels": []}

for no more motion:

2022-06-08 14:32:06 DEBUG (MainThread) [velbus-protocol] RX: RawMessage(priority=f8, address=24, rtr=False, command=0, data=b'00 00 10 00')
2022-06-08 14:32:06 DEBUG (MainThread) [velbus-packet] Received {"name": "PushButtonStatusMessage", "priority": 248, "address": "24", "rtr": false, "closed_channels": [], "opened_channels": [5], "closed_long_channels": []}
2022-06-08 14:35:05 DEBUG (MainThread) [velbus-protocol] RX: RawMessage(priority=f8, address=24, rtr=False, command=0, data=b'00 00 04 00')
2022-06-08 14:35:05 DEBUG (MainThread) [velbus-packet] Received {"name": "PushButtonStatusMessage", "priority": 248, "address": "24", "rtr": false, "closed_channels": [], "opened_channels": [3], "closed_long_channels": []}

These do not update the sensors in HA for me:


for the outside sensor only temperature and light value change, nothing else (also not DARK/LIGHT binary sensor).

Hope this clears out the confusion a bit :slight_smile:

Kind regards,
Jeroen

Hi,

Again, thank you for fixing the bugs with both PIR sensors!
I wanted to revisit my feature request for “simulating button press” like in the velbuslink software:

what this does is kind of straightforward, it just sends out a message acting as if a physical button was pressed, the same message that the module would send.

like:
this was a physical push of a button:

2022-06-08 22:04:02 DEBUG (MainThread) [velbus-protocol] RX: RawMessage(priority=f8, address=22, rtr=False, command=0, data=b'00 02 00 00')
2022-06-08 22:04:02 DEBUG (MainThread) [velbus-packet] Received {"name": "PushButtonStatusMessage", "priority": 248, "address": 34, "rtr": false, "data": "", "closed": [2], "opened": [], "closed_long": []}
2022-06-08 22:04:02 DEBUG (MainThread) [velbus-protocol] RX: RawMessage(priority=f8, address=22, rtr=False, command=0, data=b'00 00 02 00')
2022-06-08 22:04:02 DEBUG (MainThread) [velbus-packet] Received {"name": "PushButtonStatusMessage", "priority": 248, "address": 34, "rtr": false, "data": "", "closed": [], "opened": [2], "closed_long": []}

this was the simulated version in velbusLink:

2022-06-08 21:57:35 DEBUG (MainThread) [velbus-protocol] RX: RawMessage(priority=f8, address=22, rtr=False, command=0, data=b'00 02 00 00')
2022-06-08 21:57:35 DEBUG (MainThread) [velbus-packet] Received {"name": "PushButtonStatusMessage", "priority": 248, "address": 34, "rtr": false, "data": "", "closed": [2], "opened": [], "closed_long": []}
2022-06-08 21:57:35 DEBUG (MainThread) [velbus-protocol] RX: RawMessage(priority=f8, address=22, rtr=False, command=0, data=b'00 00 02 00')
2022-06-08 21:57:35 DEBUG (MainThread) [velbus-packet] Received {"name": "PushButtonStatusMessage", "priority": 248, "address": 34, "rtr": false, "data": "", "closed": [], "opened": [2], "closed_long": []}

I don’t know how much work it would be to dynamically create push buttons in HA linked to each module’s physical buttons sending out the short press PushButtonStatusMessage with the correct address corresponding to the module and data corresponding to the key.

The request might seem silly, but there are some things which HA can’t do on velbus (maybe later it could ofc) such as, I override the color of my Glass pannel modules, this action is linked to a velbus button, which when i push it does a “override collor” to a specific module.


it would be easy for me if i could virtually press that button from HA, which then would override my color instead of actually integrating the “override color” feature also in HA, which might also be possible but harder i guess.

Kind regards,
Jeroen

Hi Everybody,

I’m looking for someone who can help me with the configuration of Velbus in home assistant.
I’m trying since more than 1 month by myself, reading a lot of forum but it don’t work.

Someone have a little time to help me? Please

Thank you

Hi Jonathan,

Can you describe exactly what is not working?
What type of home assistant installation do you have (Docker, HassIO, custom install on rpi)?
How are you trying to interface with your velbus (through a USB velbus module connected to your HA device, or with the Velbus IP module)?

Kind regards,
Jeroen

the bugs that are mentioned above are all implemented, and today the are merged into dev
i requested this change to be added in the next maintenance release, so i expect it to roll-out verry sooon.

For the button simulation i started working on this

2 Likes

great news! for both the fixes in HA and the button simulation :smiley:

Hello everyone,

I have home assistant discussing with the velbus network thanks to a VMBRSUSB.
I am transitioning from Openhab and my current knowledge of HA is still limited.
Everything is working pretty well, and has been setup smoothly. Great integration.

Still I noticed a small annoying issue with my VMB7IN. Two inputs are connected to my gas and water counter. They are working well but update pretty slowly, clearly not real time. For instance, I am taking a shower in the evening, the counter will not update before morning / noon the day after. I am wondering how this could be solved by adjusting some parameters somewhere.

When the udpate is done, the counter is 100% accurate compared to the reading on the actual counter device.

Additionally there is a gaz sensor created that is always zero value… I would have expected it to have 0 - 1 - 0 value change when a pulse is counted but it seems to be off…

Anyone could help me ?

side information:
VMB7IN Firmware: 10095-3.24.34
The other module are updating super fast (switch, ligth).

Best regards

Jonathan

is the vmb7in set to transmit the value upon change or on every x minuts?
i think this value is off by default, so you will have to change this to transmit every x seconds (i have it set to 60 seconds).
This change needs to happen via velbuslink

OK I checked in VelbusLink. There is indeed a transmit parameter. It was defined as “unknown”. I changed it to transmit every 10sec and will have a look later today to check if the value are updating more often ! I am guessing this should solve the issue.

Super thanks for the quick and accurate answer !

BR

Jonathan

I have noticed that my Velbus devices all have a copy in HA. I don’t know when this happened. Here is a part of a screenshot from the Velbus integration:
image
Only one of the copies have a real link to the velbus entities. How can I clean up the doubles ?
I"m running HA 2022.6.1

Stop your HA, remove the velbus folder under .storage and restart HA.

Kind regards,
Jeroen

Removing the velbuscache does not help.

Hi Darkpainy,

I have home assistant 2022.4.7 installed on docker.
I installed the integration and it say taht connection is ok.
I tried with ip, with the signum VMBSIG module.

But It doesn’t discover any module.
And when i see the log, i always have the same errors :

Logger: velbus
Source: /usr/local/lib/python3.9/site-packages/velbusaio/controller.py:206
First occurred: 8 juin 2022, 22:34:37 (2679 occurrences)
Last logged: 22:43:40

Not all modules are loaded within a timeout of 600 seconds, continuing with the loaded modules

Logger: homeassistant.components.switch
Source: /usr/local/lib/python3.9/asyncio/events.py:80
Integration: Commutateur (documentation, issues)
First occurred: 8 juin 2022, 22:27:21 (13 occurrences)
Last logged: 22:43:35

Setup of switch platform velbus is taking over 10 seconds.

and the same fot all other categories of platform

Thanks

Hi Jonathan,

I know the component is saying that the connection is ok, but might be blocked beyond initial connectivity test.
Is your gisnum module in the same network?
Are you running home assistant as “network_mode: host” ? or in docker network.
Any firewall might be blocking someting?

Can you enable debug logging for velbus in HA? might give us more insight.
The python error itself will be more usefull for @Cereal2nd

I don’t have the signum module myself, I use a usb to serial to connect to my NUC which also runs docker HA.

Kind regards,
Jeroen