My journey into smart home setup started with being gifted a Wyze camera many years ago. Wyze makes nice devices and this gift was when Wyze was in it’s infantancy. But as they grew as a company, they have been moving more into an “ecosystem” with (forced) subscription options. And my mindset has moved more into keeping my data in house as much as possible. So as I’ve leaned more on Home Assistant and keeping my data at home, the more the Wzye devices don’t fit into my long term goals. Additionally the Wyze equipment doesn’t play very nice with Home Assistant. There is an unofficial integration that offers limited functionality at the time of witting.
There is a very annoying flaw with the Wyze Sense V1 (no longer offered, not sure if this affects V2 or not). If the battery dies, the entire device dies. Replacing the battery doesn’t revive the sensor. I know this from first hand experience. [source] To make matters worse, they now only offer Wyze Sense V2 which requires a home monitoring subscription. And with that – I’m out! This is just another strike against Wyze. Sad as I really liked their products at first.
This lead me on a venture to look for new options. I’ve analyzed many many options out there, done (far too much) research, and found Aqara. This company feels like what I was hoping Wyze was going to be – cost friendly smart devices that aren’t part of a closed ecosystem and/or subscription based. Aqara has a large offering of products which is great! So the next step is to give Aqara a test. This might be confusing as their products all say Hub Required, but read on as that’s not true.
- 1 Why I Chose Aqara
- 2 Aqara Contact Sensor
- 3 Adding Aqara Contact Sensor to Home Assistant without a Hub
- 3.1 Instructions to Add Aqara Contact Sensors with ZHA Home Assistant Integration and HUSBZB-1 Zigbee Coordinator
- 3.2 Instructions to add Aqara Contact Sensors with deCONZ Home Assistant Integration and ConBee II Zigbee Coordinator
- 4 References:
Why I Chose Aqara
Why Aqara? First off, their name comes up over an over in the Home Assistant forums. Aqara seems to be well liked by the community.
Aqara uses the open Zigbee protocol which is an open standard that other manufacturers use as well. This means that despite them saying you need to use their hub, you can connect their devices to Home Assistant so long as you have a Zigbee antenna setup. If this is something you need to do, you can follow my tutorial on adding Zigbee to Home Assistant on a QNAP NAS.
Price was certainly a factor for Aqara. They offer good technology at a fair price comparative to the market.
The size of their devices is another factor. They are small enough to not stand out in my house. Some of the competitors have rather large devices.
Aqara Contact Sensor
In the United States they are sold via Amazon, and when I purchased them you could find a bundle if you need more than one. The bundles seemed cheaper at first, but there was an Amazon coupon I could apply and it’s actually cheaper buying them separately with the coupon than in the bundle. So do some math and see if you can save yourself a few bucks like I did.
Adding Aqara Contact Sensor to Home Assistant without a Hub
There are many Zigbee gateways on the market. Below are instructions or adding the Aqara contact sensor using two popular Zigbee coordinators and links to tutorials on how to add those integrations to Home Assistant on QNAP.
- ZHA (Zigbee Home Automation) Home Assistant integration with the HUSBZB-1 Zigbee Coordinator
- deCONZ Home Assistant integration with the ConBee II Zigbee Coordinator
Both integration methods work. In my experience however, the deCONZ integration has been far more reliable. The contact sensors would loose their connection on the ZHA integration. That was my main motivation for switching to the deCONZ setup.
Instructions to Add Aqara Contact Sensors with ZHA Home Assistant Integration and HUSBZB-1 Zigbee Coordinator
- Click on Configuration
- Click on Integrations
- Click on CONFIGURE for the HubZ Smart Home Controller integration (or similarly named Zigbee integration if Zigbee is integrated differently in your Home Assistant)
- Click the ADD DEVICE button
- A screen will show indicating that Home Assistant is scanning for a new device.
- Press the button on the bottom of the Sensor Unit for about 3 seconds. The lights will flash indicating it is in pairing mode. Let go of the button.
- Wait as Home Assistant connects to the device.
- This often will take more than one attempt. (this is noted in the ZHA documentation)
- I’m not sure if it technically helps or not, but if you’re having issues connecting I found that pressing the button every 5 seconds or so will ensure the device stays awake during the connection step
- Ensure you aren’t “too far away” from the Zigbee radio on the Home Assistant device.
- I suggest NOT changing the name at this step. See below in the Connection Stability section for how and why I do my device naming.
- I like to set these up at the location they will be used. If they can connect when right next to the Zigbee radio it’s not very helpful in knowing if the radio can reach the final destination of where this will live. There is one “dead spot” in an upstairs bedroom in my house that must be perfectly blocked by ductwork, floors, and walls from where my radio is.
If all goes as planned, you’ll be all setup with a Aqara Window and Door Sensor connected directly to Home Assistant via the Zigbee protocol and NO Aqara Hub was needed!
Two entities are now added to the Zigbee integration.
sensor entity is added for the battery level.
binary_sensor entity is added for detecting if the door/window is open or closed.
|Open (two pieces apart)
|Closed (two pieces next to eachother)
Troubleshooting Aqara Contact Sensor ZHA Connection Issues in Home Assistant
I’ve seen a lot of conversation across the internet about using Aqara devices with the HUSBZB-1 device and the ZHA integration and how one person says it’s awesome and the next person says the devices don’t stay connected and back and forth. This makes it hard to know if this should be the right integration method or not. And I’ll be honest – I’ve had some stability issues myself. Some of it might be my own fault, but other times devices just drop off. A bit strange.
From what I’ve read, the Aqara devices didn’t follow the Zigbee spec 100%, and the HZA integration is still growing. So those are some factors. Your home layout, interference, etc. are also factors of course.
But one trick that I think is critical here is how you name your devices when you add them through ZHA. On step 7 above when the device is connected, you can rename the device there. I personally suggest NOT doing that. I have a theory that the naming of a device there will cause instability.
I go back to Configuration -> Integrations, click on the Devices link in ZHA, and then click into a newly added device. In the Entities section, I’ll click into each Entity and set the Name field only. I do NOT change the Entity ID field.
After naming the entities, I’ll click the pencil icon at the top of the device page to rename the device itself. When it prompts you asking if you want to rename the entity ID’s choose NO.
If you have a device that isn’t connecting well, click the REMOVE DEVICE button, go through the process to re-add the device, and ensure you follow this naming process and you should be all set to go. If you’ve never changed the Entity ID for the device, the re-added devices should connect back into your automations and dashboards without issue. At least that’s been my experience.
Again, this sequence is a theory but so far it’s been working for me.
Instructions to add Aqara Contact Sensors with deCONZ Home Assistant Integration and ConBee II Zigbee Coordinator
- Click the three lined hamburger menu to expand it
- Click on Sensors
- Click the Add new sensor button
- Choose the Other button
- Press and hold the button on the bottom of the Aqara contact sensor for about 3 seconds, until the light flashes indicating it is in pairing mode and let go of the button.
- The Phoscon App should show a green bar saying Sensor Ready.
- If after about ten seconds the Phoscon App doesn’t show Sensor Ready, repeat step 5.
Now that the Aqara contact sensor is connected to deCONZ in the Phoscon App, confirm that it is connected to the deCONZ Home Assistant integration.
- Click on Configuration
- Click on Integrations
- Click on the device ID
- Click on the x devices link
- The Aqara contact sensor should show in the list (depending on configuration)
Home Assistant deCONZ Configuration: Automatic Connection of New Devices
Within the Home Assistant deCONZ integration configuration section, an option of Allow automatic addition of new devices is available. With this checked, there isn’t an extra effort needed to ensure that new devices show in Home Assistant.