Skip to the content.

Z1-Mini/ZIGBEE RFID TAG READER

With this project a cool zigbee RFID tag reader can be built. Tag reader is realized with a cheap arduino nano that communicate with Z1-Mini using UART. Arduino code can be easily adapted to work with various tag readers: RC522, PN532, Wiegand etc. Z1-Mini setting is the same for all. Readed codes can be managed in Home assistant using mqtt binary sensors. It is even possible to send text commands from Home assistant to arduino to command outputs. In this example a time-delay relay is connected to arduino for door opening. It can be driven from home assistant sending a text command.

Arduino code

Z1-mini-wiegand.ino

Wiegand library can be found here:

Monkeyboard Wiegand Library

Home assistant codes management

Create a binary sensor for each rfid tag using the code of each one. Codes can be readed in zigbee2mqtt log.

 binary_sensor:  
  - platform: mqtt
    name: "Z1 Wiegand"
    payload_on: "4710313" # readed code
    payload_off: ""
    state_topic: "zigbee2mqtt/0x00124b0022609cd1/action" # topic where code is sent
    expire_after: 1 # After 1s code is cleared
   

Send zigbee Text commands from Homeassistant to arduino example

In example below, code “1” is sent to arduino using an mqtt switch; when arduino read it, a time-delay relay is activated.

 switch: 
  - platform: mqtt
    name: "Door Switch"
    state_topic: "zigbee2mqtt/0x00124b0022609cd1/"
    command_topic: "zigbee2mqtt/0x00124b0022609cd1/set/action"
    payload_on: "1"