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

TypeError: Cannot read property 'type' of undefined #228

Closed pegglseder closed 3 years ago

pegglseder commented 3 years ago

Describe the bug I´m getting the following error messages;

[20/08/2021, 12:14:58] [FritzPlatform] An error occurred during polling extras! [20/08/2021, 12:14:58] [FritzPlatform] TypeError: Cannot read property 'type' of undefined at /usr/local/lib/node_modules/homebridge-fritz-platform/src/accessories/extras/extras.handler.js:761:91 at Array.filter () at Handler.poll (/usr/local/lib/node_modules/homebridge-fritz-platform/src/accessories/extras/extras.handler.js:761:44) at Timeout._onTimeout (/usr/local/lib/node_modules/homebridge-fritz-platform/src/accessories/extras/extras.handler.js:776:29) at listOnTimeout (internal/timers.js:557:17) at processTimers (internal/timers.js:500:7) [20/08/2021, 12:14:59] [FritzPlatform] An error occurred during polling router/characteristics! [20/08/2021, 12:14:59] [FritzPlatform] TypeError: Cannot read property 'type' of undefined at /usr/local/lib/node_modules/homebridge-fritz-platform/src/accessories/router/router.handler.js:963:91 at Array.filter () at Handler.poll (/usr/local/lib/node_modules/homebridge-fritz-platform/src/accessories/router/router.handler.js:963:44) at Timeout._onTimeout (/usr/local/lib/node_modules/homebridge-fritz-platform/src/accessories/router/router.handler.js:1003:29) at listOnTimeout (internal/timers.js:557:17) at processTimers (internal/timers.js:500:7)

To Reproduce I installed homebridge with the Raspberry Pi Imager 1.6 according this installation: https://github.com/homebridge/homebridge-raspbian-image/wiki/Getting-Started

Afterwards I installed your plugin via plugins-page on the config-page and did the configuration via plugin settings link.

Desktop (please complete the following information): System Information OS Raspbian GNU/Linux Buster (10) Hostname homebridge IPv4 (eth0) 192.168.20.240 IPv6 (eth0) fe80::4d6d:463c:a2e5:9989 Node.js Version v14.17.4 Npm Version v7.20.3 User pi Storage Path /var/lib/homebridge Config Path /var/lib/homebridge/config.json Service Mode Yes

CONFIG { "bridge": { "name": "Homebridge B5CB", "username": "0E:32:E8:93:B5:CB", "port": 51392, "pin": "220-78-652" }, "accessories": [], "platforms": [ { "name": "Config", "port": 8581, "platform": "config" }, { "name": "FritzPlatform", "debug": true, "devices": [ { "active": true, "name": "DocBox", "host": "192.168.20.1", "port": 49000, "username": "Homebridge", "password": "*****", "manufacturer": "Fritz Box", "model": "7590", "serialNumber": "12345", "master": true, "ssl": true, "tr064": true, "igd": false, "readOnly": false, "hide": true, "connection": "dsl", "wifiUnits": 2, "options": { "wifi_2ghz": "switch", "wifi_5ghz": "switch", "wifi_guest": "switch", "wps": "characteristic", "led": "switch", "dect": "switch", "broadband": "characteristic" } } ], "options": { "polling": { "timer": 15, "timerSmarthomeButtons": 5, "exclude": [] } }, "telegram": { "active": true, "token": "*", "chatID": "****", "messages": { "presence": { "user_in": "Welcome at home @", "user_out": "Bye Bye @", "anyone_in": "Someone is at home!", "anyone_out": "Nobody at home!" }, "callmonitor": { "incoming": "Incoming call from @", "outgoing": "Outgoing call to @", "disconnected": "Call with @ disconnected" }, "alarm": { "activated": "Alarm activated", "deactivated": "Alarm deactivated" }, "reboot": { "start": "@: Offline!", "finish": "@: Online!" }, "network": { "on": "@ is in network!", "off": "@ not in network!" }, "outlet": { "started": "@ started!", "finished": "@ finished!" } } }, "platform": "FritzPlatform" } ] }

seydx commented 3 years ago

i pushed a new beta version, can u check it pls and confirm if the beta fix the issue

sudo npm i -g homebridge-fritz-platform@beta

Dont worry, u can always jump back to official version without any issues with following command:

sudo npm i -g homebridge-fritz-platform@latest

seydx commented 3 years ago

fixed in v6.0.15

pegglseder commented 3 years ago

unfortunately not:

[21/09/2021, 18:27:53] [FritzPlatform] Error: Internal Server Error at Object.exports.request (/usr/local/lib/node_modules/homebridge-fritz-platform/node_modules/@seydx/fritzbox/lib/request.js:78:21) at runMicrotasks () at processTicksAndRejections (internal/process/task_queues.js:95:5) at exports.requestXml (/usr/local/lib/node_modules/homebridge-fritz-platform/node_modules/@seydx/fritzbox/lib/request.js:230:20) at Service.execAction (/usr/local/lib/node_modules/homebridge-fritz-platform/node_modules/@seydx/fritzbox/lib/service.js:133:20) at Handler.get (/usr/local/lib/node_modules/homebridge-fritz-platform/src/accessories/router/router.handler.js:101:28) at Handler.poll (/usr/local/lib/node_modules/homebridge-fritz-platform/src/accessories/router/router.handler.js:979:11) { title: 'Invalid Response', code: 500, soap: { errorCode: '401', errorDescription: 'Invalid Action', action: 'urn:dslforum-org:service:WANPPPConnection:1#GetInfo' }, url: 'https://Homebridge:*********@192.168.20.1:49443/upnp/control/wanpppconn1' }

seydx commented 3 years ago

Thats a different issue. Can u restart your fritzbox and homebridge and try again pls

pegglseder commented 3 years ago

Thanks, It´s working now