Masquerade Plugin

Posted on
Thu Dec 31, 2020 3:59 pm
dduff617 offline
Posts: 659
Joined: Jul 05, 2006
Location: Massachusetts, USA

Treat IOLinc as an On/Off sensor device

I have a bunch of door sensors on doors on my house that have simple behavior that they are On when open and Off when closed. I also have two garage doors hooked to IOLincs. I'd like to encapsulate the IOLincs so they behave like the other sensors and ideally be able to include these encapsulated devices in a Device Group.

I'm encouraged by the one-line summary of Masquerade plugin, which states "This plugin allows non-sensor devices (IOLincs, Alarm zones, etc) [to] look like Sensor devices." Sounds pretty close to what I'm after... When I try to create a device using the plugin (example: On/Off Sensor Device), the first thing it asks me is to select a plugin. But my IOLinc devices are "native" Indigo devices (no plugin) - so I'm not sure how to proceed.

Help/advice appreciated.

Posted on
Thu Dec 31, 2020 4:27 pm
FlyingDiver offline
User avatar
Posts: 7189
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Masquerade Plugin

Well, I can tell you this. The original version of the plugin had support for all the native Indigo device types (Z-Wave, Insteon, etc). Somewhere around version 0.1.0 I took that out. I have no idea why. I can't find anything in this thread or GitHub that documents why. And that was four years ago, so I have no memory of actually doing it. There must have been a reason, but for the life of me I can't remember it.

Getting old sucks.

I'll go back and look at the old code and see what it would take to restore it.

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

Posted on
Thu Dec 31, 2020 4:30 pm
dduff617 offline
Posts: 659
Joined: Jul 05, 2006
Location: Massachusetts, USA

Re: Masquerade Plugin

Thanks for the quick response! Glad to know I wasn't missing something obvious.

It seemed a bit mysterious that there was (as far as i could find) no mention of "IOLinc" anywhere in this thread beyond the first post.

Posted on
Mon Feb 08, 2021 2:16 pm
FlyingDiver offline
User avatar
Posts: 7189
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Masquerade Plugin


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

Posted on
Mon Aug 02, 2021 1:26 am
Bildhauer offline
Posts: 160
Joined: Sep 30, 2019
Location: 22113 Oststeinbek (near Hamburg), Germany

Re: Bug Reports and Feature Requests

Hello setting up an humidity.ui I'm facing the following errors:

Code: Select all
Masquerade Error                Error in plugin execution ServerReplacedElem:

Traceback (most recent call last):
  File "plugin.py", line 169, in deviceUpdated
  File "/Library/Application Support/Perceptive Automation/Indigo 2021.1/IndigoPluginHost.app/Contents/Resources/PlugIns/plugin_base.py", line 1278, in deviceUpdated
  File "plugin.py", line 64, in deviceStartComm
  File "plugin.py", line 212, in updateDevice
ValueError: invalid literal for float(): 62 %


Thanks in advance for your suppoer.

Best regards

Bildhauer

Posted on
Mon Aug 02, 2021 1:34 am
FlyingDiver offline
User avatar
Posts: 7189
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Bug Reports and Feature Requests

Bildhauer wrote:
Hello setting up an humidity.ui I'm facing the following errors:

Code: Select all
Masquerade Error                Error in plugin execution ServerReplacedElem:

Traceback (most recent call last):
  File "plugin.py", line 169, in deviceUpdated
  File "/Library/Application Support/Perceptive Automation/Indigo 2021.1/IndigoPluginHost.app/Contents/Resources/PlugIns/plugin_base.py", line 1278, in deviceUpdated
  File "plugin.py", line 64, in deviceStartComm
  File "plugin.py", line 212, in updateDevice
ValueError: invalid literal for float(): 62 %



That's a Masquerade plugin error. This is the MyQ forum. Moving it.

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

Posted on
Mon Aug 02, 2021 1:38 am
FlyingDiver offline
User avatar
Posts: 7189
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Masquerade Plugin

You can't use humidity.ui, it's not a valid float number to convert. You need to use just humidity.

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

Posted on
Mon Apr 25, 2022 11:48 pm
srkinard offline
Posts: 320
Joined: Apr 10, 2016
Location: Austin, Texas

Re: Bug Reports and Feature Requests

FlyingDiver wrote:
That's a Masquerade plugin error. This is the MyQ forum. Moving it.


Hey Joe...seems like the URL in the About Masquerade v0.3.2 in the plugin and the Get Support link in the plugin store both link to the MyQ forum, not this one.

I was looking up something to see if Masquerade could do it and the links carried me to the MyQ forum.

Just FYI

Thanks
Ross

Posted on
Tue Apr 26, 2022 3:00 am
FlyingDiver offline
User avatar
Posts: 7189
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Masquerade Plugin

Will fix.

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

Posted on
Wed May 11, 2022 5:28 am
FlyingDiver offline
User avatar
Posts: 7189
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Indigo 2022.1 release


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

Posted on
Sun Sep 18, 2022 2:22 pm
Londonmark offline
Posts: 509
Joined: Feb 29, 2012

Re: Masquerade Plugin

Hi. I have a virtual device called 'Mark home' which gets switched on and off via HomeKit according to whether I am home or not. I want to use it in Occupatum so have set up a Masquerade device to make it show as a motion sensor. But nothing happens...

Am mystified... I've tried leaving the match string empty and tried including it. I manually switch on and off the source device, but the masquerade device does nothing at all.

What am I doing wrong?
Attachments
Screenshot 2022-09-18 at 21.20.30.png
Screenshot 2022-09-18 at 21.20.30.png (293.52 KiB) Viewed 2177 times

Posted on
Sun Sep 18, 2022 2:32 pm
FlyingDiver offline
User avatar
Posts: 7189
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Masquerade Plugin

The onOffState of a virtual device is only usable when you have "Supports Status" checked, AND your on/off action groups set the status variable's value appropriately.
Attachments
Screen Shot 2022-09-18 at 4.32.19 PM.png
Screen Shot 2022-09-18 at 4.32.19 PM.png (231.9 KiB) Viewed 2174 times

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

Posted on
Sun Sep 18, 2022 2:37 pm
FlyingDiver offline
User avatar
Posts: 7189
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Masquerade Plugin

And then use "True" as the match string, since the state is actually a boolean.

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

Posted on
Mon Sep 19, 2022 2:47 am
Londonmark offline
Posts: 509
Joined: Feb 29, 2012

Re: Masquerade Plugin

That works - thanks. Was literally the next thing I was going to try but then though better to ask. Will be braver next time...

Posted on
Thu Aug 10, 2023 6:48 am
durosity offline
User avatar
Posts: 4320
Joined: May 10, 2012
Location: Newcastle Upon Tyne, Ye Ol' England.

Re: Masquerade Plugin

Howdy! I'm trying to use Masquerade to publish an on/off relay to Occupatum. I can get the Masquerade plugin to update its state from 0 to 1 depending on the on/off state of the device, but the Occupatum device doesn't follow its changes. Now I think it's because in the device details the On State isn't updating, but I can't find any way to get it to update, nor am I 100% sure that this is what would mark that room as occupied in Occupatum.

Here's the device output:

Code: Select all
10 Aug 2023 at 13:26:14
   Script                          address :
allowOnStateChange : False
allowSensorValueChange : False
batteryLevel : None
buttonGroupCount : 0
configured : True
description :
deviceTypeId : masqValueSensor
displayStateId : sensorValue
displayStateImageSel : NoImage
displayStateValRaw : 1.0
displayStateValUi : 1.000000
enabled : True
energyAccumBaseTime : None
energyAccumTimeDelta : None
energyAccumTotal : None
energyCurLevel : None
errorState :
folderId : 231565974
globalProps : MetaProps : (dict)
     com.flyingdiver.indigoplugin.masquerade : (dict)
          SupportsOnState : true (bool)
          SupportsSensorValue : true (bool)
          SupportsStatusRequest : false (bool)
          baseDevice : 1209817393 (string)
          deviceClass : plugin (string)
          devicePlugin : nl.rjdekok.indigoplugin.RFXCOM (string)
          masqSensorSubtype : Generic (string)
          masqState : onOffState (string)
          matchString :  (string)
          reverse : false (bool)
id : 1340321052
lastChanged : 2023-08-10 13:13:50
lastSuccessfulComm : 2023-08-10 13:13:50
model : Value Sensor Device
name : Garage - Occupied Lock Masquerade
onState : False
ownerProps : com.flyingdiver.indigoplugin.masquerade : (dict)
     SupportsOnState : true (bool)
     SupportsSensorValue : true (bool)
     SupportsStatusRequest : false (bool)
     baseDevice : 1209817393 (string)
     deviceClass : plugin (string)
     devicePlugin : nl.rjdekok.indigoplugin.RFXCOM (string)
     masqSensorSubtype : Generic (string)
     masqState : onOffState (string)
     matchString :  (string)
     reverse : false (bool)
pluginId : com.flyingdiver.indigoplugin.masquerade
pluginProps : emptyDict : (dict)
protocol : Plugin
remoteDisplay : True
sensorValue : 1.0
sharedProps : com.indigodomo.indigoserver : (dict)
states : States : (dict)
     onOffState : off (on/off bool)
     sensorValue : 1.000000 (real)
subModel :
subType :
supportsAllLightsOnOff : False
supportsAllOff : False
supportsOnState : True
supportsSensorValue : True
supportsStatusRequest : False
version : None


Here's the print out of the device itself (although I have tried it with other on/off devices too)

Code: Select all
10 Aug 2023 at 13:46:27
   Script                          address : 000000
batteryLevel : None
buttonConfiguredCount : 0
buttonGroupCount : 0
configured : True
description :
deviceTypeId : EMW100Appliance
displayStateId : onOffState
displayStateImageSel : PowerOn
displayStateValRaw : True
displayStateValUi : on
enabled : True
energyAccumBaseTime : None
energyAccumTimeDelta : None
energyAccumTotal : None
energyCurLevel : None
errorState :
folderId : 231565974
globalProps : MetaProps : (dict)
     nl.rjdekok.indigoplugin.RFXCOM : (dict)
          address : 000000 (string)
          unit : 1 (string)
id : 1209817393
lastChanged : 2023-08-10 13:13:50
lastSuccessfulComm : 2023-08-10 13:13:50
ledStates : []
model : EMW100 Appliance
name : Garage - Occupancy Hold
onState : True
ownerProps : nl.rjdekok.indigoplugin.RFXCOM : (dict)
     address : 000000 (string)
     unit : 1 (string)
pluginId : nl.rjdekok.indigoplugin.RFXCOM
pluginProps : emptyDict : (dict)
protocol : Plugin
remoteDisplay : True
sharedProps : com.indigodomo.indigoserver : (dict)
states : States : (dict)
     onOffState : on (on/off bool)
subModel :
subType :
supportsAllLightsOnOff : False
supportsAllOff : False
supportsOnState : True
supportsStatusRequest : True
version : None


I've attached a couple of screenshots of the states and config in case they help. Also I've tried it with different device types (such as a z-wave relay) but with the same results. I suspect I've just not got something configured correctly, but I'm drawing a blank on what that is. Any ideas?
Attachments
device config.png
device config.png (43.83 KiB) Viewed 1380 times
device state.png
device state.png (32.39 KiB) Viewed 1380 times

Computer says no.

Who is online

Users browsing this forum: No registered users and 4 guests