Home Assistant How To - integrate Xiaomi Mijia Smart Mosquito Repellent

Опубликовано: 12 Октябрь 2024
на канале: BeardedTinker
5,223
82

If you want to get your fight with mosquitoes to the next level, - best way is to add it to Home Assistant. And in this video, we will be integrating Xiaomi Mijia Smart Mosquito Repellent (WX08ZM) to Home Assistant, using ESP32 board using ESPHome.

For this you will need:
⏵ Smart Mosquito Repellent - https://s.click.aliexpress.com/e/_A90zZH (*)
⏵ ESP32 WROOM32 - https://www.aliexpress.com/item/32816...
⏵ ESPHome Addon - https://github.com/esphome/hassio
or ESPHome in Docker -    • ESPHome in Docker for Home Assistant ...  

00:00 Intro
00:22 Thank you to members who joined the channel
00:36 What we need
01:49 Adding BLE tracker using ESPHome
04:01 Download ESPHome Flasher
⏵ https://github.com/esphome/esphome-fl...
05:03 Download binary file and upload to ESP32
06:34 Connect to board and get MAC address from device
08:27 Finish setting up ESP32 board
11:33 Add to integrations - Home Assistant
14:05 How it works & some ideas and automations
17:51 Wrapping up the video

Sample configurations:
⏵ mosquito_repellent.yaml
__________
esphome:
name: mosquito_repellent
platform: ESP32
board: esp-wrover-kit

wifi:
ssid: !secret wifi_ssid
password: !secret wifi_key

Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Mosquito repellent"
password: "something"
manual_ip:
Set this to the IP of the ESP
static_ip: 192.168.1.99
Set this to the IP address of the router. Often ends with .1
gateway: 192.168.1.1
The subnet of the network. 255.255.255.0 works for most home networks.
subnet: 255.255.255.0
captive_portal:

Enable logging
logger:

Enable Home Assistant API
api:
password: !secret api_password

ota:
password: !secret ota_password

esp32_ble_tracker:

sensor:

binary_sensor:
platform: xiaomi_wx08zm
name: Mosquito
mac_address: "74:A3:4A:BE:3F:D3"
tablet:
name: "WX08ZM Mosquito Tablet"
battery_level:
name: "WX08ZM Battery Level"
__________


Please, give me a thumb up if you liked this video, subscribe if you still haven't and I'll see you next time!

Have fun!
BeardedTinker

P.S. If you would like to support me and this channel, you can JOIN and become member!
https://www.youtube.com/BeardedTinker...

(*) should indicate links that are affiliated links. They don't cost you anything extra but provide small income to get this channel going, and finance any future Mail Day packages I buy and review here.

Twitter: @BeardedTinker
Discord:   / discord  

#howto #HomeAssistant #radiostream