RM Ignores Some Zwave Plus Switch Activity


#1

I have a simple motion activated lighting rule I set up in RM. if active, turn on the lights and turn off after 2 min of no activity.

I have another trigger rule set up so that if there is a physical on from the switch controlling the light turned on by the motion, pause the motion rule.

The log logs the physical on. Hubitat knows it happened. Keep in mind the md has already activated the light. The problem is RM won’t act on it if the md has already turned on the light.

If the log is picking up the physical on activity, wouldn’t RM be able to use it as a trigger?

Additional Info:

  • The physical off switch activity works fine as a trigger in RM.

GE 14291 Z-wave plus switch - port from Smartthings
#2

If the light is already on, how can it turn on again? What happens if you toggle it off and then back on? Does it work then?


#3

The light is already on. I want to use the physical on as a trigger to either pause the motion rule or change a PB to disable the motion rule. Hubitat knows the physical on happened because it is recorded in the log, RM just won’t act on it.

If I toggle it off and then on, it works perfectly to pause the motion rule.


#4

Show the Logs from the RM rule. It shows the events it sees.


#5

Here are the logs. I have two rules Pantry Motion and Pantry Motion Override. The last four entries I copied are the activity from using the switch when the motion sensor has not yet turned on the light. Unfortunately, I've also got rooms where motion turns on the light before you can reach the switch.

There seems to be one residual entry in there "Override ended by Pantry Light" from when I was testing this in the ML app. That rule is paused now.

app:882019-01-11 05:29:08.060 am infoPantry Motion Override Triggered
app:762019-01-11 05:29:07.973 am infoPantry Motion: Paused by Pantry Motion Override
app:882019-01-11 05:29:07.924 am infoPantry Motion Override: Pantry Light switch on
dev:372019-01-11 05:29:07.852 am infoPantry Light was turned on[physical]
app:842019-01-11 05:26:34.675 am infoOverride ended by Pantry Light
dev:372019-01-11 05:26:34.648 am infoPantry Light was turned off[digital]
app:762019-01-11 05:24:34.109 am infoPantry Motion is now False
app:762019-01-11 05:24:34.066 am infoPantry Motion: Pantry Motion motion inactive
dev:402019-01-11 05:24:34.009 am infoPantry Motion motion is inactive
dev:372019-01-11 05:24:05.468 am infoPantry Light is on [physical]
dev:372019-01-11 05:23:59.797 am infoPantry Light is on [physical]
dev:372019-01-11 05:23:59.294 am infoPantry Light was turned on[digital]
app:762019-01-11 05:23:58.641 am infoPantry Motion is now True
app:762019-01-11 05:23:58.596 am infoPantry Motion: Pantry Motion motion active
dev:402019-01-11 05:23:58.538 am infoPantry Motion motion is active


#7

Could you show just the Logs for the rule that you think is failing? Is it the triggered rule? Could you show the rule itself?


#8

The rule that isn't executing is the triggered rule and isn't executing when the motion detector has already turned on the light. It does work if the motion detector hasn't already activated the light. Because it's not firing I'm not seeing any log entries.


#9

Well, that rule isn't setup right, it has no conditions or rule. If all you want to do is Pause the other rule, then use a Trigger, not a Triggered Rule.


#10

What would that look like? I haven't seen anywhere (like in PLEG) to create just a trigger. These seem to work in recognizing on/off and executing pause and resume...except if the motions have already turned on the light.

I also didn't see the option to enter a condition around a physical switch event (just switch on/off). If it's really just a simple trigger I need to clear a nice spot for bang head here. :slight_smile:


#11

43%20PM


#12

Appreciate your patience with this!

This still didn't execute if the motion already turned on the light.


#13

Are you sure it's throwing an On event in that circumstance? None of my switches send an On event if they are already on, but probably a different type of switch.

Look at the Logs for the rule, to see if it's seeing an event or not. Also, look at the Events for the device from the Device page.


#14

I think you're right - it's not throwing another on event because it's already on. There's no activity in the rule or device logs. FWIW, the physical on is recorded in the main Hubitat log.

If there's no state change, nothing will happen? I don't remember exactly, but did PLEG have an option to execute an action regardless of state change? Is there any way to capture the activity that's being sent to the main log?


#15

This is true generally. A custom driver could do this differently, and force an event even with no state change.

What is PLEG?


#16

Webcore for Vera?


#17

PLEG is the rule maker for Vera. Is this functionality switch dependent even though Hubitat records the physical on switch was activated? I think ST may have somehow addressed this, but I didn't stay there long enough to try it out.


#18

Only in so far as some devices are not good at reporting physical on/off events, older GE switches in particular.

The functionality of not processing events that are not state changes is an app decision. An app could see every event by being coded to do so. Rule Machine and the other built-in apps are not coded to do that, to respond to events the are not state changes. In fact, the entire concept of Rule Machine is built on state changes, at least as far as rules are concerned (not so much as for triggers).

Having said that, I can see what you want to accomplish. A very simple Groovy app could do it for you. The idea would be to catch every physical event, and turn it into something like a button push. A button push is a state-free event, unlike a switch, and you are actually using the switch in this case like a button.

I wrote a little app for you, below. You would create a virtual button device, and select it in the app. Then your rule (trigger) in RM would be triggered by a button push from that device (button 1). And the little app turns every physical on event into a button push. It's a very tiny app. This is perhaps a kludge, but it should work for what you want to do.

Meanwhile, I'll think about a more graceful way to get what you want. I suppose one way to do it would be to have physical switch on as a trigger use the means of subscribing to events that looks at every event, not just state changes. I can't at the moment thing of any harm that would come from doing this, but I haven't thought about it for very long.

definition(
    name: "Physical to Button",
    namespace: "bravenel",
    author: "Bruce Ravenel",
    description: "Turn Physical On to Button Push",
    category: "My Apps",
    iconUrl: "",
    iconX2Url: "",
    iconX3Url: "")

preferences {
    section {
		input "aSwitch", "capability.switch", title: "Select physical switch"
    	input "button", "capability.pushableButton", title: "Select virtual button device"
    }
}

def initialize() {
    subscribe(aSwitch, "switch.on", switchHandler, [filterEvents: false])
}

def switchHandler(evt) {
    if(evt.type == "physical" && evt.value == "on") button.push(1)
}

def installed() {
    initialize()
}

def updated() {
	unsubscribe()
    initialize()
}

#19

Thank you for your help with this!