Scene to turn on lights with a keyfob disarm trigger.

I would like a scene that turns on some lights when the DSC 1832 panel is disarmed via a keyfob at night. You are in your car, you disarm the panel, lights come on to help you get in the house.
I have searched the posts and have what I think I should for this but it doesn’t work. Simple scene
Certain lights set to come on.
Trigger is Partition 1; Vendor Status Code: 751
(751 is listed as “Special Opening” here and in other places) http://code.mios.com/trac/mios_dscalarmpanel/browser/trunk/I_DSCAlarmPanel1.xml#L811

No LUUP code while testing but would set a simple return luup.is_night() once the scene works.
I see that Special Opening is listed in the events of the panel.
But I do not ever see the 751 Code listed on the Vera Partition options or VendorStatusCode variable.
Is it possible that this status happens so fast that it does not get registered with Vera? I am interfacing with the panel via InvisaLink 2DS.

Oh, Plugin version 0.38 Firmware 1.6.641

Sounds interesting… I’m not able to help but hopefully you do manage to get this worked out because it’d be a nice feature at my house.

I think I have this figured out.

By default your keyfobs need to also be associated with user codes, or they will not report a user ID.

So, your master user is user code 40.

Your first Keyfob registers in section 804 slot 41 with it’s ESN number.

That slot 41 maps to user code 17. 42 maps to 18 etc.

So, *5, Master Code, then (hopefully you have the keypad with the LCD screen that displays a few rows of text) scroll right to user code 17, add a four digit code, and you should then be able to trigger events off of user 17 when your first keyfob is used.

I figured it out from this thread here:

http://forum.eyez-on.com/FORUM/viewtopic.php?f=6&t=1068&hilit=keyfob&sid=ae9a1f41dfa51556d1ca59b195512538

Oh, and for your logic, you will probably have to use PLEG to trigger on “when alarm partition 1 disarmed by user 17”.

I use PLEG for these events:;

When Alarm disarmed from AWAY by user 1 play welcome home greeting
When Alarm disarmed from AWAY by user 2 play certain station on Sonos (basically call a scene)
When Alarm disarmed from STAY by user 1 play good morning/afternoon/evening greeting and weather forecast
When alarm disarmed from STAY by user 2 play call scene to play Sonos station

You may be able to get away with simple things without using PLEG, but you’ve been warned :slight_smile:

Or look at using PLTS – Program Logic Timer Switch. Combined with the free Day/Night plugin.

You could do something like “If Night and If User 17 (keyfob 1) sets disarm, then turn on lights for 5 minutes; keep lights on 5 more mins if motion detector trips” etc.

Thanks a bunch! I am heading out of town today so it will be a few days before I can make the adjustments. Yes, I have a multi line LCD and I also have DLS so adding the user codes will be a piece of cake.

I have not used PLEG as of yet. I have been able to do everything I want via Luup code. I may try to work that out first. It isn’t that I have anything against PLEG, it’s just that learning Luup has been a very fun challenge. I’ll post back if I get it worked out there, or if I had to move it to PLEG.

Thank you, Ramias. This answered a question that I was just about to ask. :slight_smile:

I am able to now do what I wanted to do. I did establish codes for my keyfob as suggested and now user 0017 is being registered as the last user. I set up a scene to trigger on the panel disarm and added this code to LUUP.

local LastUser = luup.variable_get(“urn:micasaverde-com:serviceId:AlarmPartition2”, “LastUser”, 24)
if LastUser == “0017” then return true else return false end

I’ll dress it up a bit by only running at night and add the second keyfob to the condition to finish it off. But the basics does now work.

Thanks!!

The adjusted code (Will test tonight but it should be just fine).

local LastUser = luup.variable_get(“urn:micasaverde-com:serviceId:AlarmPartition2”, “LastUser”, 24)
– Storing the last user in a Variable Container for now.
if (LastUser == nil) then
luup.variable_set(“urn:upnp-org:serviceId:VContainer1”,“Variable4”,“Nil”,43)
else
luup.variable_set(“urn:upnp-org:serviceId:VContainer1”,“Variable4”,LastUser,43)
end
if LastUser == “0017” or LastUser == “0018” then return luup.is_night() else return false end