-
-
Notifications
You must be signed in to change notification settings - Fork 33.8k
No update in MQTT Binary Sensor #7478
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I doubt that your configuration worked as the indentation is wrong (or it's a copy-&-paste error). As far as I remember are topics starting with |
Yes, there is a copy&past error, this is my actual configuration: binary_sensor:
- platform: mqtt
state_topic: "devices/ds18b201/$online"
name: "Status DS18B20"
payload_on: "true"
payload_off: "false" In Home Assistant release 0.43 the same configuration (and topic) worked well. |
We updated paho-mqtt with #7214 for 0.43.1. |
Same issue for me with version 0.44.2 in the public docker container image. I tried rolling back to paho-mqtt==1.2.2 with no better results. This is problematic for users of homie-esp8266 library since it exposes a fair amount of values using a $ symbol. This issue might be related to PR #7269 but I'd have to test to be sure. For now I'm just using 0.43. |
Yes, looks like that subtopics starting with |
@modus-operandi I'm facing the same problem, did you figure some work-around ? |
@dgomes My workaround was to downgrade my home-assistant version to 0.43. I'm using docker so I just pulled the 0.43 image (homeassistant/home-assistant:0.43) and relaunched. IMO I'd still call this a bug rather than "dropping support" but I'm not bothered enough to write a PR for this. |
@amigian74 I can confirm that PR #7269 is the root cause of this issue and should be IMO reverted, as the approach of matching topic with subscription by using regular expressions is just plain wrong (especially as PR #7269 does not correctly escape characters with special meaning). So for example subscription "/foo/.../" will match "/foo/bar/", anything having "^" or "$" on other place than at the beginning or end of a topic will never match anything, any braces will likely never match as well etc. |
A PR is welcome to fix it @pezinek . But not a revert. The reason why it has been added still needs to be supported. |
OK, if this change can't be reverted, then I'll fix the escaping of special characters at least, even though I still believe that using regexps in this case is a bad idea. |
Make sure you are running the latest version of Home Assistant before reporting an issue.
You should only file an issue if you found a bug. Feature and enhancement requests should go in the Feature Requests section of our community forum:
Home Assistant release (
hass --version
):0.44.0
Python release (
python3 --version
):3.4.2
Component/platform:
binary_sensor/mqtt
Description of problem:
HA receive the mqtt message with correct state_topic but there is no internal message to homeassistant.components.mqtt and there is no update of the binary_sensor
Expected:
Change of the binary_sensor state
Problem-relevant
configuration.yaml
entries and steps to reproduce:Traceback (if applicable):
Additional info:
The same configuration worked in Home Assistant 0.43
In mqtt broker log file there is the mqtt PUBLISH message sent to HA.
In HA log there are other messages related to other mqtt messages received, for example:
2017-05-07 19:22:45 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on devices/ds18b201/temperature/degrees: 21.2
The text was updated successfully, but these errors were encountered: