Velbus binding for OpenHAB

This is totally possible.

Have you read this?

Specifically where Cédric talks about Channel triggers?

You can use all the states and triggers within openHAB2 rules

Dear MDAR,
100% right for thing types vmbgp1 , vmbgp2 , vmbgp4 , vmbgp4pir and vmbpiro have 8 trigger channels CH1CH8 and one temperature channel CH9 .
But I still have/use the “old” temperature sensors vmb1ts
I hope low effort to add this to the supported sensors (or potentially I can make openhab “think/fool” I have vmbgp1 instead of vmb1ts

Oh I see what you mean.

I’ve hung a VMB1TS onto my demo rig, so that it is accessible to Cédric.

When he has time, I’m sure he’ll take a look at it.

Shhhhhhh…

I think I can faintly hear the tapping of keyboard buttons and I think I made out a key stroke sequence that sounded a bit like… VMB1TS…

But I could be wrong…

We’ll have to see what the great master presents us with… Soon ???

Have you worked this out yet?

DSL rules are easy enough for this in openHAB2, or there is NodeRed which I’ve been playing with recently.

The results are great for whichever you’re most comfortable using.

Patiently waiting for the VMB1TS integration… and meanwhile learning openhab features, rules, virtual relays, react on label changes etc…the sky is the limit… only missing time. Luckily 1 may tomorrow…holiday for working folks.

1 Like

Hello All :smile:

I’m struggling to find where I posted the link to an openHAB2 Velbus binding update script, so to help everyone, I’ll put it here

http://www.mdar.co.uk/dl/openhab2/update-velbus-jar.sh

wget http://www.mdar.co.uk/dl/openhab2/update-velbus-jar.sh
sh update-velbus-jar.sh

Just run that script from your linux command line and it will pull down Cédrics latest binding from my website and put it into the openHAB addons’ folder.

Assuming it is
/usr/share/openhab2/addons

Don’t forget to add the V1 Serial Binding to get it working, easiest way it from PaperUI / Configuration / Addons / Bindings
You don’t need to do anything more than add it, there are no configuration files needed.

(I’ve lost count how many times I’ve forgotten that step)

1 Like

@MDAR :
Are the VMBEL (Edge Lit) control modules compatible with the OpenHab (or HomeAssistant) platforms?

Hello

Cédric is working on the openHAB2 binding, so that it includes the edge lit panels.

There is a development binding if you want to test it :slight_smile: (although I suspect Cédric has a more recent version he’s working on)

1 Like

Thanks for the fast reply! I’ll check it out when I have the new control modules.

1 Like

Hi All,

Just an update that might help others. I’ve been playing around with Openhab & Velbus
(and even intergrated with IFTTT and google calandar) to create a “wake-up light” + smooth song fader + …
Again thx to all who created the components, it’s just a matter of combining/integrating the great developments together. I’m not a programmer (but installed Visual Studio Code with the smooth integration of openhab)

Only still waiting for the final bits on VMB1TS integration

Feature - Support for VMB1TS module #4
(if I could somehow help, feel free to reach out for testing or debugging purpose, but limited time to deep dive in the code)

Below some personal code … as per other topics … yes it’s possible to react on string events (basically everything that shows up in eventlog) … yes it’s possible to create “dummy switches/variables to be used system wide” and yes it’s possible to put raffstores on flap and roller shutter on ledge.
Best to search on Openhab forums for more info but still sharing the possibilities below:

rule “React on GROUP_IFTTT Group IFTTT Automation Rules change/update”
when Member of GROUP_IFTTT received update
//when Member of GROUP_IFTTT changed
then
val sourcename = triggeringItem.name
val sourcestate = triggeringItem.state

    switch(sourcename)
    {
        case "F0_BU_IT_STR_IFTTTLABEL01": 
        {   
            if(sourcestate == "opstaan") 
            {
                logInfo("F0_BU_IT_STR_IFTTTLABEL01", "script opstaan start") 
                
                // verwarming aan
                F2_TE_VB_4RY36CH5_VirtualRelais.sendCommand(ON) // indirect coupling Velbus, pending integration

                // versterker op KODI input & mute
                F0_BU_YM_Receiver_SWI_Power.sendCommand(ON)
                Thread::sleep(6000)
                F0_BU_YM_ReceiverZone_SWI_ZoneChannelsMute.sendCommand(ON)
                Thread::sleep(6000)
                F0_BU_YM_ReceiverZone_STR_ZoneChannelsInput.sendCommand("HDMI4")

                // kodi start
                var int iDimmer50 = 1
                F0_BU_KO_Mediacenter_DIM_Volume.sendCommand(iDimmer50)
                F0_BU_KO_Mediacenter_STR_Playfavorite.sendCommand("opstaan")
                Thread::sleep(1000)
                F0_BU_KO_Mediacenter_STR_Inputaction.sendCommand("down")
                Thread::sleep(500)
                F0_BU_KO_Mediacenter_STR_Inputaction.sendCommand("select")
                Thread::sleep(500)
                F0_BU_KO_Mediacenter_STR_Inputaction.sendCommand("play")
                //F0_BU_KO_Mediacenter_PLA_Control.sendCommand(PLAY)
                Thread::sleep(400)
            
                // versterker slaapkamer ouders aan
                F0_BU_VB_4RY29CH1_StopcontactKast02VersOuders.sendCommand(ON)
                Thread::sleep(10000)

                                 
                // dimmer ouders
                F1_OU_VB_1DM35CH1_DimmerOuders.sendCommand(iDimmer50) 



            
                while((iDimmer50=iDimmer50+1) < 51) 
                {
                    F0_BU_KO_Mediacenter_DIM_Volume.sendCommand(iDimmer50)
                    F1_OU_VB_1DM35CH1_DimmerOuders.sendCommand(iDimmer50) 
                    Thread::sleep(10000)
                    // 10sec per run x 50 = 8,3 min
                }

                // airco aan
                F0_SA_AC_DaikinSalon_Power.sendCommand(ON)
                Thread::sleep(5000)
                F0_SA_AC_DaikinSalon_Settemp.sendCommand(23) 


                Thread::sleep(300000) // 5 min sleep/wakeup


                // rolluik richel
                FB_BO_VB_2BL24CH2_RollSlOud.sendCommand(UP) // received command UP or STOP or DOWN
                Thread::sleep(3000)
                FB_BO_VB_2BL24CH2_RollSlOud.sendCommand(STOP) 
                F1_OU_VB_1DM35CH1_DimmerOuders.sendCommand(0) 
                Thread::sleep(300000) // 5 min sleep

                // Last warning
                F1_OU_VB_1DM35CH1_DimmerOuders.sendCommand(100) 
                Thread::sleep(5000) // 5 seconden
                F1_OU_VB_1DM35CH1_DimmerOuders.sendCommand(0) 


                // Stop/Cleanup
                F0_BU_VB_4RY29CH1_StopcontactKast02VersOuders.sendCommand(OFF)
                F0_BU_YM_ReceiverZone_STR_ZoneChannelsInput.sendCommand("HDMI1")
                F0_BU_YM_Receiver_SWI_Power.sendCommand(OFF)
                F0_BU_KO_Mediacenter_STR_Inputaction.sendCommand("stop")

                F0_BU_IT_STR_IFTTTLABEL01.postUpdate("executed script: opstaan")
                logInfo("F0_BU_IT_STR_IFTTTLABEL01", "script opstaan stop") 
            }
            else
            {
                logInfo("F0_BU_IT_STR_IFTTTLABEL01", "unhandled script "+ sourcestate) 
            }

        }
        case NULL: { logWarn("React on Group Velbus Relais (GROUP_VB_4RY) change/update", "One of the Items is NULL") }
        default: { logWarn("GROUP_IFTTT", "Unhandled label: " + sourcename + " with command: " + sourcestate) } // 
    }

end

Not sure if this is a right topic/place for conceptual discussion, but above script/rule runs when I receive an external trigger. Current issue is that it sometimes doesn’t run :wink: (not related with Velbus or Openhab, but my solution is dependent on availability of local power/AC, Velbus USB connection, raspberry PI uptime, local openhab, local wifi, Telenet, public openhab server, IFTTT service, google calendar services. For the moment most problems with Telenet sometimes down :wink: as well as the openhab public service. In the end it’s a suboptimal design and i’m used to work with program timers of the VMB4PD which basically never failed if you put in a battery (to coupe with power outage/keep clock).
Only drawback is that it’s a bit challenging to reprogram/adapt the weekly schedule.
Main idea was to create an invite (in google calendar) with the keyword “opstaan” to trigger above script. But as mentionned, this runs “on the spot” so if something is “down” there is no trigger = oversleeping :wink:

I assume an optimization is possible by using the 8PBU alarm clock 1 and 2 … but if someone has an idea to easy change it with a mobile (something like set alarm clock) feel free to guide me in correct direction. To avoid complexity maybe best to just work in habpanel to adjust the values?

Excellent post.

I’m interested to see where you go with this.

Have you tried changing the VMB8PBU alarm times via the HabPanel?

(My own house revolves around the Global alarm times.)

Alternatively, have you seen the Light Scheduler nodes in NodeRed?

The outgoing payload can be set to either of two user definable states.
ON / OFF
1 / 2
Day / Night

Whatever you want :slight_smile:

FYI…

openHAB2 Velbus binding sets the Velbus Network time shorts after boot-up :slight_smile:

I don’t have any other kind of RTC in any of my Velbus networks.

As far as I know, none of my client’s clients have one either.

Hi

If anyone is interested, I’ve just pasted a simple DSL rule to the openHAB2 community forum that links a Cooler channel of a glass panel to an chiller “switch”.
(Using openHAB2 as the bridge between the two hardware platforms)

I thought people here might find it useful.

This same process is easy enough to achieve in NodeRed.
When I get 2 minutes, I’ll add it to the openHAB2 post.

I currently have a problem with either Openhab or the Velbus VMB8PBU module.
I think I correctly set the alarm clock variables but this isn’t correctly set to the module (when I check in VelbusLink hence alarm action isn’t executed).

I also notices something strange in the logs, apparently another VMB8PBU module receives the “enable alarm” trigger.
I think we have 2 seperate issues - alarm hours & minutes not correctly set and “enable alarm” is also behaving strange. Did I do something wrong or forgot to set something (note: in VelbusLink I enabled program 1, and used the alarm to trigger an input).

code and log below:

2019-08-11 21:30:19.028 [ome.event.ItemCommandEvent] - Item ‘F0_BU_VB_8PBU2B_AL1_WAKEUPHOUR’ received command 5

2019-08-11 21:30:19.034 [nt.ItemStatePredictedEvent] - F0_BU_VB_8PBU2B_AL1_WAKEUPHOUR predicted to become 5

2019-08-11 21:30:19.044 [ome.event.ItemCommandEvent] - Item ‘F0_BU_VB_8PBU2B_AL1_WAKEUPMINUTE’ received command 26

2019-08-11 21:30:19.049 [vent.ItemStateChangedEvent] - F0_BU_VB_8PBU2B_AL1_WAKEUPHOUR changed from 13 to 5

2019-08-11 21:30:19.057 [nt.ItemStatePredictedEvent] - F0_BU_VB_8PBU2B_AL1_WAKEUPMINUTE predicted to become 26

2019-08-11 21:30:19.067 [vent.ItemStateChangedEvent] - F0_BU_VB_8PBU2B_AL1_WAKEUPMINUTE changed from 2 to 26

2019-08-11 21:30:19.070 [ome.event.ItemCommandEvent] - Item ‘F0_BU_VB_8PBU2B_AL1_ENABLED’ received command ON

2019-08-11 21:30:19.073 [nt.ItemStatePredictedEvent] - F0_BU_VB_8PBU2B_AL1_ENABLED predicted to become ON

2019-08-11 21:30:19.271 [vent.ItemStateChangedEvent] - F2_TE_VB_8PBU3B_AL1_ENABLED changed from OFF to ON

Code snipper:
F0_BU_VB_8PBU2B_AL1_WAKEUPHOUR.sendCommand(F0_BU_OH_VAR_NUM_HOURS.state as Number)
F0_BU_VB_8PBU2B_AL1_WAKEUPMINUTE.sendCommand(F0_BU_OH_VAR_NUM_MINUTES.state as Number)

F0_BU_VB_8PBU2B_AL1_ENABLED.sendCommand(ON)

Hi

Just double checking…

Are you synchroning VelbusLink by “reading the new values” back from the VMB8PBU Module into VelbusLink before you look at them again?

Hi MDAR,
Were you able to set the time/hours alarm parameters in GitHub trait “Alarm Type inverted #10” ?
Main difference is the module Edge Lit Oled vs 8PBU what’s I’m trying to configure.

Upon reaching the new time configured, no action happens and of course I do sync-read before I check in Velbuslink.
This makes me wondering, since its not an “action” … is the command .sendCommand() enough?
Possibly we need a “sync-write” action to store the new values in the velbus module flash.
Can we check if this alarm variables are potentially “read-only”?

No worries in this case I wll deep dive in openhab persistence section. (not a lot of experience with SQL database etc, but also usefull for trending/historical info from sensors etc) and non-velbus variables I would like to store.

Hi
I’m confused by what you’re asking.

Updating / changing the hour or minutes of an alarm time should be no different from updating anything else.

So yes, if you’re using DSL rules, this would work.

8PBUalarmMinute.sendCommand(45)

I haven’t used Rules to change the time values, but I regularly use paperUI & HabPanel.
I’ll assume that BasicUI works the same way.

So to divide the issue into two…

If you ONLY set the alarm time in VelbusLink, do the correct actions happen at the set times?

After that,

When you set a new time in the VMB8PBU, is it shown correctly in openHAB2? (PaperUI can take some time to update, but HabPanel seems almost instant)

@cedricb are the VMBEL modules still in the running to be implemented in your openhab addon?
I’m always in to do some alpha testing :slight_smile:

2 Likes

Same question for me. Just purchased some VMBEL4 modules. Did not realize these are not supported ny openhab yet.

So, please… :wink:

Grtz matthijs