My DYI Xiaomi Binary Contact Sensor using an off the shelf Xiaomi Aqara Door Sensor
Final product, when wires touch contact is reported as "true" by the sensor, when wires are not touching it reports "false".
Photos go over a few posts due to the attachments limit.
1) Open Case
2) Remove the sensor from case
3) Remove the magnet sensor from the board
DYI Xiaomi Binary Contact Sensor
Moderator: leecollings
-
ben53252642
- Posts: 543
- Joined: Saturday 02 July 2016 5:17
- Target OS: Linux
- Domoticz version: Beta
- Contact:
DYI Xiaomi Binary Contact Sensor
Last edited by ben53252642 on Tuesday 30 October 2018 11:54, edited 3 times in total.
Unless otherwise stated, all my code is released under GPL 3 license: https://www.gnu.org/licenses/gpl-3.0.en.html
-
ben53252642
- Posts: 543
- Joined: Saturday 02 July 2016 5:17
- Target OS: Linux
- Domoticz version: Beta
- Contact:
Re: DYI Xiaomi Binary Contact Sensor
4) Solder wires to each terminal the magnet sensor was attached to (remove the battery first for safety)
5) Drill holes for the wires on the side of the case
6) Re-assemble case and install the battery
Last edited by ben53252642 on Tuesday 30 October 2018 11:38, edited 2 times in total.
Unless otherwise stated, all my code is released under GPL 3 license: https://www.gnu.org/licenses/gpl-3.0.en.html
-
ben53252642
- Posts: 543
- Joined: Saturday 02 July 2016 5:17
- Target OS: Linux
- Domoticz version: Beta
- Contact:
Re: DYI Xiaomi Binary Contact Sensor
7) Product re-assembled ready for use, looking very professional!
8) Connected it to a magnetic reed switch, working nicely
9) I'm using Zigbee2MQTT and Node-Red to use the sensor with Domoticz via MQTT, here is a screenshot of Node-Red output when I move the magnet to and away from the switch.
After some time (about an hour for me) sensor also start reporting battery level which is nice feature.
After some time (about an hour for me) sensor also start reporting battery level which is nice feature.
Code: Select all
payload: "{"contact":true,"linkquality":70,"battery":"100.00","voltage":3055}"Unless otherwise stated, all my code is released under GPL 3 license: https://www.gnu.org/licenses/gpl-3.0.en.html
- Thuis
- Posts: 281
- Joined: Tuesday 11 September 2018 11:36
- Target OS: Linux
- Domoticz version: Beta
- Location: The Netherlands
- Contact:
Re: DYI Xiaomi Binary Contact Sensor
I'm curious, what is the purpose of doing this ? You take the functionality of the sensor put wires on it and have the same functionality.
If you can not handle a computer, you buy a Mac. If you can not handle domotica, you use Homeassistant!
- LouiS22
- Posts: 433
- Joined: Friday 27 February 2015 13:21
- Target OS: Raspberry Pi / ODroid
- Domoticz version: beta
- Location: Budapest, Hungary
- Contact:
Re: DYI Xiaomi Binary Contact Sensor
+1, really don't understand thisThuis wrote: Thursday 04 April 2019 13:26 I'm curious, what is the purpose of doing this ? You take the functionality of the sensor put wires on it and have the same functionality.
-
ben53252642
- Posts: 543
- Joined: Saturday 02 July 2016 5:17
- Target OS: Linux
- Domoticz version: Beta
- Contact:
Re: DYI Xiaomi Binary Contact Sensor
My application has 6 binary sensors in a series circuit. If any of the 6 cupboard doors are opened the circuit breaks and the binary switch is triggered.
It just turns on a light in the cupboards so makes no sense to use 6 separate battery powered sensors.
It just turns on a light in the cupboards so makes no sense to use 6 separate battery powered sensors.
Unless otherwise stated, all my code is released under GPL 3 license: https://www.gnu.org/licenses/gpl-3.0.en.html
-
hoeby
- Posts: 531
- Joined: Saturday 02 June 2018 11:05
- Target OS: Raspberry Pi / ODroid
- Domoticz version: V2022.1
- Location: Echt, Netherlands
- Contact:
Re: DYI Xiaomi Binary Contact Sensor
Maybe his example is not the best. To modify it and an other door sensor.
But this is a nice example how to make an input device which could be connected to do domiticz.
Maybe jou have a device with an output which couldn't be connected to domoticz. Using this modified door sensor, it could be possible
But this is a nice example how to make an input device which could be connected to do domiticz.
Maybe jou have a device with an output which couldn't be connected to domoticz. Using this modified door sensor, it could be possible
Thin-client --> Docker Domoticz main environment
Pi3A+ --> Google home (GAssistPi)
Pi3B+ --> Docker (P1monitor, Domoticz test environment, Ubiquity controller)
Pi3A+ --> Google home (GAssistPi)
Pi3B+ --> Docker (P1monitor, Domoticz test environment, Ubiquity controller)
Who is online
Users browsing this forum: No registered users and 1 guest