Rule Machine vs Simple Automation

I have an ornamental tree with lights that I "upgraded" with a Magic Home WiFi dimmer. This is a simple single channel controller. I would like this light to come on every morning at 7 am and then shut off at 10:30 pm. I created a Simple Automation Rule to set the light to 3% brightness at 7 am and shut off at 10:30. What I am seeing, the rule runs ONCE, then never runs again. If I look under status of the rule, it does say there is a PENDING job for 7 am today, but that time has past, and there is nothing in the logs.

If I disable that rule, and setup a Rule Machine rule that only turns the light on every day at 7 am at 3% that works fine.

Any ideas as to where the problem is? I have other Simple Automation rules that I have had for months that work without issue.

It’s possible that the simple automation has become corrupted. Have you tried deleting the simple automation and recreating it?

And welcome to the community!

2 Likes

Thanks. I have recreated the rule two or three times....

Ok. Is it possible that you have some Restrictions that are preventing operation?

Have you turned on the “Enable Logging” and “Enable App Events” switches to see what is happening?

Perhaps a screenshot would help.

I have turned on the logs.

Here is the rule....

And here is the rule status...

And your hub and firmware version? What does the events tab look like after 7 am and 10:30 pm?

I’m baffled. Everything looks good.

I have a similar automation that’s been running for almost a year, no problems.

I am running 2.2.5.131.

This is interesting. I see that under the device events at 7:00am, the light when to "off" state nearly immediately after it came on.

The off state from last night at 8:45 would have been when I did an "Alexa Goodnight" to go to bed.

Is it possible Alexa is messing with you? Check to see if you’ve got a routine in Alexa that you originally might have set up to do the same thing as your Simple Automation, but got on/off backwards. Reason I ask is because, just before your 8:45 pm turn off, there’s a turn on, and just after your morning turn on, you’ve got that turn off.

Either that sort of a mix-up, or perhaps you have some auto off virtual switch in there, etc.

Look at the light in question, see what is listed for “in use by” on the device page.

1 Like

This ^^^ Things like this often are due to a "competing" automation that is running. That's screwed me up a few times when I forget I have done that.

This section at the bottom of the device page:

3 Likes

I checked Alexa and I don't have any "timer" automations set by her. I have 3 voice routines that turn a subset of devices on/off and good night routine that turns everything off before bed.

This device is only tied to 4 "in use by"

First is Alexa
Second is a routine that shuts everything off if I am not at home.
Third is the rule that is not working right.
Fourth is a rule that sets a subset of lights to come on 2 hours before sunset.

Is it possible that presence is not being detected properly, such that you are believed to be “not at home”?

Check events on those other “in use by” items to see if anything matches up with the unexpected immediate turn offs.

I don't see any conflicts. Also it may have been lost in the message, but a Simple rule to turn the device on works fine.

One thing that I notice with these Magic Home devices is that they show multiple events even when you go to the device and do a simple on-off...

The current state of the device is 'ON'...
I am simply going to go to the device page and hit "off" then "on"....

This is what 2 "off then on" events look like.....
Is this a driver thing?

I saw that in your message, but it didn’t say that you had later edited that rule to turn it off later.

Not quite sure what you are saying here.

Are you saying that you did one manual “off then on”, and then a second manual “off then on”, from the driver page, and it generated these 10 events?

I did not setup an off event in the simple rule, just an on event.

Yep that is what I am saying. This might be how a wifi switch works, but Z-wave switches don't do have all this chatter.

Hard for me to believe this is normal. What driver are you using?

It's a community driver made by Adam Kempenich.

*[Release] Magic Home Wifi Devices - 0.89

Perhaps @adamkempenich has some insight. I am baffled.

1 Like

Moi aussi, mon ami.

1 Like

Check if the Turn off if disconnected setting is turned on, or not. I wonder if it's having a tough time staying connected with Hubitat...

1 Like

Some Z-Wave devices do lol.

I need to rework those MH drivers. I've been focused on some real-world projects over the last year, and haven't made much time to work on those. The nature of these (and a lot of TCP/UDP/TELNET) devices is that you need to poll them, and check if a hub is still connected to them. It's unfortunately CPU intensive, but can be toned down. My development versions have all of the sendEvent commands removed from everything but parse, among other changes.

I have a few ideas of how to make the TCP interface faster, but unfortunately the implemenation in Hubitat doesn't tell us if a device has disconnected or not (unlike my Python, and NodeJS version), so it needs to be polled for. That is, unless @gopher.ny can message me and let me know if that interface has changed in the last couple months to have some way of being notified of a non-hub-side disconnect. Chuck had said it wasn't on the block for implementation back in that era.

Also, @672southmain thanks for the ping.

4 Likes