Using Google Assistant switch with ackNeeded=true not working

Hello,

It seems that since the recent Google Assistant updates, a switch (for a lock) I have configured for ackNeeded=true is no longer working. Other OH switches tagged for “ga” with no other options work fine, but this one stopped working about the same time that the Google Assistant changes were rolled out. When I ask Google to operate the lock item with ackNeeded=true, the response is always “I can’t reach Openhab” (or something like that). I can give a command to operate another (non ackNeeded) switch right after and it works just fine so it’s not a connectivity problem. I have experimented with removing the “ga” tag from my item and syncing Google, then adding it back, but it doesn’t fix it. The only thing that allows me to resume using the switch with Google is to remove the “ackNeeded=true” from the item definition. After I do that Google is happy to use it again. Are others seeing this problem?

Definitely strange. I just tested mine and it worked without issue.

Strange indeed. I had read about the upcoming Google Assistant changes in the OH Community forum email digest several weeks back, so I knew changes were coming. This particular switch has been working using tfaAck=true for me for many months now, but I knew the change from tfaAck to ackNeeded was going to be required, but it sounded like there was a grace period where the old option was deprecated. When it stopped working I figured something was wrong with using the old option so I changed it to ackNeeded and it still had the same behavior (“I can’t reach Openhab”). I’m not sure what else to try since clearly it can work if I just remove this option, so I don’t see how it could be an issue with my items file. For now I can get by without the ackNeeded, but it would be nice to re-enable it at some point. Tomorrow I’ll experiment adding the option to another correctly operating switch and see if it breaks it.

Ok, so I ran the experiment now since I had a moment. I added [ ackNeeded=true ] to a different switch that was working and after the change it stopped working. I removed the change and it began working again. Must be something related to my OH setup. I’m still running 2.5.12. Could that be why I see different behavior?

Hang on, I just realized something. I haven’t changed my lock from tfaAck=true (and I’m on OH3). Sorry, I didn’t pick up on that difference.

Ok, but I encountered the problem before changing from tfaAck to ackNeeded. Both show the same behavior.

My best guess is that the old method has stopped working in OH2, but the new one isn’t defined for it. But that’s just a guess. Let’s ask an expert.

@michikrug, do you have any insight on this issue?

From my pov there should not be any difference between OH 2 and 3 in that regard. Furthermore, both variants ‘tfaAck’ and ‘ackNeeded’ should do exactly the same for now. As we did not yet remove the old one.
I will try to run some tests in the next days… but can not promise anything. Especially, since for others it’s working :thinking:

1 Like

I did some investigation and actually found a bug that causes this behavior. This seems to have been slipped through during the large rework that was release recently. Sorry for that.

Please see Fix exception when tfa challenge is missing by michikrug · Pull Request #211 · openhab/openhab-google-assistant · GitHub for updates on the fix.

What I also noticed is that in the Google Home app an acknowledgement is not requested and thus commands are not executed :thinking:

1 Like

Thanks for the update. I’m glad to hear it’s not an issue unique to my setup. I appreciate your efforts to identify the cause and a fix.

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