House Modes Plugin

Just out of curiosity, whey wouldn’t this be built into a future incremental release of UI7 instead of having to rely on a plugin. If GetVera wants to implement House Modes it would make sense to bake this ability into the OS directly.

@mcv.andrei ,

Thanks for your reply,

  1. For the installation of the plugin , I have downloaded the 4 files in my PC and then uploaded to Vera from Vera’s UI, Apps/Install Apps menu , as you described.

I have used the files from the post of mcv.steve dated 10th march 2015

  1. Concerning the scene logic , I want to switch off a smart swith when the mode is changed from Away to Home ( when returning to home) so my mistake as I understand your comment , is that the scene must run the Home mode ( the new house mode after the change AWAY → Home mode ) and not the Away mode ( house mode before the change)

[quote=“gerardosamara, post:22, topic:183306”]@mcv.andrei ,

Thanks for your reply,

  1. For the installation of the plugin , I have downloaded the 4 files in my PC and then uploaded to Vera from Vera’s UI, Apps/Install Apps menu , as you described.

I have used the files from the post of mcv.steve dated 10th march 2015

  1. Concerning the scene logic , I want to switch off a smart swith when the mode is changed from Away to Home ( when returning to home) so my mistake as I understand your comment , is that the scene must run the Home mode ( the new house mode after the change AWAY → Home mode ) and not the Away mode ( house mode before the change)[/quote]

I think it was that you wanted it to run when changed to Home Mode WHILE in Night or Away Mode. You can’t have it run in multiple modes at the same time. Home Mode can be run at night with use of a schedule. Not sure how you can run Home and Away at the same time.

To have the expected behavior , as per last tests , the scene must be setup to run in Any mode ( Home + Away + Night + Vacation selected in the Vera UI for these 2 scenes :

  • Scene 1 : The smart switch is OFF when changing mode from Away to Home
  • Scene 2 : The smartswitch is ON when changing mode from Home to Away

I will try to narrow the Any Mode (Home+Away+Night+Vacation) to a minimum combination of expected mode by the system as this is not normal.

I’m using the house modes plugin to set various equipment on or off depending on Home or Away and also use LUA to run a scene on my Ui5 Vera. I’m not experiencing any issue.

Basically the trigger is house modes plugin going to away mode.
Several sensors are armed and equip is switched off
I run below LUUP code to execute a scene on my other Vera.

luup.inet.wget(“http://IP_ADDRESS:3480/data_request?id=lu_action&serviceId=urn:micasaverde-com:serviceId:HomeAutomationGateway1&action=RunScene&SceneNum=10”, 5, “”, “”)

The second scene does the same thing only uses the plugin going to home mode as a trigger.
Sensors are disarmed and equip switched back on.
Below LUUP is run to execute a scene on my other Vera.

luup.inet.wget(“http://IP_ADDRESS:3480/data_request?id=lu_action&serviceId=urn:micasaverde-com:serviceId:HomeAutomationGateway1&action=RunScene&SceneNum=11”, 5, “”, “”)

I’m unsure why you are encountering issues with the plugin. Do note, by default house modes is set to a 30 second delay before doing anything. This can be changed on the dashboard by clicking the > next to My Modes and scrolling down to where those settings are listed.

To have the expected behavior , as per last tests , the scene must be setup to run in the new mode in the Vera UI :

  • Scene 1 : The smart switch is OFF when changing mode from Away to Home → Scene setup = Run in HOME mode
  • Scene 2 : The smartswitch is ON when changing mode from Home to Away → Scene setup = Run in Away ode

Problem closed

Interesting read

I have a similar problem as gerardosamara:
I want to trigger a scene when going from night to home mode and only in that case. I do not want to run the scene when going from away to home or vacation to home.
Setting up the scene to run only in night mode works if one toggles the house mode through the plugin but it doesn’t if it is toggled outside of it.

For me to setup the scene to run in Home mode now means that the scene will run for the other cases…

I suppose this is due to the delay incurred for the polling when the house mode is not toggled by the plugin itself.

Could scenes be added to the my modes page so that they would trigger just like the switches and sensor without have this delay?

[quote=“anhman, post:27, topic:183306”]Setting up the scene to run only in night mode works if one toggles the house mode through the plugin but it doesn’t if it is toggled outside of it.

For me to setup the scene to run in Home mode now means that the scene will run for the other cases…

I suppose this is due to the delay incurred for the polling when the house mode is not toggled by the plugin itself.[/quote]

The only reason I am using the House mode plugin is because the UI house mode does not offer the possibility to run Luup Code ( when house mode is setup to home ( Desactivate motion detection in Cameras) or to Away/Night mode ( Activate motion detection in Cameras)

This missing feature ( running Luup code) has to be added in the UI house mode by mcv , in my opinion

[quote=“gerardosamara, post:28, topic:183306”][quote=“anhman, post:27, topic:183306”]Setting up the scene to run only in night mode works if one toggles the house mode through the plugin but it doesn’t if it is toggled outside of it.

For me to setup the scene to run in Home mode now means that the scene will run for the other cases…

I suppose this is due to the delay incurred for the polling when the house mode is not toggled by the plugin itself.[/quote]

The only reason I am using the House mode plugin is because the UI house mode does not offer the possibility to run Luup Code ( when house mode is setup to home ( Desactivate motion detection in Cameras) or to Away/Night mode ( Activate motion detection in Cameras)

This missing feature ( running Luup code) has to be added in the UI house mode by mcv , in my opinion[/quote]

Yeah being able to trigger scenes like switches for the house modes would enable us to write luup codes since we can do so in the scenes themselves… I am basically asking for the same thing.

I was wondering… is that polling loop configured via “POLLING_RATE” ? if so, what is the timescale ? ms ? s? mins ?

Thanks :slight_smile:

It’s less than a minute … I think it is in the 15 - 45 second range.
As I recall PLEG POLLS at a faster rate and it uses 15s.

Sorry for digging up such an old thread, but I’m a little confused about something with this plugin.
I recently tried to set up scenes that use the House Modes plugin, watching my alarm system status to set the Vera accordingly. For some reason today, I started receiving notifications that my motion sensors were being triggered as I moved around my apartment. I don’t recall changing anything to do with notifications.
Does the House Modes plugin change anything that would modify notifications? I’m unclear on exactly what the House Modes do, aside from basically being a variable with some icons to reflect which mode the Vera is in.

Thanks in advance.

House Modes plugin just adds the ability to use HM as trigger in scenes.
Does not do anything on it;s own, unless used in scenes.

Ok, so it means that I must’ve inadvertently changed the armed status? Does having the sensor “armed” automatically send notifications? Does “disarming” them have any effect on whether or not my scenes with scripts that are triggered by those sensors execute? I’m not sure what else could have changed that would cause the notifications to start.
Thanks for your assistance.

I would like to turn the porch light on when I’m in away mode but only if its sunset. I figured I could do this with the House Modes Plugin. But when I go to restrict the trigger to a certain time I can only select an exact time. There is no selection for sunrise or sunset like when you setup a schedule. Is there another way of doing this?

I would use PLEG, otherwise, you may need multiple scenes, some virtual switches, and a combination switch.

I’ve never used PLEG and after watching an introductory video on PLEG I don’t think it’s for me. I just don’t understand why something as simple as turning on a light in Away mode at sunset should be so complicated to do.

[quote=“packman, post:37, topic:183306”]I just don’t understand why something as simple as turning on a light in Away mode at sunset should be so complicated to do.[/quote]For Vera, that’s just the way it is. Here is one answer to your question (I’m sure there are other approaches and you’ve already ruled out PLEG):

  1. Get the Day or Night plugin: http://forum.micasaverde.com/index.php?topic=12806.0
  2. Use it to trigger a scene that turns on the lights at sunset (can also set an offset if desired)
  3. Make the scene conditional based on the state of the house mode. See the conditional scene examples here: http://forum.micasaverde.com/index.php?topic=18679.0 And to get the house mode into lua for the conditional scene, you can use this:
local mode = luup.attr_get "Mode"

Edit - easier way to get similar functionality with no plugins, no PLEG:

  1. make a scene that turns on the light and runs every 5 minutes or so
  2. add the following lua code to the scene to make it conditional on both night and away mode
  3. done

local mode = luup.attr_get "Mode" return (mode == "2" and luup.is_night())
Now, within 5 minutes of both Away mode and night, the light will turn on.

PLEG makes it simpler - you set up 3 triggers (sunset, house mode, switch status), and create 2 conditions, 1 for turning it on, and one for turning it off. You then create your switch on action and switch off action. Even if Vera restarts, PLEG will still run the actions.

I have my exterior lights set to come one at sunset minus x minutes. x = 0 if the skies are clear, 15 min. if overcast, and 30 min. if raining.

My porch light comes on, day or night, when the front door is open.

All this can be done with scenes but scenes are limited to OR logic whereas PLEG allows AND logic.

Anyone getting a message from this plugin “Changing the Mode, please wait 15 seconds!” It doesn’t go away on mine. Vera Plus, latest Firmware UI7