Author Topic: Can I set/change modes from a scene?  (Read 2349 times)

Offline sirpinky

  • Sr. Newbie
  • *
  • Posts: 35
  • Karma: +0/-0
Can I set/change modes from a scene?
« on: October 31, 2014, 11:21:39 am »
Hi guys,
I am wondering, is there anyway to change the current preset mode (home, away, night, vacation) from a scene?
Maybe using luup code?

Tell you why, the only reasons I am not using these modes and using my own scenes are:
1. I would like to auto-arm night at 10pm everyday
2. I would like to auto-disarm 7am every morning
3. I would like to auto-disarm if the front door is unlocked using a correct PIN
4. I would like to use a keyfob to control arm, disarm or arm night

Because of the above, I am using scenes to control my alarm system.
If there is a way for me to change the mode from a scene, I would start using these modes which are pretty simple and cool.

I searched everywhere but couldn't find any mention on this.

Thanks in advance,

Offline RexBeckett

  • Master Member
  • *******
  • Posts: 3888
  • Karma: +476/-10
Re: Can I set/change modes from a scene?
« Reply #1 on: November 01, 2014, 05:10:00 am »
House modes are documented here.

The Lua to set the mode is:

Code: [Select]
luup.call_action('urn:micasaverde-com:serviceId:HomeAutomationGateway1', 'SetHouseMode', { Mode=<newmode> }, 0)
Replace <newmode> with values from 1 to 4 where:

          1 = Home
          2 = Away
          3 = Night
          4 = Vacation

Online RichardTSchaefer

  • Master Member
  • *******
  • Posts: 9418
  • Karma: +715/-130
    • RTS Services Plugins
Re: Can I set/change modes from a scene?
« Reply #2 on: November 01, 2014, 02:11:39 pm »
The next version of PLEG also exposes this as an action from the advanced tab of the PLEG device.

Offline Jamr

  • Hero Member
  • *****
  • Posts: 579
  • Karma: +17/-8
    • 007 Systems
Re: Can I set/change modes from a scene?
« Reply #3 on: December 03, 2014, 02:06:38 am »
Hi guys,
I am wondering, is there anyway to change the current preset mode (home, away, night, vacation) from a scene?
Maybe using luup code?

Tell you why, the only reasons I am not using these modes and using my own scenes are:
1. I would like to auto-arm night at 10pm everyday
2. I would like to auto-disarm 7am every morning
3. I would like to auto-disarm if the front door is unlocked using a correct PIN
4. I would like to use a keyfob to control arm, disarm or arm night

Because of the above, I am using scenes to control my alarm system.
If there is a way for me to change the mode from a scene, I would start using these modes which are pretty simple and cool.

I searched everywhere but couldn't find any mention on this.

Thanks in advance,

If you set a scene to change daily at set times, which is what I am assuming you are doing here. If you leave the home for a longer length of time like an extended weekend or a long vacation, won't the scene change your "Vacation" mode and defeat the purpose of the that mode?
How do you plan to overcome this?
Is there a way to set a scene to not change modes if you select a certain mode like vacation mode?

Offline Jamr

  • Hero Member
  • *****
  • Posts: 579
  • Karma: +17/-8
    • 007 Systems
Re: Can I set/change modes from a scene?
« Reply #4 on: December 03, 2014, 03:36:28 am »
House modes are documented here.

The Lua to set the mode is:

Code: [Select]
luup.call_action('urn:micasaverde-com:serviceId:HomeAutomationGateway1', 'SetHouseMode', { Mode=<newmode> }, 0)
Replace <newmode> with values from 1 to 4 where:

          1 = Home
          2 = Away
          3 = Night
          4 = Vacation

Worked great. Thanks.