esphome / issues

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

MQTT logs, errors #295

Closed ZoltanSzilagyiCse closed 5 years ago

ZoltanSzilagyiCse commented 5 years ago

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

Windows 10 x64, using pip.

ESP (ESP32/ESP8266, Board/Sonoff):

ESP8266, NodeMCU v2

Affected component:

MQTT

Description of problem:

The problem based on the MQTT component. If I configure it using wrong broker URL (like 'asdf') it will accept without warning and it will run and try to report to it. Of course, it won't be reported but I can't get any logs about the failed connection.

Also tried this setup with the port number too. Changed the default 1883 number to something like '11883' run it, but the result was the same as I mentioned above.

The last thing I checked was the credentials. I disabled anonymous reporting and then tried to use wrong credentials (username and password). The compile was successful, initial setup too, but never reported and I never got any errors or logs that something was wrong configured.

Problem-relevant YAML-configuration entries: esp_8266_nodemcu_v2_04.zip

esphome:
  name: esp_8266_nodemcu_v2_04
  platform: ESP8266
  board: nodemcuv2

wifi:
  ssid: "WiFiSSID"
  password: "WiFiPassword"
  fast_connect: true
  manual_ip:
    static_ip: 192.168.2.81
    gateway: 192.168.0.1
    subnet: 255.255.252.0

# Enable logging
logger:
  level: VERBOSE
# Enable Home Assistant API
api:

ota:

switch:
  - platform: gpio
    name: "lamp_light"
    id: lamp_light
    pin: D7

sensor:
  - platform: dht
    pin: D6
    model: DHT22
    temperature:
      name: "Temperature"
    humidity:
      name: "Humidity"
    update_interval: 60s

mqtt:
  broker: example.com
  port: 1883
  discovery: true
  username: Username
  password: Password

Traceback (if applicable):

[22:16:11][I][app:063]: esphome-core version 1.13.0-dev compiled on May  5 2019, 22:15:47
[22:16:11][C][wifi:368]: WiFi:
[22:16:11][C][wifi:250]:   SSID: 'Martin Router King'
[22:16:11][C][wifi:251]:   IP Address: 192.168.2.81
[22:16:11][C][wifi:253]:   BSSID: 84:16:F9:AF:08:3E
[22:16:11][C][wifi:254]:   Hostname: 'esp_8266_nodemcu_v2_04'
[22:16:11][C][wifi:258]:   Signal strength: -45 dB [22:16:11][C][wifi:258]:   Signal strength: -45 dB ▂▄▆█
[22:16:11][C][wifi:259]:   Channel: 3
[22:16:11][C][wifi:260]:   Subnet: 255.255.252.0
[22:16:11][C][wifi:261]:   Gateway: 192.168.0.1
[22:16:11][C][wifi:262]:   DNS1: 0.0.0.0
[22:16:11][C][wifi:263]:   DNS2: 0.0.0.0
[22:16:11][C][switch.gpio:044]: GPIO Switch 'lamp_light'
[22:16:11][C][switch.gpio:045]:   Pin: GPIO13 (Mode: OUTPUT)
[22:16:11][C][switch.gpio:061]:   Restore Mode: Restore (Defaults to OFF)
[22:16:11][C][logger:137]: Logger:
[22:16:11][C][logger:138]:   Level: VERBOSE
[22:16:11](Message skipped because it was too big to fit in TCP buffer - This is only cosmetic)
[22:16:11](Message skipped because it was too big to fit in TCP buffer - This is only cosmetic)
[22:16:11][C][dht:023]: DHT:
[22:16:11][C][dht:024]:   Pin: GPIO12 (Mode: INPUT_PULLUP)
[22:16:11][C][dht:030]:   Model: DHT22 (or equivalent)
[22:16:11][C][dht:033]:   Update Interval: 60.0s
[22:16:11][C][dht:035]:   Temperature 'Temperature'
[22:16:11][22:16:11][C][dht:035]:     Unit of Measurement: '°C'
[22:16:11][C][dht:035]:     Accuracy Decimals: 1
[22:16:11][C][dht:035]:     Icon: 'mdi:thermometer'
[22:16:11][C][dht:036]:   Humidity 'Humidity'
[22:16:11][C][dht:036]:     Unit of Measurement: '%'
[22:16:11][C][dht:036]:     Accuracy Decimals: 0
[22:16:11](Message skipped because it was too big to fit in TCP buffer - This is only cosmetic)
[22:16:11](Message skipped because it was too big to fit in TCP buffer - This is only cosmetic)
[22:16:11][C][ota:031]:   Address: 192.168.2.81:8266
[22:16:11][C][api:102]: API Server:
[22:16:11][C][api:103]:   Address: 192.168.2.81:6053
[22:16:11][C][mqtt.sensor:024]: MQTT Sensor 'Temperature':
[22:16:11][C][mqtt.sensor:028]:   State Topic: 'esp_8266_nodemcu_v2_04/sensor/temperature/state'
[22:16:11][C][mqtt.sensor:024]: MQTT Sensor 'Humidity':
[22:16:11](Message skipped because it was too big to fit in TCP buffer - This is only cosmetic)
[22:16:59][22:16:59][D][dht:054]: Got Temperature=22.8°C Humidity=41.0%
[22:16:59][V][sensor:013]: 'Temperature': Received new state 22.800001
[22:16:59][V][sensor:013]: 'Humidity': Received new state 41.000000

Additional information and things you've tried:

I'm using DuckDNS to access my broker from a different place. I connected to the broker with other clients, so I know it is accessible from outside.

OttoWinter commented 5 years ago

Duplicate of https://github.com/esphome/issues/issues/301