Author Topic: HowTo: Aeon Labs MiniMote fully functional Scene Controller in UI5!  (Read 63618 times)

Offline chixxi

  • Hero Member
  • *****
  • Posts: 1037
  • Karma: +37/-14
Re: HowTo: Aeon Labs MiniMote fully functional Scene Controller in UI5!
« Reply #30 on: August 15, 2012, 07:43:51 am »
1. Use this forum and the wiki to learn howto use luup in scenes.

2. The advantage of connecting the minimote to the vera is that the logic is done on the vera and you can therefore run scenes, this allows to use the minimote for much more complex scenarios than just turning on and off lights.

3. The all-on/off function is also lost when you add the minimote to your vera, but is is ridiculously simple to create a scene which does the same. So the function is not really lost, you just do it with one button.

If you don't see any advantages, just don't do it...
Developer of Plugins: Virtual Switch, Variable Container, Popcorn Hour Remote, Vacation Ghost. => PLUGINS HAVE BEEN UNPUBLISHED BY ME.

Offline cw-kid

  • Hero Member
  • *****
  • Posts: 1214
  • Karma: +6/-2
    • Phaze1 Digital
Re: HowTo: Aeon Labs MiniMote fully functional Scene Controller in UI5!
« Reply #31 on: August 15, 2012, 08:30:37 am »
OK thanks, I can see the advantage of being able to run more complex scenes from the minimote, but to get the minimote setup how it was before VeraLite I don't have enough buttons on the minimote to run all the scenes I would need.

Cheers

Offline LightsOn

  • Hero Member
  • *****
  • Posts: 751
  • Karma: +4/-3
Re: HowTo: Aeon Labs MiniMote fully functional Scene Controller in UI5!
« Reply #32 on: August 15, 2012, 08:43:31 am »
Hi CW-Kid,

I think you loose the all on all off fuction when you add it to vera. I am sure I read this somewhere.

I have one button on the remote that does this by running scenes that do the same.

I think you just have 4 buttons with quick press and long press fuctionality.

You cna get pretty crerative with macros though by addign plug ins and playing with luup code - lots of examples here in the forum and people very helpfull  :)

good luck.

-Lights_On

Offline chixxi

  • Hero Member
  • *****
  • Posts: 1037
  • Karma: +37/-14
Re: HowTo: Aeon Labs MiniMote fully functional Scene Controller in UI5!
« Reply #33 on: August 15, 2012, 08:56:24 am »
OK thanks, I can see the advantage of being able to run more complex scenes from the minimote, but to get the minimote setup how it was before VeraLite I don't have enough buttons on the minimote to run all the scenes I would need.

Cheers

You should have enough button's, at least not less than before.  ;D You basically can control 8 scenes (long and short hold for each of the 4 buttons). If you then create smart scenes you have way more options than before. For example you don't need two buttons and two scenes to turn a light on and off, you can create a scene which does "turn on light if light is off, else turn light off".

I don't really have time to prepare the code specifically for you, but it is really simple, and as alrady said in this forum and the wiki there a lot's of example's.

I use a function, just add this to "Apps => Develop Apps => Edit Startup Lua":
Code: [Select]
-- toggleSwitch(41, status or nil, serviceId eg: "VSwitch1" or "SecuritySensor1" empty for defaul)
function toggleSwitch(devID, newstatus, serviceID)
    local command = "Status"
    if(serviceID == nil) then
        serviceID = "urn:upnp-org:serviceId:SwitchPower1"
    elseif(serviceID == "urn:micasaverde-com:serviceId:SecuritySensor1") then
        command = "Armed"
    end

    if(newstatus == nil) then
        switchStatus = luup.variable_get(serviceID, command, devID)
        if(tonumber(switchStatus) == 1) then
            switchStatus=0
        else
            switchStatus=1
        end
    else
        switchStatus = newstatus
    end
    luup.log("mirkLog[i] switchToggle("..devID..", ".. switchStatus.. ", "..serviceID..")")
    if(command == "Armed") then
        --luup.variable_set(serviceID, command, switchStatus, devID)                                                                                   
        luup.call_action(serviceID, "SetArmed", {newArmedValue = ""..switchStatus..""}, devID)
    else
        luup.call_action(serviceID, "SetTarget", {newTargetValue = ""..switchStatus..""}, devID)
    end
end
-- END toggleSwitch

When you then want to toggle a switch you can add one simple line in the scenes "Luup" tab (Replace DeviceID with the switches DeviceID):
Code: [Select]
toggleSwitch(DeviceID,nil)Example: toggleSwitch(10,nil)

When you want to toggle a Motion Sensor:
Code: [Select]
toggleSwitch(DeviceID,nil,"urn:micasaverde-com:serviceId:SecuritySensor1")
Hope this helps a little...
Developer of Plugins: Virtual Switch, Variable Container, Popcorn Hour Remote, Vacation Ghost. => PLUGINS HAVE BEEN UNPUBLISHED BY ME.

Offline cw-kid

  • Hero Member
  • *****
  • Posts: 1214
  • Karma: +6/-2
    • Phaze1 Digital
Re: HowTo: Aeon Labs MiniMote fully functional Scene Controller in UI5!
« Reply #34 on: August 15, 2012, 09:03:29 am »
OK thanks, think I will have to do some learning and play around with it then.

I was able to turn on say a lamp with one button and turn if off with the same button, short press for on scene long press for off scene etc.

Please see attached

Offline chixxi

  • Hero Member
  • *****
  • Posts: 1037
  • Karma: +37/-14
Re: HowTo: Aeon Labs MiniMote fully functional Scene Controller in UI5!
« Reply #35 on: August 15, 2012, 09:07:53 am »
Exactly, and if you now use the function I provided above you have the same functionality with only 4 Buttons. Instead of using two scenes for one light, you just use one...
Developer of Plugins: Virtual Switch, Variable Container, Popcorn Hour Remote, Vacation Ghost. => PLUGINS HAVE BEEN UNPUBLISHED BY ME.

Offline cw-kid

  • Hero Member
  • *****
  • Posts: 1214
  • Karma: +6/-2
    • Phaze1 Digital
Re: HowTo: Aeon Labs MiniMote fully functional Scene Controller in UI5!
« Reply #36 on: August 15, 2012, 09:11:12 am »
Exactly, and if you now use the function I provided above you have the same functionality with only 4 Buttons. Instead of using two scenes for one light, you just use one...

OK cool many thanks for your insight! I will certainly see if I can get this code working.


Offline oTi@

  • Beta Testers
  • Master Member
  • *****
  • Posts: 4045
  • Karma: +30/-6
  • UI what ?!
Re: HowTo: Aeon Labs MiniMote fully functional Scene Controller in UI5!
« Reply #37 on: August 15, 2012, 09:43:09 am »
Also, note that ToggleState is an available action that you can pick on the Advanced tab in the scene editor. So you can set up a single scene to toggle a light / appliance module. Then assign that scene to a minimote button. No code required. (Previous context.)

« Last Edit: August 15, 2012, 09:45:17 am by oTi@ »
Dezwaved at the moment...

Offline chixxi

  • Hero Member
  • *****
  • Posts: 1037
  • Karma: +37/-14
Re: HowTo: Aeon Labs MiniMote fully functional Scene Controller in UI5!
« Reply #38 on: August 15, 2012, 09:45:17 am »
Note that ToggleState is an available action that you can pick on the Advanced tab in the scene editor. So you can set up a single scene to toggle a light / appliance module. Then assign that scene to a minimote button. No code required. (Previous context.)

oh, very true! sorry for making that so complicated, but maybe you still learned something, sooner or later you'll get into coding  :P
Developer of Plugins: Virtual Switch, Variable Container, Popcorn Hour Remote, Vacation Ghost. => PLUGINS HAVE BEEN UNPUBLISHED BY ME.

Offline cw-kid

  • Hero Member
  • *****
  • Posts: 1214
  • Karma: +6/-2
    • Phaze1 Digital
Re: HowTo: Aeon Labs MiniMote fully functional Scene Controller in UI5!
« Reply #39 on: August 15, 2012, 09:53:23 am »
Also, note that ToggleState is an available action that you can pick on the Advanced tab in the scene editor. So you can set up a single scene to toggle a light / appliance module. Then assign that scene to a minimote button. No code required. (Previous context.)

Sounds even better! But yes I am sure I will need to learn some code at some stage.

Thank you both very much for your help! I've been using VeraLite for a day & a half, still trying to get the basics configured so I am back to where I was with my old system.

Cheers

Offline cw-kid

  • Hero Member
  • *****
  • Posts: 1214
  • Karma: +6/-2
    • Phaze1 Digital
Re: HowTo: Aeon Labs MiniMote fully functional Scene Controller in UI5!
« Reply #40 on: August 16, 2012, 06:13:56 am »
Sorry I looked in the Advanced tab whilst editing a scene, however I cannot see where you setup a Toggle ?


Offline oTi@

  • Beta Testers
  • Master Member
  • *****
  • Posts: 4045
  • Karma: +30/-6
  • UI what ?!
Re: HowTo: Aeon Labs MiniMote fully functional Scene Controller in UI5!
« Reply #41 on: August 16, 2012, 07:20:02 am »
In the Pick a device pull-down, pick the device; click Add. The device is added to the list. Then, in its pull-down menu, pick the ToggleState action.
Dezwaved at the moment...

Offline cw-kid

  • Hero Member
  • *****
  • Posts: 1214
  • Karma: +6/-2
    • Phaze1 Digital
Re: HowTo: Aeon Labs MiniMote fully functional Scene Controller in UI5!
« Reply #42 on: August 16, 2012, 08:11:40 am »
In the Pick a device pull-down, pick the device; click Add. The device is added to the list. Then, in its pull-down menu, pick the ToggleState action.

Excellent that works! I created a new scene called Fireplace On/Off set it to toggle in advanced. I then assigned that scene to Button 2 ON (Short Press) on my minimote. Which also works.

So now presumably I can use Button 2 OFF (Long Press) for another scene !

EDIT:

After created new On/Off scenes using the ToggleState option, the button setup for the minimote now looks like this (See Screenshot). As a result I have freed up the four OFF buttons for use with other scenes.

« Last Edit: August 16, 2012, 09:07:16 am by cw-kid »

Offline chixxi

  • Hero Member
  • *****
  • Posts: 1037
  • Karma: +37/-14
Re: HowTo: Aeon Labs MiniMote fully functional Scene Controller in UI5!
« Reply #43 on: August 17, 2012, 01:42:45 am »
nice job  8)

You know, rather than using the minimote to control single devices I have scenes like "Watch a Movie" or "Kids are in Bed" or "Comming Home" or "Morning". These scenes then control mutliple lights, alarms and other devices. Maybe that approach would help you too.

Enjoy your vera...
Developer of Plugins: Virtual Switch, Variable Container, Popcorn Hour Remote, Vacation Ghost. => PLUGINS HAVE BEEN UNPUBLISHED BY ME.

Offline Gilles75

  • Newbie
  • *
  • Posts: 5
  • Karma: +0/-0
Re: HowTo: Aeon Labs MiniMote fully functional Scene Controller in UI5!
« Reply #44 on: August 18, 2012, 09:35:37 am »
It work's fine

just one more point for the setup , I had to add 5 variables to get the all four upper buttons to work ...
-- variable 241 = 1
-- variable 242 = 1
-- variable 243 = 1
-- variable 244 = 1
-- variable 250 = 0
then use the "poll now" and press "learn" for three second (twice) to make it works
  http://www.pepper1.net/zwavedb/device/27

best regards