seydx / homebridge-fritz-platform

AiO Homebridge dynamic platform plugin for AVM hardware like Fritz!Box, Fritz!Repeater etc.
MIT License
223 stars 32 forks source link

Anyone State not working correctly #276

Open Scream4Life opened 2 years ago

Scream4Life commented 2 years ago

Describe the bug I just updated from Version 4 to 6 and after updating the config things seems to work correctly except of the Anyone state. In case both phone noted in presence are gone I expected the anyone state to switch off, which does not happen.

HB 1.4.0 Fritz Plugin 6.0.19 FritzBox 6590 installed FW Version 7.29

Here parts of my config { "platform": "FritzPlatform", "name": "FritzPlatform", "debug": true, "devices": [ { "active": true, "name": "FRITZ!Box 6590 Cable", "host": "xxx.xxx.xxx.xxx", "port": 49000, "username": "user", "password": "pw", "manufacturer": "Fritz Box", "model": "6590", "serialNumber": "12345", "master": true, "ssl": true, "tr064": true, "igd": false, "readOnly": false, "hide": true, "type": "cable", "connection": "cable", "wifiUnits": 2, "options": { "wifi_2ghz": "switch", "wifi_5ghz": "switch", "wifi_guest": "switch", "wps": "characteristic", "aw": "characteristic", "led": "switch", "reconnect": "switch", "broadband": "characteristic" } } ], "presence": [ { "active": true, "blockTelegram": true, "name": "my name", "address": "ip", "accType": "occupancy", "ping": true, "threshold": 15, "onDelay": 30, "offDelay": 90 }, { "active": true, "blockTelegram": true, "name": "my wife's name", "address": "ip", "accType": "occupancy", "ping": true, "threshold": 15, "onDelay": 30, "offDelay": 90 } ], "callmonitor": { "active": true, "group": true, "ip": "xxx.xxx.xxx.xxx", "port": 1012, "cityPrefix": "xxx", "countryPrefix": "+49", "incomingFrom": [], "incomingTo": [], "outgoingFrom": [] }, "options": { "polling": { "timer": 15, "timerSmarthomeButtons": 5, "exclude": [] }, "presence": { "anyone": true, "guest": false, "accType": "occupancy" }, "reboot": { "on": "/var/lib/homebridgee/rebootOn.sh", "off": "/var/lib/homebridge/rebootOff.sh" } },

Here parts of the debug Mär 22 12:26:43 raspberrypi homebridge[2588]: [22.3.2022, 12:26:43] [FritzPlatform] [DEBUG] FRITZ!Box 6590 Cable Led (led): GET CMD: {"xhr":"1","xhrId":"all","sid":"0f7b68735c0f35bd","page":"led"} Mär 22 12:26:43 raspberrypi homebridge[2588]: [22.3.2022, 12:26:43] [FritzPlatform] [DEBUG] FRITZ!Box 6590 Cable Led (led): {"pid":"led","hide":{"shareUsb":true,"liveTv":true,"faxSet":true,"dectRdio":true,"rss":true,"ssoSet":true,"dectMail":true,"mobile":true,"liveImg":true},"time":[],"data":{"ledSettings":{"canDim":"0","hasEnv":"0","ledDisplay":"0"}},"sid":"0f7b68735c0f35bd"} Mär 22 12:26:46 raspberrypi homebridge[2588]: [22.3.2022, 12:26:46] [FritzPlatform] [DEBUG] my wife's name (occupancy): {"mac":"FA:1E:0D:7A:8E:47","ip":"xxx.xxx.xxx.xxx","active":false,"name":"iPhone-SE","interface":""} Mär 22 12:26:48 raspberrypi homebridge[2588]: [22.3.2022, 12:26:48] [FritzPlatform] [DEBUG] my name (occupancy): {"mac":"EE:1C:28:31:57:AD","ip":"xxx.xxx.xxx.xxx","active":false,"name":"iPhone-13-Pro","interface":""} Mär 22 12:26:50 raspberrypi homebridge[2588]: [22.3.2022, 12:26:50] [FritzPlatform] An error occurred during polling hosts! Mär 22 12:26:50 raspberrypi homebridge[2588]: [22.3.2022, 12:26:50] [FritzPlatform] TypeError: Cannot read property 'type' of undefined Mär 22 12:26:50 raspberrypi homebridge[2588]: at /usr/lib/node_modules/homebridge-fritz-platform/src/accessories/presence/presence.handler.js:304:51 Mär 22 12:26:50 raspberrypi homebridge[2588]: at Array.find (<anonymous>:null:null) Mär 22 12:26:50 raspberrypi homebridge[2588]: at Handler.poll (/usr/lib/node_modules/homebridge-fritz-platform/src/accessories/presence/presence.handler.js:303:50) Mär 22 12:26:50 raspberrypi homebridge[2588]: at runMicrotasks (<anonymous>:null:null) Mär 22 12:26:50 raspberrypi homebridge[2588]: at processTicksAndRejections (internal/process/task_queues.js:95:5) Mär 22 12:26:58 raspberrypi homebridge[2588]: [22.3.2022, 12:26:58] [FritzPlatform] [DEBUG] FRITZ!Box 6590 Cable Wifi 2ghz (wifi_2ghz): {"NewEnable":"1","NewStatus":"Up","NewMaxBitRate":"Auto","NewChannel":"1","NewSSID":"Infinity","NewBeaconType":"11i","NewX_AVM-DE_PossibleBeaconTypes":"None,11i,WPAand11i,11iandWPA3","NewMACAddressControlEnabled":"0","NewStandard":"n","NewBSSID":"44:4E:6D:50:0C:1D","NewBasicEncryptionModes":"None","NewBasicAuthenticationMode":"None","NewMaxCharsSSID":"32","NewMinCharsSSID":"1","NewAllowedCharsSSID":"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz !\"#$%&'()*+,-./:;<=>?@[\\]^_{|}~","NewMinCharsPSK":"64","NewMaxCharsPSK":"64","NewAllowedCharsPSK":"0123456789ABCDEFabcdef"} Mär 22 12:26:58 raspberrypi homebridge[2588]: [22.3.2022, 12:26:58] [FritzPlatform] [DEBUG] FRITZ!Box 6590 Cable Wifi 5ghz (wifi_5ghz): [{"NewEnable":"1","NewStatus":"Up","NewMaxBitRate":"Auto","NewChannel":"52","NewSSID":"Infinity","NewBeaconType":"11i","NewX_AVM-DEPossibleBeaconTypes":"None,11i,WPAand11i,11iandWPA3","NewMACAddressControlEnabled":"0","NewStandard":"ac","NewBSSID":"44:4E:6D:50:0C:1E","NewBasicEncryptionModes":"None","NewBasicAuthenticationMode":"None","NewMaxCharsSSID":"32","NewMinCharsSSID":"1","NewAllowedCharsSSID":"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz !\"#$%&'()*+,-./:;<=>?@[\]^{| }~","NewMinCharsPSK":"64","NewMaxCharsPSK":"64","NewAllowedCharsPSK":"0123456789ABCDEFabcdef"}] Mär 22 12:26:59 raspberrypi homebridge[2588]: [22.3.2022, 12:26:59] [FritzPlatform] [DEBUG] FRITZ!Box 6590 Cable Wifi guest (wifi_guest): {"NewEnable":"0","NewStatus":"Disabled","NewMaxBitRate":"Auto","NewChannel":"1","NewSSID":"Welcome Guest","NewBeaconType":"11i","NewX_AVM-DE_PossibleBeaconTypes":"None,11i,11iandWPA3,OWETrans","NewMACAddressControlEnabled":"0","NewStandard":"","NewBSSID":"46:4E:6D:50:0C:1D","NewBasicEncryptionModes":"None","NewBasicAuthenticationMode":"None","NewMaxCharsSSID":"32","NewMinCharsSSID":"1","NewAllowedCharsSSID":"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz !\"#$%&'()*+,-./:;<=>?@[\\]^_{|}~","NewMinCharsPSK":"64","NewMaxCharsPSK":"64","NewAllowedCharsPSK":"0123456789ABCDEFabcdef"} Mär 22 12:26:59 raspberrypi homebridge[2588]: [22.3.2022, 12:26:59] [FritzPlatform] [DEBUG] FRITZ!Box 6590 Cable Led (led): GET CMD: {"xhr":"1","xhrId":"all","sid":"0f7b68735c0f35bd","page":"led"} Mär 22 12:26:59 raspberrypi homebridge[2588]: [22.3.2022, 12:26:59] [FritzPlatform] [DEBUG] FRITZ!Box 6590 Cable Led (led): {"pid":"led","hide":{"shareUsb":true,"liveTv":true,"faxSet":true,"dectRdio":true,"rss":true,"ssoSet":true,"dectMail":true,"mobile":true,"liveImg":true},"time":[],"data":{"ledSettings":{"canDim":"0","hasEnv":"0","ledDisplay":"0"}},"sid":"0f7b68735c0f35bd"} Mär 22 12:27:07 raspberrypi homebridge[2588]: [22.3.2022, 12:27:07] [FritzPlatform] [DEBUG] my wife's name (occupancy): {"mac":"FA:1E:0D:7A:8E:47","ip":"192.168.0.90","active":false,"name":"iPhone-SE","interface":""} Mär 22 12:27:09 raspberrypi homebridge[2588]: [22.3.2022, 12:27:09] [FritzPlatform] [DEBUG] my name (occupancy): {"mac":"EE:1C:28:31:57:AD","ip":"192.168.0.150","active":false,"name":"iPhone-13-Pro","interface":""}`