Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AWS push update? #20

Open
rainwoodman opened this issue Nov 27, 2024 · 4 comments
Open

AWS push update? #20

rainwoodman opened this issue Nov 27, 2024 · 4 comments

Comments

@rainwoodman
Copy link
Contributor

Apparently the blueair app can receive a state update of the device almost instantly, when a state change is triggered from Home Assistant; but our HA integration uses a polling frequency of 10 minutes.

What technology could be behind blueair App's fast update time? There doesn't seem to be a persist connection to the blueair servers. Is there some type of iOS/Android platform integration for such notifications?

@dahlb
Copy link
Owner

dahlb commented Nov 27, 2024

it could be done with app notifications, I haven't tried to decompile the app to see, I just based what we have so far on another implementation (referenced in the readme) and it didn't include any push mechanism

@rainwoodman
Copy link
Contributor Author

Yes the traffic seems to be referring to several API providers that are related to registering for push notification and usage tracking, names of who I never heard of. I think I have just accidentally discovered the market of mobile middlewares. I guess it also means unless naba casa sponsors some kind of push notification service that are blessed by BlueAir (maybe through one of the middleware providers), we will not be getting these push notifications.

I am still curious what technology is behind push notifications in general. If my phone is behind a HTTP Connect proxy, then obviously the push still has to come from some kind of streaming (websocket?) or frequent polling requests. Neither types of traffic were observed when my phone received the updated state.

@rainwoodman
Copy link
Contributor Author

On a second thought, I think it may be a simple tcp connection to some API port opened/assigned during the device initialization. My mitm proxy may not have been properly (since I don't really know how to use it) set up to capture type of traffic which may be non-http.

@rainwoodman
Copy link
Contributor Author

I figured out how to enable TCP logging with mitmproxy. No luck. Not even a connection to APN servers was logged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants