Part #/ Keyword
All Products

DIY Zigbee Module Integration with Home Assistant

2024-07-12 13:51:23Mr.Ming
twitter photos
twitter photos
twitter photos
DIY Zigbee Module Integration with Home Assistant

Looking to create a Zigbee module that never runs out of power, functions as a two-in-one door sensor, and integrates a doorbell sensor with Home Assistant? Here’s how you can DIY it.

Here's the final schematic:

image.png

You can find this Zigbee module online; despite its appearance, it simply connects to a reed switch.

image.png

If you decide to build it yourself, for safety, be sure to solder with an electric soldering iron at the very least.

Now, for the door sensor and doorbell integration: there are two spare terminals. Just connect them directly to the doorbell switch. This setup will allow you to trigger any music stored in Home Assistant when the switch is pressed.

Here's how to make it happen:

Materials Needed:

1. Zigbee module

2. Reed switch with magnet

3. 5V power supply

Getting Started:

·  First, obtain the Zigbee module. You can either program it yourself (the seller might offer pre-programmed options), and then upload the program.

·  Next, power it up and configure Zigbee2mqtt to allow device pairing.

·  Finally, configure Home Assistant

Copy the following code:

- platform: "mqtt"

  name: door_status

  state_topic: "zigbee2mqtt/0x00124b00820002c2"

  availability_topic: "zigbee2mqtt/bridge/state"

  payload_off: "OFF"

  payload_on: "ON"

  value_template: "{{ value_json.state_bottom_right }}"

  device_class: "door"

Ensure proper alignment. Go ahead and copy the following code:

- platform: "mqtt"

  name: door_music

  state_topic: "zigbee2mqtt/0x00124b00820002c2"

  availability_topic: "zigbee2mqtt/bridge/state"

  payload_off: "OFF"

  payload_on: "ON"

  value_template: "{{ value_json.state_bottom_left }}"

Additionally, configure triggers for playing specific music.

* Solemnly declare: The copyright of this article belongs to the original author. The reprinted article is only for the purpose of disseminating more information. If the author's information is marked incorrectly, please contact us to modify or delete it as soon as possible. Thank you for your attention!