-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HA reports zone as unknown #47
Comments
Hi @0utc45t , can you enable the 'debug' setting in the config file? It show exactly what's posted to HA so we can check if that's what's expected. Thanks. |
Hi Ronald, I changed the configs location from home to garage and changed my MAC. This is all the logs I get from logread command after restarting the presence-detector. Fri Jul 12 17:05:34 2024 daemon.info presence-detector[15835]: Device 12:34:56:78:90:ab is now at garage And HA reports my location "unknown"... then I disconnected my phone from the wlan and I got these lines. Fri Jul 12 17:11:50 2024 daemon.notice hostapd: phy0-ap1: AP-STA-DISCONNECTED 12:34:56:78:90:ab and HA reports my location "away" as it should. Oh, maybe I should have started with disconnected status.... well, here is the logs after reconnecting again to wlan. Fri Jul 12 17:14:53 2024 daemon.info hostapd: phy0-ap1: STA 12:34:56:78:90:ab IEEE 802.11: authenticated Thanks for the quick reply. Anything else I can do to help? |
Thanks. So you mentioned it did work if you call the 'see' service from developer tools? What's the difference between your payload en the one that's logged after 'Posting to HA'? |
I'm not quite sure I understand the question. When I use the HA frontends developer tools in yaml mode like this service: device_tracker.see it changes my location to garage. Oh, the difference is the missing source_type: router. I added that to the dev tools service call and I get same behaviour, my location is changed to unknown. Is this actually HA bug? |
Interesting... so source_type: router makes it break. I guess HA doesn't expect a "real" location from a router device, only from GPS devices. I remember I had to change device_type to router, or person tracking wouldn't work properly. I guess it wouldn't hurt to get some explanation from HA what's going on here. Do you feel like creating an issue there? |
I have written about this in HA discord channel... and I just got a reply stating that the device_type: router is only home or not_home. It seems that some other device_type should be used instead of router? |
Ok, so that explains it. I can make the device type configurable? But I remember there were issues when it wasn't set to router, but forgot the details. |
Does this help to remember what was the problem and circumvent it from happening again? |
Ah, yes, it was the ordering. Routers have higher precedence over GPS devices, so when not sending device_type router, it would sometimes be overridden by another device and not set the person away on disconnects. But this might not a be problem or you, maybe just try it. I'll create a PR so make the device type configurable so you can test. |
@rmoesbergen I confirm, now it works. Thanks! |
Cool, thanks! |
I have one openwrt AP at home and another at my garage some distance away. These sites are connected with wireguard. Both sites can report my location as "home" and "away" to the home-assistant running at my home. When I try to get the garage AP to report my presence with the correct zone name and change the presence-detector.settings.json file line
"location": "home",
to
"location": "garage",
the home-assistant reports my location as unknown. I've tested with developer tools to run service "device tracker see" with my MAC and zone name and using this method I get the frontend to show everything I put in the location box. So I suspect the problem is here.
The text was updated successfully, but these errors were encountered: