Possible Issue in Mode Lighting

Manually from the switch itself. I originally setup apps like these so that the light when physically pressed would turn on at different levels depending on the mode. Sometimes there are lights that are on when mode changes, hence why I wanted to enable the level change when the mode does.

I have separate motion lighting apps that actually trigger lights on with motion, this particular app although has no motion sensor tied to it.

So basically I would have a motion light app to control lights on/off with motion and then a second app that controlled what level the light turns on depending on the mode when physically pressing the switch.

Are you using Mode Lighting for modes where you don't use motion? That is, are there modes where you don't want motion to turn on the lights? If not, you shouldn't be using both apps on top of each other.

You need to have the switch itself selected in Options for off, otherwise the app never knows you turned the lights off. It thinks they are on, and adjusts the level on each mode change.

After looking closer at what I have setup I may have some overlap with motion/mode lighting apps. My original intentions were to have motion lighting turning lights on/off during specific modes and then for which modes that motion lighting was not active to have mode lighting set a specific level when the switch is physically turned on/off. What I noticed though was I had both motion and mode lighting apps and each app had specific dim levels set when on the same mode.

There are also lights that have no motion lighting app, but strictly mode lighting to set levels depending on the current mode.

I think this was were I was having the issue, I did not set the lights off option. I originally figured since the user was turning the light off no other action would be needed. But now I do understand how it works that the app needs to know when this action happens to know the state of the light.

The way I use this app is for a single 'master' switch to turn on certain lights in a room, with dimmer per mode levels. That same switch turns them all off, and in the example I posted above, turns off additional lights at the same time.

Yeah, I was mainly using the mode lighting app to control the level at which the light comes on depending on mode. I have mostly either recessed lighting or ceiling lights. So for example at night I did not want the lights turning on at very bright levels. but during the day I do.

But then I also have motion lighting setup for rooms that we use many times during the day like the kitchen, but again these motion lighting apps turn on the lights at specific levels for the same reason I stated above.

After some testing is it normal when using mode lighting that if the switch is physically pressed it will obey level per mode setting in the app, but if you turn on the light from HE this does not happen? I noticed that the "lightsOn" under application state only changes to true when the switch is physically pressed, but not when turning the light on from HE under the device's page.

Edit: Looking in the event log for that app I noticed that only the "off" command is displayed, there was no "level" or "on" command when the light is turned on from the device's page in HE. I do see the level command in there though from when the switch was physically pressed.

Edit 2: So I also found that if I use the Alexa Virtual dimmer for that same app, that the "LightsOn" status does change to true when the light is turned on from that Alexa virtual device. But under the event log for the app again only the off command is shown, and in the Alexa Virtual app the dim percentage does not change to reflect the current mode.

In fact if if I turn on a light and set the dim level directly from the device's page, the Alexa virtual device does not reflect the correct dim level either.

1 Like

@bravenel

Are you able to replicate the issues I posted above?

You're going to have to be specific now, I'm not able to reparse this whole thread. What issues? Did you redo your Mode Lighting as described above?

The last post I explained what was going on with the "lightsOn" status under application state.

I'm not following what you are saying. You said "event log for that app", which app are you referring to? From my testing just now, the Alexa Virtual dimmer associated with mode lighting does exactly what I would expect it to. And, the app status shows the state variable "lightsOn" following exactly what is done to that virtual device, also as expected. And the app events reflect what happens, for both on (actually level) and off.

The Alexa virtual device does not track the real device. It's purpose is to provide a means of control of the devices selected in Mode Lighting, not to display their state. When I operate the light selected in the app manually, the virtual device does not change, nor would I expect it to.

Are you looking for some different functionality from the virtual device?

The "lightsOn" state does change properly when using the Alexa Virtual device in a mode lighting app. But if I go to the actual device's page in HE and turn the light on/off, then the "lightsOn" state does not change. So the "lightsOn" status will update when physically turning on/off the switch or when using the Alexa Virtual Dimmer, but not when going directly to the device's page in HE and toggling on/off.

So if I understand correctly then with the Alexa Virtual Dimmer it should trigger the "lightsOn" application state when used in a mode lighting app. Also if I use that virtual device with my Google Home and issue a voice command to change dim level then if I look at the dim level in HE of the "Alexa Virtual Device" it should now reflect the dim level that I issued.

Edit: I hope this explains it well enough, sorry if its not too clear.

Yes, this is correct. The app is looking for a physical event. Are you wanting to use this some other way?

When you give a command to GH to adjust that device (the virtual dimmer), one would certainly expect it to be reflected in that device's state. What happens as a result is the functionality of the app is invoked from the virtual device calling its parent.

I expected the state to update from the device page also. I guess its not a big deal if I am using the Alexa Virtual Device for voice or physically using the switch. I just have to make sure to use the Alexa Virtual Device for all rules, otherwise the state is not known.

That setting is meant for the physical switch. If you want to invoke the app to set the lights per mode from an automation, then use the Alexa Virtual dimmer to do so.