test: modul 74_UnifiProtect.pm & 74_UnifiProtectDevice.pm

Begonnen von justme1968, 06 Februar 2022, 11:40:14

Vorheriges Thema - Nächstes Thema

justme1968

hue, tradfri, alexa-fhem, homebridge-fhem, LightScene, readingsGroup, ...

https://github.com/sponsors/justme-1968

hoppel118

Zitat von: justme1968 am 14 Februar 2022, 19:01:44
@hoppel118: aus irgendeinem grund schließt dein controller das websocket mit den update events. das kann ab und an passieren. bei dir ist das aber viel zu oft der fall.

war das mit den älteren versionen anders ?

andererseits scheint es regelmäßig alle 15 minuten zu passieren.

wenn nicht alle konfigurierten kameras da sind sollte das kein problem sein. ich habe hier auch aktuell eine nicht dran.

Jo, diese "closed / disconnected" Meldungen sehe ich seit der Version, die ich heute Nachmittag installiert hatte (direkt vor dem Crash waren diese beiden Meldungen auch schon zu sehen) und nun alle 15 min. Vorher mit der Version vom 07.02. gab es diese Meldungen nicht.

Hatte vorhin alle Readings aller EndDevices und des MainDevices einmal gelöscht. Es wurde aber anschließend wieder alles neu reingezogen, so dass eigentlich erstmal alles gut aussah.

Mein UnifiProtect MainDevice war dann immer noch im Status "disconnected", obwohl die Kamera schon ein paar Minuten wieder "connected" war.

Anschließend habe ich dann FHEM gerade nochmal neugestartet. Nun ist das UnifiProtect MainDevice wieder im Status "opened". Ich beobachte das mal. Keine Ahnung, was das jetzt war.

Falls es noch komische Logmeldungen gibt, melde ich mich nochmal. Momentan sieht erstmal alles gut aus.

Gruß Hoppel
Server: Openmediavault, XEON E3-1240L-v5, Supermicro X11SSH-CTF, 64GB ECC RAM, SSD, RAID-Z2
Homebridge | Alexa | Yowsup
Homematic | HomeConnect | MQTT | Philips Hue | Sonos | Unifi Network & Protect | vbus | Xiaomi

hoppel118

Hm..., nö, das war nicht die Lösung:

2022.02.14 20:47:06 1: !!!!closed!!!!
2022.02.14 20:47:06 1: disconnected
2022.02.14 21:18:01 1: !!!!closed!!!!
2022.02.14 21:18:01 1: disconnected


Da sich in den letzten Tagen ja wieder einiges am Modul getan hat, habe ich nun alle Protect Devices nochmal gelöscht und von vorn begonnen.

Im Logfile sah das dann wie folgt aus:

2022.02.14 21:29:28 3: UnifiProtect: is UnifiOS: 1
2022.02.14 21:29:28 2: UnifiProtect: can't connect without password
2022.02.14 21:29:28 3: stored obfuscated user
2022.02.14 21:29:28 3: stored obfuscated password
2022.02.14 21:29:29 2: autocreate: define UnifiProtectDevice_61fdc20c02dd7303e70003fa UnifiProtectDevice 61fdc20c02dd7303e70003fa
2022.02.14 21:29:29 2: autocreate: define FileLog_UnifiProtectDevice_61fdc20c02dd7303e70003fa FileLog ./log/UnifiProtectDevice_61fdc20c02dd7303e70003fa-%Y.log UnifiProtectDevice_61fdc20c02dd7303e70003fa
2022.02.14 21:29:29 2: autocreate: define UnifiProtectDevice_61f5af5f000c0803e700140c UnifiProtectDevice 61f5af5f000c0803e700140c
2022.02.14 21:29:29 2: autocreate: define FileLog_UnifiProtectDevice_61f5af5f000c0803e700140c FileLog ./log/UnifiProtectDevice_61f5af5f000c0803e700140c-%Y.log UnifiProtectDevice_61f5af5f000c0803e700140c
2022.02.14 21:29:29 2: autocreate: define UnifiProtectDevice_61fdbd8201e24a03e700142e UnifiProtectDevice 61fdbd8201e24a03e700142e
2022.02.14 21:29:29 2: autocreate: define FileLog_UnifiProtectDevice_61fdbd8201e24a03e700142e FileLog ./log/UnifiProtectDevice_61fdbd8201e24a03e700142e-%Y.log UnifiProtectDevice_61fdbd8201e24a03e700142e
2022.02.14 21:29:32 1: PERL WARNING: Use of uninitialized value in hash element at fhem.pl line 1731.


Ganz am Ende gab es also nochmal eine PERL WARNING.

Nun scheint aber Ruhe zu sein. Das MainDevice bleibt auf opened und die Meldungen sind anscheinend weg (knappe halbe Stunde ist nun rum).

Schönen Abend noch! Sieht also erstmal gut aus. ;)

Gruß Hoppel
Server: Openmediavault, XEON E3-1240L-v5, Supermicro X11SSH-CTF, 64GB ECC RAM, SSD, RAID-Z2
Homebridge | Alexa | Yowsup
Homematic | HomeConnect | MQTT | Philips Hue | Sonos | Unifi Network & Protect | vbus | Xiaomi

hoppel118

Nö, das war leider auch nicht die Lösung. Das UnifiProtect Device ist nun wieder im Status "disconnected". Um 21:27 Uhr hatte ich FHEM gestartet.

2022.02.14 22:54:38 1: !!!!closed!!!!
2022.02.14 22:54:38 1: disconnected
2022.02.14 22:59:31 1: !!!!closed!!!!
2022.02.14 22:59:31 1: disconnected
2022.02.14 23:14:31 1: !!!!closed!!!!
2022.02.14 23:14:31 1: disconnected


Was brauchst du von mir Andre?

Bin erstmal wieder auf der Version vom 07.02.. Die läuft bei mir.

Gruß Hoppel
Server: Openmediavault, XEON E3-1240L-v5, Supermicro X11SSH-CTF, 64GB ECC RAM, SSD, RAID-Z2
Homebridge | Alexa | Yowsup
Homematic | HomeConnect | MQTT | Philips Hue | Sonos | Unifi Network & Protect | vbus | Xiaomi

justme1968

kannst du bitte mal in der neusten version in zeile 1260 den log eintrag Log 1, "UnifiProtect_Disconnect: $name";und in zeile 1285 den log eintrag Log 1, "UnifiProtect_Connect: $name";aktivieren und schauen ob die dann direkt vor dem closed eintrag auftauchen.
hue, tradfri, alexa-fhem, homebridge-fhem, LightScene, readingsGroup, ...

https://github.com/sponsors/justme-1968

hoppel118

#50
Hi Andre,

habe die beiden Logzeilen auskommentiert. Nun sehe ich folgende Zeilen im Logfile:

2022.02.15 22:30:33 1: UnifiProtect_Connect: UnifiProtect
2022.02.15 22:30:33 1: UnifiProtect_Disconnect: UnifiProtect
2022.02.15 22:30:54 1: !!!!closed!!!!
2022.02.15 22:30:54 1: disconnected
2022.02.15 22:45:33 1: UnifiProtect_Connect: UnifiProtect
2022.02.15 22:45:33 1: UnifiProtect_Disconnect: UnifiProtect
2022.02.15 23:00:34 1: UnifiProtect_Connect: UnifiProtect
2022.02.15 23:00:34 1: UnifiProtect_Disconnect: UnifiProtect


Bringt uns das irgendwie weiter?

Hattest du an den Modulen noch irgendwas verändert?

Das UnifiProtect MainDevice ist immer noch im Status "opened". Das sieht also erstmal gut aus.

Ist es für dich logisch, dass diesen (Dis)Connect alle 15 Minuten gibt?

Mal sehen, ob FHEM morgen früh noch läuft.

Gruß Hoppel
Server: Openmediavault, XEON E3-1240L-v5, Supermicro X11SSH-CTF, 64GB ECC RAM, SSD, RAID-Z2
Homebridge | Alexa | Yowsup
Homematic | HomeConnect | MQTT | Philips Hue | Sonos | Unifi Network & Protect | vbus | Xiaomi

hoppel118

Ohne Ende alle 15 Minuten folgende Meldungen, aber FHEM stürzt nicht mehr ab.

2022.02.16 20:13:03 1: UnifiProtect_Connect: UnifiProtect
2022.02.16 20:13:03 1: UnifiProtect_Disconnect: UnifiProtect
2022.02.16 20:13:03 1: !!!!closed!!!!
2022.02.16 20:13:03 1: disconnected
2022.02.16 20:28:03 1: UnifiProtect_Connect: UnifiProtect
2022.02.16 20:28:03 1: UnifiProtect_Disconnect: UnifiProtect
2022.02.16 20:28:04 1: !!!!closed!!!!
2022.02.16 20:28:04 1: disconnected
2022.02.16 20:43:04 1: UnifiProtect_Connect: UnifiProtect
2022.02.16 20:43:04 1: UnifiProtect_Disconnect: UnifiProtect
2022.02.16 20:43:04 1: !!!!closed!!!!
2022.02.16 20:43:04 1: disconnected
2022.02.16 20:58:04 1: UnifiProtect_Connect: UnifiProtect
2022.02.16 20:58:04 1: UnifiProtect_Disconnect: UnifiProtect
2022.02.16 20:58:05 1: !!!!closed!!!!
2022.02.16 20:58:05 1: disconnected
2022.02.16 21:13:04 1: UnifiProtect_Connect: UnifiProtect
2022.02.16 21:13:04 1: UnifiProtect_Disconnect: UnifiProtect
2022.02.16 21:13:05 1: !!!!closed!!!!
2022.02.16 21:13:05 1: disconnected
2022.02.16 21:28:05 1: UnifiProtect_Connect: UnifiProtect
2022.02.16 21:28:05 1: UnifiProtect_Disconnect: UnifiProtect
2022.02.16 21:28:05 1: !!!!closed!!!!
2022.02.16 21:28:05 1: disconnected
2022.02.16 21:43:05 1: UnifiProtect_Connect: UnifiProtect
2022.02.16 21:43:05 1: UnifiProtect_Disconnect: UnifiProtect
2022.02.16 21:43:06 1: !!!!closed!!!!
2022.02.16 21:43:06 1: disconnected
2022.02.16 21:58:06 1: UnifiProtect_Connect: UnifiProtect
2022.02.16 21:58:06 1: UnifiProtect_Disconnect: UnifiProtect
2022.02.16 21:58:06 1: !!!!closed!!!!
2022.02.16 21:58:06 1: disconnected
2022.02.16 22:13:06 1: UnifiProtect_Connect: UnifiProtect
2022.02.16 22:13:06 1: UnifiProtect_Disconnect: UnifiProtect
2022.02.16 22:13:07 1: !!!!closed!!!!
2022.02.16 22:13:07 1: disconnected
2022.02.16 22:15:58 1: !!!!closed!!!!
2022.02.16 22:15:58 1: disconnected
2022.02.16 22:28:07 1: UnifiProtect_Connect: UnifiProtect
2022.02.16 22:28:07 1: UnifiProtect_Disconnect: UnifiProtect
2022.02.16 22:28:07 1: !!!!closed!!!!
2022.02.16 22:28:07 1: disconnected
2022.02.16 22:43:07 1: UnifiProtect_Connect: UnifiProtect
2022.02.16 22:43:07 1: UnifiProtect_Disconnect: UnifiProtect
2022.02.16 22:43:07 1: !!!!closed!!!!
2022.02.16 22:43:07 1: disconnected
2022.02.16 22:58:07 1: UnifiProtect_Connect: UnifiProtect
2022.02.16 22:58:07 1: UnifiProtect_Disconnect: UnifiProtect
2022.02.16 22:58:18 1: !!!!closed!!!!
2022.02.16 22:58:18 1: disconnected


Gruß Hoppel
Server: Openmediavault, XEON E3-1240L-v5, Supermicro X11SSH-CTF, 64GB ECC RAM, SSD, RAID-Z2
Homebridge | Alexa | Yowsup
Homematic | HomeConnect | MQTT | Philips Hue | Sonos | Unifi Network & Protect | vbus | Xiaomi

hoppel118

#52
Hi Andre,

ich sehe immer noch alle 15 Minuten diese disconnect Meldungen und mein "UnifiProtect" device ist auch gerade wieder im Status "disconnected", obwohl die verbundenen Geräte "CONNECTED" sind und auch funktionieren.

Neulich habe ich ohne Ende folgende Meldungen erhalten:

2022.03.01 20:40:15 2: UnifiProtect: json error: malformed JSON string, neither array, object, number, string or atom, at character offset 0 (before "Unauthorized") at ./FHEM/74_UnifiProtect.pm line 835.
in
2022.03.01 20:50:15 2: UnifiProtect: json error: malformed JSON string, neither array, object, number, string or atom, at character offset 0 (before "Unauthorized") at ./FHEM/74_UnifiProtect.pm line 835.
in
2022.03.01 21:00:15 2: UnifiProtect: json error: malformed JSON string, neither array, object, number, string or atom, at character offset 0 (before "Unauthorized") at ./FHEM/74_UnifiProtect.pm line 835.
in
2022.03.01 21:10:15 2: UnifiProtect: json error: malformed JSON string, neither array, object, number, string or atom, at character offset 0 (before "Unauthorized") at ./FHEM/74_UnifiProtect.pm line 835.
in
2022.03.01 21:20:15 2: UnifiProtect: json error: malformed JSON string, neither array, object, number, string or atom, at character offset 0 (before "Unauthorized") at ./FHEM/74_UnifiProtect.pm line 835.
in
2022.03.01 21:30:15 2: UnifiProtect: json error: malformed JSON string, neither array, object, number, string or atom, at character offset 0 (before "Unauthorized") at ./FHEM/74_UnifiProtect.pm line 835.
in
2022.03.01 21:40:15 2: UnifiProtect: json error: malformed JSON string, neither array, object, number, string or atom, at character offset 0 (before "Unauthorized") at ./FHEM/74_UnifiProtect.pm line 835.
in
2022.03.01 21:50:15 2: UnifiProtect: json error: malformed JSON string, neither array, object, number, string or atom, at character offset 0 (before "Unauthorized") at ./FHEM/74_UnifiProtect.pm line 835.
in


Erst ein FHEM Neustart hat das Logging dieser Meldungen gestoppt. Evtl. bringen uns diese Meldungen irgendwie weiter.

Hier ist nochmal ein verbose 5 mit den von dir neulich benannten Log-Einstellungen:

https://pastebin.com/9vBB6qEx

Wahrscheinlich wolltest du das Logfile neulich schon im verbose 5 haben. ::) Das war allerdings nicht der Fall. Das hattest du nicht geschrieben. Auf die Idee kam ich gestern Abend zufällig.  ;D

Es endet mit den Meldungen:

2022.03.03 16:20:36 1: !!!!closed!!!!
2022.03.03 16:20:36 4: UnifiProtect: UnifiProtect_CloseWebsocket: wss:10.10.10.1:443/proxy/protect/ws/updates?lastUpdateId=e62dc137-f4d5-467c-965e-8800990d3cb0
2022.03.03 16:20:36 1: disconnected


15 Minuten später kommt das gleiche Log erneut.

Siehst du da was? Hast du evtl. sonst noch eine Idee, was ich dir liefern könnte?

Danke dir und Gruß Hoppel
Server: Openmediavault, XEON E3-1240L-v5, Supermicro X11SSH-CTF, 64GB ECC RAM, SSD, RAID-Z2
Homebridge | Alexa | Yowsup
Homematic | HomeConnect | MQTT | Philips Hue | Sonos | Unifi Network & Protect | vbus | Xiaomi

DeeSPe

Die von hoppel118 gemeldeten Log Zeilen sind/waren bei mir auch gestern und heute zu finden.
2022.03.03 08:50:09 2:  UnifiProtect: json error: malformed JSON string, neither array, object, number, string or atom, at character offset 0 (before "Unauthorized") at ./FHEM/74_UnifiProtect.pm line 835.
in
2022.03.03 08:58:47 1:  PERL WARNING: Use of uninitialized value in string eq at (eval 248534) line 1.
2022.03.03 08:58:47 2:  UnifiProtect: json error: malformed JSON string, neither array, object, number, string or atom, at character offset 0 (before "Unauthorized") at ./FHEM/74_UnifiProtect.pm line 744.
in
2022.03.03 08:58:47 2:  UnifiProtect: json error: malformed JSON string, neither array, object, number, string or atom, at character offset 0 (before "Unauthorized") at ./FHEM/74_UnifiProtect.pm line 744.
in
2022.03.03 08:58:47 2:  UnifiProtect: json error: malformed JSON string, neither array, object, number, string or atom, at character offset 0 (before "Unauthorized") at ./FHEM/74_UnifiProtect.pm line 744.
in
2022.03.03 08:58:47 2:  UnifiProtect: json error: malformed JSON string, neither array, object, number, string or atom, at character offset 0 (before "Unauthorized") at ./FHEM/74_UnifiProtect.pm line 744.
in
2022.03.03 08:58:47 2:  UnifiProtect: json error: malformed JSON string, neither array, object, number, string or atom, at character offset 0 (before "Unauthorized") at ./FHEM/74_UnifiProtect.pm line 744.
in
2022.03.03 09:00:09 2:  UnifiProtect: json error: malformed JSON string, neither array, object, number, string or atom, at character offset 0 (before "Unauthorized") at ./FHEM/74_UnifiProtect.pm line 835.
in
2022.03.03 09:10:09 2:  UnifiProtect: json error: malformed JSON string, neither array, object, number, string or atom, at character offset 0 (before "Unauthorized") at ./FHEM/74_UnifiProtect.pm line 835.
in
2022.03.03 09:20:09 2:  UnifiProtect: json error: malformed JSON string, neither array, object, number, string or atom, at character offset 0 (before "Unauthorized") at ./FHEM/74_UnifiProtect.pm line 835.
in
2022.03.03 09:30:09 2:  UnifiProtect: json error: malformed JSON string, neither array, object, number, string or atom, at character offset 0 (before "Unauthorized") at ./FHEM/74_UnifiProtect.pm line 835.
in
2022.03.03 09:40:09 2:  UnifiProtect: json error: malformed JSON string, neither array, object, number, string or atom, at character offset 0 (before "Unauthorized") at ./FHEM/74_UnifiProtect.pm line 835.
in
2022.03.03 09:50:09 2:  UnifiProtect: json error: malformed JSON string, neither array, object, number, string or atom, at character offset 0 (before "Unauthorized") at ./FHEM/74_UnifiProtect.pm line 835.
in
2022.03.03 10:00:09 2:  UnifiProtect: json error: malformed JSON string, neither array, object, number, string or atom, at character offset 0 (before "Unauthorized") at ./FHEM/74_UnifiProtect.pm line 835.
in
2022.03.03 10:10:09 2:  UnifiProtect: json error: malformed JSON string, neither array, object, number, string or atom, at character offset 0 (before "Unauthorized") at ./FHEM/74_UnifiProtect.pm line 835.
in
2022.03.03 10:20:09 2:  UnifiProtect: json error: malformed JSON string, neither array, object, number, string or atom, at character offset 0 (before "Unauthorized") at ./FHEM/74_UnifiProtect.pm line 835.
in
2022.03.03 10:28:37 2:  UnifiProtect: http request (https://192.168.1.1/proxy/protect/api/cameras/62167dd0032d8903e70004e4/snapshot?w=320) failed: read from https://192.168.1.1:443 timed out
2022.03.03 10:30:37 2:  UnifiProtect: http request (https://192.168.1.1/proxy/protect/api/cameras/62167dd0032d8903e70004e4/snapshot?w=320) failed: read from https://192.168.1.1:443 timed out
2022.03.03 10:39:37 2:  UnifiProtect: http request (https://192.168.1.1/proxy/protect/api/cameras/62167dd0032d8903e70004e4/snapshot?w=320) failed: read from https://192.168.1.1:443 timed out
2022.03.03 10:44:37 2:  UnifiProtect: http request (https://192.168.1.1/proxy/protect/api/cameras/62167dd0032d8903e70004e4/snapshot?w=320) failed: read from https://192.168.1.1:443 timed out
2022.03.03 10:52:37 2:  UnifiProtect: http request (https://192.168.1.1/proxy/protect/api/cameras/62167dd0032d8903e70004e4/snapshot?w=320) failed: read from https://192.168.1.1:443 timed out


Danach kamen dann auch keine Bilder mehr von den Kameras. Ein "reconnect" im UnifiProtect Device hat dann die Funktion wieder hergestellt.

Gruß
Dan
MAINTAINER: 22_HOMEMODE, 98_Hyperion, 98_FileLogConvert, 98_serviced

Als kleine Unterstützung für meine Programmierungen könnt ihr mir gerne einen Kaffee spendieren: https://buymeacoff.ee/DeeSPe

hoppel118

Stimmt, reconnect gibts ja auch noch. Dann brauche ich FHEM beim nächsten Mal nicht Neustarten.

@DeeSPe Diese ,,!!!!closed!!!!" und ,,disconnected" Meldungen alle 15Minuten hast du nicht? Warum bin ich denn der einzige? :D

Gruß Hoppel
Server: Openmediavault, XEON E3-1240L-v5, Supermicro X11SSH-CTF, 64GB ECC RAM, SSD, RAID-Z2
Homebridge | Alexa | Yowsup
Homematic | HomeConnect | MQTT | Philips Hue | Sonos | Unifi Network & Protect | vbus | Xiaomi

DeeSPe

Zitat von: hoppel118 am 03 März 2022, 16:58:07
@DeeSPe Diese ,,!!!!closed!!!!" und ,,disconnected" Meldungen alle 15Minuten hast du nicht?

Nö, die habe ich noch nie gesehen.

Gruß
Dan
MAINTAINER: 22_HOMEMODE, 98_Hyperion, 98_FileLogConvert, 98_serviced

Als kleine Unterstützung für meine Programmierungen könnt ihr mir gerne einen Kaffee spendieren: https://buymeacoff.ee/DeeSPe

DeeSPe

Heute Früh habe ich das wieder im Log:
2022.03.04 08:50:17 2:  UnifiProtect: json error: malformed JSON string, neither array, object, number, string or atom, at character offset 0 (before "Unauthorized") at ./FHEM/74_UnifiProtect.pm line 835.
in
2022.03.04 09:00:17 2:  UnifiProtect: json error: malformed JSON string, neither array, object, number, string or atom, at character offset 0 (before "Unauthorized") at ./FHEM/74_UnifiProtect.pm line 835.
in
2022.03.04 09:10:17 2:  UnifiProtect: json error: malformed JSON string, neither array, object, number, string or atom, at character offset 0 (before "Unauthorized") at ./FHEM/74_UnifiProtect.pm line 835.
in
2022.03.04 09:20:17 2:  UnifiProtect: json error: malformed JSON string, neither array, object, number, string or atom, at character offset 0 (before "Unauthorized") at ./FHEM/74_UnifiProtect.pm line 835.
in
2022.03.04 09:30:17 2:  UnifiProtect: json error: malformed JSON string, neither array, object, number, string or atom, at character offset 0 (before "Unauthorized") at ./FHEM/74_UnifiProtect.pm line 835.
in
2022.03.04 09:40:17 2:  UnifiProtect: json error: malformed JSON string, neither array, object, number, string or atom, at character offset 0 (before "Unauthorized") at ./FHEM/74_UnifiProtect.pm line 835.
in
2022.03.04 09:50:18 2:  UnifiProtect: json error: malformed JSON string, neither array, object, number, string or atom, at character offset 0 (before "Unauthorized") at ./FHEM/74_UnifiProtect.pm line 835.
in
2022.03.04 10:00:18 2:  UnifiProtect: json error: malformed JSON string, neither array, object, number, string or atom, at character offset 0 (before "Unauthorized") at ./FHEM/74_UnifiProtect.pm line 835.
in
2022.03.04 10:10:18 2:  UnifiProtect: json error: malformed JSON string, neither array, object, number, string or atom, at character offset 0 (before "Unauthorized") at ./FHEM/74_UnifiProtect.pm line 835.
in
2022.03.04 10:20:18 2:  UnifiProtect: json error: malformed JSON string, neither array, object, number, string or atom, at character offset 0 (before "Unauthorized") at ./FHEM/74_UnifiProtect.pm line 835.
in


Das UnifiProtect Hauptdevice war auch wieder nicht verbunden, ein reconnect hat soeben wieder Abhilfe geschaffen.

Gruß
Dan
MAINTAINER: 22_HOMEMODE, 98_Hyperion, 98_FileLogConvert, 98_serviced

Als kleine Unterstützung für meine Programmierungen könnt ihr mir gerne einen Kaffee spendieren: https://buymeacoff.ee/DeeSPe

justme1968

ich glaube die neuverbindungen sind 'nur' der reconnect der im modul nicht drin steckt. das sich der unterschiedlich auswirkt (d.h. mit oder ohne closed eintrag) könnte zufall sein und am system liegen.

im code gibt es ein InternalTimer mit 900 sekunden. könnt ihr den mal ändern und schauen ob es einen unterschied macht?


der malformed JSON string schein ein abgelaufenes token zu sein. das sollte eigentlich regelmässig aktualisiert werden und im fehlerfall ebenfalls. eventuell habe ich hier bei der umstellung noch was übersehen.

ich schaue es mir an sobald ich dazu komme.
hue, tradfri, alexa-fhem, homebridge-fhem, LightScene, readingsGroup, ...

https://github.com/sponsors/justme-1968

DeeSPe

Zitat von: justme1968 am 05 März 2022, 21:06:45
der malformed JSON string schein ein abgelaufenes token zu sein. das sollte eigentlich regelmässig aktualisiert werden und im fehlerfall ebenfalls. eventuell habe ich hier bei der umstellung noch was übersehen.

Ich habe das jetzt jeden Tag im Log, irgendwas scheint mit der Aktualisierung des Token noch nicht zu klappen:

2022.03.08 13:41:03 2:  UnifiProtect: json error: malformed JSON string, neither array, object, number, string or atom, at character offset 0 (before "Unauthorized") at ./FHEM/74_UnifiProtect.pm line 835.
in
2022.03.08 13:51:03 2:  UnifiProtect: json error: malformed JSON string, neither array, object, number, string or atom, at character offset 0 (before "Unauthorized") at ./FHEM/74_UnifiProtect.pm line 835.
in
2022.03.08 14:01:03 2:  UnifiProtect: json error: malformed JSON string, neither array, object, number, string or atom, at character offset 0 (before "Unauthorized") at ./FHEM/74_UnifiProtect.pm line 835.
in
2022.03.08 14:11:03 2:  UnifiProtect: json error: malformed JSON string, neither array, object, number, string or atom, at character offset 0 (before "Unauthorized") at ./FHEM/74_UnifiProtect.pm line 835.


Ein "reconnect" behebt das Problem immer wieder.

Gruß
Dan
MAINTAINER: 22_HOMEMODE, 98_Hyperion, 98_FileLogConvert, 98_serviced

Als kleine Unterstützung für meine Programmierungen könnt ihr mir gerne einen Kaffee spendieren: https://buymeacoff.ee/DeeSPe

hoppel118

Zitat von: justme1968 am 05 März 2022, 21:06:45
ich glaube die neuverbindungen sind 'nur' der reconnect der im modul nicht drin steckt. das sich der unterschiedlich auswirkt (d.h. mit oder ohne closed eintrag) könnte zufall sein und am system liegen.

im code gibt es ein InternalTimer mit 900 sekunden. könnt ihr den mal ändern und schauen ob es einen unterschied macht?

OK, ich habe gerade mal den InternalTimer auf 1800 gesetzt. Nun siehts erstmal so aus:

2022.03.08 16:59:40 1: !!!!closed!!!!
2022.03.08 16:59:40 1: disconnected
2022.03.08 17:07:49 1: !!!!closed!!!!
2022.03.08 17:07:49 1: disconnected
2022.03.08 17:19:38 1: UnifiProtect_Connect: UnifiProtect
2022.03.08 17:19:38 1: UnifiProtect_Disconnect: UnifiProtect
2022.03.08 17:19:39 1: !!!!closed!!!!
2022.03.08 17:19:39 1: disconnected


Melde mich später nochmal. Vielleicht pendelt sich das ja noch bei einer halben Stunde ein. Hatte FHEM beendet, den Code angepasst und anschließend um 16:49 Uhr FHEM wieder gestartet.

Gruß Hoppel
Server: Openmediavault, XEON E3-1240L-v5, Supermicro X11SSH-CTF, 64GB ECC RAM, SSD, RAID-Z2
Homebridge | Alexa | Yowsup
Homematic | HomeConnect | MQTT | Philips Hue | Sonos | Unifi Network & Protect | vbus | Xiaomi