Rule Machine vs Simple Automation

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

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...

This setting was on. I will turn it off to see if that solves the issue.
The only other thing I can think of is that at 7am my Mode changes to Day.
That just sets a dimmer level on one switch. I moved that to 7:01am. Let's see what happens in the morning.

Thanks everyone for the ideas and support.

4 Likes

If anyone cares, I bought one of these Firefly Bonsai trees from Amazon (first pic). It runs from 5v USB. The base has a touch activated switch that simply turns it on/off. I thought it would be cool to trick it out, so I opened it up and bypassed the stock controller and embedded one of these wifi controllers (second pic) so I could run it from Hubitat.


3 Likes

First time I ever knew that condors could speak French.

1 Like

Certainement! (Mais unfortunatement nous parlons avec une accent Americaine. Tant pis pour nous...)

1 Like

Thatā€™s a great idea! Love the implementation.

1 Like

You can have socketStatus method which will be called with "receive error: reason" or "send error: reason" like this:

def socketStatus(String status) {
    if (status.startsWith("receive error:")) {
        log.debug "ouchie"
    } else if (status.startsWith("send error:")) {
        log.debug "owie"
    }
}
2 Likes

This code should come w/bandaids... :wink:
image

1 Like

The tree came on this morning at 7:00 with only one event in the log. Not sure if it was the "Turn off if disconnected" setting or not, but it works.....will continue to monitor.

Thank you again to this group.

1 Like

Iā€™m having the same problem with a timed On/Off Simple Automation Rule. I have Osram Smart+ Zigbee outlets and would like certain lamps to go on in the morning and off in the evening. I get the same PENDING events but the lamps do nothing.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.