Geekzone: technology news, blogs, forums
Guest
Welcome Guest.
You haven't logged in yet. If you don't have an account you can register now.


Lizard1977

1735 posts

Uber Geek

ID Verified

#295267 17-Mar-2022 17:01
Send private message

I took advantage of PB Tech's EOFY sale to get a discount on the Xiaomi smart home bundle - the gateway, plus a pair of motion sensors, a door sensor, a humidity/temp sensor, along with a simple button switch.  I figured this would work reasonably well with HA, but unless it's just my foggy non-Covid brain, I can't for the life of me work out what I'm doing wrong.

 

I set up the gateway and added it to the Mi Home app on my phone.  I then added the Xiaomi Miio integration in HA, and it found and added the gateway.  But then the door sensor (which works fine with the Mi Home app) can't be added using the Miio integration (it's not a supported device - something to do with the gateway being a lumi gateway?).  I haven't tried the other devices - if I've wandered down the wrong path, I'd prefer to keep them boxed for now.

 

I think a while back I was looking at the Conbee II for controlling Zigbee devices - is this the way forward or is there actually a simple way to integrate the basic Xiaomi devices into Home Assistant?  I wanted to check that these types of sensors would do what I was looking to do before buying more, and then probably getting the Conbee to run everything locally.  But maybe I need to get the Conbee anyway so I can bring all the devices into Home Assistant in the first place.


Create new topic
Affiliate link
 
 
 

Affiliate link: NordVPN allows you to securely access the Internet, encrypt your connection and keep your browsing history private.
fe31nz
815 posts

Ultimate Geek


  #2887935 18-Mar-2022 00:32
Send private message

I have an older Xiaomi gateway + devices pack with a mains socket, button, reed switch and PIR.  Due to not being able to get the gateway to allow me local access, I decided to try directly connecting all the other to zigbee and bought a CC2531 device to do that with.  That works fine - they all connect directly to it.  The gateway is now working well as a nightlight for my mother - I am not using it for automation and it is controlled only via its Android app.  It would be nice if I could get the gateway under local control, but I think it is unlikely now.  When I was testing using the devices via the gateway and cloud control, it just did not work very well - the delay for traffic to the cloud site and back was seriously annoying and I hated the app.  And I also hate the idea of relying on anything outside my network.


tieke
555 posts

Ultimate Geek

ID Verified

  #2887966 18-Mar-2022 08:06
Send private message

I'll have to double-check my setup, but I've had Xiaomi Gateways and many many sensors/devices/lights etc working fine here with HA for many years. I could change to a direct zigbee connection I suppose, but I've never had an issue with response times etc, so if it's not broken..

 

More importantly, although I'm not sure which hub version you have I know that while my older hub used the Xiaomi Miio integration, I have the newer Aqara hub connecting to Home Assistant via the HomeKit integration so that's probably what you should look at. I think there is a sticker with the eight-digit HomeKit code that you need on the hub packaging. I can try and find mine if you need to know what it looks like.

 

EDIT: The sticker looks like this and I don't think you can get the number otherwise - I archived a photo of mine so I wouldn't lose it, and made sure the sticker was moved to the bottom of the unit rather than the packaging (which makes a lot of sense, so hopefully that is how your one is already).

 


Lizard1977

1735 posts

Uber Geek

ID Verified

  #2887972 18-Mar-2022 08:19
Send private message

I did a bit more checking and experimenting last night, and learned a few things.  The door and window sensor that I set up is Bluetooth, whereas all the other devices in the bundle are Zigbee.  I hadn't appreciated this until I started experimenting - I just assumed they all connected to the gateway as zigbee devices.  I don't know if that's the case for other door and window sensors, but it does limit it's usefulness as far as Home Assistant goes (as far as I can tell).  There doesn't seem to be a way to connect a Bluetooth device to Home Assistant (unless that's something the Conbee II can do) - I guess I had assumed that it would be connected via the gateway (which is connected to Home Assistant), but it seems like the gateway I have (a lumi device, whatever that is) doesn't support adding subdevices to Home Assistant, which really limits what I wanted to do with the door sensor.  Basically, I wanted it to run a bunch of automations configured in HA.  I can do limited automations in the Mi Home app, but that kind of defeats the purpose of having HA.

 

I guess I need to go and find a door/window sensor that is Zigbee and not Bluetooth.  I'll also try the motion sensor and the button to see how they work and whether they can be added into HA.  




tieke
555 posts

Ultimate Geek

ID Verified

  #2888015 18-Mar-2022 09:21
Send private message

I'd still recommend you try the HomeKit integration instead: as long as the Xiaomi base station can see the sensors, it doesn't matter what communication method they use.  (My Xiaomi home door/window sensors that are connected to my Xiaomi base station all show up in Home Assistant without an issue.)


Lizard1977

1735 posts

Uber Geek

ID Verified

  #2888030 18-Mar-2022 10:06
Send private message

So, the Xiaomi gateway is in Homekit.  I can't remember how I got it in there, but it's showing up in the Home app as a bridge.  But the Door/Window sensor is not.  I can see the Door/Window sensor in the Mi app, but it just says "Bluetooth gateway is connected."

 

I added a motion sensor, and that shows up in Homekit.  I tried to add that using the Miio integration in HA, but it doesn't even show up in Discovery (whilst the Door/Window sensor did, but couldn't be added).  I looked at the Homekit integration, but if I try to add an accessory it will only show the entities already added to HA, which doesn't include this motion sensor.

 

In the meantime, I tried to set up an automation in the Home app, where if motion is detected then it turns on the hallway lights.  Didn't work.  No idea why.  I experimented with the Mi Home app, but all I can do is set it to send a notification to my phone when the motion sensor is activated (because I have no other devices connected in the Mi Home app).  That does work, but it's disappointingly slow.  It's slightly better than the cheap Genio motion sensor I got from Kmart, but still too slow to detect motion before I'm halfway down the hallway (at least when the notification comes through - it's possible the delay is in sending/receiving the notification).  But without being able to connect it to lights, I can't actually tell if the sensor is working as it should.

 

It all feels very muddled... 


tieke
555 posts

Ultimate Geek

ID Verified

  #2888074 18-Mar-2022 11:10
Send private message

That's annoying that they've bundled door sensors that don't integrate with Homekit when that integration is an explicitly highlighted reason for the combo purchase on the PBTech webpage ("Works with Mi Home and Apple HomeKit") - I'd say that's a reason to request a refund if you wanted one. My xiaomi door sensors are several years old, but connect via the standard Xiaomi zigbee connection.

 

You're right in that you don't have to individually add Xiaomi sensors via HomeKit - once the hub has been added, additional sensors just appear automatically as attached devices/entities (unless you disable that under system options for that HomeKit controller).

 

As far as the motion detection goes, unfortunately that seems to be an issue using presence detection with most wireless motion detectors, regardless of make. I saw a good comment about it recently, where someone was disappointed that changing to local tuya didn't speed up their sensors response time enough - basically battery-powered motion sensors go to a low power mode in order to last as long as possible, so it takes them a couple of seconds to power up and send the appropriate alert, which can make them pretty ineffective for relatively quick-moving presence detection, especially if you're waiting on that alert to go to the cloud and back to a phone app.

 

It's a pity you can't test with more immediate local responses than the app - the old hub had its own light and sound options that you could include in automations, but it looks like there are no such options for the latest version.


Lizard1977

1735 posts

Uber Geek

ID Verified

  #2888114 18-Mar-2022 11:57
Send private message

I may look into asking PB Tech for a return/refund.  So far, it's pretty much 0 for 2 with the devices.  The door/window sensor is next to useless if I can't add it to HA or even Homekit, and the motion sensor - though it is in Homekit - doesn't trigger automations.

 

I understand about the limitations of battery-powered presence detection.  However, I've seen plenty of videos on YT demonstrating motion sensors that activating nearly immediately, and they appear to be battery-powered.  I can't imagine what use a motion sensor would be that had such a long lag time (barring detecting very slow moving burglars).  Does anyone have good experience with a motion sensor brand/model that they can recommend (same for the door/window sensor)?




peejayw
1576 posts

Uber Geek

Subscriber

  #2888184 18-Mar-2022 12:33
Send private message

I have a Philips Hue motion sensor connected to a Conbee. Not cheap but detection is very fast and cooldown is only 8 secs.




 I'm supposed to respect my elders, but it's getting harder and harder for me to find one now.


eonsim
114 posts

Master Geek


  #2888608 19-Mar-2022 08:34
Send private message

So for Xiaomi BLE sensors there are a couple of different options for getting them into Home Assistant.

 

In HACS for HA there is a BLE passive monitor, which supports a fairly wide range of Xiaomi BLE gear, everything from their toothbrushes through some door sensors and temperature sensors. It does require you to have a Bluetooth module with support for BLE installed on the HA machine, and it needs to be close enough to catch the BLE broadcasts, I use it for a number of Xiaomi temperature sensors.

 

https://github.com/custom-components/ble_monitor

 

 

 

There is also ESPhome, which can create BLE to wifi repeaters. You set up a unit and put a couple of them in areas of the house too far from the HA server for it to catch BLE transmissions and they will catch the BLE transmission and send it back to HA via wifi. They natively support a range of Xiaomi BLE sensors and will transform the data locally before transmitting the results back. However, if they device isn't specifically supported I believe they also have a generic BLE -> wifi repeater function and will forward on BLE raw data for HA to interpret (see the second github link). I have a number of ESP32's set up to grab the various BLE data from around the house but haven't tried the generic repeater/gateway function.

 

https://esphome.io/

 

https://github.com/myhomeiot/esphome-components#ble-gateway

 

 

 

Finally for Xiaomi there is an updated integration in HACs which seems to support a wider range of devices than the standard built in one, it also supports local access for a range of devices using the mIoT protocol. So if you've not tried this version yet you could give it a go.

 

https://github.com/al-one/hass-xiaomi-miot

 

 


fe31nz
815 posts

Ultimate Geek


  #2888850 19-Mar-2022 23:49
Send private message

The Linux kernel supports remote use of USB devices with the usbipd and usbip commands.  So if you have a Linux system anywhere on your home network that has a spare USB port to put a BLE device in, or already has a builtin BLE device that appears on lsusb, you can use it remotely for HA.


Create new topic





News and reviews »

D-Link G415 4G Smart Router Review
Posted 27-Jun-2022 17:24


New Zealand Video Game Sales Reaches $540 Million
Posted 26-Jun-2022 14:49


Github Copilot Generally Available to All Developers
Posted 26-Jun-2022 14:37


Logitech G Introduces the New Astro A10 Headset
Posted 26-Jun-2022 14:20


Fitbit introduces Sleep Profiles
Posted 26-Jun-2022 14:11


Synology Introduces FlashStation FS3410
Posted 26-Jun-2022 14:04


Intel Arc A380 Graphics First Available in China
Posted 15-Jun-2022 17:08


JBL Introduces PartyBox Encore Essential Speaker
Posted 15-Jun-2022 17:05


New TVNZ+ streaming brand launches
Posted 13-Jun-2022 08:35


Chromecast With Google TV Review
Posted 10-Jun-2022 17:10


Xbox Gaming on Your Samsung Smart TV No Console Required
Posted 10-Jun-2022 00:01


Xbox Cloud Gaming Now Available in New Zealand
Posted 10-Jun-2022 00:01


HP Envy Inspire 7900e Review
Posted 9-Jun-2022 20:31


Philips Hue Starter Kit Review
Posted 4-Jun-2022 11:10


Sony Expands Its Wireless Speaker X-series Range
Posted 4-Jun-2022 10:25









Geekzone Live »

Try automatic live updates from Geekzone directly in your browser, without refreshing the page, with Geekzone Live now.



Are you subscribed to our RSS feed? You can download the latest headlines and summaries from our stories directly to your computer or smartphone by using a feed reader.