Giter Club home page Giter Club logo

Comments (3)

Maczuga avatar Maczuga commented on July 22, 2024

It is supported, listed as "Xiaomi Aqara thermometer via mi thermometer". Somebody just mistitled the device in readme file, as there is no Aqara temperature / humidity bluetooth sensor.

I have 5 of them running using this library.

from bt-mqtt-gateway.

kobush avatar kobush commented on July 22, 2024

I'm not sure if we are talking about the same device model here. Mine are round devices with LCD display. I have tried to configure this but it couldn't connect. Using hctool lescan devices are listed as MJ_HT_V1:

pi@raspi-zero:~/bt-mqtt-gateway $ sudo hcitool lescan
LE Scan ...
58:0D:27:4B:C5:20 (unknown)
01:0D:B2:C9:6F:BD (unknown)
58:2D:34:32:63:38 (unknown)
58:2D:34:32:63:38 MJ_HT_V1
C4:7C:8D:6B:27:9F (unknown)
C4:7C:8D:6B:27:9F Flower care
58:0D:27:4B:C5:20 (unknown)
C4:7C:8D:6B:23:D3 (unknown)
C4:7C:8D:6B:18:DC (unknown)
58:2D:34:32:5B:42 (unknown)
58:2D:34:32:63:58 (unknown)
C4:7C:8D:6B:23:D3 Flower care
C4:7C:8D:6B:18:DC Flower care
C8:0F:10:A5:09:CF (unknown)
58:2D:34:32:5B:42 MJ_HT_V1
58:2D:34:32:63:58 MJ_HT_V1
58:2D:34:32:5A:AB (unknown)
58:2D:34:32:5A:AB MJ_HT_V1
C8:0F:10:A5:09:CF MI_SCALE

I configured just one of them and got DeviceTimeutError:

2019-09-03 10:57:32,891 INFO bt-mqtt-gw.workers.mithermometer mithermometer.py:60:status_update - Updating 1 mithermometer devices
2019-09-03 10:57:32,894 DEBUG bt-mqtt-gw.workers.mithermometer mithermometer.py:63:status_update - Updating mithermometer device 'library' (58:2D:34:32:63:58)
2019-09-03 10:57:38,902 ERROR bt-mqtt-gw.workers.mithermometer logger.py:48:log_exception - Time out during update of mithermometer device 'library' (58:2D:34:32:63:58)
Traceback (most recent call last):
  File "/home/pi/bt-mqtt-gateway/workers/mithermometer.py", line 66, in status_update
    yield self.update_device_state(name, data["poller"])
  File "/home/pi/bt-mqtt-gateway/.venv/lib/python3.5/site-packages/interruptingcow/__init__.py", line 153, in inner
    return func(*args, **kwargs)
  File "/home/pi/bt-mqtt-gateway/workers/mithermometer.py", line 77, in update_device_state
    ret.append(MqttMessage(topic=self.format_topic(name, attr), payload=poller.parameter_value(attr)))
  File "/home/pi/bt-mqtt-gateway/.venv/lib/python3.5/site-packages/mithermometer/mithermometer_poller.py", line 136, in parameter_value
    self.fill_cache()
  File "/home/pi/bt-mqtt-gateway/.venv/lib/python3.5/site-packages/mithermometer/mithermometer_poller.py", line 60, in fill_cache
    self.firmware_version()
  File "/home/pi/bt-mqtt-gateway/.venv/lib/python3.5/site-packages/mithermometer/mithermometer_poller.py", line 109, in firmware_version
    with self._bt_interface.connect(self._mac) as connection:
  File "/home/pi/bt-mqtt-gateway/.venv/lib/python3.5/site-packages/btlewrap/base.py", line 44, in __enter__
    self._backend.connect(self._mac)
  File "/home/pi/bt-mqtt-gateway/.venv/lib/python3.5/site-packages/btlewrap/bluepy.py", line 26, in _func_wrapper
    return func(*args, **kwargs)
  File "/home/pi/bt-mqtt-gateway/.venv/lib/python3.5/site-packages/btlewrap/bluepy.py", line 55, in connect
    self._peripheral = Peripheral(mac, iface=iface)
  File "/home/pi/bt-mqtt-gateway/.venv/lib/python3.5/site-packages/bluepy/btle.py", line 391, in __init__
    self._connect(deviceAddr, addrType, iface)
  File "/home/pi/bt-mqtt-gateway/.venv/lib/python3.5/site-packages/bluepy/btle.py", line 436, in _connect
    rsp = self._getResp('stat')
  File "/home/pi/bt-mqtt-gateway/.venv/lib/python3.5/site-packages/bluepy/btle.py", line 407, in _getResp
    resp = self._waitResp(wantType + ['ntfy', 'ind'], timeout)
  File "/home/pi/bt-mqtt-gateway/.venv/lib/python3.5/site-packages/bluepy/btle.py", line 347, in _waitResp
    rv = self._helper.stdout.readline()
  File "/home/pi/bt-mqtt-gateway/.venv/lib/python3.5/site-packages/interruptingcow/__init__.py", line 74, in handler
    raise exception
exceptions.DeviceTimeoutError
2019-09-03 10:57:38,967 DEBUG bt-mqtt-gw.workers_manager workers_manager.py:48:execute - Execution result of command MithermometerWorker.status_update: []

from bt-mqtt-gateway.

wutu avatar wutu commented on July 22, 2024

After increasing the timeout, data can be retrieved.
per_device_timeout: 20

from bt-mqtt-gateway.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.