-
Notifications
You must be signed in to change notification settings - Fork 100
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
Mi Flora Max Support #171
Comments
Example with demo.py: pi@plantgateway:~ $ sudo python demo.py --backend bluepy poll XX:XX:XX:XX:XX:XX |
Could you clarify which device you are talking about? |
Xiaomi HHCC Mi Flower Care Plant Sensor Max |
Yup, got the same problem. The larger version uses a different MAC address range, even though it seems to be the same chip (Dialog DA14580). It announces itself as the "Grow care garden" with firmware version 3.6.6 (not 3.3.6!) but fails to respond. The trace below first polls a small sensor, then the big one:
The Android app works of course, so I guess it reacts to different commands. Suggestions on how to debug the Bluetooth traffic? |
Yes, the delay works. I made a slightly improved version that checks for the firmware version and adds the delay when necessary. And what I meant by debugging is sniffing the traffic between the official app and the sensor, not this Python code. |
I tried to get data from the new Mi Flora Max with firmware version 3.6.6. Unfortunately, it did not work. Is this new version supported or have I done something wrong?
LOG:
Sat, 06 Aug 2022 15:17:42 ERROR could not read data from C4:7C:8D:6D:59:3F (flora_1) with reason:
Traceback (most recent call last):
File "/usr/local/lib/python3.9/dist-packages/btlewrap/bluepy.py", line 27, in _func_wrapper
return func(*args, **kwargs)
File "/usr/local/lib/python3.9/dist-packages/btlewrap/bluepy.py", line 75, in read_handle
return self._peripheral.readCharacteristic(handle)
File "/usr/local/lib/python3.9/dist-packages/bluepy/btle.py", line 529, in readCharacteristic
self._writeCmd("rd %X\n" % handle)
File "/usr/local/lib/python3.9/dist-packages/bluepy/btle.py", line 302, in _writeCmd
raise BTLEInternalError("Helper not started (did you call connect()?)")
bluepy.btle.BTLEInternalError: Helper not started (did you call connect()?)
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/local/lib/python3.9/dist-packages/plantgw/plantgw.py", line 263, in process_all
self.process_mac(sensor)
File "/usr/local/lib/python3.9/dist-packages/plantgw/plantgw.py", line 241, in process_mac
self._publish(sensor_config, poller)
File "/usr/local/lib/python3.9/dist-packages/plantgw/plantgw.py", line 213, in _publish
MQTTAttributes.BATTERY.value: poller.parameter_value(MI_BATTERY),
File "/usr/local/lib/python3.9/dist-packages/miflora/miflora_poller.py", line 149, in parameter_value
return self.battery_level()
File "/usr/local/lib/python3.9/dist-packages/miflora/miflora_poller.py", line 119, in battery_level
self.firmware_version()
File "/usr/local/lib/python3.9/dist-packages/miflora/miflora_poller.py", line 128, in firmware_version
res = connection.read_handle(_HANDLE_READ_VERSION_BATTERY) # pylint: disable=no-member
File "/usr/local/lib/python3.9/dist-packages/btlewrap/bluepy.py", line 33, in _func_wrapper
raise BluetoothBackendException() from last_error
btlewrap.base.BluetoothBackendException
The text was updated successfully, but these errors were encountered: