Author Topic: New Plugin: Deus Ex Machina  (Read 25351 times)

Offline beowulfe

  • Newbie
  • *
  • Posts: 6
  • Karma: +0/-0
New Plugin: Deus Ex Machina
« on: July 28, 2012, 01:13:44 am »
I've created a new plugin that is now available in Mios. If anyone tries it out, I'd love to hear feedback.

Deus Ex Machina is a plugin for the MiCasaVerde Vera home automation system. It takes over your house while you're away on vacation by creating a ghost that moves from room to room, turning on and off lights. Simply specify the lights you want to have controlled by the plugin, specify a "Lights Out" time when lights will begin to turn off, and come sundown Deus Ex Machina will take over.

How It Works

Once Deus Ex Machina is activated, or the following Sundown occurs, it picks a random light from its configured list of lights, and switches its state. Deus Ex Machina continues doing this at random intervals between 5 and 30 minutes until the Lights Off time or Sunrise. When that happens, the same pattern is followed, however a random light in an On state is chosen to turn Off. Once all lights are off, Deus Ex Machina goes to sleep until the next Sundown.

Offline beowulfe

  • Newbie
  • *
  • Posts: 6
  • Karma: +0/-0
Re: New Plugin: Deus Ex Machina
« Reply #1 on: July 28, 2012, 01:15:32 am »
Also, I can't post external links, but there's a GitHub repository if anyone wants to see the code, file bugs, or contribute. Search for DeusExMachina on GitHub. You'll find it under my name, beowulfe.

Offline Trotsky40

  • Full Member
  • ***
  • Posts: 125
  • Karma: +4/-0
Re: New Plugin: Deus Ex Machina
« Reply #2 on: July 28, 2012, 01:23:37 am »
@beowulfe

Great app. I have been trying it out tonight and it works well. 

The only request is to enable it so it can be added to scenes. Right now it can only be activated through the settings menu. I currently use Google Calendar Switch to activate a "vacation" scene which turns down my thermostat. I would love to include this plug-in in that scene as well.
Vera Plus- A wide variety of z-wave devices, a few zigbee devices, Sonos, and Phillips Hue bulbs via Hue Bridge.

Offline beowulfe

  • Newbie
  • *
  • Posts: 6
  • Karma: +0/-0
Re: New Plugin: Deus Ex Machina
« Reply #3 on: July 28, 2012, 01:44:16 am »
That's a good suggestion @Trotsky40 -- I'll get that added!

Offline intveltr

  • Hero Member
  • *****
  • Posts: 1683
  • Karma: +93/-5
Re: New Plugin: Deus Ex Machina
« Reply #4 on: July 28, 2012, 06:30:46 am »
Nice plugin (and nice name too). I'll use it on my next holiday :)
HomeWave is available in the App Store!  Turn your iPhone/iPad into an easy-to-use remote control for Vera.

Offline Trotsky40

  • Full Member
  • ***
  • Posts: 125
  • Karma: +4/-0
Re: New Plugin: Deus Ex Machina
« Reply #5 on: July 28, 2012, 12:44:29 pm »
@beowulfe

I did have a question about the time off setting. In the configure tab, there is a setting for "enter time (after sunset) to begin turing off lights". The default was set to 23:59 (I assumed this meant 11:59 pm) and changed it to 22:30 (10:30pm). Last night after 10:30pm the plug-in continued to run...

I looked in the advanced tab and saw the 'Lightsouttime". It appeared to show a very large number in seconds, so I thought maybe the setting on the cofigure tab wasn't a "clock" time (i.e. 10:30pm) but the number of hours and minutes after sunset (i.e. 22 hours and 30 minutes after sunset). To test this I set the configure tab to 00:00 and the "Lightsoutime" went to zero. So far so good. Then I set the configure tab to 00:01 expecting the "Lightsouttime" to be 60 but instead it came back at 60,000 (about 16 hours and 40 minutes)

Is this setting not working correctly or am I misinterpretting something?
Vera Plus- A wide variety of z-wave devices, a few zigbee devices, Sonos, and Phillips Hue bulbs via Hue Bridge.

Offline beowulfe

  • Newbie
  • *
  • Posts: 6
  • Karma: +0/-0
Re: New Plugin: Deus Ex Machina
« Reply #6 on: July 28, 2012, 03:08:47 pm »
It is meant to be an absolute time. Looking over the code again, I think there's a bug around times before midnight. I'll get a new release out soon with that fixed and the scene support.

Offline Aaron

  • Hero Member
  • *****
  • Posts: 1984
  • Karma: +61/-193
Re: New Plugin: Deus Ex Machina
« Reply #7 on: July 29, 2012, 04:35:18 pm »
beowulfe
I just installed your plugin. When I open the config the only Device is shows is one zwave device - none of my Insteon devices, or my zwave lock or thermostat?
I use Altsteon plugin for Insteon - can you make it work with Alsteon devices?

Also, are you planning to have options for lights (on, off, dim level) and sunrise/sunset?
... it would be great to see an all-in-one plugin that can simulate occupancy.

thx

Offline frichter09

  • Sr. Member
  • ****
  • Posts: 397
  • Karma: +0/-1
Re: New Plugin: Deus Ex Machina
« Reply #8 on: July 29, 2012, 07:41:04 pm »
Thank you very much for this great plugin!
Excellent idea.
My wife and I are actually going on vacation soon so I will try it out.

One question, is there an option to exclude certain lights from coming on though?
Flo
Vera Lite (1), Kwikset Locks (2), 2Gig-CT30 Thermostat (1), D-Link IP Cam (1), Evolve DM-15 (1), Evolve LRM-15(AS) (4), Evolve LFM-20 (1), Evolve LSM-15 (1), Everspring Sensor (1), Intermatic HA02C (6), Intermatic HA03C (4), Wayne-Dalton HA-03WD (2), MCV Smart Switch (1)

Offline frichter09

  • Sr. Member
  • ****
  • Posts: 397
  • Karma: +0/-1
Re: New Plugin: Deus Ex Machina
« Reply #9 on: July 29, 2012, 07:47:39 pm »
Nevermind... just found it :)
Vera Lite (1), Kwikset Locks (2), 2Gig-CT30 Thermostat (1), D-Link IP Cam (1), Evolve DM-15 (1), Evolve LRM-15(AS) (4), Evolve LFM-20 (1), Evolve LSM-15 (1), Everspring Sensor (1), Intermatic HA02C (6), Intermatic HA03C (4), Wayne-Dalton HA-03WD (2), MCV Smart Switch (1)

Offline beowulfe

  • Newbie
  • *
  • Posts: 6
  • Karma: +0/-0
Re: New Plugin: Deus Ex Machina
« Reply #10 on: July 31, 2012, 12:14:13 am »
@Aaron - the plugin only controls lights right now, so your other z-wave devices won't show up. I'm not too familiar with insteon -- right now the plugin acts on any devices that implement schemas-upnp-org:device:BinaryLight:1. What's the device-type that shows up in the advanced tab for your insteon switches?

I'm not sure what to do with dimmer switches besides on/off. Do you think randomly changing the brightness has any value? What other devices do you think are worthwhile?

Offline Aaron

  • Hero Member
  • *****
  • Posts: 1984
  • Karma: +61/-193
Re: New Plugin: Deus Ex Machina
« Reply #11 on: July 31, 2012, 02:01:42 am »
@Aaron - the plugin only controls lights right now, so your other z-wave devices won't show up. I'm not too familiar with insteon -- right now the plugin acts on any devices that implement schemas-upnp-org:device:BinaryLight:1. What's the device-type that shows up in the advanced tab for your insteon switches?

Altsteon uses:
urn:geektaco-info:device:Dimmer:1

I'm not sure what to do with dimmer switches besides on/off. Do you think randomly changing the brightness has any value? What other devices do you think are worthwhile?
I ask because many of my lights are never 100% on... my main room is usually at 30% in the evening (and off all day long). So, if your intent is to simulate occupancy to deter would-be thieves... the plugin should simulate the occupancy as accurately as possible. Anyone casing the house (e.g.  thieves that are good at thieving) would know something is not right if light pattern is different in any way.

... This is also why lighting changes base on time offsets from sunrise/sunset is necessary - it is more realistic.

Offline Aaron

  • Hero Member
  • *****
  • Posts: 1984
  • Karma: +61/-193
Re: New Plugin: Deus Ex Machina
« Reply #12 on: August 03, 2012, 01:19:41 pm »
beowulfe
can you add support for Altsteon devices?

Offline Handyman

  • Newbie
  • *
  • Posts: 15
  • Karma: +0/-0
Re: New Plugin: Deus Ex Machina
« Reply #13 on: August 08, 2012, 11:35:00 am »
Beowulfe:

Awesome idea - keep up the great work!

Offline resq93

  • Full Member
  • ***
  • Posts: 208
  • Karma: +0/-2
Re: New Plugin: Deus Ex Machina
« Reply #14 on: August 27, 2012, 11:02:24 pm »
That's a good suggestion @Trotsky40 -- I'll get that added!

Has this been added? I currently have a vacation (away) scene that I trigger by enabling a virtual switch. I'd love to be able to enable your plugin from that away scene.

Thanks,