How do I automate remote access (on/off) based on whether I am on the local network or not?

reference this post on reddit:

they say that you can automate remote access so that while you are at home, remote access is disabled. I’d like to set this up but the OP didn’t post any instructions.


Maybe disabling the nginx addon based on your location?

I believe, many of us are using http locally and https remotely over nginx, which is running inside supervisor as add-on.

Keep in mind that this will block some (or many) google home and alexa functionality if there is any in your setup

1 Like

Simply set up an automation, that depends on your home status.

Someting like this:

  - id: enable remote access
    name: enable remote access
      - platform: state
        state: not_home
        for: '00:05:00'
      - service: cloud.remote_connect

There are numerous other sensor or entities that you can use to trigger this automation, but in an essence, this is what you need to do. :slight_smile:

If you do it like this, this is only the remote connection from NabuCasa to your HA instance. This has nothing to do with the other settings like Google Home or Alexa, it just enables your remote connection.

If you’d choose the way @fuatakgun supposed, which is perfectly ok as well, you will loose the other settings from your NabuCasa account. :slight_smile: