I was recently attemping to get Home-Assistant to understand I was ‘home’ by scanning SNMP on my various OpenWRT powered Meraki access points.
All the devices were showing as associated in the web UI, but were not being listed in the SNMP or LUCI API output when being queried either by snmpwalk or by home-assistant itself.
I subsequently discovered that snmpd will only list a device if OpenWRT knows the IP address – which it will only have obtained if it’s actively communicated with the device, such as by OpenWRT itself offering a DHCP address. Since I don’t run DHCP servers on my access points, the quickest way to a solution was to have a schedule task cron job that does a broadcast ping every few minutes.
In scheduled tasks, simply have the following…
*/5 * * * * /usr/bin/fping -g 172.24.32.0/24
After a few minutes, the associated device list will also have IP addresses listed against each device, and SNMP will start reporting the correct data. Home-Assistant will then be able to determine if your device is home, or not