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.



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)

I’d like to reopen this topic, but it’s linked to another topic:

openHAB2 Velbus binding update script by @MDAR

I noticed the wetransfer link in this post is no longer valid, and the script by MDAR downloads the 2.4.0-SNAPSHOT. I’d like to experiment with the light value option again.

How can I get the 2.5.0? Maybe @MDAR can upload that one instead of the 2.4.0?

Be careful in these strange times…

Just want to let you guys know that I found the 2.5.0 in my trashcan, thank God I don’t empty that very often. So I’m trying to get the 2.5.0 running now.
I’ll post an update when I get some results.


Got the 2.5.0 running, removed the VMBPIRO, added it again after scanning, this is what I get:
So that’s the same value as back in August.
I’m guessing there’s something wrong somewhere.
@cedricb no rush at all, but if you find some time… :wink:



Thanks for the nudge.

I have managesd to get some time to test Cedric’s latest binding version now and I have updated the script’s resource so that it pulls down this new version -

This will run happily with openHAB2.5.2-1

Please give this a try and see what you get.

My own looks like this

I think the temperature readings are different because one is in direct sunlight and the other is under an eve.

I’ve tried version which is currently the latest one on Cedric’s github. Still 512 lx
Then I’ve tried the version you mention, again, 512 lx.
Each time removed the VMBPIRO and added it again.
The only thing difference I see is that I still use Openhab 2.5.1
Maybe that’s a reason?

Just want to mention in your readings, the difference between 37520 lx and 1536 lx is pretty huge, no? But maybe you’re right if the one is in direct sunlight and the other is under an eve. :man_shrugging:

Also, I don’t know if you remember, but i had a lot of problems with my RPi, I’ve made another post about that. It’s still a 2B. I do have a 4B laying around here, waiting to be installed. I’m thinking of doing everything text-based, not through Paper UI. But I haven’t found the time yet
Maybe in the coming days/weeks, 'cause I think we’ll be spending more time at home than we’d like due to the COVID-19 stuff…


It sounds like there is something else at play here, if you’re getting identical readings from both versions of the binding.

Which firmware do you have in your PIR ? I’ve got 1817

I think that is more to do with the fact that the PIR isn’t really using Lux / Lumen values, it’s a Velbus only value for using with the light dependent motion sensing.

You might be able to find a correlation…

… Um… I remember a lot of people having issues with Raspbery PIs, but that doesn’t seem to stop people buying the… :wink:

When you do…

Take a look at the generic template that I’ve put together, it should have everything you need for every type of module that Cedric’s binding supports and there is a velbusNetworkBridge.thing file in there too, so that the IDs for each module will be the same when you import them into PaperUI, even if you have to completely rebuild a system :slight_smile:

The Zip file is referenced here -

I don’t know what the world is coming too…