UniFi intergration, why some clients are not showing up as entities

You get an unexpected type of response. I added a debug print so we can see what it is, but probably something else is needed to make it work

i will test sometime before tonight
i should have a response before 6pm EST

Websockets isn’t adapted to work, the branch is more to try stuff out with the command line tool to iterate changes quickly rather than debug through hass

applied the new controller.py
rebooted
verified that the new one is in place

getting exact same error

“bad credentials” on screen
and below in the log

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 164, in request
raise ResponseError(f"Invalid content type: {res.content_type}")
aiounifi.errors.ResponseError: Invalid content type: text/html

There should be a debug print just above, if you don’t see it enable debug for aiounifi

ok now there is more

but there are tokens listed in the data
am i safe to put it here?
should i pm it to you

Can we please review UNIFIOS integration and next steps for testing to have the new os functional

I’ve been prioritising fixing bugs related to the web socket (still not fully solved) and I can’t do the implementation fully by myself since I don’t own a unifios device. Apart from all of that I’ve also been svamped at work leaving me with little energy in the evening. I wouldn’t expect it to be done by next release either. I have gotten offers of access to proper devices so I could progress by myself and will probably take up the offer, though I can’t promise when.

OK

I understand you can only do so much, that is why I am eager to do anything required

If you want something tested, you got it
If you want access to my router, you got it

But I can only do as instructed

Bumping this as I have a problem with one phone not showing up in the integration (I have an UDM Pro). Tried restarting everything a couple of times (and yes I see the client in the UDM Pro interface) with no luck. Is there anything else than actually removing the integration and installing it again that could possible help?

I had the same issue with my iPhone13 not showing up in the Integration even though it is listed in the wireless clients in my UDR.
I found that it was due to the “Private Wi-Fi Address” setting being enabled in the WiFi settings on the phone. When I disabled it the phone then appeared in the Integration Entities and the device_tracker then works correctly when associated with my HA User Id.