Does Home Assistant have a function which check hat access is from the same network or not?

Does Home Assistant have a function which we can check that the access is from the same network or not?

You can see the IP that was used in the login. There is a custom component that tracks it. I can dig up a link if you are interested.

Yes, absolutely. Thank you for your help!!!

thank you so much!

I added this, logged out and in again and it still says unknown??

what do your logging settings look like?

Can you see the login in your home-assistant.log file.

did you add the file to custom_components/sensor and add the config to your sensors file?

Do you see the warning about a custom component in your log?


2018-11-17 14:19:43 WARNING (MainThread) [homeassistant.loader] You are using a custom component for sensor.authenticated which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you do experience issues with Home Assistant.

Actually I’m wondering if it’s because it’s not from a ‘new’ IP address? I’m on a static ip address.

I forget what the filename is call but there is a hidden file that logs each unique IP that logs in. See if its in there. It should have picked up your login though. Its been awhile since I used it so I forgot the ins and outs of it.

it’s not there. You’re referring to .ip_authenticated.yaml file in your config dir

Yes, is that showing up at all?

I see to recall your using a proxy, not sure if that is causing a hiccup

nope. no file. I do use Caddy. I can try a local login with IP address

local login with ipaddress:8123 doesn’t log either

Hmm, not sure whats up, I would raise an issue on the github page.

so does it work for you?

I don’t use it currently but used to and it worked fine.

ok so it needs the logger to be configured… go figure… I added the logger so I could report an issue and it’s working but showing an IP address of 127.0.0.1 hahahah so useful lol.

I would guess this is due to you using caddy. Is caddy running on the same machine as homeassistant?

Yes it is on same machine. I agree it’s Caddy doing it…