Masquerade Plugin

dduff617
Posts: 662
Joined: Wed Jul 05, 2006 10:50 am
Location: Massachusetts, USA

Treat IOLinc as an On/Off sensor device

Post by dduff617 »

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.
User avatar
FlyingDiver
Posts: 7323
Joined: Sat Jun 07, 2014 10:36 am
Location: Southwest Florida, USA

Re: Masquerade Plugin

Post by FlyingDiver »

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
dduff617
Posts: 662
Joined: Wed Jul 05, 2006 10:50 am
Location: Massachusetts, USA

Re: Masquerade Plugin

Post by dduff617 »

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.
User avatar
FlyingDiver
Posts: 7323
Joined: Sat Jun 07, 2014 10:36 am
Location: Southwest Florida, USA

Re: Masquerade Plugin

Post by FlyingDiver »

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177
Bildhauer
Posts: 160
Joined: Mon Sep 30, 2019 2:10 pm
Location: 22113 Oststeinbek (near Hamburg), Germany

Re: Bug Reports and Feature Requests

Post by Bildhauer »

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
User avatar
FlyingDiver
Posts: 7323
Joined: Sat Jun 07, 2014 10:36 am
Location: Southwest Florida, USA

Re: Bug Reports and Feature Requests

Post by FlyingDiver »

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
User avatar
FlyingDiver
Posts: 7323
Joined: Sat Jun 07, 2014 10:36 am
Location: Southwest Florida, USA

Re: Masquerade Plugin

Post by FlyingDiver »

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
srkinard
Posts: 320
Joined: Sun Apr 10, 2016 5:55 pm
Location: Austin, Texas

Re: Bug Reports and Feature Requests

Post by srkinard »

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
User avatar
FlyingDiver
Posts: 7323
Joined: Sat Jun 07, 2014 10:36 am
Location: Southwest Florida, USA

Re: Masquerade Plugin

Post by FlyingDiver »

Will fix.
joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177
User avatar
FlyingDiver
Posts: 7323
Joined: Sat Jun 07, 2014 10:36 am
Location: Southwest Florida, USA

Indigo 2022.1 release

Post by FlyingDiver »

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177
Londonmark
Posts: 513
Joined: Wed Feb 29, 2012 12:57 pm

Re: Masquerade Plugin

Post by Londonmark »

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 2954 times
User avatar
FlyingDiver
Posts: 7323
Joined: Sat Jun 07, 2014 10:36 am
Location: Southwest Florida, USA

Re: Masquerade Plugin

Post by FlyingDiver »

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 2951 times
joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177
User avatar
FlyingDiver
Posts: 7323
Joined: Sat Jun 07, 2014 10:36 am
Location: Southwest Florida, USA

Re: Masquerade Plugin

Post by FlyingDiver »

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
Londonmark
Posts: 513
Joined: Wed Feb 29, 2012 12:57 pm

Re: Masquerade Plugin

Post by Londonmark »

That works - thanks. Was literally the next thing I was going to try but then though better to ask. Will be braver next time...
User avatar
durosity
Posts: 4392
Joined: Thu May 10, 2012 3:21 pm
Location: Newcastle Upon Tyne, Ye Ol' England.

Re: Masquerade Plugin

Post by durosity »

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 2157 times
device state.png
device state.png (32.39 KiB) Viewed 2157 times
Computer says no.
Post Reply

Return to “Other Plugins”