ACDR / homebridge-yamaha-avr

homebridge-plugin for Yamaha AVR. Audio Receiver Accessory with Power, Input, Volume & Remote Control
Apache License 2.0
45 stars 6 forks source link

Unhandled Promise Rejection Warning #35

Closed typkrft closed 2 years ago

typkrft commented 4 years ago

Describe The Bug:

To Reproduce:

Expected behavior:

Logs:

[10/27/2020, 12:10:40 AM] [Living Room Receiver] 
          Cannot communicate with Yamaha AVR at 192.168.1.124.
          Connection will be restored automatically when the AVR begins responding.

(node:1828) UnhandledPromiseRejectionWarning: Error: [node-persist][readFile] /homebridge/persist/AccessoryInfo.0E5AC1BABBEC.json does not look like a valid storage file!
    at /homebridge/node_modules/homebridge-yamaha-avr/node_modules/node-persist/src/local-storage.js:314:89
    at FSReqCallback.readFileAfterClose [as oncomplete] (internal/fs/read_file_context.js:63:3)
(node:1828) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 4)

Plugin Config:

{
    "bridge": {
        "name": "Homebridge BBEC",
        "username": "0E:5A:C1:BA:BB:EC",
        "port": 52580,
        "pin": "031-45-155"
    },
    "accessories": [
        {
            "name": "x",
            "vin": "x",
            "username": "x",
            "password": "x",
            "waitMinutes": 1,
            "accessory": "Tesla"
        },
        {
            "accessory": "PlexWebhooksServer",
            "name": "Plex Upstairs Master",
            "port": "32000",
            "filter": [
                {
                    "Account.title": "x",
                    "Player.title": "Upstairs Master"
                }
            ]
        },
        {
            "accessory": "PlexWebhooksServer",
            "name": "Plex Living Room",
            "port": "32001",
            "filter": [
                {
                    "Account.title": "x",
                    "Player.title": "Living Room Apple TV"
                }
            ]
        },
        {
            "accessory": "PlexWebhooksServer",
            "name": "Plex Theater",
            "port": "32002",
            "filter": [
                {
                    "Account.title": "x",
                    "Player.title": "XBOXONE"
                }
            ]
        }
    ],
    "platforms": [
        {
            "name": "Config",
            "port": 8582,
            "platform": "config"
        },
        {
            "platform": "TeslaPowerwall",
            "name": "Tesla Powerwall",
            "ip": "192.168.1.92",
            "pollingInterval": 10000,
            "historyInterval": 120000,
            "lowBattery": 10,
            "historySetting": {
                "storage": "fs"
            }
        },
        {
            "units": "us",
            "interval": 5,
            "stations": [
                {
                    "nameNow": "x",
                    "service": "openweathermap",
                    "key": "x",
                    "locationGeo": [
                        x,
                        -x
                    ],
                    "locationCity": "x",
                    "language": "en",
                    "compatibility": "home",
                    "forecast": [
                        "Today"
                    ],
                    "conditionCategory": "detailed",
                    "now": true,
                    "extraHumidity": false,
                    "hidden": [
                        "Air Pressure",
                        "Dew Point",
                        "Ozone"
                    ]
                }
            ],
            "platform": "WeatherPlus"
        },
        {
            "email": "x",
            "password": "x",
            "platform": "NeatoVacuumRobot"
        },
        {
            "name": "Govee",
            "apiKey": "x",
            "debug": false,
            "debugReqRes": false,
            "refreshTime": 30,
            "platform": "Govee"
        },
        {
            "ip": "192.168.1.124",
            "name": "Living Room Receiver",
            "cacheDirectory": "/homebridge/persist",
            "platform": "yamaha-avr"
        }
    ]
}

Screenshots:

Environment:

crazylenni commented 4 years ago

I got the same error.

(node:1833) UnhandledPromiseRejectionWarning: Error: [node-persist][readFile] /homebridge/persist/AccessoryInfo.0E5E6F2BF4D1.json does not look like a valid storage file! at /homebridge/node_modules/homebridge-yamaha-avr/node_modules/node-persist/src/local-storage.js:314:89 at FSReqCallback.readFileAfterClose [as oncomplete] (internal/fs/read_file_context.js:63:3) (node:1833) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)

lugaetsch commented 3 years ago

Running the plugin in a docker with latest homebridge version I have the same output after adding the receiver to the homekit. There seem to be a communication error from homekit to the plugin, not sure...

ACDR commented 2 years ago

Can somebody please test whether this is still an issue in v2.1.0?