Just tried esphome last couple of days and coming from Espurna there is a lot to like in esphome!
However, I am having a few problems
After the first few flashes, I found that the device will not come fully online. It connects to my LAN, but I canāt re-flash via port 8266, or telnet to that port. No MQTT messages show up in HA.
Is there anything obvious Iām doing wrong? Does my device have insufficient RAM? Can I get detailed logging without a serial connection?
The only way I can currently recover the device is by turning off my wifi network and forcing the device into fallback AP modeā¦
FYI: Iām currently not interested in the native API component as Iām trying to go like-for-like in switching from Espurna.
Looks to me like only MQTT and direct serial are available for logging. If my node is not coming up properly, then my logs will not be available via MQTT.
A telnet option would be wonderful if it exists.
I tried building a new config and going through the time consuming fallback AP dance - and now Iām getting ānot enough spaceā
After a couple of days of having a bad time with esphome, I think Iāll just go back to espurna for now. Shame espurna doesnāt support SM16716
As to your issue, there are some problems with the current release of ESPhome. Try the DEV version (available in the same repository). Just make sure to stop the regular ESPhome addon first.
The binaries Iām producing are 439KB - and Iāve been flashing 511KB espurna bins with no problems. No idea why esphome doesnāt like this. After another 30 mins of messing, it looks like I will need to open this device and get soldering to get espurna back on there
Most times when I try this fallback OTA flash, I simply get a connection reset at around 100% upload - not even an error message.
Unless you have some rather advances routing, you canāt have the gateway 192.168.1.1 and a device IP 192.168.20.217.
They need to be on the same subnetā¦
I.e. both on 192.168.1.X or 192.168.20.X
I would correct that first (unless it was intentional)
Your subnet mask says that with a gateway of 192.168.1.1, your local network is from 192.168.1.0 to 192.168.1.255, but your static IP for the plug is outside this range. So you need one of:
Static IP and gateway should have the same first three octets (numbers), aligned to whatever your router is set to; or
Subnet mask of 255.255.0.0 for a \16 network, and if you donāt understand exactly what that means, this is not the bullet point solution youāre looking for.
Also, itās likely that your router will be giving out IP addresses via DHCP. If youāre setting static addresses for your devices (which is a good idea), you should make sure that you either set a static reservation in your router or restrict its DHCP range and set the static IP outside that range. Otherwise the router might give out your static address to another device (phone, for example), whereupon weird things will happen.
The network configuration is intentional. 192.168.1.1 is routable from 192.168.20.x.
You are right @Troon that the subnet mask is probably incorrect in this case - I donāt actually remember now why I was bothering with manual_ip in the first placeā¦
Would that config stop the device from connecting to MQTT?
Ah that was it. If I donāt include manual_ip, then the upload fails with (example from a different node):
INFO Resolving IP address of 6c8595.local
ERROR Error resolving IP address of 6c8595.local. Is it connected to WiFi?
ERROR (If this error persists, please set a static IP address: https://esphome.io/components/wifi.html#manual-ips)
ERROR Error resolving IP address: Error resolving address with mDNS: Did not respond. Maybe the device is offline., [Errno -3] Temporary failure in name resolution
Above is correct as mDNS will definitely not work across different subnets.
I guess the manual_ip option is being used in two different contexts. One is from oneās dev machine when uploading OTA firmware (just the IP address is important), and then the second is when the device has its static IP config set at startup (IP, subnet & gateway).
Looks like youāre running VLANs or a separate network for IoT items? The key difference here to your original post is that the gateway is now in 192.168.20.x, which aligns with the subnet mask.
Itās still worth setting manual_ip if you have a setup that now works. Youāll find other posts here where things suddenly stop working because DHCP leases have expired and the routerās given out different IPs.
Yes I have multiple VLANs, the āiotā SSID is hidden and has various firewalls in place. Funnily enough I had never configured a static IP since putting this setup in, and so made a beginnerās error