I was having problems with my Broadlink RM Pro going offline every few days. According to my router it was connected, but the device would not react at all to any commands from Home Assistant.
After trying a numer of different things I found that using Nmap to ‘ping’ the device every 5 minutes kept it online. Before I had to reset the Broadlink every 2-3 days, now I haven’t had to do it once since setting this up. (about 3-4 weeks ago)
I recently got a Xiaomi gateway which was showing the same problem, after adding it to the Nmap list it has also stayed online. (Only 2 days now, but keeping my fingers crossed.)
Here’s my config for Nmap.
- platform: nmap_tracker
home_interval: 5
hosts:
# Broadlink RM Pro
- 192.168.2.70
# Xiaomi gateway
- 192.168.2.71
and an example for if one goes offline
- alias: Broadlink Offline
trigger:
platform: state
entity_id: device_tracker.broadlink_rmpro
from: 'home'
to: 'not_home'
action:
service: notify.all
data:
message: >
'Broadlink Offline'