Inhibit Google Assistant


I am looking for a solution for inhibiting Google Assistant interaction.

Use case :
When the alarm is armed, google assistant is not allowed to open or close rollershutters.

At the moment, I can’t find any solution except using proxy items… which is a pain.

Thank you for all suggestion.

I think - Why would you do something like that?
Asumptions: When the alarm is armed, I assume nobody is near to activate anything through Google anyway. So whats the need?

Since Google operate directly on item level, its pretty hard to do what you want. You will somehow have to build all operations through rules only, by the use of proxy items… Sounds me to like a huge job for something I dont see a need for.

@Kim_Andersen someone from the outside can yell commands to Google home inside. There’s even a way to modulate a LASER beam directed to google home’s microphone (through a glass window) and send a command that way - look it up on youtube.

@Orfait an interesting question. One way as you said is to use proxy items. But what if it’s you that’s sending the command from outside the house using your mobile phone?

Another way is by attaching a smart plug power control on all google home devices inside the house and turn them all off when the alarm is armed.

I’m interested to hear other ideas as well.

I have heard of both, but never actually seen it happen. The person would somehow need to know what to shout/command to send. Unless he lives in Forth knox or something simular, it still sounds like a huge job to do what he want to.
There is a option to use the two factor acknowlegde for Google devices. Just in case.

He will still need to make a huge job of a rule to override the items he want to prevent from beeing controled.

I don’t see it as being a huge job? It would just be one rule, applied to one group which is assigned to all the proxy items. Using some sort of naming pattern e.g. RealItemName_Proxy, the proxy item -> real item can be mapped easily.

Using 2FA is a good idea, although it seems like a pain to do every time you need to do it.

I guess you do what you feel comfortable with your system, but that doesn’t answer the OP’s question.

I know. I was just wondering about the reason for this.

You are right, it seems useless… but someone can yell to google home (this is what I sometime did when rollershutters are closing while I’m outside).
If I get burgled without a break-in, no insurance (exclusion in contract… this is common in France but almost nobody read the contract :slight_smile: ).

There is a button on it to disable the microphone, but it does not seem to be possible to toggle the microphone from openhab.

2FA is a pain for normal usage.

So, only proxy.

@JimT : can you illustrate how you would do it “easily” ?

The burgler will still need to know exactly what to yell.
I do understand your concern though. But even though I have several Google home devices, I wouldnt consider going this far. I do have a small rule for my Velux windows, which will close til ventilation state, as soon as the alarm is beeing armed. But it wont prevent someone to tell Google to open the windows, (if they can figure what to say). And then the rule will close them again :smiley:
This is however not exactly the same, as my Velux windows is skyline build into the roof at aprox 4½ meters high. Any burgler will have to go to the roof, start shouting and hoping my Google Home devices will respond correctly. And they he need to be fast before the rule will close the window again… Hmm… Maybe this will do like a mouse trap… That would be fun coming home to see a burgler beeing trapped in one of the windows :rofl:

Completely other approach.
Make a rule which, when alarm is triggerd, sends a roller_shutter down command on every change or update of the roller_shutter items.
Basically overruling all commands by closing them again.

Thats almost how I run my Velux windows. But it wont prevent Google Home devices from controlling them. And I think thats what OP is searching for.

This is not so simple.
I would prefer to have rollershutters going back to previous position. How could it be done ?

Like suggested, why not just put a zwave/zigbee/x/y/z plug on the power of the google device? I have this in my home office for example, so google will not be able to listen to meetings and phone calls.
When I’m not in a meeting google mini can wake up again.

At any time saving the current position. Then when the alarm is armed and something (-> google home) is controlling the rollershutters just send the previous position saved earlier.

Why are proxy items a pain? Just because of how many you’ll need?

It comes down to there being a direct relationship between GA and the item it’s controlling, and no way for GA to know that it should reject commands due to openHAB being in a mode. So openHAB has to intercept GA commands, and proxy items are perfect for that task.

To update the proxies, you just need to use the follow profile. So there’s only one rule necessary to determine if a proxy command should be passed through to the real items.

1 Like


Group gAlarmProxy
Group gAlarmProxied

Rollershutter MyRollerShutter (gAlarmProxied)
Rollershutter MyRollerShutter_Proxy "My Roller Door" (gAlarmProxy) { ga="Door" }

Switch MySwitch1 (gAlarmProxied)
Switch MySwitch1_Proxy (gAlarmProxy) { ga="Switch" }
# Note I haven't tested these rules.
@rule("Alarm Proxy Handler")
@when("Member of gAlarmProxy received command")
def alarm_proxy_handler(event):
   if items.Alarm_Armed == ON:
   real_item = event.itemName.replace("_Proxy", "")
   sendCommand(real_item, event.itemCommand)

@rule("Update Proxy State")
@when("Member of gAlarmProxied changed state")
def update_proxy(event):
    proxy_item = event.itemName + "_Proxy"
    postUpdate(proxy_item, event.itemState)

Once again, doing this, you won’t be able to command your items from your mobile phone while you’re out.

Personally, I would just name my sensitive items like the garage door a special name that people can’t guess. So instead of calling it “Garage door” on google, I would call it something like “Dimensional Portal”. So They’d have to say “OK Google, open the Dimensional Portal” instead of “Garage Door”.

However, when I spot a good bargain on smart plugs, I will get some and just cut out power to my google home devices while we’re away.


If you have unifi , you could block wifi access to the Google Home when alarm is armed…


Interesting idea! It can also be done with other access points (e.g. wrt or netgear) or done on the router level, if that’s separate.

Thank you for all your suggestions, this is very nice !

@greg Nice idea, I will probably use it first.