How to setup and control a virtual device?

I would like to use a virtual device to create custom vera triggers from IP sources. I’ve added a virtual device using the instructions listed here:

During the creation process, i set it up with D_MotionSensor1.xml as the template. The device shows up properly in Vera, but I’m not able to change the status (tripped/untripped) of the device.

I’ve also tried toggling arm/bypass in the UI, but it’s constantly stuck on by BYPASS. Clicking arm results in an error message reporting “No implementation”

Have I missed something?

You will need a matching Implementation file (“I_MotionSensor.xml”) that has implementations of the actions for sensors (set armed/bypass; set tripped/not-tripped). You could look at the other virtual device implementation files for inspiration, but there is a learning curve ahead of you.

Ah. Makes sense. Thanks for the pointer!


did you manage to get a “virtual Motion sensor” Implementation file going ?

i’m really interested in getting hands on that one :wink:

I am interested in this as well. Would like to create a virtual motion detector and then trigger it via an alarm from my Hikvision cameras. Essentially to manually create a motion detector for those cameras that support an HTTP call on alarm…

if you NOT want to arm/disarm the sensor manually … then you can just create a virtual device by using the D_MotionSensor1.xml file.

this will set you up a Motion sensor and you can change its status and armed/disarmed values by change the Variables (not the action calls)

triggers to work anyway…
its not a nice solution but it does work.

so Apps - Develop - create Device
desctiption: some name
device file: D_MotionSensor1.xml

and click create.

however, due to the missing Implementation file, all actions wont work and you will get “no implementation error”
but change the variable via luup_request working just fine … and triggers will fire.

i have tested this extensively.
also its uses the SecuritySensor Base, so it will fire even if the sensor was triggered before (thats good if you use web-calls to triger them, so you not have to take care so much about setting them back to not-triggered)

With a camera, you can only trip the alarm, would need the virtual motion sensor to automatically un-trip after some period of time.

I guess a regular scene with Luup could do that without a problem… When the camera trips and sends HTTP call to virtual sensor, run a scene that changes the state back to untripped after some period of time (20 seconds to match how the Hikvision’s work. Foscams would be 60 seconds…)

Wondering why others haven’t done this to create motion detectors for cameras that are not supported automatically (essentially anything other than Foscam/VistaCam)? If I pursue will start a thread under Camera…

as i said before. the trigger will fire … even if the device was tripped before.

all your camera need to do is call a URL like this


and in the scene you executing just have this in the luup box
luup.variable_set(“urn:micasaverde-com:serviceId:SecuritySensor1”, “Tripped”, “0”, -DEVICEID-)