Room lighting and physical switch attributes

Might it be possible to get the physical switch attributed fixed in room lighting please?:pray:
The physical switch attribute works as expected in rule machine but not in room lighting as room lighting sees switch as (physically on) even from automation where as rule machine physical switch attribute only registers when the switch light switch is turned on or off manually by the physical wall switch

1 Like

Hi any Devs can help with this bug fix please?

I've moved your thread into the specific 'Room Lighting' section. Maybe Bruce @bravenel will be able to comment if there's any reason why 'physical' and 'digital' appear to be logged correctly in RM while digital switch events are being interpreted as 'physical' in RL for you.

Are you able to see that issue consistently while using the exact same device in both apps? I know that I've had digital events reported as physical occasionally on my Fibaro Dimmer 2's and it's not clear whether that's a possible issue with the device. It might be worth posting exactly what device you're using for the rule, an example of the rule and logs showing the wrong result in case anyone can replicate the behaviour you're seeing. Whether 'Physical' or 'Digital' is logged for an event is dependant on the specific device supporting it (not all do).

It is 100% reproducible
Device is aeotec nano switch

1 Like

Go to the devices page for that device and post a screenshot of the events tab. Show both physical and digital activations.

It’s the driver, it is putting physical and digital in the description but it is not setting the type in the event so RL doesn’t see it.

If it’s a custom driver I can fix it for you.

1 Like

It’s using aeotec dual nano switch driver which creates two child devices that use generic component switch

Is that a built in driver or a custom downloaded driver?
Usually the component drivers just post whatever the parent sends them, so the parent driver is probably the one that needs to be fixed.

See this is what the event log should look like:

The problem would be that RL is picking up any event as physical, not that it’s not picking up physical. So I think this is a good catch for the driver @jtp10181 but a red herring wrt the RL issue reported

I remember suggesting to the op to use that physical flag in RL a while back, and then later noticed it didn’t work for me either (with a Lutron switch which properly flags digital/physical). In my real RL instance, I now use a virtual switch to limit activation (RM is controlling that switch from the physical events of the real switch).

Created a quick test RL just to demonstrate.

Three attempts :

  1. Kitchen Lights off - virtual switch is turned on (OK)
  2. Kitchen Lights physical on - virtual switch not turned on (OK)
  3. Kitchen Lights digital on (from device page) - virtual switch not turned on (bug)

@bravenel looks like the "Physical" switch options are broken in RL. I just tested one I had setup using that and the only reason it was working was because I also added the button event. Once I removed the button and only had the physical switch trigger it did not work right. I tested for Physical off, and it is the opposite of what @hubitrep reports for the on, for Physical Off it never picks anything up.

This is despite OP's issue with the driver they are using, but apparently even if the driver worked right this would still not work based on testing above.

3 Likes

Built in driver, I could not find custom driver for the aeotec dual nano version

Two bugs found in one post :slight_smile:

@mike.maxwell or @bcopeland
Looks like the Aeotec Dual Nano Switch driver is identifying the physical/digital events correctly but is not posting the "type" to the events, rendering it useless for rules. See screenshot of events above: Room lighting and physical switch attributes - #6 by ThunderboltsRock

3 Likes

It's not that it's broken as much as it is that the option should not be offered in the first place in the Limit Activation section. The tests in Limit Activation are state tests, not event based. So the app only looks at the current state of a switch, not how it got there (physical vs digital). There is a failed test in the code about this, where it should be offering Physical only for Enable/Disable events, not for Limit Conditions. Evidently it also fails to offer Physical only for the Enable/Disable events.

I'll get a fix going for this.

3 Likes

Ok I see in the example above @hubitrep is using it in the Limit Conditions, I missed that before.

My rule I tested it in the Means to turn off, switch Physical Only. I was not able to get that work at all. So it might be an issue in the means to activate / turn off as well? I can make a mock up test on my dev hub to do a better test if needed.

Given that it's messed up in one place, not surprising it's messed up elsewhere... Evidently not setup right in the first place...

1 Like

I'm not seeing a problem with Physical for Means to Activate or for Means to Turn Off. Both of those appear to be working correctly.

1 Like

The use case where I would like to use the physical switch is:

  1. If wife physically turns on the switch (do not auto turn off light)
  2. Re-enable auto turn off automation after physical switch is turned off
    In the current state I select “limit auto turn off actions when physical switch is turned on. This results in the light staying permanently on as RL sees the automation on also as physical switch is turned on

I think that's what Bruce is saying was not even supposed to be an option in the "limits", which is why it is not working. He is going to fix by removing it from that area. To do what you want you will need to use a separate rule and set either a variable or a virtual switch, then use that as a limiter in RL:

image

1 Like

Seems to be contrary to my KISS rule (keep it simple stupid), would be ideal to have this functionality in the app that controls lighting