Repurposing Wireless Doorbell Button

Posted: January 14, 2016 in HA, Hardware
Tags: , ,

Because I found myself turning things off or down when I went to bed, I added a simple button on the OH app to run a very simple script to turn off lights and arm the motion detectors. Once I got my head around the heating API I also added calls to turn the heating in certain rooms to night mode.

This was all great, but I still had to go through the hoops of finding a device, opening the app, and pressing the button. I wanted a physical button to do this!

Enter the Nexa Push Button (LMLT-711) from Clas Olson. This is a 433Mhz device that is designed to work with various other Nexa doorbells. BUT as it is 433Mhz, and Nexa is supported by the excellent RFXCom plugin on my Veralite, it should work.

Other Nexa items – several temperature/humidity sensors have al worked perfectly with the Vera and are happily reporting from around the house (and they are a LOT cheaper than the Z-Wave equivalent).

Anyway although the device is supported and appears in the Vera console, pressing the button seems to trigger the ‘group-on’ button that automatically ties itself to Scene 100. Trouble is that scene 100 doesn’t exist… and I’ve never figured out how to create a specifically numbered scene!

Screen Shot 2016-01-14 at 09.07.32

Trying to create a new automation scene and then change the scene that gets triggered didn’t work either; it just reset back to 100. This meant that I couldn’t do much in Vera and then even less in OH.

Anyway – after discussions with Guessed & Lolodomo on the OH forum I figured out a way around the issue.

1. Connect the Nexa doorbell button to the Vera (device #134)
2. Create a virtual switch in Vera (device #140)

Screen Shot 2016-01-14 at 09.07.47

3. Create a new scene & trigger in Vera – the trigger is tied to the actual Group On/Activated event from the doorbell button. When it is triggered it runs the follow LUUP script:

status = luup.variable_get("urn:upnp-org:serviceId:VSwitch1","Status", 140)
 luup.call_action("urn:upnp-org:serviceId:VSwitch1", "SetTarget", {newTargetValue = "0"}, 140)
 luup.call_action("urn:upnp-org:serviceId:VSwitch1", "SetTarget", {newTargetValue = "1"}, 140)

This basically toggles the state of the virtual switch…. an event that I can detect and use in OH very simply.

Switch Bedtime "Bedtime" (gSettings) {mios="unit:house,device:140/service/SwitchPower1/Status"}

4. When OH Bedtime is ‘ON’ – run the script….

I currently just use a timer to reset the switch back to ‘OFF’ after 30 minutes, it doesn’t do anything, just changes the status of the switch across the different devices so it’s ready for use the next night.

Alternatively I could get it to run ‘wake up’ events instead – push on at night and then push off in the morning, but I’ve not really thought about what I could do until now…..


UK Clas Olson Nexa button – here


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s