Velbus percentage button for dimmer

Hey Guys,

Im new to openhab but i find everything getting a long as we progress tru-out our renovation.
We are nearing the end so im trying to get everything up and running in its final form.
we have 3 rooms with dimmers and that is pretty easy in the basicUI to get it working.( Long live the generator)
However i would like to create Buttons with for example 20% 50% and 70%.
But i cant seem to figure out how to create a button and what the code needed is to send.

Its a Velbus installation, i’ve found out that the vmbdmir support ON/OFF and percentage.
I can’t seem to figure out how to send a percentage to the channel and to create a normal “button” in simpleUI.

I have 0 coding background so i can make it work with examples only…
I’ve tried via selection element, if i don’t make my sitemap go offline i can get a button to show up (with some underlying menu) so not ideal but i still am unable to send a specfic value…

Thanks !!

Hi Glenn, welcome to the OH community.

I think your best bet here is to look over the switch element in the sitemaps doc. Note the section on mapping values to produce a button series with custom values instead of binary values:

For a bit of clarification; you don’t do that.
You send a command to an Item, and it will get passed to any linked channel.
If your Item is a Dimmer type, you can command it ON/OFF or numeric, for a percentage.

See previous post for how to build a UI element to do that.

Hi Glenn

Following on from our WhatsApp chat last night, I’ve bitten the bullet and looked at BasicUI again.
I can see what you mean about its suitability for phone layouts.

I’ve created this frame to show the same Dimmer Item in different Sitemap elements

Frame label="Dimmer Tests"{
Slider item=MasterBedroomLight
Switch item=MasterBedroomLight label="Light" mappings=[0="0",33="33",66="66",100="100"]
Selection item=MasterBedroomLight label="Light Sel" mappings=[0="Off",50="Half",100="Full"]

This gave me this in the openHAB2 Android app



As always you made my day :innocent:
The way u formatted the selection as a switch and then map 3 options to it is exactly what i was looking for

Thanks alot again !
Trying to find a case u cannot solve !

Tread closed

1 Like

Get ready to spend alot of time then :smiley:

1 Like

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.