Motion Sensor Integration with 20P/AD2USB/OpenHab for Scene Lighting

I am a beginner here, and I’m looking to see if a fantasy scenario would work for me. I have a Vista 20P panel, and I’m going to be purchasing the AD2USB adapter to integrate the system into OpenHab. My questions are around the use of the system’s motion sensors to accomplish some scene lighting functions.

In particular, I would like to have OpenHab access the home’s motion sensors while the alarm is set to STAY. What I want to have happen is that, if someone gets up in the middle of the night to get a drink of water or something, motion sensors would sense the presence of that person and automatically initiate a lighting scenario where the lights in that room would come up very dim to light the path of the person without blinding them, but then, after a period of time of no motion, automatically turn the lights off and reset for another similar situation. All of this would be while the alarm panel is set, using the same motion sensors that are integrated with the panel.

Is this something that I could setup using Z-Wave dimmer switches, integrated through OpenHab, the AD2USB, and the Vista 20P?

Thanks ahead!

Assuming the integration with the alarm can report the state to OH, use an

if(Alarm.state.toString == "STAY")

to the rules that are triggered by the motion sensors.

var Timer timer = null

rule "Bathroom lighting motion sensor"
    Item BathroomPIR changed to ON // trigger when the motion sensor detects motion
    // Only care about the event when the Alarm is in STAY mode
    if(Alarm.state.toString == "STAY") {
        // If this is the first time we have seen motion
        if(timer == null){
            // Set a Timer to turn off the light in five minutes
            timer = createTimer(now.plusMinutes(5), [|
                timer = null
        else {
            // Reschedule the Timer
            BathroomLight.sendCommand(20) // set dimmer to a low dimmer value

Notice in the above code there is no mention of specific devices or technology or communications protocols or the like. Behavior is defined in OH using Rules and Rules operate on Items. Items get linked to Bindings which knows how to communicate with the devices. So, if you can get OH to talk to your devices, anything you can think of can be programed as a Rule.

I have no idea if AD2USB or Vista 20P are supported or how to do that integration, but if you can figure that part out, you can make them work with ANYTHING else integrated with OH. That is the real power of OH. It lets us bridge technologies.

Wow Rich! This is great! Thank you! So much to learn, but it’s a lot of fun to learn!