Could version = ‘UDMP-unifiOS’ be the problen as I have a UCG Ultra instead of a UDMP.
But when I try all other version credential options [v4|v5|unifiOS]
i get the following error
error: "Login failed - status code: 401"
traceback: |
Traceback (most recent call last):
File "/config/custom_components/python_script/__init__.py", line 107, in execute_script
exec(code, vars)
~~~~^^^^^^^^^^^^
File "/config/python_scripts/unifi_mqtt.py", line 17, in <module>
client = Controller(host, username, password, port, version, site_id=site_id, ssl_verify=verify_ssl)
File "/usr/local/lib/python3.13/site-packages/pyunifi/controller.py", line 113, in __init__
self._login()
~~~~~~~~~~~^^
File "/usr/local/lib/python3.13/site-packages/pyunifi/controller.py", line 195, in _login
raise APIError(
"Login failed - status code: %i" % response.status_code
)
pyunifi.controller.APIError: Login failed - status code: 401
I think works great.
But I need to re do the card again.
Do you have a beta off the card?
I dont know how to use the atributes in the old card. If i can see a example then it will be easy for me to adapt my card to this new integration
Is it possible to use this integration to connect to a MQTT server on a different host and not the MQTT Integration in HA? Also, when trying it out, it is not able to connect to my self hosted Unifi Network Manager as it is running on port 8443. I changed the port config from 443 to 8443 but the HA log shows that it is still trying to connect to port 443 and it times out as there is nothing listening on port 443.
yes, apologies, didn’t notice this one previously.
Logger: homeassistant
Source: custom_components/unifi_mqtt/__init__.py:75
integration: UniFi MQTT Integration (documentation)
First occurred: 4 February 2025 at 22:13:03 (738 occurrences)
Last logged: 10:30:04
Error doing job: Task exception was never retrieved (None)
Traceback (most recent call last):
File "/config/custom_components/unifi_mqtt/__init__.py", line 75, in update_unifi_data
if not device.get("adopted"):
^^^^^^^^^^
AttributeError: 'str' object has no attribute 'get'[wrap="justify"]
Text
[/wrap]
Could you try upgrading to release v1.0.1. There was a fix put in there earlier today to potentially resolve that issue. I haven’t been able to test on different apps, but the fix would resolve that error.
If you check logs in the future, you may see something like “Received device that is not a dictionary”. If you do, I would be keen to get details that are provided in the logs. In mine when I have had this, it simply said “Error”, I would like to know if that’s the same as others.
Thanks for you help I seem to be getting this error with v1.0.1, although all MQTT publishing seems to be working.
Logger: custom_components.unifi_mqtt
Source: custom_components/unifi_mqtt/__init__.py:63
integration: UniFi Device Info Integration (documentation)
First occurred: 11:52:02 (1 occurrences)
Last logged: 11:52:02
Failed to initialize UniFi controller: HTTPSConnectionPool(host='192.68.1.1', port=443): Max retries exceeded with url: /api/auth/login (Caused by ConnectTimeoutError(<urllib3.connection.HTTPSConnection object at 0x7f6944ac10>, 'Connection to 192.68.1.1 timed out. (connect timeout=None)'))
I also had this error due to an apostrophe in one of my Unifi devices, but I changed the name and this obviously was resolved, just thought it would be good to know.
Logger: homeassistant.components.mqtt.discovery
Source: components/mqtt/discovery.py:395
integration: MQTT (documentation, issues)
First occurred: 11:49:49 (1 occurrences)
Last logged: 11:49:49
Received message on illegal discovery topic 'homeassistant/sensor/unifi_mqtt/usw-flex-george's_room/config'. The topic contains non allowed characters. For more information see https://www.home-assistant.io/integrations/mqtt/#discovery-topic
Hello.
I updated today and create the new integration(after delete de previous 1.0)
in this new version I set the pool interval to 30seconds.
But i see that the entitis refresh after aprox 70sg (60sec pooling, and 10sg between the script launch and report information).
maybe the config pool interval is not working?
and other thing. how can i change the pooling interval? I must delete de integration and create again? i cant find the configuration button to change it in the integration
hello.
today at morning i see the log and see this errors:
Este error se originó a partir de una integración personalizada.
Registrador: custom_components.unifi_mqtt
Fuente: custom_components/unifi_mqtt/__init__.py:79
integración: UniFi Device Info Integration (documentación)
Ocurrió por primera vez: 5 de febrero de 2025, 22:57:35 (1377 ocurrencias)
Última vez registrado: 10:25:38
Received device that is not a dictionary: error