fjs21 / homebridge-blueair

BlueAir air purifier plugin for homebridge
https://www.npmjs.com/package/@fjs21/homebridge-blueair
Apache License 2.0
50 stars 6 forks source link

Automate API Region Selection #324

Open nlittlejohns opened 1 year ago

nlittlejohns commented 1 year ago

Hi, Great work on this plugin! Just wanted to flag the following (resolved) issue for anyone else having trouble...

Device: Protect 7470i (requires AWS API) located in Quebec, Canada

After enabling the AWS API, I'd get this error (similar to this issue: https://github.com/fjs21/homebridge-blueair/issues/24)

TypeError: Cannot read properties of undefined (reading 'sessionToken')
    at BlueAirAwsApi.awsLogin (/var/lib/homebridge/node_modules/@fjs21/homebridge-blueair/src/blueair-aws-api.ts:150:42)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at BlueAirHomebridgePlatform.discoverAwsDevices (/var/lib/homebridge/node_modules/@fjs21/homebridge-blueair/src/platform.ts:165:33)

Issue was resolved by changing region from US to EU.

It's not clear what it is about my account which requires me to use the EU region. I don't have my address/country set in my profile. I do have my temperature set to Celsius, so maybe it assumes EU based on that? Account was created recently from within Quebec.

Anyway, got it working. I also hit this UUID issue: https://github.com/fjs21/homebridge-blueair/issues/291, but it worked after I hid Germ Shield in the plugin settings (it wasn't clear what "disable.UUID" does, so I didn't want to add that.

Feel free to close this issue if there's nothing to be done with it, just wanted to document the solution for others.

jonato1 commented 1 year ago

@nlittlejohns Thanks for flagging this! I made an update in the configs, and will make and update in the Readme.md to offer better guidance to show "Canada/EU" instead of just "EU". When I have some time, I will work to make it so that the country auto-selects without user-input.