Mirabella Genio Door & Window Sensor I002575 HKWL-DWS02W

I have seen a few people trying to get the Mirabella Genio Door & Window Sensor working with home assistant without success, myself included. I am creating this topic to track the progress of this integration.

Model: HKWL-DWS02W
Item: I002575

I have it running with ESPhome, although response time is terrible at between 5 and 10 seconds.
Probably fine for windows or garage doors, but for a standard door that can be opened and closed within this time, almost useless as the open / close will be missed.

I plan to use mine on a sliding wardrobe door to toggle a light strip.

Esphome config here:

Sensor must be put in to pairing mode to keep it awake for the flash

I bricked mine trying to follow a guide on tasmota website and have tried to reflash it with a serial connection but it doesn’t want to work.

Nice @jivesinger I am giving this a go now. If it is possible with esphome then it should be possible with Tasmota you would think.

Sounds like it was faulty when you bought it @a_lunatic, need to take it back in and get it replaced :wink:

So I flashed it with ESPhome as suggested and it will not connect to my access point. Wifi details are correct, and I tested a non flashed one with the AP so I know it works.

I also enabled the Captive Portal and that is not coming up after the 1minute wait ether. So I am not sure how to recover the device without opening it up.

esphome:
  name: door
  platform: ESP8266
  board: esp01_1m
  arduino_version: 2.5.1
  board_flash_mode: dout
  includes:
    - sb1_uart.h

wifi:
  ssid: 'SSID'
  password: PASSWORD
  fast_connect: true
  ap:
    ssid: "doorsensor Fallback Hotspot"
    password: "W1PBGyrokfLz"

captive_portal:

mqtt:
  broker: ''
  username: USERNAME
  password: PASSWORD
  birth_message:
  shutdown_message:
  will_message:

uart:
  - tx_pin: 1
    rx_pin: 3
    baud_rate: 9600
    id: uart0

ota:

logger:
  level: INFO
  hardware_uart: UART1

sensor:
  - platform: wifi_signal
    name: "Door WiFi Signal"
    update_interval: never
    expire_after:
    filters: []
  - platform: adc
    name: "Door Battery"
    update_interval: never
    expire_after:
    pin: VCC
    filters: []

binary_sensor:
  - platform: template
    id: door
    name: "Door Closure"
    filters: []
    device_class: door
    lambda: "return {};"

custom_component:
  - id: sb1_uart
    lambda: |-
      auto component = new SB1UARTComponent(id(uart0), id(door));
      return {component};

So I got it connected, I think my issue was the fast_connect: true however I’m not 100%.

The captive_portal: still isn’t working ether.

At the end of the day these door sensors just kinda suck. To be fair they seemed okay running the default firmware but no good if you want to flash them.

It doesn’t work because the ESP is only awake for a few seconds. If it did work your batteries would be flat within hours.

What sort of delay are you getting between activating the sensor and seeing that reflected in Home Assistant ?

Sorry, by captive_portal I mean the fall back AP mode. Where if your device dose not connect to the WI-FI network within 1 minute it starts its own AP you can connect to and reconfigure the WI-FI credentials.

I managed to flash my genio door/window sensor and it is now connected to my home wifi. I can connect to it to configure mqtt and point it to my local HA pi server. Flashing tasmota was easy just need to add it to HA and find a template for it as none is listed on the famous https://templates.blakadder.com site. I will report back if I have any success.

I’m interested to hear what sort of delay you experience when operating the sensor.

I found the seemingly same pcb (hkwl_dws02w_v2.0) sold under the brand name Cleverio, was possible to load esphome using tuyaconvert but i didn’t see any mqtt messages when triggering the reed switch.

Will update if I find the time to troubleshoot it

1 Like

did you find any template for tasmota or HA?

Thanks to ChatGPT, I succesfully linked my sensor to HA without flashing it! You need an account on Tuya IOT platorm, link it to your SmartLife App and restart HA. It exposes 3 sensors: contact, tamper and battery.
I confirm it’s quite slow, it takes about 3-5 seconds to update. Here it is a short guide written by ChatGPT:

What you need

  • Home Assistant (I’m using HAOS 15 on Proxmox)
  • Tuya-compatible device: HKWL-DWS02W (door/window sensor)
  • The Smart Life app (not “Tuya Smart” or other clones)
  • A free account on Tuya IoT Platform

:screwdriver: Step-by-step Instructions

1. Pair the sensor in Smart Life

  • Install the Smart Life app on your phone
  • Sign in and add the sensor:
    + → Sensors → Contact Sensor (or scan if needed)
  • Make sure it shows up and responds to open/close in the app

2. Create a Tuya IoT Project

  • Go to https://iot.tuya.com
  • Register a new developer account (can be different from Smart Life)
  • Create a Cloud Development Project:
    • Industry: Smart Home
    • Region: Western Europe (or your location)
    • APIs: Enable everything, especially:
      • Device Status
      • Device Control
      • Authorization Management
  • After creation:
    → Go to Devices → Link Tuya App Account

3. Link your Smart Life account

  • In the Tuya platform, scan the QR code with your Smart Life app:
    • Open Smart Life → Profile (Me) → Scan QR code
  • After 30–60 seconds, your devices will appear under “Devices” in the Tuya project

4. Add the Tuya integration in Home Assistant

  • In Home Assistant:
    → Settings → Devices & Services → + Add Integration → Tuya
  • Fill in:
    • Country code: 39 (Italy), or your country
    • Platform: Smart Life
    • Email/Password: from your Smart Life app
    • Access ID / Secret: from your Tuya project

5. Restart Home Assistant

  • Sometimes the sensor won’t appear until you restart HA
  • After restart, check:
    → Settings → Devices & Services → Tuya → Devices
  • The HKWL-DWS02W should be listed!