hannseman / homebridge-mi-hygrothermograph

Homebridge plugin for the Xiaomi Mi Bluetooth Temperature and Humidity Sensor
MIT License
267 stars 52 forks source link

Any suggestion to extend the Bluetooth LE range? #22

Closed Aekung closed 6 years ago

Aekung commented 6 years ago

Thank you very much for the plugin. I've been using it and it works very well so far. I like the fact that it can publish temperature and humidity to MQTT Broker so that I can use those values in home automation.

However, I am experiencing the Bluetooth LE coverage range, which can't go to my second floor very steady. Do you have any suggestion on what I should do to that might help me extending the rage of Bluetooth LE of this device? Any suggestion would be worth for me to try.

Thank you in advance.

hannseman commented 6 years ago

Thanks!

Yeah I have the same problem but haven’t gotten around to try and fix it. I’ve been planning to solder a bigger antenna to the Bluetooth usb-adapter I use. It’s a really cheap one so maybe looking around for a more powerful and probably expensive adapter is an option. Let me know if you figure something out.

Aekung commented 6 years ago

@hannseman

Thanks for the reply. I'm not sure if right now the device is trying to connect to the Apple TV or the Raspberry Pi via Bluetooth LE? I thought it would connect with Apple TV that I'm using as the hub for Home App just like other bluetooth peripherals. In this case, using Bluetooth USB with Raspberry Pi shouldn't cause any different, is it correct?

I have 2 Mi Devices in my home and 3 Apple TVs. However, only 2 Apple TVs are compatible with Bluetooth LE. I put the 4th Generation in my living room and the 4k in my Home Theater room. If I install one of the Mi Device in the living room and power my 4th Generation Apple TV on, Mi device will be found and connected very steady. However, if I turn my 4th Generation Apple TV off, the Mi Device in my living room will not be found easily and if it is found, the connection is super unsteady. Because of this, I think the Mi Device is connecting to my Apple TV instead of Raspberry Pi.

I'm not sure if I understand correctly. Please kindly advice if I am wrong.

hannseman commented 6 years ago

The Apple TV does not communicate directly with homebridge devices. It will always have to go through your Raspberry Pi running homebridge. Homebridge acts like middle hand between Apple HomeKit and devices which are not natively HomeKit compatible.

In the case of this sensor the Apple TV will have no idea how to make sense of the raw data that is sent over Bluetooth or even know that it’s a Bluetooth device which is producing the data it’s seeing. The work of parsing the sensor data is made by this plugin which is then exposed over the network by homebridge.

Using a HomePod or Apple TV as a hub will give you remote access and the ability to manage permissions for your devices. As I’ve understood it can also act as a Bluetooth repeater for official HomeKit Bluetooth devices. But because of the way homebridge works it will not have the ability to do this.

I have no good explanation why you are seeing that turning off your Apple TV while connected to your local network would give you connectivity issues. What other Mi devices are you running?

Aekung commented 6 years ago

@hannseman Thanks for the very well and clear explanation. I will have to try to find those Bluetooth Range Extender Antenna and plug it in my Raspberry Pi and I will let you know how it turns out.

The Mi Device I'm using is Xiaomi Mijia Bluetooth Hygrothermograph, which is the same device as in your plugin's picture.

hannseman commented 6 years ago

Closing this issue but please comment if you find out any tricks for enhancing the range.