Masquerade Plugin

Posted on
Thu Dec 15, 2016 3:43 pm
Ksullivan offline
Posts: 83
Joined: Feb 22, 2014

Re: Masquerade Plugin

Ok thanks Joe I'll play around and see if I can reduce the volume on the russound unit.

Thank you

Keith


Sent from my iPad using Tapatalk

Posted on
Fri Dec 16, 2016 7:00 am
FlyingDiver offline
User avatar
Posts: 7189
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Masquerade Plugin

I just thought of something. If you want to limit the Russound to a max of 25 (half it's normal range), set the bottom (action) limit to 25 instead of 50. Then set the top (state) limit to 50. That should make the 100% on the dimmer be 25 inside the Russound.

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

Posted on
Fri Dec 16, 2016 12:43 pm
Ksullivan offline
Posts: 83
Joined: Feb 22, 2014

Re: Masquerade Plugin

I was going to update where I had got to as I played around yesterday and came up with the same and it works a treat now I can say "hey Siri set living room volume to 50" and hey presto the dimmer sets to 50 and the russound volume sets to 25. I'm like a dog with two ! Thanks a lot for all your help the plugin work great a brilliant contribution to Indigo.

Posted on
Fri Dec 16, 2016 6:18 pm
ac4lt offline
Posts: 74
Joined: Sep 20, 2015

Re: Masquerade Plugin

I'm trying to create a pretty simple virtual sensor but I can't get it to work.

I'm using the ad2usb plugin to control our Ademco alarm panel. That's working fine. I can control and monitor the states in Indigo without any problem. The issue comes in when I try to create a virtual sensor for the acPower state in the alarm keypad device. This is a binary state that is 1 when the panel has A/C power and 0 when it is running on battery so it can be used to detect a power failure.

I'm trying to expose the field to HomeKit via home bridge and I thought the Masquerade plugin would do the job nicely. It actually does show up in HomeKit just fine but the masquerade device doesn't ever see "on" state set. Here's the configuration for the device:

acpower.png
the masquerade device
acpower.png (43.53 KiB) Viewed 8098 times


And here is the current state for the underlying device:

keypad.png
the current state of the alarm keypad
keypad.png (26.75 KiB) Viewed 8098 times


It seems like this should cause the masquerade device to be considered "on" but it, in fact, is off as shown below:
sensor.png
sensor.png (13.03 KiB) Viewed 8098 times

Am I doing something wrong or is some other issue causing a problem?

Posted on
Fri Dec 16, 2016 7:29 pm
FlyingDiver offline
User avatar
Posts: 7189
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Masquerade Plugin

Can you turn on debug logging for the plugin, restart it, then post the log section? Doing whatever it takes to get that value to turn off and then back on in the ad2usb plugin would help.

I don't think you're doing anything wrong. I think I must not be converting the values properly for comparison.

One more thing - when you have debug logging on, change the device config and put "True" in the state value field instead of "1" and see what happens. It's actually a boolean field, but the UI is displaying it as 0/1. I'm thinking when I convert that boolean to a string internally, I'm getting "True" instead of "1".

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

Posted on
Fri Dec 16, 2016 9:25 pm
ac4lt offline
Posts: 74
Joined: Sep 20, 2015

Re: Masquerade Plugin

Joe,

Is it possible it is an initial state problem?

I did what you asked and I saw the states update properly in the log and in the device. Now it is showing that it is on.

However, I then created a second device with the same definition and it shows off. I tried reloading the plugin and it still shows as off though the original device shows on. Could it be that the device isn't checking the initial state when it gets created and only gets synced once the first match happens?

Linda

Posted on
Fri Dec 16, 2016 9:31 pm
FlyingDiver offline
User avatar
Posts: 7189
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Masquerade Plugin

I can't proactively check the state. At least, I don't think I can. I only do an update when the Indigo server notifies my plugin that the underlying device had a change.

Restarting the other plugin after creating a Masquerade device is probably the right answer.

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

Posted on
Sat Dec 17, 2016 6:56 am
ac4lt offline
Posts: 74
Joined: Sep 20, 2015

Re: Masquerade Plugin

It never occurred to me to try restarting the underlying plugin. It might be something worth adding to the readme for those cases where it's not practical to trigger the state change to get things in sync. Thanks for your help in figuring out what was going on!

***********

Some follow up:

Actually, restarting the underlying plugin didn't get things in sync so forcing an initial state change seems to be necessary. Still, so long as I know I need to ensure that happens I should be in good shape.

Posted on
Sat Dec 17, 2016 8:02 am
FlyingDiver offline
User avatar
Posts: 7189
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Masquerade Plugin

I'm not sure what I was thinking when I said I couldn't set the initial state without an update from the base device. I can. Try 0.0.7 using the internal updater or:

https://github.com/FlyingDiver/Indigo-M ... tag/v0.0.7

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

Posted on
Sat Dec 17, 2016 8:17 am
ac4lt offline
Posts: 74
Joined: Sep 20, 2015

Re: Masquerade Plugin

FlyingDiver wrote:
I'm not sure what I was thinking when I said I couldn't set the initial state without an update from the base device. I can. Try 0.0.7 using the internal updater or:

https://github.com/FlyingDiver/Indigo-M ... tag/v0.0.7


Worked great! Upon device creation it had the proper state. Thanks!

Posted on
Sat Dec 31, 2016 12:49 pm
FlyingDiver offline
User avatar
Posts: 7189
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Masquerade Plugin

chobo997 wrote:
This looks like a fascinating little plugin that could really be useful in a number of scenarios. My particular use case: a Leviton z-wave fan controller without a proper device definition. In my situation, these particular fan controllers (Leviton VRF01-1LZ) display as dimmers when they should be Off-Low-Med-High devices.


What are the dimmer values for Low/Med/High for this device?

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

Posted on
Sat Dec 31, 2016 12:55 pm
chobo offline
Posts: 126
Joined: Dec 08, 2013
Location: USA

Re: Masquerade Plugin

Hi FlyingDiver,

The values for this Leviton VRF01-1LZ are:

0 = Off
1-32 = Low
33-67 = Medium
68-100 = High

Please let me know if I can provide any additional information.

Thanks!

Posted on
Sat Dec 31, 2016 1:26 pm
FlyingDiver offline
User avatar
Posts: 7189
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Masquerade Plugin

v0.1.0 now available: https://github.com/FlyingDiver/Indigo-M ... tag/v0.1.0

New Speed Control device type
Sensor and Dimmers devices are now limited to custom (plugin) base devices
Speed Control base device must be dimmer device

Very minimal testing has been done on the Speed Control device.

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

Posted on
Sun Jan 01, 2017 12:23 pm
chobo offline
Posts: 126
Joined: Dec 08, 2013
Location: USA

Re: Masquerade Plugin

FlyingDiver wrote:
v0.1.0 now available: https://github.com/FlyingDiver/Indigo-M ... tag/v0.1.0

New Speed Control device type
Sensor and Dimmers devices are now limited to custom (plugin) base devices
Speed Control base device must be dimmer device

Very minimal testing has been done on the Speed Control device.


FlyingDiver — This speed control masquerade is working perfectly. Thanks so much for taking the time to implement!

Happy New Year!
chobo997

Posted on
Sun Jan 01, 2017 12:31 pm
manonstreet offline
Posts: 7
Joined: Dec 27, 2016

Re: Masquerade Plugin

Subject: Masquerade Plugin

chobo997 wrote:
FlyingDiver wrote:
v0.1.0 now available: https://github.com/FlyingDiver/Indigo-M ... tag/v0.1.0

New Speed Control device type
Sensor and Dimmers devices are now limited to custom (plugin) base devices
Speed Control base device must be dimmer device

Very minimal testing has been done on the Speed Control device.


FlyingDiver — This speed control masquerade is working perfectly. Thanks so much for taking the time to implement!

Happy New Year!
chobo997


Mostly working for me too. When using the Indigo UI, everything works great. However when accessing the masqueraded device via Alexa (hue bridge), it can't send states of low, medium, or high since those aren't valid commands for a hue bulb. No false expectations there.

But if I tell Alexa to turn the device ON, the plugin sets a brightness level of the underlying device to '0', which is unexpected. Would be handy if there was a UI setting for the default value so that when it is turned 'On' (and not high, medium, or low), it would send that corresponding brightness level to the underlying device.

Additionally, if I do attempt to set the brightness level via Alexa, it throws the following error:
Code: Select all
   Alexa-Hue Bridge Error          StandardError detected in put_response for device 632479213. Line '229' has error='not enough arguments for format string'
   Alexa-Hue Bridge Error          StandardError detected in HttpdRequestHandler for device 632479213. Line '147' has error='must be string or buffer, not None'


Not sure if its possible for it handle a brightness parameter while still masquerading as a speed control device? If not, I could always work around it by using Alexa with the underlying device. I was just trying to have a single device name that I access via UI as well as voice control.

Update:
When using Alexa to turn the fan on (underlying dimmer device), it automatically goes to it's last remembered speed. If this plugin could send an ON to that device when turned ON (as opposed to sending a brightness 0) then it should handle this use case.

Cheers and thanks for your work on this plugin!

Who is online

Users browsing this forum: No registered users and 2 guests