DeepBass9 Posted July 19, 2019 Share Posted July 19, 2019 (edited) I hope someone van help, I am struggling to get a TP link smartplug be visible in home assistant. I can connect to it via its own app and switch on and off. I have got its IP address and can ping so that seems OK. The internet tells me if I put these lines in my configuration.yaml file the switch should be visible in the UI, but nothing. switch: - platform: tplink host: 192.168.2.101 name: Switcheroo What am I missing? is there a specific order that things need to be in the yaml file? Edited July 19, 2019 by DeepBass9 Quote Link to comment Share on other sites More sharing options...
Luminous Posted July 22, 2019 Share Posted July 22, 2019 On 2019/07/19 at 5:34 PM, DeepBass9 said: I hope someone van help, I am struggling to get a TP link smartplug be visible in home assistant. I can connect to it via its own app and switch on and off. I have got its IP address and can ping so that seems OK. The internet tells me if I put these lines in my configuration.yaml file the switch should be visible in the UI, but nothing. switch: - platform: tplink host: 192.168.2.101 name: Switcheroo What am I missing? is there a specific order that things need to be in the yaml file? Did you add the integration part? Configuration -> Integration -> "+" and select tplink? Quote Link to comment Share on other sites More sharing options...
DeepBass9 Posted July 23, 2019 Author Share Posted July 23, 2019 I did. But it still doesn't work. I have other network problems to sort out first though. I have a mixed windows and linux network which is a nightmare (to a network ignoramus) Quote Link to comment Share on other sites More sharing options...
DeepBass9 Posted July 24, 2019 Author Share Posted July 24, 2019 Maybe someone can help, I am getting nowhere with HA. I have it running on a PI with a fixed ip address of 192:168:0.111 . This is on a wired network. I have a wireless access point, connected to the switch, with address192.168.2.1 and a test TP link switch and a sonoff connected via ewelink. If I have my tablet connected to the wireless, I can switch both the switches on and off using their own apps. I can't see either switches from the wired network, and so the pi doesn't see them either. What am I doing wrong? Quote Link to comment Share on other sites More sharing options...
Luminous Posted July 25, 2019 Share Posted July 25, 2019 Best I would say is to try and keep the IP range the same, disable the dhcp on the 192.168.2.1. And just run everything of the 192.168.0.111 dhcp. Or change your Pi to also get the ip from the 192.168.2.1 dhcp Quote Link to comment Share on other sites More sharing options...
vlan_one Posted July 30, 2019 Share Posted July 30, 2019 (edited) I agree keeping all the devices on the same network/subnet/IP range (at first at least). This will make troubleshooting a bit easier. To get back to the initial issue. If you go to developer tools > states, do you see the entity for the TP Link? It think it should be switch.switcheroo unless the TP Link integration does something else with it. If you see it you could try adding a switch or an entity to the frontend if you use the LovelaceUI. I am using a hybrid of Lovelace and old legacy config files so I am not always sure where the legacy config stops working and Lovelace takes over. Edited July 30, 2019 by vlan_one Quote Link to comment Share on other sites More sharing options...
DeepBass9 Posted July 30, 2019 Author Share Posted July 30, 2019 I am still stuck at the point of getting the Pi to connect to the internet. very annoying, it initially worked, but now not. I have the pi plugged into a wired network on a fixed IP address, and I can see the HA app from either the wired or wireless AP. It seems there is a problem with DNS as the pi can't find anything on the internet, so that default installed weather service cannot be connected to. But if I install a component from the internet, then it is found and installed. So I get this: The log file shows : Tue Jul 30 2019 12:17:04 GMT+0200 (South Africa Standard Time) https://aa015h6buqvih86i1.api.met.no/weatherapi/locationforecast/1.9/ returned Cannot connect to host aa015h6buqvih86i1.api.met.no:443 ssl:None [Try again] And similar for anything else it has to find on the internet. Any ideas anyone? Quote Link to comment Share on other sites More sharing options...
Luminous Posted July 30, 2019 Share Posted July 30, 2019 You look really at the start of your HA setup. Format the SD card with the new software version. Plug the sd card in, network cable and then the power. Give it 20min and then access the url it gets from the router. If you don't know what IP the device got, load Fing app on your phone and it will scan all the devices on the network and tell you the IP. It should be connected to the internet and most of the stuff will start to work. Quote Link to comment Share on other sites More sharing options...
DeepBass9 Posted July 30, 2019 Author Share Posted July 30, 2019 I am moving backwards from that point. The 'should be connected to the internet' is where it all falls down. I have the IP addresses of various devices so once I get the internet connection sorted out, maybe I can move forward. I am using this my-network file to set up the static IP address : [connection] id=HassOS default uuid=8e923b56-c1c0-48b7-9a13-7de2ebd4be6e type=802-3-ethernet [ipv4] method=manual address=192.168.0.111/24,192.168.2.1 dns=8.8.8.8,8.8.4.4,127.0.1.1,192.168.0.1 [ipv6] addr-gen-mode=stable-privacy method=auto Quote Link to comment Share on other sites More sharing options...
DeepBass9 Posted July 31, 2019 Author Share Posted July 31, 2019 I have no done a fresh install using wifi network. It took a long time but is done. Below is the log, and I don,t see any network access errors. It pulls the hassio image and configurator image with no problem. 19-07-31 01:45:59 INFO (MainThread) [__main__] Initialize Hass.io setup 19-07-31 01:46:06 INFO (MainThread) [__main__] Setup HassIO 19-07-31 01:46:06 INFO (SyncWorker_0) [hassio.docker.supervisor] Attach to Supervisor homeassistant/armv7-hassio-supervisor with version 170 19-07-31 01:46:06 INFO (SyncWorker_0) [hassio.docker.supervisor] Connect Supervisor to Hass.io Network 19-07-31 01:46:08 INFO (SyncWorker_0) [hassio.docker.interface] Cleanup images: ['homeassistant/armv7-hassio-supervisor:163'] 19-07-31 01:46:10 INFO (MainThread) [hassio.utils.gdbus] Introspect org.freedesktop.systemd1 on /org/freedesktop/systemd1 19-07-31 01:46:10 INFO (MainThread) [hassio.utils.gdbus] Connect to dbus: org.freedesktop.systemd1 - /org/freedesktop/systemd1 19-07-31 01:46:10 INFO (MainThread) [hassio.utils.gdbus] Introspect org.freedesktop.hostname1 on /org/freedesktop/hostname1 19-07-31 01:46:11 INFO (MainThread) [hassio.utils.gdbus] Connect to dbus: org.freedesktop.hostname1 - /org/freedesktop/hostname1 19-07-31 01:46:11 INFO (MainThread) [hassio.utils.gdbus] Introspect de.pengutronix.rauc on / 19-07-31 01:46:11 INFO (MainThread) [hassio.utils.gdbus] Connect to dbus: de.pengutronix.rauc - / 19-07-31 01:46:11 INFO (MainThread) [hassio.host.info] Update local host information 19-07-31 01:46:11 INFO (MainThread) [hassio.utils.gdbus] Call org.freedesktop.DBus.Properties.GetAll on /org/freedesktop/hostname1 19-07-31 01:46:11 INFO (MainThread) [hassio.host.services] Update service information 19-07-31 01:46:11 INFO (MainThread) [hassio.utils.gdbus] Call org.freedesktop.systemd1.Manager.ListUnits on /org/freedesktop/systemd1 19-07-31 01:46:11 INFO (MainThread) [hassio.host.apparmor] Load AppArmor Profiles: {'hassio-supervisor'} 19-07-31 01:46:11 INFO (MainThread) [hassio.host.services] Reload local service hassos-apparmor.service 19-07-31 01:46:11 INFO (MainThread) [hassio.utils.gdbus] Call org.freedesktop.systemd1.Manager.ReloadOrRestartUnit on /org/freedesktop/systemd1 19-07-31 01:46:11 INFO (SyncWorker_1) [hassio.docker.interface] Attach to homeassistant/raspberrypi3-homeassistant with version landingpage 19-07-31 01:46:11 INFO (MainThread) [hassio.hassos] Detect HassOS 2.12 on host system 19-07-31 01:46:11 INFO (SyncWorker_0) [hassio.docker.hassos_cli] Found HassOS CLI homeassistant/armv7-hassio-cli with version 11 19-07-31 01:46:12 INFO (MainThread) [hassio.store.git] Load add-on /data/addons/git/a0d7b954 repository 19-07-31 01:46:12 INFO (MainThread) [hassio.store.git] Load add-on /data/addons/core repository 19-07-31 01:46:12 INFO (MainThread) [hassio.store] Load add-ons from store: 59 all - 59 new - 0 remove 19-07-31 01:46:12 INFO (MainThread) [hassio.addons] Found 0 installed add-ons 19-07-31 01:46:12 INFO (MainThread) [hassio.updater] Fetch update data from https://version.home-assistant.io/stable.json 19-07-31 01:46:21 INFO (MainThread) [hassio.snapshots] Found 0 snapshot files 19-07-31 01:46:21 INFO (MainThread) [hassio.discovery] Load 0 messages 19-07-31 01:46:21 INFO (MainThread) [hassio.ingress] Load 0 ingress session 19-07-31 01:46:21 INFO (MainThread) [__main__] Run Hass.io 19-07-31 01:46:21 INFO (MainThread) [hassio.misc.dns] Start DNS port forwarding for host add-ons 19-07-31 01:46:21 INFO (MainThread) [hassio.api] Start API on 172.30.32.2 19-07-31 01:46:21 INFO (MainThread) [hassio.addons] Phase 'initialize' start 0 add-ons 19-07-31 01:46:21 INFO (MainThread) [hassio.addons] Phase 'system' start 0 add-ons 19-07-31 01:46:21 INFO (MainThread) [hassio.addons] Phase 'services' start 0 add-ons 19-07-31 01:46:21 INFO (SyncWorker_0) [hassio.docker.interface] Restart homeassistant/raspberrypi3-homeassistant 19-07-31 01:46:28 INFO (MainThread) [hassio.homeassistant] Detect a running Home Assistant instance 19-07-31 01:46:28 INFO (MainThread) [hassio.addons] Phase 'application' start 0 add-ons 19-07-31 01:46:28 INFO (MainThread) [hassio.tasks] All core tasks are scheduled 19-07-31 01:46:28 INFO (MainThread) [hassio.core] Hass.io is up and running 19-07-31 01:46:28 INFO (MainThread) [hassio.homeassistant] Setup Home Assistant 19-07-31 01:46:28 INFO (SyncWorker_3) [hassio.docker.interface] Pull image homeassistant/raspberrypi3-homeassistant tag 0.96.5. 19-07-31 01:55:11 INFO (SyncWorker_3) [hassio.docker.interface] Tag image homeassistant/raspberrypi3-homeassistant with version 0.96.5 as latest 19-07-31 01:55:11 INFO (MainThread) [hassio.homeassistant] Home Assistant docker now installed 19-07-31 01:55:11 INFO (MainThread) [hassio.homeassistant] Start Home Assistant 19-07-31 01:55:11 INFO (SyncWorker_8) [hassio.docker.interface] Stop homeassistant application 19-07-31 01:55:16 INFO (SyncWorker_8) [hassio.docker.interface] Clean homeassistant application 19-07-31 01:55:17 INFO (SyncWorker_8) [hassio.docker.homeassistant] Start homeassistant homeassistant/raspberrypi3-homeassistant with version 0.96.5 19-07-31 01:55:53 INFO (MainThread) [hassio.homeassistant] Detect a running Home Assistant instance 19-07-31 01:55:53 INFO (SyncWorker_17) [hassio.docker.interface] Cleanup images: ['homeassistant/raspberrypi3-homeassistant:landingpage'] 19-07-31 03:22:59 INFO (MainThread) [hassio.addons] Create Home Assistant add-on data folder /data/addons/data/core_configurator 19-07-31 03:22:59 INFO (SyncWorker_4) [hassio.docker.interface] Pull image homeassistant/armv7-addon-configurator tag 3.4. 19-07-31 03:24:41 INFO (SyncWorker_4) [hassio.docker.interface] Tag image homeassistant/armv7-addon-configurator with version 3.4 as latest 19-07-31 03:24:44 INFO (MainThread) [hassio.homeassistant] Updated Home Assistant API token 19-07-31 03:24:44 INFO (MainThread) [hassio.ingress] Update Ingress as panel for core_configurator But still none of the entities are able to connect to the internet, I still get errors like this: Log Details (ERROR) Wed Jul 31 2019 05:20:19 GMT+0200 (South Africa Standard Time) https://aa015h6buqvih86i1.api.met.no/weatherapi/locationforecast/1.9/ returned Log Details (ERROR) Wed Jul 31 2019 04:55:46 GMT+0200 (South Africa Standard Time) Could not contact Home Assistant Update to check for updates Log Details (ERROR) Wed Jul 31 2019 04:55:46 GMT+0200 (South Africa Standard Time) Error doing job: Task exception was never retrieved Traceback (most recent call last): File "/usr/local/lib/python3.7/site-packages/aiohttp/connector.py", line 825, in _resolve_host self._resolver.resolve(host, port, family=self._family) File "/usr/local/lib/python3.7/site-packages/aiohttp/resolver.py", line 30, in resolve host, port, type=socket.SOCK_STREAM, family=family) File "uvloop/loop.pyx", line 1464, in getaddrinfo socket.gaierror: [Errno -3] Try again Quote Link to comment Share on other sites More sharing options...
Luminous Posted July 31, 2019 Share Posted July 31, 2019 Is your router not maybe blocking the connection from the Pi to the internet. Maybe some ports or firewall settings. Maybe port forwarding is required? Quote Link to comment Share on other sites More sharing options...
DeepBass9 Posted July 31, 2019 Author Share Posted July 31, 2019 (edited) Possible, but I have no clue how to set that up. My networking knowledge is just about non existent! I thought it was maybe DNS, as HASSIO is probably looking on the internet for an IP address, but when a url is used then it fails. Edited July 31, 2019 by DeepBass9 Quote Link to comment Share on other sites More sharing options...
vlan_one Posted July 31, 2019 Share Posted July 31, 2019 18 hours ago, DeepBass9 said: [ipv4] method=manual address=192.168.0.111/24,192.168.2.1 dns=8.8.8.8,8.8.4.4,127.0.1.1,192.168.0.1 It seems your default gateway is incorrect. If your Pi is in .192.168.0.0/24 subnet then there is no way to get to 192.168.2.1. Try and change your gateway to 192.168.0.1 (or whatever your router IP Address is) Quote Link to comment Share on other sites More sharing options...
DeepBass9 Posted July 31, 2019 Author Share Posted July 31, 2019 So ELI5, all of the adresses on the wired network are 192.168.0.XX. The addresses on the wireless part of the network are 192.168.2.XX. When I had the pi on the wired network with 192.168.0.111 as a static IP, it was visible on wired and wireless. Now I have used the following my-network file to get it up on wireless. Now I can see it on the wireless part of the network, but not from wired: Initially when it worked, thinking about it now, I had it connected with a network cable to the wireless AP and it came up with 192.168.2.XX address, could connect to the internet but was invisible from the wired side. [connection] id=HassOS default uuid=8e923b56-c1c0-48b7-9a13-7de2ebd4be7e type=802-11-wireless [wifi] mode=infrastructure ssid=dreamlodge [wifi-security] auth-alg=open key-mgmt=wpa-psk psk=DeepBass9 [ipv4] method=auto [ipv6] addr-gen-mode=stable-privacy method=auto Quote Link to comment Share on other sites More sharing options...
DeepBass9 Posted July 31, 2019 Author Share Posted July 31, 2019 Trying this now with wired connection : [connection] id=HassOS default uuid=8e923b56-c1c0-48b7-9a13-7de2ebd4be6e type=ethernet interface-name=eth0 permissions= secondaries= [ipv4] method=manual address=192.168.0.111/24,192.168.0.1 dns=8.8.8.8,8.8.4.4 dns-search= [ipv6] addr-gen-mode=stable-privacy method=auto Quote Link to comment Share on other sites More sharing options...
DeepBass9 Posted July 31, 2019 Author Share Posted July 31, 2019 Back to this point: Quote Link to comment Share on other sites More sharing options...
DeepBass9 Posted July 31, 2019 Author Share Posted July 31, 2019 If I do an ip config from my laptop I get this : 192.168.0.4 is the internet modem Quote Link to comment Share on other sites More sharing options...
DeepBass9 Posted July 31, 2019 Author Share Posted July 31, 2019 (edited) arp -a Gives this: The pi is 192.168.0.111: 192.168.2.1 is the wireless AP Edited July 31, 2019 by DeepBass9 Quote Link to comment Share on other sites More sharing options...
Luminous Posted July 31, 2019 Share Posted July 31, 2019 Is there a reason the wired and wifi is on a different IP range? DNS looks like google, is this hard coded in your router setup? Please draw us a picture, I think you setup is over complicated with multiple ranges Quote Link to comment Share on other sites More sharing options...
vlan_one Posted July 31, 2019 Share Posted July 31, 2019 4 minutes ago, DeepBass9 said: 192.168.0.4 is the internet modem According to your ipconfig output this is your laptop IP and your router should be 0.1 for the wired network. Can you ping the Google DNS server from the pi? Quote Link to comment Share on other sites More sharing options...
DeepBass9 Posted July 31, 2019 Author Share Posted July 31, 2019 Its quite simple I would have thought: Quote Link to comment Share on other sites More sharing options...
DeepBass9 Posted July 31, 2019 Author Share Posted July 31, 2019 4 minutes ago, vlan_one said: According to your ipconfig output this is your laptop IP and your router should be 0.1 for the wired network. Can you ping the Google DNS server from the pi? I don't know how to do that. Quote Link to comment Share on other sites More sharing options...
DeepBass9 Posted July 31, 2019 Author Share Posted July 31, 2019 The wireless AP has this LAN setup : Should I change this to something else? Quote Link to comment Share on other sites More sharing options...
vlan_one Posted July 31, 2019 Share Posted July 31, 2019 (edited) sorry for the assumption. if you are able to get onto a SSH terminal window of HASS, just issue the command ping 8.8.8.8 and see if you get a reply. Edited July 31, 2019 by vlan_one Quote Link to comment Share on other sites More sharing options...
DeepBass9 Posted August 6, 2019 Author Share Posted August 6, 2019 Still getting nowhere with this issue. I.m trying to install SSH on the pi but get this error: 19-07-31 05:28:45 INFO (SyncWorker_17) [hassio.docker.interface] Pull image homeassistant/armv7-addon-ssh tag 6.0. 19-07-31 05:28:45 ERROR (SyncWorker_17) [hassio.docker.interface] Can't install homeassistant/armv7-addon-ssh:6.0 -> 500 Server Error: Internal Server Error ("Get https://registry-1.docker.io/v2/: dial tcp: lookup registry-1.docker.io on [::1]:53: read udp [::1]:49822->[::1]:53: read: connection refused"). The time I would save by automating things compared to the time I have wasted on home assistant are rapidly becoming indistinguishable. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.