Feature Request: Extra custom state for occupancy

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

Feature Request: Extra custom state for occupancy

Hey

Would it be possible to add an extra custom state for 'Occupancy' being either true or false, and this be set by adding an extra setting in the device config to compare against how long the lastchanged timer is. Eg If the defined timeout is 10 mins and the last change timer is 7 mins then the occupancy custom state would show as true. If the last change time was 11 mins then it would show as false.

I can currently do this using a combination of variables, virtual devices and action groups.. but frankly it's a lot of faf and something like this built into the plugin would be a heck of a lot easier. (And yes I appreciate that it's not true occupancy detection, but it's a good enough approximation and works well enough for my needs)

Check out my amazing mockups. I bet you thought they were the real thing!
Attachments
dsc custom state.png
dsc custom state.png (24.88 KiB) Viewed 1589 times
dsc config .png
dsc config .png (78.72 KiB) Viewed 1589 times

Computer says no.

Posted on
Sat May 07, 2022 8:00 am
FlyingDiver offline
User avatar
Posts: 7222
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Feature Request: Extra custom state for occupancy

You could do that with Occupatum now, I think.


Sent from my iPhone using Tapatalk

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

Posted on
Sat May 07, 2022 7:00 pm
Monstergerm offline
Posts: 274
Joined: Sep 01, 2009

Re: Feature Request: Extra custom state for occupancy

Hi FlyingDiver,
Occupatum sounds like a great plugin for this purpose. However, in its current form it only shows as available devices: Insteon motions sensors, Insteon water leak sensors and Ping Sensors (from Ping plugin).

Can you make your plugin also support DSC Motion sensors?

Also, I noticed the Occupatum plugin is already programmed to run only under Python 3. I got it to run with the current Python version 2.7 and Indigo 2021.2.0 by changing the Server API version back to 2.0 and by making changes to log string formatting.

Posted on
Sat May 07, 2022 9:02 pm
FlyingDiver offline
User avatar
Posts: 7222
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Feature Request: Extra custom state for occupancy

You should have downloaded the current plugin store release, not the pre-release Python3 version.

You probably also need to use the Masquerade plugin to make on/off sensor devices from the DSC sensor states.


Sent from my iPhone using Tapatalk

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

Posted on
Sat May 07, 2022 11:50 pm
durosity offline
User avatar
Posts: 4320
Joined: May 10, 2012
Location: Newcastle Upon Tyne, Ye Ol' England.

Re: Feature Request: Extra custom state for occupancy

Ah I wasn’t aware of this plugin! I shall have a look!


Sent from my iPhone using Tapatalk Pro

Computer says no.

Posted on
Sat May 07, 2022 11:52 pm
durosity offline
User avatar
Posts: 4320
Joined: May 10, 2012
Location: Newcastle Upon Tyne, Ye Ol' England.

Re: Feature Request: Extra custom state for occupancy

FlyingDiver wrote:
You probably also need to use the Masquerade plugin to make on/off sensor devices from the DSC sensor states.


Is there any way of getting it to run directly from the indigo state? I’ve got about 50 zones, so 50 masquerade devices then 50 Occupasuun is quite a lot!

Computer says no.

Posted on
Sun May 08, 2022 8:40 am
FlyingDiver offline
User avatar
Posts: 7222
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Feature Request: Extra custom state for occupancy

durosity wrote:
Is there any way of getting it to run directly from the indigo state? I’ve got about 50 zones, so 50 masquerade devices then 50 Occupasuun is quite a lot!


50 DSC zones? I would think that only the motion sensor zones would make sense for occupancy sensors. And you only need one Occupatum device for each “area”, which can aggregate multiple sensors as needed. I would be shocked if you actually needed more than a dozen or so.

In any case, Occupatum only works with on/off sensors, and Masquerade was specifically written to create those as needed. I’m not going to duplicate that code into multiple plugins.

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

Posted on
Sun May 08, 2022 2:32 pm
durosity offline
User avatar
Posts: 4320
Joined: May 10, 2012
Location: Newcastle Upon Tyne, Ye Ol' England.

Re: Feature Request: Extra custom state for occupancy

FlyingDiver wrote:
durosity wrote:
. I would be shocked if you actually needed more than a dozen or so. .


Valid point, I shall have a play and see if I can make a usable setup! Thanks for the idea!

Computer says no.

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

Re: Feature Request: Extra custom state for occupancy

FlyingDiver wrote:
You probably also need to use the Masquerade plugin to make on/off sensor devices from the DSC sensor states.


I've run into the same issue as Monstergerm, however I've set up a Masquerade device to mirror a DSC zone (which works and shows on/off depending on if the zone is open/closed) but that device doesn't appear as an option in Occupatum.

I've tried all 3 'Sensor Types' in the Masquerade config but to no avail.

Here's a device output of the DSC Zone in case it helps;

Code: Select all
batteryLevel : None
buttonGroupCount : 0
configured : True
description : DSC Zone 30 - Wired
deviceTypeId : alarmZone
displayStateId : state
displayStateImageSel : Closed
displayStateValRaw : closed
displayStateValUi : closed
enabled : True
energyAccumBaseTime : None
energyAccumTimeDelta : None
energyAccumTotal : None
energyCurLevel : None
errorState :
folderId : 1730343820
globalProps : MetaProps : (dict)
     com.frightideas.indigoplugin.dscAlarm : (dict)
          occupancyGroup : 0 (integer)
          var : None (empty)
          zoneLogChanges : true (bool)
          zoneNumber : 30 (string)
          zonePartition : 1 (string)
          zoneType : zoneTypeWindow (string)
id : 1776005501
lastChanged : 2022-05-09 00:09:04
lastSuccessfulComm : 2022-05-09 00:09:04
model : Alarm Zone
name : Ensuite - Window Sensor
ownerProps : com.frightideas.indigoplugin.dscAlarm : (dict)
     occupancyGroup : 0 (integer)
     var : None (empty)
     zoneLogChanges : true (bool)
     zoneNumber : 30 (string)
     zonePartition : 1 (string)
     zoneType : zoneTypeWindow (string)
pluginId : com.frightideas.indigoplugin.dscAlarm
pluginProps : emptyDict : (dict)
protocol : Plugin
remoteDisplay : True
sharedProps : com.indigodomo.indigoserver : (dict)
states : States : (dict)
     LastChangedShort : 21m (string)
     LastChangedTimer : 21 (integer)
     bypass : nobypass (string)
     bypass.bypassed : false (bool)
     bypass.nobypass : true (bool)
     state : closed (string)
     state.closed : true (bool)
     state.open : false (bool)
     state.tripped : false (bool)
subModel :
subType :
supportsAllLightsOnOff : False
supportsAllOff : False
supportsStatusRequest : False
version : None
Attachments
Screenshot 2022-05-09 at 00.07.20.png
Screenshot 2022-05-09 at 00.07.20.png (154.25 KiB) Viewed 1429 times
Screenshot 2022-05-08 at 23.58.47.png
Screenshot 2022-05-08 at 23.58.47.png (91.14 KiB) Viewed 1429 times

Computer says no.

Posted on
Sun May 08, 2022 10:09 pm
FlyingDiver offline
User avatar
Posts: 7222
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Feature Request: Extra custom state for occupancy

Hmmm. I think that might be a bug in Occupatum. Can you open a GitHub issue for that? I’ll take a look when I get home. We’re on the road from Haifa to Jerusalem today.

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

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

Re: Feature Request: Extra custom state for occupancy

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

Since many of us have DSC alarm systems with motion sensors I thought about integrating them in the Occupatum plugin. I made some minor changes to support DSC Alarm Motion Sensor zones and added a few other minor updates. So no need to first Masquerade those motion zone devices. Just make sure that the DSC motion sensor device in the DSC plugin is using the "Motion" attribute.

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.

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 8 guests