Ankündigung

Einklappen
Keine Ankündigung bisher.

UniFi Controller API WLAN

Einklappen
X
 
  • Filter
  • Zeit
  • Anzeigen
Alles löschen
neue Beiträge

    #91
    Da ist nix Screenshot_2022-03-10-21-37-02-177_com.ubnt.easyunifi.jpg

    Kommentar


      #92
      Das ist traurig…

      Dann muss ich wohl mal rausfinden, wie man das in das Plugin reinbrät. Die Funktion „powercycle port“ hab ich jedenfalls schonmal gebastelt, aber noch nicht getestet. Wenn, wäre das aber die einfacherererere Lösung für das „Neustartproblem“.

      Kommentar


        #93
        Hallo,

        ist es mit diesem Plugin möglich signifikant den stromverbrauch der Access Points z.b nachts zu reduzieren indem man die Sende und Empfangseinrichtung abschaltet?

        Ich habe keine UniFi Switches, sondern nur die APs.

        Gruß,
        Hendrik

        Kommentar


          #94
          Ich fand AP.disable als extrem wenig hilfreich. Der PoE Verbrauch war minimal unterschiedlich zu „vollbelastet“… getestet mit: UAP AC Nano Light / UAP AC Mesh. Beim U6 pro hab ichs dann nicht mehr probiert. Ich schalte wenn dann komplett ab, also auch den Strom.

          Kommentar


            #95
            Ja, das hatte ich befürchtet.
            Danke aber!

            Kommentar


              #96
              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/​
              Wird die UDM-Pro vom Plugin unterstützt?

              Kommentar


                #97
                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


                  #98
                  Kein Stress.
                  Dann brauche ich nicht zu versuchen eine Verbindung herzustellen. Oder hast du schon eine Richtuung in die ich eventuell testen kann?

                  Kommentar


                    #99
                    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
                    Ein anderer Eintrag sieht eigtl. gleich aus, aber da kommt der Fehler nicht..

                    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
                        LAN+Gast existiert, ohne + dazwischen eigtl. nicht, aber da ist die Fehlermeldung nicht anders..
                        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/
                            Dacht zuerst, es liegt an der 2FA, die hab ich nun aber deaktiviert. User und PW stimmen, Server auch. Wenn ich curl -k -H 'Content-Type: application/json' --data '{"username":"USER","password":"PW"}' https://10.0.0.1/api/auth/login aufrufe, klappt alles.

                            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​
                                Und das für alle Items im Sekundentakt, weshalb ich ständig Neustarts hatte.

                                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

                                Lädt...
                                X