Neues Modul - 74_Unifi - Für den Ubiquiti Networks (UBNT) - Unifi Controller

Begonnen von rapster, 23 August 2015, 02:12:04

Vorheriges Thema - Nächstes Thema

roedert

Gibts eigentlich schon Neuigkeiten zu der Kompatibilität mit der neuen Cloudkey-Firmware?

andies

Bei mir werden die Readings nicht aktualisiert und ich habe diese Meldungen im Log, weiß da jemand weiter
2021.03.05 13:30:39 5: Unifi (Unifi_Notify) - executed.
2021.03.05 13:30:40 5: Unifi: get called with ?.
2021.03.05 13:30:42 5: Unifi (Unifi_Notify) - executed.
2021.03.05 13:30:45 5: Unifi: set called with update
2021.03.05 13:30:45 4: Unifi: set update
2021.03.05 13:30:45 5: Unifi (Unifi_DoUpdate) - executed.
2021.03.05 13:30:45 5: Unifi (Unifi_GetEvents_Send) - executed.
2021.03.05 13:30:45 5: Unifi: get called with ?.
2021.03.05 13:30:45 5: Unifi (Unifi_GetEvents_Receive) - executed.
2021.03.05 13:30:45 5: Unifi (Unifi_GetEvents_Receive) - Failed! - state:'error.decode_json' - msg:'malformed JSON string, neither tag, array, object, number, string or atom, at character offset 0 (before "Unauthorized") at ./FHEM/74_Unifi.pm line 1408.
'
2021.03.05 13:30:45 5: Unifi (Unifi_GetUnarchivedAlerts_Send) - executed.
2021.03.05 13:30:45 5: Unifi (Unifi_GetUnarchivedAlerts_Receive) - executed.
2021.03.05 13:30:45 5: Unifi (Unifi_GetUnarchivedAlerts_Receive) - Failed! - state:'error.decode_json' - msg:'malformed JSON string, neither tag, array, object, number, string or atom, at character offset 0 (before "Unauthorized") at ./FHEM/74_Unifi.pm line 1367.
'
2021.03.05 13:30:45 5: Unifi (Unifi_GetClients_Send) - executed.
2021.03.05 13:30:45 5: Unifi (Unifi_GetClients_Receive) - executed.
2021.03.05 13:30:45 5: Unifi (Unifi_GetClients_Receive) - Failed! - state:'error.decode_json' - msg:'malformed JSON string, neither tag, array, object, number, string or atom, at character offset 0 (before "Unauthorized") at ./FHEM/74_Unifi.pm line 1015.
'
2021.03.05 13:30:45 5: Unifi (Unifi_GetClientInsights_Send) - executed.
2021.03.05 13:30:45 5: Unifi (Unifi_GetClientInsights_Receive) - executed.
2021.03.05 13:30:45 5: Unifi (Unifi_GetClientInsights_Receive) - Failed! - state:'error.decode_json' - msg:'malformed JSON string, neither tag, array, object, number, string or atom, at character offset 0 (before "Unauthorized") at ./FHEM/74_Unifi.pm line 1070.
'
2021.03.05 13:30:45 5: Unifi (Unifi_GetVoucherList_Send) - executed.
2021.03.05 13:30:46 5: Unifi (Unifi_GetVoucherList_Receive) - executed.
2021.03.05 13:30:46 5: Unifi (Unifi_GetVoucherList_Receive) - Failed! - state:'error.decode_json' - msg:'malformed JSON string, neither tag, array, object, number, string or atom, at character offset 0 (before "Unauthorized") at ./FHEM/74_Unifi.pm line 2004.
'

Das ging komischerweise vor einer Woche; ich kann mich nicht erinnern etwas an FHEM geändert zu haben (Unifi hatte ein update).
FHEM 6.1 auf RaspPi3 (Raspbian:  6.1.21-v8+; Perl: v5.32.1)
SIGNALduino (433 MHz) und HM-UART (868 MHz), Sonoff, Blitzwolf, Somfy RTS, CAME-Gartentor, Volkszähler, Keyence-Sensor, Homematic-Sensoren und -thermostat, Ferraris-Zähler für Wasseruhr, Openlink-Nachbau Viessmann

Christoph Morrison

Sieht so aus als könnte sich das FHEM-Modul nicht mehr mit dem Controller verbinden (Unauthorized). Die zurückgelieferten Daten sind dann kein valides JSON und das Modul schreibt einen Fehler.
Stimmt die Adresse noch?

andies

ja, die stimmt noch -aber ich kann mich tatsächlich nicht einloggen. Das Prozedere scheint sich da geändert zu haben. Danke für den Tipp, ich forsche da mal weiter.
FHEM 6.1 auf RaspPi3 (Raspbian:  6.1.21-v8+; Perl: v5.32.1)
SIGNALduino (433 MHz) und HM-UART (868 MHz), Sonoff, Blitzwolf, Somfy RTS, CAME-Gartentor, Volkszähler, Keyence-Sensor, Homematic-Sensoren und -thermostat, Ferraris-Zähler für Wasseruhr, Openlink-Nachbau Viessmann

andies

Kann es sein, dass sich der port geändert hat? Die weboberfläche ist auch eine ganz andere.

root@CloudKey:~# netstat -nlp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name   
tcp        0      0 127.0.0.1:7445          0.0.0.0:*               LISTEN      12800/evostreamms   
tcp        0      0 127.0.0.53:53           0.0.0.0:*               LISTEN      1219/systemd-resolv
tcp        0      0 0.0.0.0:7446            0.0.0.0:*               LISTEN      12800/evostreamms   
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      1262/sshd           
tcp        0      0 0.0.0.0:7447            0.0.0.0:*               LISTEN      12800/evostreamms   
tcp        0      0 127.0.0.1:9080          0.0.0.0:*               LISTEN      29590/ulp-go-app   
tcp        0      0 127.0.0.1:7448          0.0.0.0:*               LISTEN      12800/evostreamms   
tcp        0      0 127.0.0.1:1112          0.0.0.0:*               LISTEN      12800/evostreamms   
tcp        0      0 127.0.0.1:5432          0.0.0.0:*               LISTEN      1274/postgres       
tcp        0      0 127.0.0.1:7449          0.0.0.0:*               LISTEN      12333/node         
tcp        0      0 127.0.0.1:5433          0.0.0.0:*               LISTEN      12059/postgres     
tcp        0      0 127.0.0.1:7450          0.0.0.0:*               LISTEN      12333/node         
tcp        0      0 0.0.0.0:7550            0.0.0.0:*               LISTEN      12800/evostreamms   
tcp        0      0 127.0.0.1:9090          0.0.0.0:*               LISTEN      1054/ubnt-systemhub
tcp        0      0 0.0.0.0:5355            0.0.0.0:*               LISTEN      1219/systemd-resolv
tcp        0      0 127.0.0.1:27117         0.0.0.0:*               LISTEN      5583/bin/mongod     
tcp        0      0 127.0.0.1:7440          0.0.0.0:*               LISTEN      12800/evostreamms   
tcp        0      0 0.0.0.0:7441            0.0.0.0:*               LISTEN      12800/evostreamms   
tcp        0      0 127.0.0.1:7634          0.0.0.0:*               LISTEN      1038/hddtemp       
tcp6       0      0 :::7443                 :::*                    LISTEN      12333/node         
tcp6       0      0 :::7444                 :::*                    LISTEN      12333/node         
tcp6       0      0 :::22                   :::*                    LISTEN      1262/sshd           
tcp6       0      0 :::8888                 :::*                    LISTEN      12333/node         
tcp6       0      0 ::1:5432                :::*                    LISTEN      1274/postgres       
tcp6       0      0 ::1:5433                :::*                    LISTEN      12059/postgres     
tcp6       0      0 :::7877                 :::*                    LISTEN      12333/node         
tcp6       0      0 :::6789                 :::*                    LISTEN      4711/java           
tcp6       0      0 :::7080                 :::*                    LISTEN      12333/node         
tcp6       0      0 :::8843                 :::*                    LISTEN      4711/java           
tcp6       0      0 :::5355                 :::*                    LISTEN      1219/systemd-resolv
tcp6       0      0 :::8880                 :::*                    LISTEN      4711/java           
tcp6       0      0 :::8080                 :::*                    LISTEN      4711/java           
tcp6       0      0 127.0.0.1:8081          :::*                    LISTEN      4711/java           
tcp6       0      0 :::7442                 :::*                    LISTEN      12333/node         
udp        0      0 0.0.0.0:10001           0.0.0.0:*                           12333/node         
udp        0      0 192.168.2.15:42938      0.0.0.0:*                           12333/node         
udp        0      0 127.0.0.53:53           0.0.0.0:*                           1219/systemd-resolv
udp        0      0 192.168.2.15:68         0.0.0.0:*                           542/systemd-network
udp        0      0 192.168.2.15:123        0.0.0.0:*                           1264/ntpd           
udp        0      0 127.0.0.1:123           0.0.0.0:*                           1264/ntpd           
udp        0      0 0.0.0.0:123             0.0.0.0:*                           1264/ntpd           
udp        0      0 0.0.0.0:56058           0.0.0.0:*                           1023/avahi-daemon: 
udp        0      0 0.0.0.0:5353            0.0.0.0:*                           1023/avahi-daemon: 
udp        0      0 0.0.0.0:5355            0.0.0.0:*                           1219/systemd-resolv
udp6       0      0 :::10001                :::*                                4711/java           
udp6       0      0 :::1900                 :::*                                4711/java           
udp6       0      0 fe80::7683:c2ff:fe1:123 :::*                                1264/ntpd           
udp6       0      0 2003:cf:5706:c900:7:123 :::*                                1264/ntpd           
udp6       0      0 ::1:123                 :::*                                1264/ntpd           
udp6       0      0 :::123                  :::*                                1264/ntpd           
udp6       0      0 :::55654                :::*                                1023/avahi-daemon: 
udp6       0      0 fe80::7683:c2ff:fe1:546 :::*                                542/systemd-network
udp6       0      0 192.168.2.15:51947      :::*                                4711/java           
udp6       0      0 :::5353                 :::*                                4711/java           
udp6       0      0 :::5353                 :::*                                1023/avahi-daemon: 
udp6       0      0 :::5355                 :::*                                1219/systemd-resolv
udp6       0      0 :::3478                 :::*                                4711/java           
raw6       0      0 :::58                   :::*                    7           542/systemd-network
Active UNIX domain sockets (only servers)
Proto RefCnt Flags       Type       State         I-Node   PID/Program name     Path
unix  2      [ ACC ]     STREAM     LISTENING     93981    12059/postgres       /var/run/postgresql/.s.PGSQL.5433
unix  2      [ ACC ]     STREAM     LISTENING     39196    1/init               /var/run/avahi-daemon/socket
unix  2      [ ACC ]     STREAM     LISTENING     55257    5583/bin/mongod      /usr/lib/unifi/run/mongodb-27117.sock
unix  2      [ ACC ]     STREAM     LISTENING     39207    1/init               /var/run/dbus/system_bus_socket
unix  2      [ ACC ]     STREAM     LISTENING     96855    12759/ubnt_avcodec_  /var/run/unifi-protect/transcoder
unix  2      [ ACC ]     STREAM     LISTENING     157831   29590/ulp-go-app     /run/ulp-go/jsonrpc.sock
unix  2      [ ACC ]     STREAM     LISTENING     44685    1274/postgres        /var/run/postgresql/.s.PGSQL.5432
unix  2      [ ACC ]     STREAM     LISTENING     16282    1/init               /run/systemd/private
unix  2      [ ACC ]     STREAM     LISTENING     16296    1/init               /run/systemd/fsck.progress
unix  2      [ ACC ]     STREAM     LISTENING     16307    1/init               /run/systemd/journal/stdout
unix  2      [ ACC ]     SEQPACKET  LISTENING     462      1/init               /run/udev/control

Das device
Internals:
   DEF        cloudkey.fritz.box 443 crypt:*********** crypt:*********** 300
   FUUID      5e244be7-f33f-1115-db34-394dc6a8906d8bfd
   FVERSION   74_Unifi.pm:0.235000/2021-01-09
   LASTInputDev Unifi
   MSGCNT     670825
   NAME       Unifi
   NOTIFYDEV  global
   NR         255
   NTFY_ORDER 50-Unifi
   STATE      disconnected
   TYPE       Unifi
   UC_VERSION unknown
   Unifi_MSGCNT 670825
   Unifi_TIME 2021-03-05 13:23:37
   VERSION    3.5.2
FHEM 6.1 auf RaspPi3 (Raspbian:  6.1.21-v8+; Perl: v5.32.1)
SIGNALduino (433 MHz) und HM-UART (868 MHz), Sonoff, Blitzwolf, Somfy RTS, CAME-Gartentor, Volkszähler, Keyence-Sensor, Homematic-Sensoren und -thermostat, Ferraris-Zähler für Wasseruhr, Openlink-Nachbau Viessmann

Christoph Morrison

Port 443 stimmt schon, aber ich glaube, der Endpunkt hat sich geändert. Ich habe auf jeden Fall das gleiche Problem wie du.

andies

Ich habe eine neue Firmware aufgespielt und komme nun nicht mehr an die Weboberfläche. Oh mann, manchmal nervt unifi...
FHEM 6.1 auf RaspPi3 (Raspbian:  6.1.21-v8+; Perl: v5.32.1)
SIGNALduino (433 MHz) und HM-UART (868 MHz), Sonoff, Blitzwolf, Somfy RTS, CAME-Gartentor, Volkszähler, Keyence-Sensor, Homematic-Sensoren und -thermostat, Ferraris-Zähler für Wasseruhr, Openlink-Nachbau Viessmann

Newbie

Hallo,

ich hab die aktuelle Beta-Version 6.1.64 installiert und keine Probleme feststellen können.

viele Grüße
Jens

P.S.: attr Unifi isUDM 1 gesetzt?
fhem-6.1 (configDB+DbLog)  auf ODROID-XU4

andies

FHEM 6.1 auf RaspPi3 (Raspbian:  6.1.21-v8+; Perl: v5.32.1)
SIGNALduino (433 MHz) und HM-UART (868 MHz), Sonoff, Blitzwolf, Somfy RTS, CAME-Gartentor, Volkszähler, Keyence-Sensor, Homematic-Sensoren und -thermostat, Ferraris-Zähler für Wasseruhr, Openlink-Nachbau Viessmann

Wolle02

Tja, jetzt hat es mich mit meiner UDM scheinbar auch erwischt. state steht auf disconnected und im Logfile finde ich mit Verbose 5 folgendes:

2021.03.10 14:05:40 5: UniFi_UDM (Unifi_Login_Send) - executed.
2021.03.10 14:05:40 5: UniFi_UDM (Unifi_Login_Receive) - executed.
2021.03.10 14:05:40 5: UniFi_UDM (Unifi_Login_Receive) - Login Failed! - state:'error.decode_json' - msg:'malformed JSON string, neither tag, array, object, number, string or atom, at character offset 1 (before "<!doctype html>\n<ht...") at ./FHEM/74_Unifi.pm line 937.
'
2021.03.10 14:05:40 5: UniFi_UDM (Unifi_Login_Receive) - Connect/Login to Unifi-Controller failed. Will try again after interval...
2021.03.10 14:06:10 5: UniFi_UDM (Unifi_Login_Send) - executed.
2021.03.10 14:06:10 5: UniFi_UDM (Unifi_Login_Receive) - executed.
2021.03.10 14:06:10 5: UniFi_UDM (Unifi_Login_Receive) - Login Failed! - state:'error.decode_json' - msg:'malformed JSON string, neither tag, array, object, number, string or atom, at character offset 1 (before "<!doctype html>\n<ht...") at ./FHEM/74_Unifi.pm line 937.
'
2021.03.10 14:06:10 5: UniFi_UDM (Unifi_Login_Receive) - Connect/Login to Unifi-Controller failed. Will try again after interval...
2021.03.10 14:06:40 5: UniFi_UDM (Unifi_Login_Send) - executed.
2021.03.10 14:06:41 5: UniFi_UDM (Unifi_Login_Receive) - executed.
2021.03.10 14:06:41 5: UniFi_UDM (Unifi_Login_Receive) - Login Failed! - state:'error.decode_json' - msg:'malformed JSON string, neither tag, array, object, number, string or atom, at character offset 1 (before "<!doctype html>\n<ht...") at ./FHEM/74_Unifi.pm line 937.
'
2021.03.10 14:06:41 5: UniFi_UDM (Unifi_Login_Receive) - Connect/Login to Unifi-Controller failed. Will try again after interval...
2021.03.10 14:07:11 5: UniFi_UDM (Unifi_Login_Send) - executed.
2021.03.10 14:07:11 5: UniFi_UDM (Unifi_Login_Receive) - executed.
2021.03.10 14:07:11 5: UniFi_UDM (Unifi_Login_Receive) - Login Failed! - state:'error.decode_json' - msg:'malformed JSON string, neither tag, array, object, number, string or atom, at character offset 1 (before "<!doctype html>\n<ht...") at ./FHEM/74_Unifi.pm line 937.
'
2021.03.10 14:07:11 5: UniFi_UDM (Unifi_Login_Receive) - Connect/Login to Unifi-Controller failed. Will try again after interval...
2021.03.10 14:07:41 5: UniFi_UDM (Unifi_Login_Send) - executed.
2021.03.10 14:07:41 5: UniFi_UDM (Unifi_Login_Receive) - executed.
2021.03.10 14:07:41 5: UniFi_UDM (Unifi_Login_Receive) - Login Failed! - state:'error.decode_json' - msg:'malformed JSON string, neither tag, array, object, number, string or atom, at character offset 1 (before "<!doctype html>\n<ht...") at ./FHEM/74_Unifi.pm line 937.


Ist das mal wieder nur bei den UDMs so und mit den USGs geht es immer noch?

Mitch

Kann man denn den Autocreate der Switche irgendwie ausschalten?
FHEM im Proxmox Container

aski71

Hallo,

ich bin neuer Benutzer des Moduls und habe kriege leider keine Clients gelistet.

2021.03.13 22:39:28 1: UNIFI (Unifi_GetSysinfo_Receive) - Failed! - state:'error' - msg:'api.err.NoSiteContext' - This error indicates that the <siteID> in your definition is wrong. Try to modify your definition with <sideID> = default.
2021.03.13 22:39:28 5: UNIFI (Unifi_UsergroupRestJson_Receive) - executed.
2021.03.13 22:39:28 1: UNIFI (Unifi_UsergroupRestJson_Receive) - Failed! - state:'error' - msg:'api.err.NoSiteContext' - This error indicates that the <siteID> in your definition is wrong. Try to modify your definition with <sideID> = default.


Meine Site-ID hat einen eigenen Namen.
Ich habe in der Definition schon alles versucht:
Ohne Angabe von Site-ID, mit dem Namen default, mit meinem eigenen Sitenamen. Ich kriege aber immer den gleichen Fehler.
Der grundsätzliche Connect geht.

Wer kann helfen?

Danke!

wg25

Zitat von: wg25 am 01 März 2021, 14:35:36
bei mir funktioniert ein disconnectClient nicht mehr. Benutze ich normalerweise, um ein "verlorengegangenen" ESP32 wieder ins Netz zu holen. Das Modul ist verbunden mit einer UDM (state ist connected), aber irgendwie lassen sich keine set-Befehle mehr absetzen, block/unblock geht auch nicht mehr, sehe ich gerade.

Ist das ein bekanntes Problem? Gibt es eine Lösung?

Bin ich tatsächlich alleine mit dem Problem?

andies

Nein, ich kann nichtmal connecten. Anscheinend ein update und dann war Schluss mit dem Zugriff.
FHEM 6.1 auf RaspPi3 (Raspbian:  6.1.21-v8+; Perl: v5.32.1)
SIGNALduino (433 MHz) und HM-UART (868 MHz), Sonoff, Blitzwolf, Somfy RTS, CAME-Gartentor, Volkszähler, Keyence-Sensor, Homematic-Sensoren und -thermostat, Ferraris-Zähler für Wasseruhr, Openlink-Nachbau Viessmann

Wolle02

Zitat von: Wolle02 am 10 März 2021, 14:10:52
Tja, jetzt hat es mich mit meiner UDM scheinbar auch erwischt. state steht auf disconnected und im Logfile finde ich mit Verbose 5 folgendes:



Ist das mal wieder nur bei den UDMs so und mit den USGs geht es immer noch?

Ich habe gestern ein FHEM Upate gefahren. Kurioserweise kann ich jetzt wieder connecten. Dabei wurde aber laut Changelog am Modul gar nicht geändert?