[quote=“cpmilez, post:14, topic:184807”]After many hours, i’ve finally managed to get my key fob (Gen5) to work. I was able to pair it easily using the same instructions as found online, however after switching to scene mode the buttons failed to send any commands to Vera. The light was indicating red as well which didn’t seem right and the instructions indicated it should be green.
I then set the parameter 250 =1 in for the device in Vera and then whilst holding down a button on the fob and clicking “configure node right now” under the device settings it updated the key fob with the new parameter and after that the key fob gave me a green light when pressing buttons, some progress! From checking the logs I could see Vera was then getting a command when a button was pressed so I setup a scene to trigger when scene 1 was activated. This worked hooray!!! However… I then found the same scene triggered regardless of which button i pressed, booo!!!
At this point I contacted Vesternet who gave me some pointers. Apparently Aeon changed the way that they send Scene commands in the Gen5 version of the keyfob, so they no longer get mapped correctly to the “sl_SceneActivated” variable - this is what the built in Scene Controller support in Vera uses to Trigger Scenes from.
The Scene IDs are now as follows:
Button 1 short press = 1
Button 1 long press = 2
Button 2 short press = 3
Button 2 long press = 4
Button 3 short press = 5
Button 3 long press = 6
Button 4 short press = 7
Button 4 long press = 8
However this part didn’t really help as if I set the scene to trigger on scene activated = 1 it would trigger for all 4 buttons. From my logs I found the “sl_SceneActivated” variable was always 1, however “LastSceneID” variable was correct and matched to the mapping table above. Using this and another example from Vesternet support for the Z-wave.me Wall Controller I was able to easily add some Luup code to the scene to act differently for each button. Here’s the code I used.
Firstly set the trigger for the keyfob device - “scene activated” and put the scene number to *
Then in the Luup code use something like this below.
-
Replace: “232” for the deviceid of your key fob.
-
pushbullet_push is just a function I used for testing, you can put anything you want here to control a device or run another scene for example.
luup.call_delay('scene_controller', 1)
function scene_controller()
local lastSceneID= luup.variable_get("urn:micasaverde-com:serviceId:SceneController1", "LastSceneID", 232)
if (lastSceneID== "1") then
pushbullet_push('Debug', 'Button1 Pressed')
elseif (lastSceneID== "2") then
pushbullet_push('Debug', 'Button1 Press/Hold')
elseif (lastSceneID== "3") then
pushbullet_push('Debug', 'Button2 Pressed')
elseif (lastSceneID== "4") then
pushbullet_push('Debug', 'Button2 Press/Hold')
elseif (lastSceneID== "5") then
pushbullet_push('Debug', 'Button3 Pressed')
elseif (lastSceneID== "6") then
pushbullet_push('Debug', 'Button3 Press/Hold')
elseif (lastSceneID== "7") then
pushbullet_push('Debug', 'Button4 Pressed')
elseif (lastSceneID== "8") then
pushbullet_push('Debug', 'Button4 Press/Hold')
end
end
References:
Add keyfob to Vera: http://www.vesternet.com/resources/application-notes/apnt-22 (switching modes is different for the Gen5 it seems, see manual for this)
Additional Luup Code: http://www.vesternet.com/resources/application-notes/apnt-69 (toward bottom of page)
Please note this was done on a Vera Lite with Firmware: 1.5.672
Hopefully this will help someone else and save you some frustration![/quote]
I just got this working on my Vera 3 with Firmware 1.5.672 as well. I had to upgrade firmware as I was on 1.5.622. I was nervous but the upgrade only took about 20 minutes. I have about 80 devices and about 50 scenes, but all went well! I used this thread to do the upgrade. http://forum.micasaverde.com/index.php?topic=27870.0
Before the firmware upgrade the Vera was not able to set the 250 dec 1 bit when trying to do “Configure Node Right Now” in Settings. After doing the upgrade it did it instantly.
Also, I could not get the 1 long press and 4 long press buttons to work via Lua. I coded the other buttons though. Here is some code you can run if you want each button to set a scene.
Thanks to everyone else that put in hours before me. That helped me a lot as I was working on setting my KeyFOB up.
My KeyFOB device ID is 160. So you would change that one line to whatever device ID your KeyFOB is.
[code]luup.call_delay(‘scene_controller’, 1)
function scene_controller()
local lastSceneID= luup.variable_get(“urn:micasaverde-com:serviceId:SceneController1”, “LastSceneID”, 160)
– Button 1 Press OK — Looking at KeyFOB with buttons on the top and slide down cover on the bottom - changed from 76
if (lastSceneID== “1”) then
luup.call_action(“urn:micasaverde-com:serviceId:HomeAutomationGateway1”, “RunScene”, {SceneNum = “4”}, 0)
– Button 1 Press Press and Hold - BAD ?? - Not Working
elseif (lastSceneID== “2”) then
luup.call_action(“urn:micasaverde-com:serviceId:HomeAutomationGateway1”, “RunScene”, {SceneNum = “3”}, 0)
– Button 2 Press OK
elseif (lastSceneID== “3”) then
luup.call_action(“urn:micasaverde-com:serviceId:HomeAutomationGateway1”, “RunScene”, {SceneNum = “4”}, 0)
– Button 2 Press and Hold OK
elseif (lastSceneID== “4”) then
luup.call_action(“urn:micasaverde-com:serviceId:HomeAutomationGateway1”, “RunScene”, {SceneNum = “3”}, 0)
– Button 3 Press OK changed rom 76
elseif (lastSceneID== “5”) then
luup.call_action(“urn:micasaverde-com:serviceId:HomeAutomationGateway1”, “RunScene”, {SceneNum = “4”}, 0)
– Button 3 Press and Hold OK
elseif (lastSceneID== “6”) then
luup.call_action(“urn:micasaverde-com:serviceId:HomeAutomationGateway1”, “RunScene”, {SceneNum = “3”}, 0)
– Button 4 Press OK
elseif (lastSceneID== “7”) then
luup.call_action(“urn:micasaverde-com:serviceId:HomeAutomationGateway1”, “RunScene”, {SceneNum = “4”}, 0)
– Button 4 Press and Hold - BAD ?? - Not Working
elseif (lastSceneID== “8”) then
luup.call_action(“urn:micasaverde-com:serviceId:HomeAutomationGateway1”, “RunScene”, {SceneNum = “3”}, 0)
end
end[/code]