esphome / issues

Issue Tracker for ESPHome
https://esphome.io/
290 stars 36 forks source link

Warning that not connected to the internet despite the node on wifi and sending data #1264

Closed Newms118 closed 4 years ago

Newms118 commented 4 years ago

Operating environment/Installation (Hass.io/Docker/pip/etc.):

I am running Home Assistant (HASSIO) on a Raspberry Pi 4 4Gb version.

ESP (ESP32/ESP8266, Board/Sonoff):

I'm using a NodeMCU ordered off of amazon (HiLetgo 3pcs ESP8266 NodeMCU CP2102 ESP-12E Internet WiFi Development Board Open Source Serial Wireless Module Works Great for Arduino IDE/Micropython (Large))

Affected component:

Description of problem:

I'm doing some really simple work here. I'm following this video to make BRUH sensors: https://www.youtube.com/watch?v=9Yu57vjz7AY.

A few days ago I successfully set up two NodeMCUs with the DHT22 sensor, the compilation went fine, they were able to be flashed OTA after I used the Rpi4 USB to do the initial compilation.

Today I'm trying to add the PIR and an LED. Both of my running NodeMCUs have been submitting data to my HA all day and I've been able to track this. So to install the PIR and LED, I went to the relevant code section on Esphome and added this to the yaml file. Went to upload and compile and I get an error saying, "Warning! You are not connected to the Internet." This repeats twice and I've include the text from the log below (sorry it may not be in the right format, dont know how to submit something in debug mode).

Not being connected to the internet doesn't make sense, the node is online, submitting data to HA. In case there was something wrong with wifi, I reconnected my node sensor back to the Rpi4 using the USB and tried to compile using USB (like I originally did) instead of OTA. I got the same error, saying it still cant connect to the internet, despite it still being connected already.

In case it was something wrong with the chip, I created a new node, using a new NodeMCU with nothing else connected to it. I connected the NodeMCU to the RPi using the USB as done before. That gave me the second error log shown below.

Ive search around and cant find any information online or in the forums, so any help would be greatly appreciated.

Problem-relevant YAML-configuration entries:

PASTE YAML FILE HERE
esphome:
  name: temp_sensor_node_1
  platform: ESP8266
  board: nodemcuv2

wifi:
  ssid: "XXXXXXXX"
  password: "XXXXXXXXXXXXXXXXX"

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

captive_portal:

# Enable logging
logger:

# Enable Home Assistant API
api:

ota:
sensor:
  - platform: dht
    pin: D7
    model: dht22
    temperature:
      name: "SenseNode Temp"
    humidity:
      name: "SenseNode Humidity"
    update_interval: 30s

binary_sensor:
  - platform: gpio
    pin: D6
    name: "SenseNode Motion"
    device_class: motion

light:
  - platform: fastled_clockless
    chipset: WS2812
    pin: D3
    num_leds: 1
    rgb_order: RGB
    name: "SenseNode LED"

Logs (if applicable):

PASTE DEBUG LOG HERE
INFO Reading configuration /config/esphome/temp_sensor_node_1.yaml...
INFO Generating C++ source...
INFO Compiling app...
INFO Running:  platformio run -d /config/esphome/temp_sensor_node_1
Processing temp_sensor_node_1 (board: nodemcuv2; framework: arduino; platform: espressif8266@2.2.3)
--------------------------------------------------------------------------------
HARDWARE: ESP8266 80MHz, 80KB RAM, 4MB Flash
Warning! You are not connected to the Internet.
If you build a project first time, we need Internet connection to install all dependencies and toolchains.
Looking for FastLED library in registry
Warning! You are not connected to the Internet.
If you build a project first time, we need Internet connection to install all dependencies and toolchains.
Dependency Graph
|-- <ESPAsyncTCP-esphome> 1.2.2
|   |-- <ESP8266WiFi> 1.0
|-- <ESP8266WiFi> 1.0
|-- <ESP8266mDNS> 1.2
|   |-- <ESP8266WiFi> 1.0
|-- <ESPAsyncWebServer-esphome> 1.2.6
|   |-- <ESPAsyncTCP-esphome> 1.2.2
|   |   |-- <ESP8266WiFi> 1.0
|   |-- <Hash> 1.0
|   |-- <ESP8266WiFi> 1.0
|-- <DNSServer> 1.1.1
|   |-- <ESP8266WiFi> 1.0
Compiling /data/temp_sensor_node_1/.pioenvs/temp_sensor_node_1/src/esphome/components/fastled_base/fastled_light.cpp.o
In file included from src/esphome/components/fastled_base/fastled_light.cpp:1:0:
src/esphome/components/fastled_base/fastled_light.h:14:21: fatal error: FastLED.h: No such file or directory

*****************************************************************
* Looking for FastLED.h dependency? Check our library registry!
*
* CLI  > platformio lib search "header:FastLED.h"
* Web  > https://platformio.org/lib/search?query=header:FastLED.h
*
*****************************************************************

 #include "FastLED.h"
                     ^
compilation terminated.
Compiling /data/temp_sensor_node_1/.pioenvs/temp_sensor_node_1/src/main.cpp.o
Generating LD script /data/temp_sensor_node_1/.pioenvs/temp_sensor_node_1/ld/local.eagle.app.v6.common.ld
*** [/data/temp_sensor_node_1/.pioenvs/temp_sensor_node_1/src/esphome/components/fastled_base/fastled_light.cpp.o] Error 1
Compiling /data/temp_sensor_node_1/.pioenvs/temp_sensor_node_1/lib4d9/ESP8266WiFi/BearSSLHelpers.cpp.o
In file included from src/esphome.h:18:0,
                 from src/main.cpp:3:
src/esphome/components/fastled_base/fastled_light.h:14:21: fatal error: FastLED.h: No such file or directory

*****************************************************************
* Looking for FastLED.h dependency? Check our library registry!
*
* CLI  > platformio lib search "header:FastLED.h"
* Web  > https://platformio.org/lib/search?query=header:FastLED.h
*
*****************************************************************

 #include "FastLED.h"
                     ^
compilation terminated.
*** [/data/temp_sensor_node_1/.pioenvs/temp_sensor_node_1/src/main.cpp.o] Error 1
========================== [FAILED] Took 7.58 seconds ==========================

If I click "show logs", I get this:

INFO Reading configuration /config/esphome/temp_sensor_node_1.yaml...
INFO Starting log output from temp_sensor_node_1.local using esphome API
INFO Connecting to temp_sensor_node_1.local:6053 (XXX.XXX.XXX.XXX)
INFO Successfully connected to temp_sensor_node_1.local
[21:26:28][I][app:100]: ESPHome version 1.14.3 compiled on Jun  3 2020, 19:34:12
[21:26:28][C][wifi:415]: WiFi:
[21:26:28][C][wifi:283]:   SSID: [redacted]
[21:26:28][C][wifi:284]:   IP Address: XXX.XXX.XXX.XXX
[21:26:28][C][wifi:286]:   BSSID: [redacted]
[21:26:28][C][wifi:287]:   Hostname: 'temp_sensor_node_1'
[21:26:28][C][wifi:291]:   Signal strength: -47 dB ▂▄▆█
[21:26:28][C][wifi:295]:   Channel: 10
[21:26:28][C][wifi:296]:   Subnet: 255.255.255.0
[21:26:28][C][wifi:297]:   Gateway: 192.168.0.1
[21:26:28][C][wifi:298]:   DNS1: 192.168.0.1
[21:26:28][C][wifi:299]:   DNS2: (IP unset)
[21:26:28][C][gpio.binary_sensor:015]: GPIO Binary Sensor 'SenseNode Motion'
[21:26:28][C][gpio.binary_sensor:015]:   Device Class: 'motion'
[21:26:28][C][gpio.binary_sensor:016]:   Pin: GPIO12 (Mode: INPUT)
[21:26:28][C][logger:175]: Logger:
[21:26:28][C][logger:176]:   Level: DEBUG
[21:26:28][C][logger:177]:   Log Baud Rate: 115200
[21:26:28][C][logger:178]:   Hardware UART: UART0
[21:26:28][C][dht:017]: DHT:
[21:26:28][C][dht:018]:   Pin: GPIO13 (Mode: INPUT)
[21:26:28][C][dht:024]:   Model: DHT22 (or equivalent)
[21:26:28][C][dht:027]:   Update Interval: 30.0s
[21:26:28][C][dht:029]:   Temperature 'SenseNode Temp'
[21:26:28][C][dht:029]:     Unit of Measurement: '°C'
[21:26:28][C][dht:029]:     Accuracy Decimals: 1
[21:26:28][C][dht:029]:     Icon: 'mdi:thermometer'
[21:26:28][C][dht:030]:   Humidity 'SenseNode Humidity'
[21:26:28][C][dht:030]:     Unit of Measurement: '%'
[21:26:28][C][dht:030]:     Accuracy Decimals: 0
[21:26:28][C][dht:030]:     Icon: 'mdi:water-percent'
[21:26:29][C][captive_portal:169]: Captive Portal:
[21:26:29][C][ota:029]: Over-The-Air Updates:
[21:26:29][C][ota:030]:   Address: temp_sensor_node_1.local:8266
[21:26:29][C][api:095]: API Server:
[21:26:29][C][api:096]:   Address: temp_sensor_node_1.local:6053
[21:26:55][D][dht:048]: Got Temperature=21.1°C Humidity=56.5%
[21:26:55][D][sensor:092]: 'SenseNode Temp': Sending state 21.10000 °C with 1 decimals of accuracy
[21:26:55][D][sensor:092]: 'SenseNode Humidity': Sending state 56.50000 % with 0 decimals of accuracy

This is the second error log, from trying to compile a new NodeMCU for a new node:
INFO Reading configuration /config/esphome/temp_sensor_node_3.yaml...
INFO Generating C++ source...
INFO Core config or version changed, cleaning build files...
INFO Deleting /data/temp_sensor_node_3/.pioenvs
INFO Deleting /data/temp_sensor_node_3/.piolibdeps
INFO Compiling app...
INFO Running:  platformio run -d /config/esphome/temp_sensor_node_3
Processing temp_sensor_node_3 (board: nodemcuv2; framework: arduino; platform: espressif8266@2.2.3)
--------------------------------------------------------------------------------
HARDWARE: ESP8266 80MHz, 80KB RAM, 4MB Flash
Looking for ESPAsyncTCP-esphome library in registry
Warning! You are not connected to the Internet.
If you build a project first time, we need Internet connection to install all dependencies and toolchains.
Looking for ESPAsyncWebServer-esphome library in registry
Warning! You are not connected to the Internet.
If you build a project first time, we need Internet connection to install all dependencies and toolchains.
Warning! You are not connected to the Internet.
If you build a project first time, we need Internet connection to install all dependencies and toolchains.
Dependency Graph
|-- <ESP8266WiFi> 1.0
|-- <ESP8266mDNS> 1.2
|   |-- <ESP8266WiFi> 1.0
|-- <DNSServer> 1.1.1
|   |-- <ESP8266WiFi> 1.0
Compiling /data/temp_sensor_node_3/.pioenvs/temp_sensor_node_3/src/esphome/components/api/api_connection.cpp.o
Compiling /data/temp_sensor_node_3/.pioenvs/temp_sensor_node_3/src/esphome/components/api/api_pb2.cpp.o
Compiling /data/temp_sensor_node_3/.pioenvs/temp_sensor_node_3/src/esphome/components/api/api_pb2_service.cpp.o
Compiling /data/temp_sensor_node_3/.pioenvs/temp_sensor_node_3/src/esphome/components/api/api_server.cpp.o
In file included from src/esphome/components/api/api_connection.h:7:0,
                 from src/esphome/components/api/api_connection.cpp:1:
src/esphome/components/api/api_server.h:19:25: fatal error: ESPAsyncTCP.h: No such file or directory

*********************************************************************
* Looking for ESPAsyncTCP.h dependency? Check our library registry!
*
* CLI  > platformio lib search "header:ESPAsyncTCP.h"
* Web  > https://platformio.org/lib/search?query=header:ESPAsyncTCP.h
*
*********************************************************************

 #include <ESPAsyncTCP.h>
                         ^
compilation terminated.
*** [/data/temp_sensor_node_3/.pioenvs/temp_sensor_node_3/src/esphome/components/api/api_connection.cpp.o] Error 1
In file included from src/esphome/components/api/api_server.cpp:1:0:
src/esphome/components/api/api_server.h:19:25: fatal error: ESPAsyncTCP.h: No such file or directory

*********************************************************************
* Looking for ESPAsyncTCP.h dependency? Check our library registry!
*
* CLI  > platformio lib search "header:ESPAsyncTCP.h"
* Web  > https://platformio.org/lib/search?query=header:ESPAsyncTCP.h
*
*********************************************************************

 #include <ESPAsyncTCP.h>
                         ^
compilation terminated.
*** [/data/temp_sensor_node_3/.pioenvs/temp_sensor_node_3/src/esphome/components/api/api_server.cpp.o] Error 1
========================== [FAILED] Took 8.95 seconds ==========================

Additional information and things you've tried: I've tried stopping and restarting Esphome addon. I've restarted HA. Nothing has changed.

2016for commented 4 years ago

+1 Same here Getting "Warning! You are not connected to the Internet." Was working fine yesterday

Tried restarting addon, HA, wifi, internet. All other internet connections are working on HA.

TorbjornZachrisson commented 4 years ago

+1 Same here Tried everything. Different computers. Docker and no docker. Beta release.

anthonylavado commented 4 years ago

We figured out the problem in the Discord. I'll open another issue with how to fix it.

glmnet commented 4 years ago

Closing. Fixes and temp workarounds https://github.com/esphome/issues/issues/1265