ESPhome manual_ip Errno 113

I have a few Wemos D1 mini converted from Tasmota to ESPhome. One of the codes for test is

esphome:
  name: mini
  platform: ESP8266
  board: d1_mini

wifi:
  ssid: "ranch"
  password: "09052009"
  manual_ip:
    static_ip: 192.168.1.241
    gateway: 192.168.1.1
    subnet: 255.255.255.0
    dns1: 192.168.1.1
    dns2: 8.8.8.8
#  use_address: 192.168.1.241
  ap:
    ssid: "mini"
    password: "09052009"
    manual_ip:
      static_ip: 192.168.1.241
      gateway: 192.168.1.1
      subnet: 255.255.255.0

# Enable logging
logger:

# Enable Home Assistant API
api:

ota:

switch:
  - platform: gpio
    name: "Mini_Wemos LED"
    pin: D4

Without manual_ip things work normally, but it puts device betheen 192.168.1.100 and 200 where I have set my DHCP range on router. This particular vas .111. But I want to have it on manual part above 200 where my iot devices are.

When enable manual IP, I can see it on my network, but I get error:

INFO Reading configuration...
INFO Starting log output from 192.168.1.241 using esphome API
INFO Connecting to 192.168.1.241:6053 (192.168.1.241)
WARNING Initial connection failed. The ESP might not be connected to WiFi yet (Error connecting to 192.168.1.241: [Errno 113] No route to host). Re-Trying in 1 seconds
INFO Connecting to 192.168.1.241:6053 (192.168.1.241)
WARNING Initial connection failed. The ESP might not be connected to WiFi yet (Error connecting to 192.168.1.241: [Errno 113] No route to host). Re-Trying in 2 seconds
INFO Connecting to 192.168.1.241:6053 (192.168.1.241)

It is strange. When I put in manual ip 192.168.1.111 (the same as it was without manual_ip part), things work ok. But even if I change ip to 192.168.1.112, I get the same error.

Did I miss something?

Have your read this?

1 Like

Hi
i have same problem i think
how i fix it ?
i change the static IP but its not connected

Need to use_address of your old IP

no difference

I also have this error ā€¦
Has anyone found a solution?
I ask for help please.

1 Like

You found a solution?

I found a solution that may work for you.

Although I am using esp-07 it is necessary to keep the platform as esp01_1m.

After I made this change to the platform type, esp8266 connected to EspHome.

For me working setup is like:

wifi:
  ssid: "myssid"
  password: "mypass"
  use_address: 192.168.1.236
  manual_ip:
    static_ip: 192.168.1.236
    gateway: 192.168.1.1
    subnet: 255.255.255.0
    dns1: 192.168.1.1 
1 Like

Hi guys
I have been having the same problem and I canā€™t move forward: (ERROR Connecting to 192.168.0.1353:8266 failed: [Errno -2] Name or service not known)
Iā€™ve tried the suggestions in the post but none worked, would anyone have any other solutions?

it looks like your problem is with IP addressing. The largest possible ip is 255 and you are using it 1353.

After you assign your device a static IP check that it is actually connected to your router by pinging it through the command prompt. Then check if you are connected to EspHome.

Sorry for resurrecting this old(ish) thread, but Iā€™m stumbling into a very similar issueā€¦

Iā€™ve just finished moving some devices from one subnet to another and the recently moved devices arenā€™t being recognised by HA.

To elaborate: I have several other devices which I moved a few weeks ago, all on the same Wifi SSID, same subnet, etc - and they are being recognised by HA, so it canā€™t be an mDNS issueā€¦ (maybe :wink: )

The ESPHome GUI can see them, I can update their configuration, show logs, etc, but HA canā€™t see themā€¦

Looking at packet captures, it appears that ā€œHAā€ (running on a PI, so this could be ESPHome tooā€¦) is ARPing for the old IP address, so IMO something is stuck with the old addressā€¦

Iā€™ve restarted HA, rebooted the entire device, etc, but Iā€™m still seeing the old addresses in the logs:

2020-06-15 13:50:15 DEBUG (MainThread) [aioesphomeapi.connection] 192.168.7.34: Connecting to 192.168.7.34:6053 (('192.168.7.34', 6053))
2020-06-15 13:50:15 DEBUG (MainThread) [aioesphomeapi.connection] 192.168.7.234: Connecting to 192.168.7.234:6053 (('192.168.7.234', 6053))
2020-06-15 13:50:15 DEBUG (MainThread) [aioesphomeapi.connection] 192.168.7.39: Connecting to 192.168.7.39:6053 (('192.168.7.39', 6053))
2020-06-15 13:50:15 DEBUG (MainThread) [aioesphomeapi.connection] 192.168.7.106: Connecting to 192.168.7.106:6053 (('192.168.7.106', 6053))
2020-06-15 13:50:18 INFO (MainThread) [homeassistant.components.esphome] Can't connect to ESPHome API for 192.168.7.234: Error connecting to ('192.168.7.234', 6053): [Errno 113] Connect call failed ('192.168.7.234', 6053)
2020-06-15 13:50:18 INFO (MainThread) [homeassistant.components.esphome] Trying to reconnect in 60 seconds
2020-06-15 13:50:18 INFO (MainThread) [homeassistant.components.esphome] Can't connect to ESPHome API for 192.168.7.34: Error connecting to ('192.168.7.34', 6053): [Errno 113] Connect call failed ('192.168.7.34', 6053)
2020-06-15 13:50:18 INFO (MainThread) [homeassistant.components.esphome] Can't connect to ESPHome API for 192.168.7.106: Error connecting to ('192.168.7.106', 6053): [Errno 113] Connect call failed ('192.168.7.106', 6053)
2020-06-15 13:50:18 INFO (MainThread) [homeassistant.components.esphome] Can't connect to ESPHome API for 192.168.7.39: Error connecting to ('192.168.7.39', 6053): [Errno 113] Connect call failed ('192.168.7.39', 6053)

Iā€™m seeing no attempts to reach those old addresses on :6053, just ARPs (which makes sense).

So, in my mind, I think that ā€œESPHomeā€ is working, but ā€œHAā€ is still using the old addressesā€¦???

Working config:

# Sonoff S26 Socket
# MAC Address:      cc:50:e3:1b:ec:1e

esphome:
  name: dehumidifier
  platform: ESP8266
  board: esp01_1m

wifi:
  ssid: !secret iot_wifi_ssid
  password: !secret iot_wifi_pass

  manual_ip:
    static_ip: 192.168.4.25
    gateway: 192.168.4.1
    subnet: 255.255.255.0
    dns1: 192.168.4.1
  domain: .home

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Dehumidifier Fallback Hotspot"
    password: "wTuI9eoMXvYo"

captive_portal:
  
# Enable logging
logger:

# Enable Home Assistant API
api:
  password: !secret api_password

ota:
  password: !secret ota_password

time:
  - platform: sntp
    id: sntp_time
    timezone: Europe/London
    servers: 192.168.4.1

sensor:
  - platform: wifi_signal
    name: "Dehumidifier WiFi Signal"
    update_interval: 60s
  - platform: uptime
    name: "Dehumidifier Uptime"

text_sensor:
  - platform: version
    name: "Dehumidifier ESPHome Version"

binary_sensor:
  - platform: gpio
    pin:
      number: GPIO0
      mode: INPUT_PULLUP
      inverted: True
    name: "Dehumidifier Button"
    on_press:
      - switch.toggle: relayandled

output:
  - platform: esp8266_pwm
    id: sonoff_green_led
    pin:
      number: GPIO13
      inverted: True

light:
  - platform: monochromatic
    name: "Dehumidifier Status LED"
    output: sonoff_green_led
    id: led

switch:
  - platform: gpio
    pin: GPIO12
    id: relay
  - platform: template
    name: "Dehumidifier Relay" 
    optimistic: true
    id: relayandled
    turn_on_action:
    -  switch.turn_on: relay
    -  light.turn_on: led
    turn_off_action:
    -  switch.turn_off: relay
    -  light.turn_off: led
  

Not working config:

# Sonoff S26 Socket
# MAC Address:      cc:50:e3:18:92:60

esphome:
  name: officefan
  platform: ESP8266
  board: esp01_1m

wifi:
  ssid: !secret iot_wifi_ssid
  password: !secret iot_wifi_pass

  manual_ip:
    static_ip: 192.168.4.26
    gateway: 192.168.4.1
    subnet: 255.255.255.0
    dns1: 192.168.4.1
  domain: .home

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Officefan Fallback Hotspot"
    password: "mTfIDWXze9Bs"

time:
  - platform: sntp
    id: sntp_time
    timezone: Europe/London
    servers: 192.168.4.1

captive_portal:

# Enable logging
logger:

# Enable Home Assistant API
api:
  password: !secret api_password

ota:
  password: !secret ota_password

sensor:
  - platform: wifi_signal
    name: "Office Fan WiFi Signal"
    update_interval: 60s
  - platform: uptime
    name: "Office Fan Uptime"

text_sensor:
  - platform: version
    name: "Office Fan ESPHome Version"

binary_sensor:
  - platform: gpio
    pin:
      number: GPIO0
      mode: INPUT_PULLUP
      inverted: True
    name: "Office Fan Button"
    on_press:
      - switch.toggle: relayandled

output:
  - platform: esp8266_pwm
    id: sonoff_green_led
    pin:
      number: GPIO13
      inverted: True

light:
  - platform: monochromatic
    name: "Office Fan Status LED"
    output: sonoff_green_led
    id: led

switch:
  - platform: gpio
    pin: GPIO12
    id: relay
  - platform: template
    name: "Office Fan Relay" 
    optimistic: true
    id: relayandled
    turn_on_action:
    -  switch.turn_on: relay
    -  light.turn_on: led
    turn_off_action:
    -  switch.turn_off: relay
    -  light.turn_off: led
  

Iā€™ve tried using use_address with the same address as static_ip, but that made no change.

I tried removing the manual_ip section, and returning to DHCP (which has a static mapping to the same address) - thinking that might need to update something, but still no change.

Nothing obvious in HAā€™s /config folder as I grepā€™d for the old addresses (grep -lir "192.168.7." /config/*)

Any more ideas / pointers?

Hello every one,

Just like to share my experience regarding this error.

I Found that error 113 was because of uploading a bad bin file so the sonoff (in my case). it did not connect to the wifi anymoreā€¦ that caused esphome losing the connection to it too. thatā€™s why the OTA method was failing giving this error. So I flashed it with a clean bin file using an usb serial adapter and that solved the problem.

may be it will be helpful for somebody.

5 Likes

I got the error when I changed my IP address. It is necessary to flash the ESP8266 with the esphomeflasher application, for this you need to create .bin and download it to a folder on your PC.

2 Likes

this worked for me thanks!

Hi, I have the same problemā€¦why this YAML doesnā€™t work?

esphome:
  name: temp2
  platform: ESP32
  board: nodemcu-32s

wifi:
  ssid: "myssid"
  password: "mypass"
  use_address: 192.168.200.198
  manual_ip:
    # Set this to the IP of the ESP
    static_ip: 192.168.200.198
    # Set this to the IP address of the router. Often ends with .1
    gateway: 192.168.200.2
    # The subnet of the network. 255.255.255.0 works for most home networks.
    subnet: 255.255.255.0
    dns1: 192.168.200.179

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "mybackup"
    password: "mybackuppass"

captive_portal:

# Enable logging
logger:

# Enable Home Assistant API
api:
  password: "myapipass"

ota:
  password: "myotapass"

sensor:
  - platform: dht
    pin: 5
    temperature:
      name: "Living Room Temperature"
    humidity:
      name: "Living Room Humidity"
    update_interval: 30s
    model: DHT22

Thank you so much for the insight! This was indeed my problem as well, after uploading the file via usb it worked!!! Thank you

1 Like

This worked for me.

Thanks

Resurrecting this old thread, what do you mean by create a .bin. How do I create that?

This procedure is only for a manual installation of the firmware, previously edited in Homeassistant, when it is not achieved with the normal sequence of ESPHome.

I have had to review the sequence because after the successive updates of ESPHome the procedure has changed.

Steps:



ThirdStep

1 Like