Light value Openhab

Hi all

I would like to have a variable in Openhab that shows the current outside light value. Kind of like seeing the outside temperature.
I found a checkbox in VelbusLink for a VMBPIRO that automatically sends the current light value on the bus. In the logging I can see a “light request”

FYI Address 16 is a VMBPIRO, absolutely no ID if “Light value request (AA)” is of any use.

I would like to use this value to make a rule: when I wake up I press a button in Habpanel, my Yamaha AV receiver turns on, my roller shutter goes up, and depending on the outside light value I want some lights to turn on or not turn on.
Easier than pressing 4 buttons :wink:

Many thanks in advance!


What kind of integration do you have between OpenHAB and Velbus?

The software ( I wrote can do this.
I don’t know if the OpenHAB binding voor Velbus ( can do this. This was developed after I developed my own solution so I never tried it out.


I am using “velserv”, is that yours? That and the Velbus binding “created by Cedric Boon”.
I have already had really useful help by @MDAR, resolving several problems, such as:


No, velserv is a TCP/IP gateway so you can access your Velbus over te network.

My code does the same as the OpenHAB Velbus module. It’s a 2-way gateway between OpenHAB en Velbus so OpenHAB knows that happens on the bus and can send commands to the Velbus modules.
Since I never used the Velbus binding I don’t know if what you ask is possible.


1 Like

Hi Bernd,

I didn’t know that was possible with a VMBPIRO

I’ll ask if it’s possible to add this value as a channel to a VMBPIRO thing in the Velbus Binding.

As for VelServer, I (am ashamed to say) don’t know much about it.

If it handles the Velbus packets directly, you might be able to filter for that packet?

Is this possible in your approach @Stef_Coene ?

If so, how ?

Alternatively, you might be able to filter the packet in NodeRed

You could ask the developer here -

My scripts already forward this to OpenHAB.


1 Like

Okay, now I’m confused. :confused:
I do have the velserv running on a RPi, I can program my Velbus over the network (which is much better than using a USB cable and being stuck to 1 place), and I use OpenHAB. Mainly HABpanel that is.
But are you saying we don’t need the Velbus binding by Cédric?

As for the light value, @Stef_Coene, could you explain (or give me a URL where I can find) how to use this?

@MDAR I’m not familiar with NodeRed, but I know you use it a lot. Maybe I’ll have a look. And also, if the light value is already integrated in velserv, I don’t need NodeRed. :stuck_out_tongue:

Have a good Sunday!


Yes, it looks that way.

VelServer is Stef’s script based solution for grabbing Velbus packets and passing them to platforms like openHAB2.

VelServ is Jerome’s TCP server that converts Velbus USB / Serial interface data into TCP packets, for anything to access, like VelbusLink, OpenRemote, openHAB2, NodeRed Velbus node (TCP is in development)

openHAB2 Velbus Binding is Cédric’s solution for linking Velbus, based on the Things and Items model.

Does that help you?

It does, thank you :+1: :slight_smile:

So it won’t help my light value problem when @Stef_Coene replies my question, as I don’t have Velserver running.

Correct? :blush:

Yep, except that if you are adventurous enough, you can install my scripts and so get the light value in OpenHAB :slight_smile:


1 Like

Hi Bernd,

The following version of the Velbus binding should add an extra “LIGHT” channel to the VMBPIRO containing the current light value. I haven’t a VMBPIRO for testing, so let me know if it works (or if it doesn’t):

You will probably have to delete your VMBPIRO things in OpenHab and re-detect them through a search on the Inbox before the new “LIGHT” channel appears.


1 Like


You’ve worked your magic again :slight_smile:

Thank you :smile:

My only observation is that the weather station is reporting a very different light value.

The PIRO is in shadow a little (under the eaves) so that is probably the reason.

Another explanation would be that the value of the PIRO isn’t in lux.
I assumed it was, but the docs actually don’t mention a unit.

1 Like

In Velbuslink the value used is definately not in lux, as they use 0 for light and 1023 for dark.
I’m not sure it’s working ok, current Velbuslink value is 20, and the Openhab-control shows 512, which is the same value as @MDAR’s paste of the Openhab-control…

1 Like

I just noticed this:

No ID what the current value is/was; OpenHAB Control shows 512lx atm.
Strange thing, I have 2 VMBPIRO, only 1 of them shows these events… both values in Control are 512 lx…

I added both in Visual Code

which gives me:
image image
I already removed the one that doesn’t give events (the 0F) and added it again, didn’t help.

**edit: 0F reported an event:

(probably because I deleted it and added it again)