Support for Velbus Home Automation

i never played with the feedback leds.
i just toggle the state of the relay/button i do nothing more.

so in your setup you created a feedback led on a module X, and you want to show the state of channel Z on module Y?
Via hass you toggle Y/Z via the gui and you expect the feedback-led to lght up?

is this your scenario?

1 Like

The Edgelit lights are quite complex to fit inside the model of Home Assistant. Iā€™ve tried a few approaches, but none were satisfactory. A custom service call would be the easiest solution, but Iā€™m quite wary about it getting through the code review stage of HA.

Some of the problems I remember:

  • you cannot request the current state of the edgelit lights
  • the colors you can set are a hardcoded list. How do we map to those from the RGB(A) space that HA allows you to choose from?
  • how do you represent the 4 sides of an edgelit module: if I create 4 separate entities in HA, this is bound to give problems if you want all 2 or more sides to blink at the same time, etc.

Maybe Iā€™ll be able to take this feature back up in the coming winter months, but Iā€™ll need some input from @Cereal2nd on what the best approach will be.

@wlcrs @Cereal2nd @robbed

I donā€™t know enough about how the cogs work within HA, but I do know a thing or two about Velbus :smiley:

Correct, these should never be seen as something that can report a state or be polled.
Especially the Ambient colour options.
Feedback state is probably the same, certainly when you consider that a Velbus panel is monitoring the state changes on (potentially) many modules, to derive the correct Feedback state.
If intending to solely use HA for Feedback state, it is probably best NOT to have that button affected directly by any Velbus activity.
(Which is fine if using that button action for Media Player control, outside of Velbus for example)

To a point they are.
In so much as there are a number of palette presets that are configured with VelbusLink for each Edge Lit panel.

A Velbus action simply calls that Palette number with the required function.

Iā€™m not sure that would ever be possible on any platform.
The Control4 solution is to offer a list of palette presets for the C4 programmer to choose from.

That is a very good point.

There is also the very serious issue of ā€œwriting to the memory block too many timesā€ and potentially damaging it.
Because, to set the Ambient or feedback colour value, the state must be written to the memory map, followed by a ā€œresetā€ command.
I have this working in a Node-RED flow, for use on my demo unit on the understanding that I am risking bricking (or at least damaging) my demo modules.

I would refer everyone back to my previous comment, regarding creating the required colour effects / actions within Velbuslink against ā€œspareā€ button or relay channels, then trigger the change from HAā€¦
(I know that mimicking button events is now possible in openHAB and Control4, as it always has been with OpenRemote)

This way you can change as many or as few sides as you wish, with or without flashing effect, with one event from HA.

I hope this helps.

As always, feel free to remotely connect to a unit here if you want to do some testing.
I would much rather you ā€œbrickā€ one of my demo units, than a module in your own home/s.

1 Like

Hello all, I was just wondering if there was some kind of implementation in HA for the dual mode functioning of push and touch buttons (e.g. for double press).
For instance, if I set a button in Velbuslink to dual mode, will it create corresponding virtual buttons in HA? or something similar?
Thank you !

Hi

What are you trying to achieve?

Because itā€™s possible to monitor all button events, whether they are physical buttons or virtual, the only thing that hides these things is Velbuslink, but then it only hides them within Velbuslink.

Do you mean you want a Dual Mode button within a HA interface?

Indeed,

the correct way of doing this (and i do it like this at home) is create a spare button, let this trigger the correct colour effect on the correct panels and then trigger this button via HA.

Iā€™m not in favor of writing the memory from the valbusaio lib.

1 Like

Yes basically my question is whether it is possible to trigger an automation with a longpress in HA. If so, how?

No, what I was trying to achieve was to have a ā€œnight lightā€ for my kid, so having the feedback leds glow softly in the night.

What I needed to do was to enable the feedback leds in VelbusLink, after that it worked as expected.

Thanks everyone for your input! I will need to dive a little bit more into VelbusLink to learn how everything is linked toghether.

1 Like

simple answer: No

longer answer: No but it can be build, we already support longpress on the bus so should be possible.

1 Like

Initially you mentioned

Which option do you need?

Dual mode is simply triggering a second (Non-physical) Velbus button channel, whereas Long_Press of the same Velbus protocol button (physical button) is something else.

any option is fine as long as it does not trigger a short press before the long one.

with the Trigrr software that I have at home, their method of triggering a long press first triggers a short press, so thatā€™s not goodā€¦
In Velbuslink you can trigger a longpress with dual mode, which is nice as it doesnā€™t trigger a short press.

So my question is, is there a way to also do that on HA?
Thx !

I understand where you are now.

There is a little confusion.

Dual mode IS NOT creating a ā€œLong_Pressā€ event for the button.

Let me explain.

Take a single button Glass panel for example (This is the same for ALL Velbus hardware)
image

By default, it only has 1 button active.

To create a ā€œDual Modeā€, we have to activate a second ā€œVirtualā€ button
image

Which is then used in the Button Mode tab

image

No doubt, you have seen the ā€œLong Press Timeā€, which is what might be causing the confusion here.

What happens with Dual Mode is this.

If you press the (only) physical button on the panel and release it, a ā€œPressā€ (followed by a ā€œreleaseā€) event for Button 1 is put on the bus.

However, if you press and hold that physical button, what actually happens is a ā€œPressā€ (followed by a ā€œreleaseā€) event for Button 2 is put on the bus.

(Long_press events just donā€™t happen when a button is in ā€œDual Modeā€)

So if you are asking ā€œhow do I mimic the Dual Modeā€, what you are actually looking for is a Button event for ā€œButton 2ā€

However, are you asking for a way to create a ā€œHA UI Long Press converted into a different eventā€ within HA, which I think would be a very different question.

Sorry for going around in circles a bit, we just need to be clear on what behaviour you have from your Velbus hardware and what you want to do in HA.


Just for absolute clarity, that is exactly how the Velbus protocol works.
Itā€™s the output device within Velbus that has to know to ignore the Press event and wait for a Long_Press.

That said, itā€™s fine if you ONLY put a Long_Press event onto the bus, as long as it is followed by a Release, at some stage.

1 Like

Interesting I see, thanks for the write up !

1 Like

Hi @MDAR , @Cereal2nd ,

First of all: appreciate all the effort you put in this Velbus support!

Since a few versions ago , Iā€™ve had some issues when restarting HA.
The log is spammed with the following error:

Logger: root
Source: deps/lib/python3.11/site-packages/velbusaio/raw_message.py:68
First occurred: 4:08:01 PM (377 occurrences)
Last logged: 4:08:55 PM

Could not parse the message b'0ffb050802008bca7f0000010000'. Truncating invalid data.
Could not parse the message b'0ffb0508ec02110002008bca7f00'. Truncating invalid data.
Could not parse the message b'0ffb0508ec021100806400000000'. Truncating invalid data.
Could not parse the message b'0ffb0508ec021100806400000200'. Truncating invalid data.
Could not parse the message b'0ffb02008bca0ffb0508ec021100'. Truncating invalid data.

Not sure what to do with this.
When I restart HA a few times, when Iā€™m lucky it stops and it functions normally.
When I then restart or update HA again after a while, this returns.

Not sure why itā€™s happening and why itā€™s fixed randomly after a few restarts (seems like I just need to be lucky when restarting, sometimes it happens, sometimes itā€™s fine).

Any ideas?
(Iā€™ve just updated to 2023.10.5)

1 Like

Hi

This really is a question that only @Cereal2nd can help with.

Anyone thatā€™s seen my code writing skills will know that Iā€™m not the man to ask.

this looks like a bug in the parser.

Is there a posibility that i login onto your bus via a tcp/ip connection to debug this?

Hey all ! I am just wondering what your start-up times are, my Velbus integration takes the most time by really far (78 devices, 1132 entities)
image

I am using the VMBUSBIP, would using another gateway speed up anything? thx !
(running HAOS on lenovo M710q)

no, this is the nature of velbus.

The scan and full read-out takes a long time, so there is no way to speed this up. The initial (first) startup time can be really long, the later startups should be faster (for me its almost 180 seconds for 30 devices)

2 Likes

Hey,
i am trying to implement velbus into home assistant.
I can install automation, link it etcā€¦but whatever i do i donā€™t see any entities ā€¦
If i go in the log fileā€¦i see a lot of communication to velbus.

I found some info hereā€¦
I tried to clear cache of velbus, reloaded integrationā€¦
This is what i see in the logā€¦
2023-12-07 11:39:47.543 DEBUG (MainThread) [velbus] Reconnecting to transport

2023-12-07 11:39:47.575 INFO (MainThread) [velbus-protocol] Connection established to Velbus

2023-12-07 11:39:47.603 WARNING (MainThread) [velbus-protocol] EOF received from Velbus

2023-12-07 11:39:47.604 DEBUG (MainThread) [velbus] Reconnecting to transport

2023-12-07 11:39:47.628 WARNING (MainThread) [homeassistant.components.binary_sensor] Setup of binary_sensor platform velbus is taking over 10 seconds.

2023-12-07 11:39:47.628 WARNING (MainThread) [homeassistant.components.button] Setup of button platform velbus is taking over 10 seconds.

2023-12-07 11:39:47.629 WARNING (MainThread) [homeassistant.components.climate] Setup of climate platform velbus is taking over 10 seconds.

2023-12-07 11:39:47.629 WARNING (MainThread) [homeassistant.components.cover] Setup of cover platform velbus is taking over 10 seconds.

2023-12-07 11:39:47.629 WARNING (MainThread) [homeassistant.components.light] Setup of light platform velbus is taking over 10 seconds.

2023-12-07 11:39:47.629 WARNING (MainThread) [homeassistant.components.select] Setup of select platform velbus is taking over 10 seconds.

2023-12-07 11:39:47.631 WARNING (MainThread) [homeassistant.components.sensor] Setup of sensor platform velbus is taking over 10 seconds.

2023-12-07 11:39:47.632 WARNING (MainThread) [homeassistant.components.switch] Setup of switch platform velbus is taking over 10 seconds.

2023-12-07 11:39:47.639 INFO (MainThread) [velbus-protocol] Connection established to Velbus

2023-12-07 11:39:47.664 WARNING (MainThread) [velbus-protocol] EOF received from Velbus

2023-12-07 11:39:47.664 DEBUG (MainThread) [velbus] Reconnecting to transport

2023-12-07 11:39:47.696 INFO (MainThread) [velbus-protocol] Connection established to Velbus

2023-12-07 11:39:47.725 WARNING (MainThread) [velbus-protocol] EOF received from Velbus

2023-12-07 11:39:47.725 DEBUG (MainThread) [velbus] Reconnecting to transport

2023-12-07 11:39:47.759 INFO (MainThread) [velbus-protocol] Connection established to Velbus

2023-12-07 11:39:47.787 WARNING (MainThread) [velbus-protocol] EOF received from Velbus

2023-12-07 11:39:47.788 DEBUG (MainThread) [velbus] Reconnecting to transport

2023-12-07 11:39:47.823 INFO (MainThread) [velbus-protocol] Connection established to Velbus

2023-12-07 11:39:47.849 WARNING (MainThread) [velbus-protocol] EOF received from Velbus

2023-12-07 11:39:47.849 DEBUG (MainThread) [velbus] Reconnecting to transport

2023-12-07 11:39:47.878 INFO (MainThread) [velbus-protocol] Connection established to Velbus

2023-12-07 11:39:47.911 WARNING (MainThread) [velbus-protocol] EOF received from Velbus

then i go this
2023-12-07 11:39:53.353 ERROR (MainThread) [velbus] Not all modules are loaded within a timeout of 600 seconds, continuing with the loaded modules

2023-12-07 11:39:53.353 ERROR (MainThread) [velbus] Not all modules are loaded within a timeout of 600 seconds, continuing with the loaded modules

2023-12-07 11:39:53.354 ERROR (MainThread) [velbus] Not all modules are loaded within a timeout of 600 seconds, continuing with the loaded modules

2023-12-07 11:39:53.354 ERROR (MainThread) [velbus] Not all modules are loaded within a timeout of 600 seconds, continuing with the loaded modules

2023-12-07 11:39:53.354 ERROR (MainThread) [velbus] Not all modules are loaded within a timeout of 600 seconds, continuing with the loaded modules

2023-12-07 11:39:53.354 ERROR (MainThread) [velbus] Not all modules are loaded within a timeout of 600 seconds, continuing with the loaded modules

2023-12-07 11:39:53.355 ERROR (MainThread) [velbus] Not all modules are loaded within a timeout of 600 seconds, continuing with the loaded modules

2023-12-07 11:39:53.355 ERROR (MainThread) [velbus] Not all modules are loaded within a timeout of 600 seconds, continuing with the loaded modules

2023-12-07 11:39:53.355 ERROR (MainThread) [velbus] Not all modules are loaded within a timeout of 600 seconds, continuing with the loaded modules

2023-12-07 11:39:53.355 ERROR (MainThread) [velbus] Not all modules are loaded within a timeout of 600 seconds, continuing with the loaded modules

2023-12-07 11:39:53.355 ERROR (MainThread) [velbus] Not all modules are loaded within a timeout of 600 seconds, continuing with the loaded modules

2023-12-07 11:39:53.356 ERROR (MainThread) [velbus] Not all modules are loaded within a timeout of 600 seconds, continuing with the loaded modules

2023-12-07 11:39:53.356 ERROR (MainThread) [velbus] Not all modules are loaded within a timeout of 600 seconds, continuing with the loaded modules

2023-12-07 11:39:53.356 ERROR (MainThread) [velbus] Not all modules are loaded within a timeout of 600 seconds, continuing with the loaded modules

2023-12-07 11:39:53.357 ERROR (MainThread) [velbus] Not all modules are loaded within a timeout of 600 seconds, continuing with the loaded modules

2023-12-07 11:39:53.357 ERROR (MainThread) [velbus] Not all modules are loaded within a timeout of 600 seconds, continuing with the loaded modules

2023-12-07 11:39:53.357 ERROR (MainThread) [velbus] Not all modules are loaded within a timeout of 600 seconds, continuing with the loaded modules

2023-12-07 11:39:53.357 ERROR (MainThread) [velbus] Not all modules are loaded within a timeout of 600 seconds, continuing with the loaded modules

2023-12-07 11:39:53.357 ERROR (MainThread) [velbus] Not all modules are loaded within a timeout of 600 seconds, continuing with the loaded modules

and after some time i get this
2023-12-07 11:39:53.419 ERROR (MainThread) [velbus] Not all modules are loaded within a timeout of 600 seconds, continuing with the loaded modules

2023-12-07 11:39:53.419 ERROR (MainThread) [velbus] Not all modules are loaded within a timeout of 600 seconds, continuing with the loaded modules

2023-12-07 11:39:53.419 ERROR (MainThread) [velbus] Not all modules are loaded within a timeout of 600 seconds, continuing with the loaded modules

2023-12-07 11:39:53.419 WARNING (MainThread) [velbus-protocol] EOF received from Velbus

2023-12-07 11:39:53.419 DEBUG (MainThread) [velbus] Reconnecting to transport

2023-12-07 11:39:53.452 INFO (MainThread) [velbus-protocol] Connection established to Velbus

nothing regarding velbus after thisā€¦but no entities :frowning:

Is there something else i can try?
iā€™m on a rasbery pi, with these versions

  • Core2023.12.0
  • Supervisor2023.11.6
  • Operating System11.1
  • Frontend20231206.0

enable the debug log for this integration, it will give you a lot more info.

How are you connecting to the bus? what connection string?