Velbus binding for OpenHAB

Ar…har :slight_smile: there’s your problem :smile:

The version in the market is the 1st release that Cédric got passed by the OpenHab2 compliance team.

He has made some amazing changes since then, but hasn’t submitted an update because it takes 3 months and he’ll probably make more additions.

First…

You need to remove the version via PaperUI/Addons/ Bindings

Stop OpenHab2

Make sure to search your installation for any archived versions and remove them.

Download this zipped up ‘bleeding edge’ version

http://www.mdar.eu/dl/openhab2/openhabvelbus.zip

And place the .jar file into your addons folder.

(On Linux that is normally /etc/openhab2/addons )

Now start OpenHab2

Go to PaperUI/Addons/Binding and make sure the Serial binding is installed.

The next part is annoying, but painless.

Because there are more ‘channels’ available for glass panels in the latest version, you’ll have to manually delete the Glass Panel / VMB1TS things and scan your Velbus network again.

Thankfully, when adding them back in, they should get linked back to the items that were linked previously.

Interestingly…

Cédric added a network binding to this version, so you can run something like PB_Server or VelServ which allows for multiple simultaneous TCP connections to your Velbus network.

Good luck :smile:

Stuart

Won thanks! Works perfect now, you (and Cédric of course) are the best!

One other thing, I saw in this thread that there is a custom widget for the velbus thermostat, but the wetransfer link doesn’t work anymore.

Would it be possible to receive a new link? Would be very much appreciated

1 Like

Blimey…

Some people don’t want much :slight_smile:

And just for the record, I don’t do anything clever, I just shout about the great work that other people like Cédric & Tom do. :smile:

Here’s a link to Tom VC’s great Thermostat widget.

http://www.mdar.eu/dl/openhab2/VelbusThermostat.widget.json

Now one tiny note…

There is code in Tom’s widget that shaves down the 4 decimal point current temperature to just one.
BUT that only works if the Item its looking at is a Number.

NOT a Number:Temperature

So…

Please tweak the Item and remove the Temperature type.

(You can always add the °C back as a suffix in HabPanel)

(This is assuming that you’ve not used the Simple Linking option)

Whoops

Sorry, there was a typo in that link.
I’ve fixed it.

Everything is working now, thank you!

2 Likes

i setup google homes with openhab:
i didnt touch one physical switch since 2 months nor paper UI or habpanel.

IT IS PERFECT!!!

endless dynamic senarios, rules and voice commands.

1 Like

Where can I find some real-world examples of things/items/rules files for a typical Velbus setup? I’m also interested in connecting my Hue lights with Velbus switches.

Hi

I’d recommend using the PaperUI for setting up Velbus Things, then linking to items that PaperUI will create as you go along. (I understand that this is the approach that is preferred and it’s mostly automated now.)

As for Rules, you can try the “Experimental Rules Engine”, but as it lost my rules 4 times, I learnt to write the rules as text files.

Once you’ve got some things and items, I’m happy to point you in the right direction for writing rules, or you can hunt around in the OpenHab2 Community page.

Thanks MDAR.
Indeed, my things / items are easy to set up using PaperUI. So as you suggested I will stick with PaperUI for that.
But for Rules it would be very handy to have some Velbus specific real-world examples. eg. When I press a Velbus button, I want to switch on/off a hue light. Only a few examples would point me in the right direction.

Thanks!

1 Like

Hi

Purely to give you something to look at, I’ve uploaded a zip of the different rules I’m playing with.

All I did was scrap the OpenHab2 Community site for hints and tips, so please don’t think any of these are purely my own work.

(Although Cédric did very kindly write the most complex one for me, for which I am very grateful)

http://www.mdar.eu/dl/openhab2/rules.zip

Good luck

Stuart

The following is a reasonable example of a Velbus trigger switching On or Off something else.

Where “ToiletUp” is a relay for a light and the DMX Chase is an RGB fixture, then DMX brightness is a way to turn off the RGB fixture and stop the chase.

rule "Toilet DMX Chase"
when

	Item ToiletUP received command
then

	
	if(ToiletUP.state == ON){
	 DMXChaserToilet_Switch.sendCommand(ON)
    
	 }
	
	if (ToiletUP.state == OFF){
	DMXDimmer_Brightness.sendCommand(OFF)
    
	
	 }
end

A simple button press triggered rule has to be phrased slightly differently.

rule "A Velbus glass panel button"
when

	Channel 'velbus:vmbgpod:c5053467:2C:input#CH3' triggered PRESSED
then

// An_Item.sendCommand("75") / some commands need to be in quotes, some are raw like ON / OFF / PLAY / PAUSE

end
1 Like

do the velbus bindings support tcp/ip comunications?
i can’t seem to get that working, the interface always complains its offline

also can it be that we have to add all modules manually?

Yes, the bleeding edge version of Cédric’s binding has a Network Bridge.

Once you’ve got a valid bridge working, just go to the inbox and start a search.

You only need to select the “things” you want to add, then link the parts of the “Things” to “Items”.

Take a read of this post :slight_smile:

https://forumtest.velbus.eu/t/velbus-binding-for-openhab/14992/118

That’s a very useful source of information, Mdar! Thanks a lot!

1 Like

i have ‘binding-velbus - 2.4.0.M4’ installed, but whats the next step? if i add a tcp/ip port under the config it stays offline …

Are you adding a serial bridge by mistake?

If the “Network Binding” isn’t available, then you’re not using the bleeding edge binding.

The Network Binding connects to something like VelServ / PB_Server / JVelbusD… And I know you know that bit :smile:

You should be able to run OpenHab2 and HomeAssistant from the same TCP server, simultaneously :slight_smile:

One tiny thought…

Have you added the Serial Binding - binding-serial1 - 1.13.0.SNAPSHOT too ?

This is needed for either of the Velbus bridges to function

Mdar, I’m investigating your rules. How are your Items set up? Using a things file or set up via PaperUI? Can you give me an example on how to set this up (things file) or how to get the ‘name’ of a Thing?

What I want to achieve:
How to set up a rule to switch a hue light when I press a button on a vmb4pd module.

Thanks!

No worries.

Just a question…

Have you put all the things and items in yet?

If you’re creating a rule to be triggered from a button event, you need to get the trigger name, as shown in green here -

(Click on the double square to copy to your clipboard - shown in red)

Then you’ll need the unique name of the Item you want to control (not the item name / human readable name) shown in Green.

(Double square to copy to your clipboard- in red)

Then you’ll need a rule like this…

rule "Toggle Demo Switch by pressing a Velbus Button"
when

Channel 'velbus:vmbgp4:9a309cee:04:input#CH1' triggered PRESSED // you could use LONG_PRESSED or RELEASED
then


if(DemoSwitch.state == ON){
 DemoSwitch.sendCommand(OFF)
    return
 }

if (DemoSwitch.state == OFF){
DemoSwitch.sendCommand(ON)

return
 }
     end
1 Like

Thanks for sharing this very clear example, Mdar. All is working as expected right now :ok_hand:

1 Like

Hi,

Where can i find the latest version of velbus binding (working with velserv)?
I am reading out the temperature of all glaspanels and VMBGPOD, VMBGP4, VMBGP2 are working, but VMBGP4PIR and VMBPIRO not.

Items working:
Number:Temperature Verw_Living_Bureau_Temp “Temp Living [%.1f °C]” (GF_Living, gLogging, gTemperature) {channel=“velbus:vmbgpod:956cb640:82:input#CH33”}

Number:Temperature SlpkLTemp “Temp Slpk L” {channel=“velbus:vmbgp4:956cb640:6E:input#CH9”}

Items not working:
Number:Temperature Verw_Inkomhal_Temp “Temperature Inkomhal [%.1f °C]” (GF_Inkomhal, gLogging, gTemperature) {channel=“velbus:vmbgp4pir:956cb640:7D:glasspannel#CH9”}

Number:Temperature BuitenTemp “Temp Buiten” {channel=“velbus:vmbpiro:956cb640:A5:input#CH9”}

When I open vmbgp4pir thing in Paper UI, everything works fine, velbus:vmbgp4pir:956cb640:7D:glasspannel#CH9 is linked.
When I open vmbpiro thingin Paper UI, I get the error “Error 500- internal server error” and there are no channels. There are no errors in the log viewer (frontail).

Is it a problem with the velbus binding, ore is there an other problem?

Thanks
David

hello, check your rules and items files for error codes, specially if new modifications made.
otherwise ask master cedric :slight_smile:

1 Like