-
Notifications
You must be signed in to change notification settings - Fork 819
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
LYWSD03MMC relevant data from connection get replaced by broadcast data #980
Comments
Would it be possible to share what you get on the serial monitor after the scan?
This solution is better in terms of battery consumption and quite easy to implement (less than 5min to flash the ATC firmware) |
Sure. It might be the connection failing from time to time, but I don't understand the serial output fully: Even so it works with homebridge mqtt and it probably should work with openhab with the retain option selected. |
I have a similar symptom with the DT24 Bluetooth voltmeter I added, and I found that two different message's were being sent on the same device topic. I found that I was seeing a message from the BLE scan and a second different message from the device BT connect. But I found that it did not cause an issue with my client as it was using home assistant mqtt discovery and it was ignoring the messages with missing fields. Does openHab have something similar to the home assistant value template and the is_defined macro ? In my setup that caused the messages to be ignored by the client.
|
@fhb you can use the macro |
Describe the bug
Although I set the esp32 to connect with every scan the temperature/humidity/battery data on mosquitto (version 1.5.7) is getting replaced by the data broadcasted by the LYWSD03MMC sensor on a scan:
Broadcast data:
Relevant data:
Therefore the relevant data is not available to openhab or mqttthing on homebridge most of the time and errors are thrown. Also "onlysensors" and "whitelist" seem not to work properly (set through mqtt commands).
To Reproduce
Steps to reproduce the behavior:
mosquitto_pub -t home/OpenMQTTGateway/commands/MQTTtoBT/config -m '{"scanbcnct":1}'
mosquitto_pub -t home/OpenMQTTGateway/commands/MQTTtoBT/config -m '{"white-list":[your MAC adresses]}'
mosquitto_pub -t home/OpenMQTTGateway/commands/MQTTtoBT/config -m '{"interval":0}'
mosquitto_pub -t home/OpenMQTTGateway/commands/MQTTtoBT/config -m '{"onlysensors":true}'
Expected behavior
I would expect OpenMQTTGateway to only plublish the relevant data set after a successful connection and otherwise not push an mqtt message.
Environment (please complete the following information):
Possible workaround, earlier discussion:
A workaround solution would be a broadcasting firmware. Similar issues seem to have been discussed here: https://community.openmqttgateway.com/t/xiaomi-mijia-lywsd03mmc-esp32-support/775/49
The text was updated successfully, but these errors were encountered: