Trigger to brighten and then dim lights

Posted on
Sat Jan 25, 2020 12:19 am
cdeggz offline
Posts: 33
Joined: Nov 30, 2014

Trigger to brighten and then dim lights

I set up a trigger than when a door is opened, it brightens the lights in one room by 30 and then 2 seconds later dims them by 30.

I get the strangest behavior:

Sometimes when I start with the lights off, it brightens them to 30 and then according to the indigo log " Sent INSTEON 'Den Lights' on to 0"

This seems to confuse things (or me), since the icon in indigo does in fact show the light as on, and shows the brightness as 0. The behavior on my lights is 1 of the 6 LED bulbs on that switch is dimly on. I would think that a brightness of 0 is "off".

Other times it brightens to 30, and then 2 seconds later dims to 1.

Clearly this is not the (my) expected behavior. I'm pretty sure I could write a python script to handle this better, but it seems the triggers should be capable of doing with their action set.

Posted on
Sat Jan 25, 2020 11:28 am
jltnol offline
Posts: 989
Joined: Oct 15, 2013

Re: Trigger to brighten and then dim lights

So you've said 2 different things:

it brightens the lights in one room by 30


and
start with the lights off, it brightens them to 30


The first indicates that the lights are on, and they go 30% brighter than however bright they are, and the 2nd indicates that whether they are at 5% brightness, or 75% brightness....they go to 30% brightness.

As far as what "0% Brightness" means, I think it's semantics. Yes, 0% brightness should be off, but I can half way understand the difference between telling a light to go to 0% brightness, as opposed to telling it to turn OFF,

I doubt this solves your problem...

Posted on
Sat Jan 25, 2020 5:51 pm
cdeggz offline
Posts: 33
Joined: Nov 30, 2014

Re: Trigger to brighten and then dim lights

Let me re-write for clarity

I set up a trigger:

When device state changed
Device Nursery Door Sensor on/off state becomes on
under condition: If device "dining room lights" Brightness Level, is greater less than, 50
Action 1: brighten "Dining Room Lights" by 30%
Action 2: dim "Dining Room Lights" by 30% (Delay by 2 second)

Desired Behavior
Lights brighten and then dim back to the original setting 2 seconds later

Actual Result:
If I start with the "Dining Room Lights" in the off state:
Sometimes the trigger above will brighten the lights from off state to 30 and then dims them to 0 two second later (but leave them "on" according to indigo).
Sometimes the trigger above will brighten the lights from off state to 30 and then dims them to 1 two seconds later (but leave them "on" according to indigo).

In both of these situations, I will sometimes see 1 of 6 of my LED bulbs on the "Dining Room Lights" stay on, so the switch is not going back to an off state.

Posted on
Sun Jan 26, 2020 2:27 pm
matt (support) offline
Site Admin
User avatar
Posts: 21411
Joined: Jan 27, 2003
Location: Texas

Re: Trigger to brighten and then dim lights

Brightness of 0 for Insteon devices should show as OFF in Indigo. The next time this happens and you see in the UI the brightness 0 and state of ON, choose the Plugins->Open Scripting Shell... menu item and copy/paste in (and hit return):

Code: Select all
indigo.server.log(unicode(indigo.devices["Den Lights"]))

Then open the Event Log window and copy/paste its contents showing both the result of the script command above as well as the Trigger execution (showing Indigo setting the brightness to 0).

Image

Posted on
Sun Jan 26, 2020 11:32 pm
cdeggz offline
Posts: 33
Joined: Nov 30, 2014

Re: Trigger to brighten and then dim lights

From Log:

Received INSTEON "Nursery Door" on (button 1)
Trigger Ethan Door Alarm
Trigger Nursery Alarm Den - Dark
Trigger Nursery Alarm Dining - Dark
Received INSTEON "Nursery Door" off (button 1)
Schedule Nursery Alarm Den - Dark (delayed action)
Schedule Nursery Alarm Dining - Dark (delayed action)
Sent INSTEON "Den Lights" on to 30
Sent INSTEON "Dining Room Lights" on to 30
Sent INSTEON "Den Lights" on to 0
Sent INSTEON "Dining Room Lights" on to 0


Interactive Shell:
Interactive Shell address : 17.28.32
batteryLevel : None
blueLevel : None
brightness : 0
buttonGroupCount : 1
configured : True
defaultBrightness : 100
description :
deviceTypeId :
displayStateId : brightnessLevel
displayStateImageSel : DimmerOn
displayStateValRaw : 0
displayStateValUi : 0
enabled : True
energyAccumBaseTime : None
energyAccumTimeDelta : None
energyAccumTotal : None
energyCurLevel : None
errorState :
folderId : 0
globalProps : MetaProps : (dict)
com.indigodomo.opensource.alexa-hue-bridge : (dict)
published : True (string)
greenLevel : None
id : 631360718
lastChanged : 2020-01-26 21:18:38
ledStates : []
model : SwitchLinc Dimmer
name : Den Lights
onBrightensToDefaultToggle : True
onBrightensToLast : False
onState : True
ownerProps : emptyDict : (dict)
pluginId :
pluginProps : emptyDict : (dict)
protocol : Insteon
redLevel : None
remoteDisplay : True
states : States : (dict)
brightnessLevel : 0 (integer)
onOffState : on (on/off bool)
subModel :
supportsAllLightsOnOff : True
supportsAllOff : True
supportsStatusRequest : True
version : 56
whiteLevel : None


I do find it interesting that the indigo command seems to be: "Den Lights" on to 0

Posted on
Sun Jan 26, 2020 11:40 pm
cdeggz offline
Posts: 33
Joined: Nov 30, 2014

Re: Trigger to brighten and then dim lights

In the Indigo UI (and on iOS) it shows an "on" icon with a 0 next to it.

Posted on
Mon Jan 27, 2020 7:58 am
matt (support) offline
Site Admin
User avatar
Posts: 21411
Joined: Jan 27, 2003
Location: Texas

Re: Trigger to brighten and then dim lights

What version of Indigo are you running?

Image

Posted on
Tue Jan 28, 2020 11:36 am
cdeggz offline
Posts: 33
Joined: Nov 30, 2014

Re: Trigger to brighten and then dim lights

6.1.11

Posted on
Tue Jan 28, 2020 12:56 pm
matt (support) offline
Site Admin
User avatar
Posts: 21411
Joined: Jan 27, 2003
Location: Texas

Re: Trigger to brighten and then dim lights

I was able to reproduce this problem in the current version of Indigo. It is a rounding issue caused by the fact that Insteon modules have 255 brightness levels that Indigo rounds when displaying. So in this case the Insteon brightness is 1 or 2 (of 255) but that rounds to 0. I'll look into addressing the problem in a future version of Indigo (won't be fixed in Indigo 6 though since that is no longer maintained/supported).

As a workaround if you change your delayed dim to do 31 I believe it will consistently go to 0 and show as OFF in Indigo's UI.

Image

Posted on
Tue Jan 28, 2020 3:39 pm
cdeggz offline
Posts: 33
Joined: Nov 30, 2014

Re: Trigger to brighten and then dim lights

Sounds like a good workaround. Thanks!

Posted on
Fri Feb 07, 2020 3:10 pm
matt (support) offline
Site Admin
User avatar
Posts: 21411
Joined: Jan 27, 2003
Location: Texas

Re: Trigger to brighten and then dim lights

Indigo 7.4.1 is now available and will now consistently turn modules OFF when brightness is set to less than 0.5%.

Image

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 2 guests