-
Notifications
You must be signed in to change notification settings - Fork 139
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
Support of "Xiaomi Mijia Temperature and Humidity Sensor" #74
base: master
Are you sure you want to change the base?
Conversation
…opic defined in configuration file.
Added information about Xiaomi Mijia Temperature and Humidity Sensor
* switched library 'Mijia Bluetooth Temperature Smart Humidity' from mitemp_bt to mithermometer * fixed schema generation for openHAB * set 'retain=True' for mqtt messages for homeassistant-mqtt * other minor fixes
* Minor fixes
Hey, thanks for your great work - I have started using this branch and I very much like it. However I would like propose update of config.ini.dist: In config.ini.dist there is the following information: # The MQTT base topic to publish all Mi Flora sensor data topics under. # Default depends on the configured reporting_method #base_topic = miflora # Default for: mqtt-json, mqtt-smarthome #base_topic = homie # Default for: mqtt-homie #base_topic = homeassistant # Default for: homeassistant-mqtt #base_topic = v1/devices/me/telemetry # Default for: thingsboard-json #base_topic = # Default for: wirenboard-mqtt So as log as I use mqtt-json the default toppic should be miflora. While the default toppic is no longer **miflora** but **misensor** - what makes total sense cause we no longer use only miflora sensors - also it was already implemented in miflora-mqtt-daemon.py: if reporting_mode == 'mqtt-homie': default_base_topic = 'homie' elif reporting_mode == 'homeassistant-mqtt': default_base_topic = 'homeassistant' elif reporting_mode == 'thingsboard-json': default_base_topic = 'v1/devices/me/telemetry' elif reporting_mode == 'wirenboard-mqtt': default_base_topic = '' else: default_base_topic = 'misensor' Hope you dont mind my changes
Fixing default base_topic to misensor based on implementation
I use these changes since this spring and I had no issues. Could this pull request be merged into the master? |
Hey guys! This is a cool but also big PR. I did not yet get around to review it... but if the addition works for you guys, there is no need to wait any further. @aqualx could you please point me to the 1-2 areas of the change that I might be interested to review, as they change existing functionality or might become an issue later? Thanks |
@aqualx Especially the new OUIs (MAC prefixes) are important for users with new devices. |
Any update on This? It would be great is this could be merged so the users of this devices can use this maim project and don't have to use the other fork. |
Hey @CWempe and @aqualx, I had big plans to further improve this daemon! Sadly I didn't have much time the last couple of months. I'm definitely willing to apply these changes. @CWempe if I resolved the conflicts in this PR and provided a merge-ready state, would you be able to test with both devices? |
I could test the Temp/Humidity device. |
I can help. I have 9 MiFlora and 2 Temp/Hum devices. |
Fyi in an attempt to merge this eventually I went ahead and merged smaller unrelated pieces from this PR in #105, aside many further PRs and improvements from my side. In general my concern with this PR is the bloating (doubling in some areas) of the existing structure, and the threading approach. Before the script is bloated more I would want to refactor the hell out of it. This project grew out of its original hacky scope almost immediately and I never took the time to follow a proper design. Every convention and every sensor deserves its own class, this could be combined with adding a new sensor type - that's where this PR comes into play. |
Dear @aqualx, dear @ThomDietrich! I believe forming this whole project into a "MQTT Thingy Interface" on top of Passive BLE Beacon Monitor will make you both happy 💞! What do you think? @onebavarian @CWempe Gratefully for everything, |
btw: I just found this project: It does not support as many Xiaomi devices as Passive BLE Beacon Monitor but some senors are supported. |
They even seem to have the "force update"-feature I'm looking for on Pull since 2019 :P Still, bt-mqtt-gateway uses miflora-git and such polling and not BLE Bacon broadcast monitor which - to me - seems fundamentally better suited for battery usage:
|
What's new:
Solution tested in Debian Stretch with python 3.5 (stable).
Notes:
config.ini
changed.