This may need a sperate thread …
What attribute that says “I am here”?
Maybe a different way of asking, is the “state” the only place you see the home? If so, they are all showing home, is that becuase I am not home that mine is not showing up?
Once it has seen your device, it should add it to the list of entities. The state is home/not_home. If you aren’t home it should still show ‘not_home’, but if you weren’t connected at home when you enabled it, it won’t show up.
So does it have to connect once after the integration? BTW I used the GUI to configure HA UniFi integration. I was at work and remoted into the HA. So what I am hearing, when I get home it will show up with a state of ‘home’. Then when I leave they the state will be ‘away’ Does this sound right?
Sounds good, will double-check tonight.
I wonder if the UniFi controller treats clients the same as HA does entities. The only reason I am showing up now because the controller remembers me. That is why HA did not see me when it polled the controller. In fact, saying it out loud now makes sense. That is why you can tell the controller to “forget” a client.
@flamingm0e, your response popped up as I was typing. Thank for the correction, I would have messed that one up.
I just got a (UDM) UNIFI Dream Machine
I previously used a UNIFI controller
The integration always worked before
to ensure smooth transition, I removed the integration, then rebooted
I verified all the entities were gone fromt he registry
re-setup the integration with the new ip and credentials
it appears to works and can see all the devices
BUT…
within about 1-2 hours it starts throwing an error for every device and the log file balloons very quickly and eventually HASS is unreachable.
I run HASS in a docker container on synology
when this happens a system process starts consuming insane amounts of CPU
deleting the integration resolves the issue immediatly
I reconnected the old router and controller
the issue does not occur
repeating with UDM
the issue starts all over again
any ideas??
it sounds like the controller is rejecting the connection after a while?
Yes, I wasn’t sure if someone had gotten a head start. I didnt think about the fact the controller softrware would be different enough in the UDM for the integration to not be compatible.
Thanks!
i have downloaded all the files from the udm_support branch
i uploaded them to the container and replaced the files in the components folder
/usr/src/homeassistant/homeassistant/components/unifi
i can no longer select the unifi integration to add it
when i click it, it puts me back in the list of available integrations
other integrations are ok
restoring the folder contents lets me select it again however its the old files so i cant test it
just let me know
i might need to be steered in the right direction but ill try anything you want me to
i know you are not back until tommorow but wanted to update my findings
after digging through the error logs
i realized that the file i am updating is not in the components
/usr/src/homeassistant/homeassistant/components/unifi
but actually in site-packages
/usr/local/lib/python3.7/site-packages/aiounifi
i restored the files to their original state
then replaced the controller.py in site-packages
restarted HASS
tried to add the integration
unfortunately i still have the original error
“Bad user credentials”
with below in the log file
Unknown UniFi communication error occurred
Traceback (most recent call last):
File “/usr/src/homeassistant/homeassistant/components/unifi/controller.py”, line 368, in get_controller
await controller.login()
File “/usr/local/lib/python3.7/site-packages/aiounifi/controller.py”, line 70, in login
await self.request(“post”, url, json=auth)
File “/usr/local/lib/python3.7/site-packages/aiounifi/controller.py”, line 163, in request
raise ResponseError(f"Invalid content type: {res.content_type}")
aiounifi.errors.ResponseError: Invalid content type: text/html