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

Fritz Plattform Socket hang up Econnreset - devices like WiFi are visible but state is not updated and not responsive #331

Open BillieWhyte opened 3 months ago

BillieWhyte commented 3 months ago

Analysis I'm a newbie - just tried to install the Fritz Platfrom plugin which worked well. When I try to add my 6490 cable fritzbox, after adding all credentials and everything the box is connected and e.g. all the WiFis are shown in the devices tab. however I receive these error messages and the shown devices are not represented in the current state. In fact all devices are only shown in "off" state independent of their actual state and I cannot control them via homebridge. Log at the end of this issue.

Expected Behavior As the installation finished without any error messages I don't know what I'm doing wrong here.

Steps To Reproduce Independent from how many devices I include via the json configuration the error seems to occur always with the last item that homebridge tries to load.

Environment OS: 14.1.1 Software: MAC Node: 20.9.0 npm: 10.1.0

Process Supervisor hb-service

Configuration { "name": "FritzPlatform", "warn": true, "error": true, "extendedError": true, "devices": [ { "active": true, "name": "Fritzbox6490", "host": "http://xxxxx", "username": "xxx", "password": "xxxx", "ssl": true, "tr064": true, "igd": false, "wifiUnits": 2, "master": true, "connection": "cable", "options": { "wifi_2ghz": "switch", "wifi_5ghz": "switch", "wifi_guest": "switch", "wps": "characteristic", "dect": "switch", "deflection": "switch", "led": "switch", "lock": "switch", "reconnect": "switch" } } ], "smarthome": [ { "active": true, "name": "FritzDECT 200 Küche", "ain": "xxxx", "energy": true, "temperature": true, "accType": "switch" } ], "options": { "polling": { "timer": 15, "timerSmarthomeButtons": 1 } }, "telegram": { "active": false }, "platform": "FritzPlatform" }

Log [3/20/2024, 8:45:14 AM] Homebridge v1.7.0 (HAP v0.11.2) (Homebridge 1A54) is running on port 51486. [3/20/2024, 8:45:14 AM] [FritzPlatform] Fritzbox6490: Configuring cached accessory... [3/20/2024, 8:45:14 AM] [FritzPlatform] Fritzbox6490 Wifi 2ghz: Configuring cached accessory... [3/20/2024, 8:45:14 AM] [FritzPlatform] Fritzbox6490 Wifi 5ghz: Configuring cached accessory... [3/20/2024, 8:45:14 AM] [FritzPlatform] Fritzbox6490 Wifi guest: Configuring cached accessory... [3/20/2024, 8:45:14 AM] [FritzPlatform] Fritzbox6490 Dect: Configuring cached accessory... [3/20/2024, 8:45:14 AM] [FritzPlatform] Fritzbox6490 Deflection: Configuring cached accessory... [3/20/2024, 8:45:14 AM] [FritzPlatform] Fritzbox6490 Led: Configuring cached accessory... [3/20/2024, 8:45:14 AM] [FritzPlatform] Fritzbox6490 Lock: Configuring cached accessory... [3/20/2024, 8:45:14 AM] [FritzPlatform] Fritzbox6490 Reconnect: Configuring cached accessory... [3/20/2024, 8:45:14 AM] [FritzPlatform] FritzDECT 200 Küche: Configuring cached accessory... [3/20/2024, 8:45:14 AM] [FritzPlatform] FritzDECT 200 Küche Temperature: Configuring cached accessory... [3/20/2024, 8:45:14 AM] [FritzPlatform] Fritzbox6490: Setup accessory... [3/20/2024, 8:45:14 AM] [FritzPlatform] Fritzbox6490 Wifi 2ghz: Setup accessory... [3/20/2024, 8:45:14 AM] [FritzPlatform] Fritzbox6490 Wifi 5ghz: Setup accessory... [3/20/2024, 8:45:14 AM] [FritzPlatform] Fritzbox6490 Wifi guest: Setup accessory... [3/20/2024, 8:45:14 AM] [FritzPlatform] Fritzbox6490 Dect: Setup accessory... [3/20/2024, 8:45:14 AM] [FritzPlatform] Fritzbox6490 Deflection: Setup accessory... [3/20/2024, 8:45:14 AM] [FritzPlatform] Fritzbox6490 Led: Setup accessory... [3/20/2024, 8:45:14 AM] [FritzPlatform] Fritzbox6490 Lock: Setup accessory... [3/20/2024, 8:45:14 AM] [FritzPlatform] Fritzbox6490 Reconnect: Setup accessory... [3/20/2024, 8:45:14 AM] [FritzPlatform] FritzDECT 200 Küche: Setup accessory... [3/20/2024, 8:45:14 AM] [FritzPlatform] FritzDECT 200 Küche Temperature: Setup accessory... [3/20/2024, 8:46:18 AM] [FritzPlatform] FritzDECT 200 Küche (smarthome-switch): ON [3/20/2024, 8:46:32 AM] [FritzPlatform] Fritzbox6490 Wifi 2ghz (wifi_2ghz): An error occured during getting state! [3/20/2024, 8:46:32 AM] [FritzPlatform] Error: socket hang up at Object.exports.request (/usr/local/lib/node_modules/homebridge-fritz-platform/node_modules/@seydx/fritzbox/lib/request.js:103:21) at processTicksAndRejections (node:internal/process/task_queues:95:5) at exports.requestXml (/usr/local/lib/node_modules/homebridge-fritz-platform/node_modules/@seydx/fritzbox/lib/request.js:230:20) at Fritzbox.parseDesc (/usr/local/lib/node_modules/homebridge-fritz-platform/node_modules/@seydx/fritzbox/lib/fritzbox.js:96:20) at Fritzbox.initialize (/usr/local/lib/node_modules/homebridge-fritz-platform/node_modules/@seydx/fritzbox/lib/fritzbox.js:54:7) at Fritzbox.exec (/usr/local/lib/node_modules/homebridge-fritz-platform/node_modules/@seydx/fritzbox/lib/fritzbox.js:109:5) at Handler.get (/usr/local/lib/node_modules/homebridge-fritz-platform/src/accessories/router/router.handler.js:186:28) at Handler.poll (/usr/local/lib/node_modules/homebridge-fritz-platform/src/accessories/extras/extras.handler.js:783:13) { title: 'No Response', code: 'ECONNRESET', soap: { action: 'unknown' }, url: 'http://http/tr64desc.xml' } [3/20/2024, 8:47:34 AM] [FritzPlatform] An error occurred during polling smarthome devices! [3/20/2024, 8:47:34 AM] [FritzPlatform] Error: read ECONNRESET at Object.exports.request (/usr/local/lib/node_modules/homebridge-fritz-platform/node_modules/@seydx/fritzbox/lib/request.js:103:21) at processTicksAndRejections (node:internal/process/task_queues:95:5) at exports.requestXml (/usr/local/lib/node_modules/homebridge-fritz-platform/node_modules/@seydx/fritzbox/lib/request.js:230:20) at Fritzbox.parseDesc (/usr/local/lib/node_modules/homebridge-fritz-platform/node_modules/@seydx/fritzbox/lib/fritzbox.js:96:20) at Fritzbox.initialize (/usr/local/lib/node_modules/homebridge-fritz-platform/node_modules/@seydx/fritzbox/lib/fritzbox.js:54:7) at Fritzbox.getSmarthomeDevices (/usr/local/lib/node_modules/homebridge-fritz-platform/node_modules/@seydx/fritzbox/lib/fritzbox.js:220:5) at Handler.poll (/usr/local/lib/node_modules/homebridge-fritz-platform/src/accessories/smarthome/smarthome.handler.js:1755:28) { title: 'No Response', code: 'ECONNRESET', soap: { action: 'unknown' }, url: 'https://http/tr64desc.xml' } [3/20/2024, 8:48:41 AM] [FritzPlatform] An error occurred during polling smarthome devices! [3/20/2024, 8:48:41 AM] [FritzPlatform] Error: socket hang up at Object.exports.request (/usr/local/lib/node_modules/homebridge-fritz-platform/node_modules/@seydx/fritzbox/lib/request.js:103:21) at processTicksAndRejections (node:internal/process/task_queues:95:5) at exports.requestXml (/usr/local/lib/node_modules/homebridge-fritz-platform/node_modules/@seydx/fritzbox/lib/request.js:230:20) at Fritzbox.parseDesc (/usr/local/lib/node_modules/homebridge-fritz-platform/node_modules/@seydx/fritzbox/lib/fritzbox.js:96:20) at Fritzbox.initialize (/usr/local/lib/node_modules/homebridge-fritz-platform/node_modules/@seydx/fritzbox/lib/fritzbox.js:54:7) at Fritzbox.getSmarthomeDevices (/usr/local/lib/node_modules/homebridge-fritz-platform/node_modules/@seydx/fritzbox/lib/fritzbox.js:220:5) at Handler.poll (/usr/local/lib/node_modules/homebridge-fritz-platform/src/accessories/smarthome/smarthome.handler.js:1755:28) { title: 'No Response', code: 'ECONNRESET', soap: { action: 'unknown' }, url: 'http://http/tr64desc.xml' } [3/20/2024, 8:49:49 AM] [FritzPlatform] Fritzbox6490 (cable): An error occured during getting state! [3/20/2024, 8:49:49 AM] [FritzPlatform] Error: read ECONNRESET at Object.exports.request (/usr/local/lib/node_modules/homebridge-fritz-platform/node_modules/@seydx/fritzbox/lib/request.js:103:21) at processTicksAndRejections (node:internal/process/task_queues:95:5) at exports.requestXml (/usr/local/lib/node_modules/homebridge-fritz-platform/node_modules/@seydx/fritzbox/lib/request.js:230:20) at Fritzbox.parseDesc (/usr/local/lib/node_modules/homebridge-fritz-platform/node_modules/@seydx/fritzbox/lib/fritzbox.js:96:20) at Fritzbox.initialize (/usr/local/lib/node_modules/homebridge-fritz-platform/node_modules/@seydx/fritzbox/lib/fritzbox.js:54:7) at Fritzbox.exec (/usr/local/lib/node_modules/homebridge-fritz-platform/node_modules/@seydx/fritzbox/lib/fritzbox.js:109:5) at Handler.get (/usr/local/lib/node_modules/homebridge-fritz-platform/src/accessories/router/router.handler.js:133:28) at Handler.poll (/usr/local/lib/node_modules/homebridge-fritz-platform/src/accessories/router/router.handler.js:979:11) { title: 'No Response', code: 'ECONNRESET', soap: { action: 'unknown' }, url: 'https://http/tr64desc.xml' } [3/20/2024, 8:49:54 AM] [FritzPlatform] Fritzbox6490 (wps): An error occured during getting state! [3/20/2024, 8:49:54 AM] [FritzPlatform] Error: Unexpected close tag Line: 16 Column: 6 Char: > at error (/usr/local/lib/node_modules/homebridge-fritz-platform/node_modules/sax/lib/sax.js:652:10) at strictFail (/usr/local/lib/node_modules/homebridge-fritz-platform/node_modules/sax/lib/sax.js:678:7) at closeTag (/usr/local/lib/node_modules/homebridge-fritz-platform/node_modules/sax/lib/sax.js:872:9) at SAXParser.write (/usr/local/lib/node_modules/homebridge-fritz-platform/node_modules/sax/lib/sax.js:1437:13) at Parser.exports.Parser.Parser.parseString (/usr/local/lib/node_modules/homebridge-fritz-platform/node_modules/xml2js/lib/parser.js:323:31) at Parser.parseString (/usr/local/lib/node_modules/homebridge-fritz-platform/node_modules/xml2js/lib/parser.js:5:59) at /usr/local/lib/node_modules/homebridge-fritz-platform/node_modules/xml2js/lib/parser.js:338:24 at new Promise () at Parser.exports.Parser.Parser.parseStringPromise (/usr/local/lib/node_modules/homebridge-fritz-platform/node_modules/xml2js/lib/parser.js:336:14) at Parser.parseStringPromise (/usr/local/lib/node_modules/homebridge-fritz-platform/node_modules/xml2js/lib/parser.js:5:59)

BillieWhyte commented 3 months ago

hello - anyone reading this?