Rule Machine & Alexa

Hi all, this is my first Rule Machine rule integrated with Alexa through a virtual switch. My rule is as below, so when virtual switch is on, I want Hubitat to check if kitchen window is open. If it is, I want it to say on my Office Echo that it is.

In my Alexa I set up a simple Routine, as below.

So far so good. When I say the command for the first time, everything is executed as expected, including the Virtual Switch going off (also visible within Alexa).

However, when I try to say the commend again, Alexa goes blank as if this routine didn't exist -- just ignores me.

I have three Echo devices and it worked on each one of them, when ran for the first time and didn't work on any of them subsequently.

This sounds to me more like an Alexa / Echo issue, but it's the first time I'm experiencing something like that so I thought, hmm, maybe it's actually an error somewhere in my rules / routines.

Can anyone spot any issue with my setup that would explain this glitch?

I originally thought you had not changed the switch but you seemed to have done so. A couple of things that seem odd or differnt to me is first, whenever I look at triggering an event on a switch it just says turned on or off not reports. What is that?

Second you are missing a last end if, shouldn't matter as I think it is implied since it is the end of the rule, but I always like to put one.

I am not sure I understand what you mean here...?

Yes, I realised that and added it, but as you say, I suspect it would work either way...

I just noticed that changes to my rule, e.g. changing which Echo devices should be 'responding' doesn't update, i.e. it's the Echos that I initially designated as talking, not the ones that I've modified to.

Does anyone know if the community app 'Echo Speaks' needs some sort of manual 'push refresh' every time there is a change in rules involving Echo devices and thus requiring involvement of the 'Echo Speaks' app?

This is a pic of a trigger event for a virtual switch that I use. Your says report switch on, mine just says turns on. I have never seen the reports switch on before.

Got it. I suspect it might be down to different drivers that we use for our virtual switches. I can’t remember which one I’m using - so many things I am downloading and installing left & right... But it was one of the community drivers.

Do you have a link to a GitHub driver that you are using for your virtual switches? I might give that a go and see if it looks like yours or whether there is something else going on here.

I am just using the included virtual switch driver. I don't know why you would need to download a driver for a virtual switch.

Right, silly me. I didn't realise Virtual Switch was available off the shelf...

I just changed my switch to the default one, but still get this strange language of 'reports witch on'... Complicating my life unnecessarily...

Does your switch look like the one below or any different?

Yep that's it.

You can set the auto off to 5 second and then you would not need to put anything in your rule to reset it. I would delete and re-do the rule trigger.

1 Like

Looks like my Alexa was going bananas because I was trying to send announcements to Echo Dot (4th gen), which apparently is not yet supported by 'Echo Speaks'.

However, I now have a different issue. When I trigger the below rule from within Hubitat, it executes it correctly, i.e. checks the window sensor, it's closed, and says 'all windows & doors are closed'.

When I press a virtual button in Alexa, it also triggers this rule, as intended, but arrives at a different conclusion, i.e. Echo says 'kitchen window is open.'

Why is that? There are no changes to the sensor reading regardless of what triggers this rule (Hubitat vs. Alexa), so why would it arrive at a different conclusion??

Untitled

Although that rules makes no sense, I think you set it up just for troubleshooting.
If that's the case, my hypothesis would be that when the switch is turned on via alexa, the rule turns it off so quickly that alexa might send the command to turn it on again, thinking that the first command wasn't processed correctly.
I think you could confirm that to be the case if you added a delay before the first action

1 Like

Yep, testing, sorry should have mentioned that.

That did the trick!

1 Like

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