My esp8266 Wemos D1 running 0.13.1 has started with some strange WIFI behaviour:
It has a static IP but I can no longer connect to it when the D1 is connected to the Router AP
It shows up on the Router (using the static IP)
I CAN connect to its built in AP and control it from there
It works fine with Home Assistant and I can control it from there (meaning its on the WIFI)
Everything used to work fine, however for the last couple of months I have been unable to connect to it the way I am meant to be able to connect to it.
eh? Why is the D1 no longer answering on its IP if called through the browser or WLED app? Even HA seems to think the ip is x.x.x.12 (the static IP I’ve given it)… Its internal web server must still be running if HA can talk to it?
What device are you using to “Browse” the D1?
Have you tried to ping the MCU IPaddress?
Any chance your Laptop/Tablet/Phone is on a different subnet than the D1, what’s the D1 IP and your device IP?
BTW, there’s no need to “hide” internal IP addresses (192.168.x.x, 10.x.x.x). They’re designed so they can’t be reached except by devices physically attached to your network. It’s safe to publish them, for eg one of my internal PC’s is at 192.168.132.36, while I have a WLED instance at 192.168.132.201. That information is of no use to you if you can’t get into my network (you can’t). That’s what your ISP or personal router/firewall does for you by design.
@divsys: I have tried controlling the WLED using the browser on my computer, this used to work before - I presume the WLED has a built in webserver.
The computer IP is 192.168.0.4
D1 IP: 192.168.0.12
Both on Subnet 255.255.255.0
If I ping I get “Destination host unreachable”…
I know the LAN IP is internal, I just put x.x.x.12 to emphasize I knew the static IP of the device.
I just find it odd that the HA is still able to communicate and control the WLED… I know it is probably using API calls to GET/POST, but still, if the IP isnt responding…?
Because mDNS exclusively resolves hostnames ending with the [.local] top-level domain. This can cause problems if .local includes hosts that do not implement mDNS, but that can be found using a conventional unicast DNS server. I got around the conflicts by using my own DNS - pihole.
What’s the IP of the HA server?
Have you tried rebooting the WiFi access point?
If HA can reach the D1, then the D1 is up. API calls still need to use the IP address of the D1, if you’re getting “Unreachable…” on pings then your PC doesn’t know how to reach that address all of a sudden.
Initially I’d suspect a router/firewall issue. Can you get to a terminal on the HA machine and try a ping there?
Definitely check out network issues at the PC end or a router/switch issue
Is your PC setup for DHCP or a hardcoded IP address?
Try changing from one to the other and see if you can suddenly ping.
Another common issue in the Win world is Windows firewall taking offense for some unknown reason.
You could try temporarily turning it off (there may be one with your antivirus as well).
A little weirder possibility is your network routing being mangled.
Try a “route print” from an admin command prompt.
It might show your subnet being split up for traffic.
Not terribly likely, but worth a look.
Just thought…
Are the D1, HA, and PC all attached to the same standalone switch or are you using the router as a switch?
Might be worth putting a small 8-port switch in if there isn’t one at the moment.
Router “switches” can be programmed to filter some traffic
I get the following when I do a “route print”:
192.168.0.0 255.255.255.0 On-link 192.168.0.4 281
192.168.0.4 255.255.255.255 On-link 192.168.0.4 281
Anyway, based on this I changed the subnet on the D1 t o be 255.255.255.255 and now I can get to it from my PC… still no joy from phone or router… but atleast progress… and shows there is nothing wrong with the D1 - only an issue on my network.
The devices in question have all got static IPs.
I’ve got 3 routers running DD-WRT in the house, 2 of them set up as APs, but all on the same subnet, etc… everything else is playing nicely with each other.
I will have a play and see if I cant get it connecting properly from all devices.
Ok, as I guessed (and you discovered) it’s a network issue.
The subnet mask should be 255.255.255.0.
That corresponds to a /24 subnet, 24 bits (the 192.168.0 part) are fixed and the last 8 depend on the device.
This allows for 254 devices (.0 and .255 are reserved).
With 3 DD-WRT’s in the house you could have 3 routers, but normally you wouldn’t.
Typically you setup 1 of the devices to do DHCP and the routing and leave the others as Access Points only. That way you don’t have to guess where a device may or may not have gotten it’s address from and/or which of your 3 routers is acting as a gateway to any given device.
Networks tend to operate best when they’re as simple as possible and as complicated as necessary - but only that much. Definitely reduce your wireless AP’s to the minimum you need - only 1 DHCP supplying device on the network. And remember, your ISP modem is often a router with DHCP enabled…