New Plugin - Occupatum - Occupancy/Presence detection

Posted on
Wed May 11, 2022 7:56 pm
Monstergerm offline
Posts: 274
Joined: Sep 01, 2009

Re: New Plugin - Occupatum - Occupancy/Presence detection

I was not aware of this plugin at all. Great plugin for handling occupancy issues.

Since many of us have DSC alarm systems with motion sensors and are using the DSC plugin, I thought about integrating those sensors in the Occupatum plugin. I made some minor changes to support DSC Alarm Motion Sensor zones and added a few other minor updates.

Of note: I made the changes first to v0.0.4 plugin under Python 2.7 and tested this version. Thanks to Durosity for also testing the plugin. I then transferred those changes to v2022.0.0 under Python 3 but did not test this version since I have not yet installed the latest Indigo app. This version was uploaded to Github for review.

Posted on
Thu May 19, 2022 2:24 am
MarcoGT offline
Posts: 1091
Joined: Sep 11, 2014
Location: Germany

Re: New Plugin - Occupatum - Occupancy/Presence detection

I am facing a problem; I am trying to add a new zone (the first one) and the device list is empty; I get this error:

Code: Select all
19. May 2022 at 10:22:53
   Occupatum Error                 Error in plugin execution GetUiDynamicList:

  File "plugin.py", line 298, in sensorDevices
type: name 'unicode' is not defined



It works if I replace

Code: Select all
unicode


with

Code: Select all
str

Posted on
Thu May 19, 2022 3:05 am
FlyingDiver offline
User avatar
Posts: 7215
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: New Plugin - Occupatum - Occupancy/Presence detection

That’s a bug. Put this in GitHub please.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Fri May 20, 2022 5:28 pm
durosity offline
User avatar
Posts: 4320
Joined: May 10, 2012
Location: Newcastle Upon Tyne, Ye Ol' England.

Re: New Plugin - Occupatum - Occupancy/Presence detection

Amazingly handy plugin, it's simplified a lot of things for me! Would it be possible for you to add a device state that'd show the countdown timer for each device's current state? Ideally if possible it'd show one state for total seconds and one showing for whole minutes.

Computer says no.

Posted on
Fri May 20, 2022 5:35 pm
FlyingDiver offline
User avatar
Posts: 7215
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: New Plugin - Occupatum - Occupancy/Presence detection

durosity wrote:
Amazingly handy plugin, it's simplified a lot of things for me! Would it be possible for you to add a device state that'd show the countdown timer for each device's current state? Ideally if possible it'd show one state for total seconds and one showing for whole minutes.


Not as it's currently designed, no. The timers are all done with Python Timer objects, so the plugin doesn't get any updates on the remaining duration of the timers until it actually expires and triggers the callback. That code is much simpler than having to loop and handle the countdowns in my code.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Sat May 21, 2022 9:48 am
ryanbuckner offline
Posts: 1080
Joined: Oct 08, 2011
Location: Northern Virginia

Re: New Plugin - Occupatum - Occupancy/Presence detection

This looks like a great plugin. If I were to be starting fresh with no devices , what are some of the hardware / sensor / trigger solutions that have worked best with this plugin?

Also, can devices that report lat / long be used ?

Posted on
Sat May 21, 2022 9:54 am
FlyingDiver offline
User avatar
Posts: 7215
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: New Plugin - Occupatum - Occupancy/Presence detection

ryanbuckner wrote:
This looks like a great plugin. If I were to be starting fresh with no devices , what are some of the hardware / sensor / trigger solutions that have worked best with this plugin?

Also, can devices that report lat / long be used ?


The plugin only uses "sensor" devices - something that reports true/false. All the logic in the plugin is boolean based on the sensors. Motion sensors obviously. Geofencing would require something external to the plugin to report a true/false value, such as a script that populates a variable which is then made available using a Virtual Device. The Masquerade plugin would be useful for converting a non-sensor device state to the sensor device needed.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Sat May 21, 2022 12:52 pm
FlyingDiver offline
User avatar
Posts: 7215
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: New Plugin - Occupatum - Occupancy/Presence detection

durosity wrote:
Amazingly handy plugin, it's simplified a lot of things for me! Would it be possible for you to add a device state that'd show the countdown timer for each device's current state? Ideally if possible it'd show one state for total seconds and one showing for whole minutes.


This is being tracked in https://github.com/FlyingDiver/Indigo-O ... m/issues/6

You might want to chime in there.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Sat May 21, 2022 1:35 pm
rbdubz3 offline
User avatar
Posts: 224
Joined: Sep 18, 2016
Location: San Diego, CA

Re: New Plugin - Occupatum - Occupancy/Presence detection

Nice work - i'm catching up on this new plugin - always thought a solid Occupancy plugin was needed in Indigo! I've implemented similar capabilities in a brute force manner - using a mix of Triggers, Timers, and custom scripts. These work pretty well, but each time I go to add a new one or make any change it's a bit of a hassle remembering all of the touch points.

Any chance you can give a run down of what's all baked into the plugin. Sounds like Occupatum manages the timers and sensor triggers - any other goodies in there?

I automate because I am lazy :D - My Plugins: https://forums.indigodomo.com/viewforum.php?f=309

Posted on
Sat May 21, 2022 1:48 pm
FlyingDiver offline
User avatar
Posts: 7215
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: New Plugin - Occupatum - Occupancy/Presence detection

rbdubz3 wrote:
Any chance you can give a run down of what's all baked into the plugin. Sounds like Occupatum manages the timers and sensor triggers - any other goodies in there?


There's really three parts. Boolean logic to combine multiple sensors into one "zone", with any/all conditions. Delay timers for both on and off transitions, and then triggers when a zone becomes occupied or unoccupied. There's also a force off delay option, mainly for zones with any "any change" sensor logic.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Sat May 21, 2022 3:06 pm
rbdubz3 offline
User avatar
Posts: 224
Joined: Sep 18, 2016
Location: San Diego, CA

Re: New Plugin - Occupatum - Occupancy/Presence detection

Thanks for the details Joe. Definitely a big improvement over setting up all the various pieces manually.

One aspect i've customized via scripts is related to definition of 'Occupied'. I use the occupancy for Climate Control features - basically turning on/off Ceiling Fans and/or Space Heaters. For these features, I'm not wanting to turn these the devices ON unless there is a good confidence level that someone is 'really' occupying the room and not just quickly in-n-out. I've tried a couple of different implementations for determining 'Occupied':
1) number of motion sensor triggers over a time interval - i.e. 5 triggers in 10 min
2) total number of seconds with motion 'ON' over a time interval - such as 120 seconds over a 10 min interval

I'm curious for feedback if the 'Occupancy Detection' algos mentioned above are of interest. Maybe already on the roadmap ;)

I automate because I am lazy :D - My Plugins: https://forums.indigodomo.com/viewforum.php?f=309

Posted on
Sat May 21, 2022 3:18 pm
FlyingDiver offline
User avatar
Posts: 7215
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: New Plugin - Occupatum - Occupancy/Presence detection

The plugin does simultaneous input logic, but I've never really looked into sequential or cumulative inputs. If you have suggestions on how that should work, please open an issue on the GitHub page for the plugin.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Sat May 21, 2022 3:35 pm
rbdubz3 offline
User avatar
Posts: 224
Joined: Sep 18, 2016
Location: San Diego, CA

Re: New Plugin - Occupatum - Occupancy/Presence detection

Sure - will-do.. BTW I don't claim to be an expert on these algos, just some stuff I've tinkered with in my house that's added value

I automate because I am lazy :D - My Plugins: https://forums.indigodomo.com/viewforum.php?f=309

Posted on
Sun May 22, 2022 11:03 am
FlyingDiver offline
User avatar
Posts: 7215
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: New Plugin - Occupatum - Occupancy/Presence detection

durosity wrote:
Amazingly handy plugin, it's simplified a lot of things for me! Would it be possible for you to add a device state that'd show the countdown timer for each device's current state? Ideally if possible it'd show one state for total seconds and one showing for whole minutes.


Try this test version: https://github.com/FlyingDiver/Indigo-O ... states.zip

States are just float numbers for remaining timer value. If you want minutes and seconds, use a script to put them in variables.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Sat May 28, 2022 12:40 pm
FlyingDiver offline
User avatar
Posts: 7215
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: New Plugin - Occupatum - Occupancy/Presence detection

Still waiting on feedback on the test version I posted last weekend.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Who is online

Users browsing this forum: No registered users and 3 guests