Checking Home Assistant internal and external connections
I am using home assistant for my home automation. I use the RPI 3 with SD card. This setup fails sometimes. I can not reach the home assitant web page. When home assistant can not be reached I wonder what is happening. So I made a small program to make sense of what is happening. It checks the local and external connection to home assitant abd check if the ports of the internal and external URL are reachable. You have to change the external URL and port. You can also change the local address *homeassistant.local" and port. The program settings will be stored in the registry, so the program will remember your settings. This program helps me to see what connection problems there are. Is the external Ip reachable? is the external port open. Has the system started yet (if not, the local port is not open and the external port is not reachable). I hope you also find this program usefull.
This is what the program does:
- ping 8.8.8.8 to check if there is an internet connection
- check if you can get the local ip for "homeassistant.local"
- ping the local ip address
- check if the local port is open
- check if the program can get the ip number for the external DNS name
- check if the program can ping the external ip address
- check if the external port from that IP address is open