Esphome not working after transition from raspberry pi to virtual machine on laptop

Hi

I decided to try installing a virtual machine on a spare laptop instead of a pie. I followed the instructions on this website and everything works now, except I can not get temp reading from my two esp devices. I get red lights on the esp home for these devices. I am able to ping the esp devices from the virtual machine. Any ideas?
http://www.thesmarthomehookup.com/migrate-your-hass-io-from-a-raspberry-pi-to-a-windows-virtual-machine/

Have you added the esp devices to home assistant via the integrations page?

Thank you for your suggestion. I deleted the integration and re-entered it and I am able to get readings from them now. But I am not able to do OTA. They show offline on the esphome page . Any other suggestion?

The OTA problem sounds like the old problem of Avahi/Bonjour/.local not working in ESPhome when running in a container. You can get this functionality back by using static IPs in your esphome yaml configs.

I tried uploading and this the error message I got. How do I set the static IPs

ERROR Error resolving IP address of basement_sensor.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 -2] Name or service not known

Ok, figured it out. Just add this line in esp module yaml file for each module
manual_ip:
static_ip: 192.168.1.155 <---- address of esp mode, make sure you reserve it in router
gateway: 192.168.1.1
subnet: 255.255.255.0

I am now able to do OTA. but it shows offline still

1 Like

Even if module is listed as offline in dashboard, OTA still typically works.

Thanks for that! Worked like a charm :wink: