joeyhage / homebridge-alexa-smarthome

Connect Alexa devices to HomeKit
MIT License
82 stars 20 forks source link

HB does not run and keeps restarting with TypeError: as.filter is not a function... #16

Closed sujay1109 closed 1 year ago

sujay1109 commented 1 year ago

I was able to authenticate the Alexa account successfully but now HB keeps restarting with the following error.

To Reproduce:

Installed the plug-in and followed the steps to authenticate Alexa account.

Expected behavior:

Not see the above issue/error.

Logs:

[8/29/2023, 5:27:25 PM] [HomebridgeAlexaSmartHome] Successfully authenticated Alexa account.
[8/29/2023, 5:27:26 PM] TypeError: as.filter is not a function
    at /usr/local/lib/node_modules/homebridge-alexa-smarthome/node_modules/fp-ts/lib/Array.js:1464:19
    at /usr/local/lib/node_modules/homebridge-alexa-smarthome/node_modules/fp-ts/lib/Either.js:349:62
    at pipe (/usr/local/lib/node_modules/homebridge-alexa-smarthome/node_modules/fp-ts/lib/function.js:299:20)
    at Object._map [as map] (/usr/local/lib/node_modules/homebridge-alexa-smarthome/node_modules/fp-ts/lib/Either.js:63:58)
    at /usr/local/lib/node_modules/homebridge-alexa-smarthome/node_modules/fp-ts/lib/Functor.js:19:92
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
[8/29/2023, 5:27:26 PM] Got SIGTERM, shutting down Homebridge...
[8/29/2023, 5:27:31 PM] [HB Supervisor] Homebridge Process Ended. Code: 143, Signal: null

Plugin Config:

{
            "auth": {
                "refreshInterval": 4,
                "proxy": {
                    "clientHost": "localhost",
                    "port": 2345
                }
            },
            "devices": [],
            "amazonDomain": "amazon.com",
            "language": "en-US",
            "debug": true,
            "platform": "HomebridgeAlexaSmartHome"
        }

Screenshots:

Environment:

canny[bot] commented 1 year ago

This issue has been linked to a Canny post: HB is not running and keeps restarting :tada:

joeyhage commented 1 year ago

@sujay1109 I have just released v0.0.19 of homebridge-alexa-smarthome. Please keep debug logging enabled and let me know if that fixes the issue.

sujay1109 commented 1 year ago

Thanks for the quick response @joeyhage. With the v0.0.19 I do not see the above issue but I do see the following.

[8/30/2023, 12:14:17 PM] [HomebridgeAlexaSmartHome] Successfully authenticated Alexa account. [8/30/2023, 12:14:17 PM] [HomebridgeAlexaSmartHome] After initialization - InvalidResponse(Invalid list of Alexa devices found for the current Alexa account)

Is there anything I'm missing to have the Amazon plugs being detected?

joeyhage commented 1 year ago

Which country are you located in? Just want to confirm your Alexa account is linked in the USA (that is the alexaDomain config option which you specified as Amazon.com)

sujay1109 commented 1 year ago

I am in USA but I realized the account I was logged in on the Alexa App was different from the one I used for the plugin. I fixed that and now I can see the devices showing up on HomeKit and working fine. Thanks a lot for your help!

joeyhage commented 1 year ago

Glad to hear that! You are very welcome!