Page 7 of 8

Treat IOLinc as an On/Off sensor device

PostPosted: Thu Dec 31, 2020 3:59 pm
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.

Re: Masquerade Plugin

PostPosted: Thu Dec 31, 2020 4:27 pm
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.

Re: Masquerade Plugin

PostPosted: Thu Dec 31, 2020 4:30 pm
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.

Re: Masquerade Plugin

PostPosted: Mon Feb 08, 2021 2:16 pm
by FlyingDiver

Re: Bug Reports and Feature Requests

PostPosted: Mon Aug 02, 2021 1:26 am
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

Re: Bug Reports and Feature Requests

PostPosted: Mon Aug 02, 2021 1:34 am
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.

Re: Masquerade Plugin

PostPosted: Mon Aug 02, 2021 1:38 am
by FlyingDiver
You can't use humidity.ui, it's not a valid float number to convert. You need to use just humidity.

Re: Bug Reports and Feature Requests

PostPosted: Mon Apr 25, 2022 11:48 pm
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

Re: Masquerade Plugin

PostPosted: Tue Apr 26, 2022 3:00 am
by FlyingDiver
Will fix.

Indigo 2022.1 release

PostPosted: Wed May 11, 2022 5:28 am
by FlyingDiver

Re: Masquerade Plugin

PostPosted: Sun Sep 18, 2022 2:22 pm
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?

Re: Masquerade Plugin

PostPosted: Sun Sep 18, 2022 2:32 pm
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.

Re: Masquerade Plugin

PostPosted: Sun Sep 18, 2022 2:37 pm
by FlyingDiver
And then use "True" as the match string, since the state is actually a boolean.

Re: Masquerade Plugin

PostPosted: Mon Sep 19, 2022 2:47 am
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...

Re: Masquerade Plugin

PostPosted: Thu Aug 10, 2023 6:48 am
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?