Ankündigung
Einklappen
Keine Ankündigung bisher.
UniFi Controller API WLAN
Einklappen
X
-
Hallo,
ich möchte das Plugin gerne mit meiner UDM-Pro nutzen. Aktuell ist die Version v3.0.18 auf der UDM.
Im Item-Generator erhalte ich folgende Meldung
Code:Traceback (most recent call last): File "/usr/local/smarthome/plugins/unifi/ubiquiti/unifi.py", line 90, in _get_url raise LoggedInException("Invalid login, or login has expired") plugins.unifi.ubiquiti.unifi.LoggedInException: Invalid login, or login has expired During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/local/smarthome/plugins/unifi/ubiquiti/unifi.py", line 90, in _get_url raise LoggedInException("Invalid login, or login has expired") plugins.unifi.ubiquiti.unifi.LoggedInException: Invalid login, or login has expired During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/local/smarthome/plugins/unifi/__init__.py", line 239, in get_item_hierarchy hr = self._api.get_device_hierarchy() File "/usr/local/smarthome/plugins/unifi/ubiquiti/unifi.py", line 202, in get_device_hierarchy dvcs = self.device_stat("") File "/usr/local/smarthome/plugins/unifi/ubiquiti/unifi.py", line 188, in device_stat return self._get_url("{}/api/s/{}/stat/device/{}".format(self._baseurl, File "/usr/local/smarthome/plugins/unifi/ubiquiti/unifi.py", line 98, in _get_url return self._get_url(url, True) File "/usr/local/smarthome/plugins/unifi/ubiquiti/unifi.py", line 96, in _get_url raise DataException("Unable to log in or get data for url {}".format(url)) plugins.unifi.ubiquiti.unifi.DataException: Unable to log in or get data for url https://192.168.1.39/proxy/network/api/s/default/stat/device/
Kommentar
-
Stand heute ist das Plugin nur für die Standalone Network Application (früher: Controller), nicht aber für Unifi OS Consoles geeignet. Ich hab jetzt seit einem Monat auch einen UDR (statt dem USG3) und kann mich im Gegensatz zu vor einem Jahr nun Hardwaremäßig an die Entwicklung für Unifi OS machen. Leider bauen wir gerade den Dachboden aus und ich habe da meine Prioritäten und nicht auf der Programmierung. Vor Ostern wird das nichts bei mir!
Kommentar
-
jentz1986 hast du eine Idee, woher der Fehler hier kommt?
KeyError('portconf_id') in item unifi_network.devices.usw_unifi_switch.wired_clien t_synology.port_enabled
Ich hab die Config aus dem Plugin Generator kopiert. Eintrag für das entsprechende Item:
Code:wired_client_synology: hostname: type: str unifi_type: client_hostname ip: type: str unifi_type: client_ip port_enabled: type: bool unifi_type: switch_port_enabled type: bool unifi_client_mac: xx:xx... unifi_switch_port_no: 3 unifi_type: client_present
Kommentar
-
Hi, boah, hoffentlich ist Ostern bald da - ich habs immer noch nicht geschafft, da was zu machen für die UDMs und UDRs.
Onkelandy du brauchst die beiden Portprofile, die bei Dir existieren müssen. Der Generator kann nur eine Seite lesen (an). Für Aus braucht es auch noch ein selbstdefiniertes Profil. Den bei Disabled bleibt bei UniFi PoE an; Warum auch immer - war bestimmt mal sinnvoll.
Code:port_enabled: type: bool unifi_switch_port_profile_on: "TelefonPoE" unifi_switch_port_profile_off: "Fully Off" unifi_type: switch_port_enabled
Zuletzt geändert von bmx; 13.09.2023, 14:57.
Kommentar
-
Hmm, das ändert nichts an dem Fehler von oben.. Interessanterweise kommt er nur für fritzbox und synology.
Code:uap_unifi_outdoor_pro: ap_name: type: str unifi_type: device_name ip: type: str unifi_type: device_ip port_enabled: type: bool unifi_switch_port_profile_on: LAN+Gast unifi_switch_port_profile_off: FullyOff unifi_type: switch_port_enabled type: bool unifi_ap_mac: xx unifi_switch_port_no: 5 unifi_type: ap_enabled unifi_switch_mac: xx wired_client_fritzbox: hostname: type: str unifi_type: client_hostname ip: type: str unifi_type: client_ip port_enabled: type: bool unifi_switch_port_profile_on: LANGast unifi_switch_port_profile_off: FullyOff unifi_type: switch_port_enabled type: bool unifi_client_mac: xx unifi_switch_port_no: 2 unifi_type: client_present wired_client_mobotix_haustuere: hostname: type: str unifi_type: client_hostname ip: type: str unifi_type: client_ip port_enabled: type: bool unifi_switch_port_profile_off: FullyOff unifi_switch_port_profile_on: Radius unifi_type: switch_port_enabled type: bool unifi_client_mac: xx unifi_switch_port_no: 8 unifi_type: client_present wired_client_synology: hostname: type: str unifi_type: client_hostname ip: type: str unifi_type: client_ip port_enabled: type: bool unifi_switch_port_profile_on: LAN+Gast unifi_switch_port_profile_off: FullyOff unifi_type: switch_port_enabled type: bool unifi_client_mac: xx unifi_switch_port_no: 3 unifi_type: client_present
Sep 13 09:04:31 ERROR plugins.unifi KeyError('portconf_id') in item unifi_network.devices.usw_unifi_switch.wired_clien t_fritzbox.port_enabled
Sep 13 09:04:31 ERROR plugins.unifi KeyError('portconf_id') in item unifi_network.devices.usw_unifi_switch.wired_clien t_synology.port_enabled
Ne Idee?
Kommentar
-
Seitdem ich auf die neuste Version der Controllersoftware geupdated habe (Dockerimage jacobalberty:unifi:v7.5.176), kriege ich nun beim Start von SHNG auch diese ERROR Meldungen. Davor ging es.
2023-12-31 15:33:12 ERROR plugins.unifi KeyError('portconf_id') in item unifi_network.devices.usw_.wired_client_ps4.port_e nabled
2023-12-31 15:33:12 ERROR plugins.unifi KeyError('portconf_id') in item unifi_network.devices.usw_.wired_client_sma_energy _meter.port_enabled
2023-12-31 15:33:12 ERROR plugins.unifi KeyError('portconf_id') in item unifi_network.devices.usw_.wired_client_sma_home_m anager.port_enabled
2023-12-31 15:33:12 ERROR plugins.unifi KeyError('portconf_id') in item unifi_network.devices.usw_.wired_client_vusolo2.po rt_enabled
2023-12-31 15:33:12 ERROR plugins.unifi KeyError('portconf_id') in item unifi_network.devices.usw_.wired_client_vusolo4k.p ort_enabled
Gibt es hier neue Erfahrungen?
Kommentar
-
Den KeyError hab ich nach wie vor, aber jetzt hab ich noch größere Probleme. Hab ein neues Unifi Gerät mit neuem Controller am Start. Nun bekomme ich die Fehlermeldung im Web Interface:
Code:Traceback (most recent call last): File "/usr/local/smarthome/plugins/unifi/ubiquiti/unifi.py", line 90, in _get_url raise LoggedInException("Invalid login, or login has expired") plugins.unifi.ubiquiti.unifi.LoggedInException: Invalid login, or login has expired During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/local/smarthome/plugins/unifi/ubiquiti/unifi.py", line 90, in _get_url raise LoggedInException("Invalid login, or login has expired") plugins.unifi.ubiquiti.unifi.LoggedInException: Invalid login, or login has expired During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/local/smarthome/plugins/unifi/__init__.py", line 239, in get_item_hierarchy hr = self._api.get_device_hierarchy() File "/usr/local/smarthome/plugins/unifi/ubiquiti/unifi.py", line 202, in get_device_hierarchy dvcs = self.device_stat("") File "/usr/local/smarthome/plugins/unifi/ubiquiti/unifi.py", line 188, in device_stat return self._get_url("{}/api/s/{}/stat/device/{}".format(self._baseurl, File "/usr/local/smarthome/plugins/unifi/ubiquiti/unifi.py", line 98, in _get_url return self._get_url(url, True) File "/usr/local/smarthome/plugins/unifi/ubiquiti/unifi.py", line 96, in _get_url raise DataException("Unable to log in or get data for url {}".format(url)) plugins.unifi.ubiquiti.unifi.DataException: Unable to log in or get data for url https://10.0.0.1/api/s/default/stat/device/
Ich habe jetzt in der Konsole einen "Super User" angelegt und dessen Name und PW in der plugin.yaml eingetragen. Es klappt leider nach wie vor nicht. Irgendwer eine Idee..? Der alte Login dürfte ja nirgends gecacht sein oder so..?
Kommentar
-
Mein Problem bin ich jetzt selbst angegangen.
Könnt ihr bitte mal https://github.com/smarthomeNG/plugins/pull/1001 testen? Es sollte zum einen das portconf_id Problem beheben und zum anderen nun auch mit Unifi Geräten funktionieren. Zumindest bitte kurz testen, ob mit eurer aktuellen Installation noch alles klappt.
Danke jentz1986
Kommentar
-
Oha, heute hatte ich plötzlich größere Probleme..
Code:Jul 21 21:27:51 ERROR plugins.unifi KeyError('data') in item unifi_network.wifi_clients.client_dolphin Jul 21 21:27:57 ERROR lib.scheduler Needing more worker threads than the specified maximum of 60! (75 worker threads active) Jul 21 21:27:57 WARNING lib.scheduler Worker-Threads: plugins.unifi.poll_unifi: 71, idle: 4
Ich habe die Unifi Software auf einem Cloud Gateway laufen. Das Problem trat plötzlich auf. Hab nun das Gerät neu gestartet/vom Netz genommen und es gibt keine Logeinträge mehr.
Ne Idee, wie man den KeyError so abfangen könnte, dass nicht ständig neue Threads generiert werden..?
Kommentar
Kommentar