Comments (17)
@jonato1 Yes, everything returned a success after I swapped out the api key with the one I posted. As for the configuration.di.hw value, it gives me "low_1.4"
from homebridge-blueair.
@jonato1 7422371000 And this is the model number for my unit.
from homebridge-blueair.
For the 7440i devices you will need to use AWS to connect. @jonato1 has been helping others with the Amazon API support.
from homebridge-blueair.
Hi @wgalternate - I suspect this is because I made the assumption that everything was going to hit US-based APIs, however I'm don't have the full list of global API endpoints. Can you use Charles Proxy on a mobile device and identify the various endpoints that you hit? They should look similar to the ones below, but will probably switch out US for EU, or AWS for Azure.
- https://accounts.us1.gigya.com/accounts.login
- https://accounts.us1.gigya.com/accounts.getJWT
- https://on1keymlmh.execute-api.us-east-2.amazonaws.com/prod/c/login
- https://on1keymlmh.execute-api.us-east-2.amazonaws.com/prod/c/registered-devices
- https://on1keymlmh.execute-api.us-east-2.amazonaws.com/prod/c/{{deviceName}}/r/initial
- https://on1keymlmh.execute-api.us-east-2.amazonaws.com/prod/c/{{deviceUuid}}/a/standby
I'm fairly certain the first two will either has a base url of https://accounts.eu1.gigya.com or https://accounts.eu2.gigya.com. For the latter endpoints, I'm guessing it might be eu-west-2, but there are quite a number of AWS regions. If it is hitting Azure, then I may need more collaboration with you to dig into this.
Looking forward to getting this working for you!
from homebridge-blueair.
Hi @jonato1
Here is the list of endpoints that I'm hitting based on the ones that you specified.
https://accounts.eu1.gigya.com/accounts.login
https://accounts.eu1.gigya.com/accounts.getJWT
https://hkgmr8v960.execute-api.eu-west-1.amazonaws.com/prod/c/login
https://hkgmr8v960.execute-api.eu-west-1.amazonaws.com/prod/c/registered-devices
https://hkgmr8v960.execute-api.eu-west-1.amazonaws.com/prod/c/{{deviceName}}/r/initial
https://hkgmr8v960.execute-api.eu-west-1.amazonaws.com/prod/c/{{deviceUuid}}/a/standby
Other notable endpoints :
https://api.blueair.io/v2/user/{{username}}/homehost/
https://api-eu-west-1.blueair.io/v2/user/{{username}}/get/
https://api-eu-west-1.blueair.io/v2/token/exchange
https://api-eu-west-1.blueair.io/v2/owner/{{username}}/device/
- Thanks for the response and your work on this!
from homebridge-blueair.
@wgalternate This is super helpful! So a follow up question - are you familiar with/comfortable with using Postman? If so, can you import this collection, populate your username and password into the Environment variables, and then run through the requests from top to bottom to see if they all work? If not, feel free to paste the response outputs or any errors you get.
https://www.getpostman.com/collections/9318d0666291a14f3d67
Alternatively, if you're not familiar with Postman, I'd be happy to either hop on a Zoom or code it blindly, release it, and iterate through that process until we get it working.
from homebridge-blueair.
@jonato1 The only issue seems to be with the api key that you used with the login session. It should be this instead for the EU West server 3_qRseYzrUJl1VyxvSJANalu_kNgQ83swB1B9uzgms58--5w1ClVNmrFdsDnWVQQCl
from homebridge-blueair.
@wgalternate Gotcha, thanks for that insight. Other than that, it seems like everything worked okay? Also, I don't explicitly have the model # for the 7440i. On the "Get State" call in Postman, what did the configuration.di.hw value show? I assume it's something like "low_1.4" or "high_1.5". This will be the last thing I think I need to get a first iteration of this coded and released.
from homebridge-blueair.
@wgalternate Just a quick update - I think I've got everything updated to enable compatibility. Once v1.1.0 is released (likely in 1-3 days), then you will have to go to Plugin Settings and update your Region to EU. After that, you will need to restart Homebridge. If you run into any issues, please feel free to enable DEBUG mode in Homebridge and share any/all logs.
Cheers!
Jon
from homebridge-blueair.
@jonato1 Thanks for the update! Looking forward to testing it out and reporting back!
from homebridge-blueair.
@wgalternate - Just another update. @fjs21 and I are running into issues with an intermittent error that pops up when trying to publish 1.1.0 to NPM. I'll let you know once we get this resolved.
from homebridge-blueair.
@wgalternate Looks like we got it figured out! Let me know how v1.1.0 goes for you.
from homebridge-blueair.
Finally got around to trying this out. Does not seem to work for me though.
[5/7/2022, 6:51:38 PM] [@fjs21/homebridge-blueair] Got homehost: api-eu-west-1.blueair.io TypeError: Cannot read properties of undefined (reading 'sessionToken') at BlueAirApi.awsLogin (/homebridge/node_modules/@fjs21/homebridge-blueair/src/blueair-api.ts:494:44) at processTicksAndRejections (node:internal/process/task_queues:96:5) at BlueAirHomebridgePlatform.discoverAwsDevices (/homebridge/node_modules/@fjs21/homebridge-blueair/src/platform.ts:160:33) [5/7/2022, 6:51:38 PM] [@fjs21/homebridge-blueair] Child bridge process ended
from homebridge-blueair.
@wgalternate Thanks for the update. Can you confirm the following?
- You are on v1.1.0
- You have the Enable AWS API enabled in the settings
- You have the Region set to EU
- You have Homebridge Debug enabled
If any of the following was not done, can you retry and re-post any logs?
from homebridge-blueair.
@jonato1 Yes, everything is set as you described. Though I just realised that my account is now "temporarily locked out"!
Probably due to all the broken request that was being made by the previous version of the script? The is probably why its erroring out for me. I'll wait to see if my account becomes unlocked, or create a new one and give it another go.
Will report back.
from homebridge-blueair.
@jonato1 A new account worked! Everything seems to be working correctly now.
from homebridge-blueair.
That's great to hear - thanks for the update @wgalternate. I'll close out this issue, but feel free to open a new one if anything changes.
from homebridge-blueair.
Related Issues (20)
- Add Support for Model: 411i MAX HOT 7
- Add Support for Classic 480i / Classic 490i HOT 3
- Add Support for 311i Max HOT 7
- Crash while using 480i
- Asking Siri to turn on all lights in a room sets BlueAir LED brightness to zero
- Warnings generated in logs
- Add switch for 'auto' mode HOT 2
- 1.3.1 crashes when multiple air purifiers are found on AWS HOT 3
- More Frequent Token Refreshes
- Please add support for 211i Max HOT 1
- Support for Blue Max 3250i
- AWS TW region support HOT 1
- Out of Compliance HOT 1
- AWS china/cn region support HOT 3
- Transfer to Homebridge Organization
- Fix auto behavior
- Add new region Malaysia
- Hide CO2 Sensor Crashes on 680i HOT 1
- Air purifier no response in homekit
- Error reading device since latest Homebridge update HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from homebridge-blueair.