home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
71.11k stars 29.79k forks source link

MQTT binary sensor messages not received #19114

Closed jquatier closed 5 years ago

jquatier commented 5 years ago

Home Assistant release with the issue: .83.3

Last working Home Assistant release (if known): .81

Operating environment (Hass.io/Docker/Windows/etc.): Docker

Component/platform: MQTT binary sensor

Description of problem: I have a few esphomeyaml sensors that report MQTT state messages but I dont see them in the logs on the HASS side with MQTT debug on. I am now just publishing messages myself from the service panel in home assistant and still only see the "transmitting" message. Other non-binary sensor state messages seem to come in regularly fine.

2018-12-08 03:53:08 DEBUG (MainThread) [homeassistant.components.mqtt] Transmitting message on garage_car_presence/binary_sensor/garage_car_present/state: OFF
2018-12-08 03:53:08 DEBUG (MainThread) [homeassistant.components.mqtt] Transmitting message on garage_car_presence/binary_sensor/garage_car_present/state: OFF
2018-12-08 03:53:09 DEBUG (MainThread) [homeassistant.components.mqtt] Transmitting message on garage_car_presence/binary_sensor/garage_car_present/state: OFF

I do see an initial state message when I boot the sensor:

018-12-08 03:43:45 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on garage_car_presence/binary_sensor/garage_car_present/state: b'ON'

Problem-relevant configuration.yaml entries and (fill out even if it seems unimportant):

logger:
  default: info
  logs:
    homeassistant.components.mqtt: debug

mqtt:
  broker: localhost
  discovery: True
  client_id: home-assistant
  keepalive: 30
  protocol: 3.1

Traceback (if applicable):

N/A

Additional information:

emontnemery commented 5 years ago

Is the sensor shown as unavailable when it stops working? If yes, this bug should be fixed by #18953 + #19019 which are in 0.84

jquatier commented 5 years ago

It actually just shows the old state. It’s odd that I don’t even get the debug statement showing the message was received. I just removed the sensor and recreated it and I’m now seeing the debug messages for received messages right after the transmitting message. You might be right though. I’ll see if those commits resolve the problem.

jquatier commented 5 years ago

Been solid on .84b1. Closing for now. Thanks!