Open craigham opened 6 years ago
Note that I've started to have success with reverse engineering the REST API used by the modern Android app (no need for scraping). See https://github.com/RByers/pooltemp
@RByers really cool. I'll try and watch what you are up to.
@RByers can you share what you've reverse engineered? I was using a modified version of this project previously, but it seems like the recent outage screwed up the page layout.
Ok, I've put a scrubbed example basic exchange in this doc. That's what I used to come up with the code here. It was pretty straight forward - I just used Charles Proxy to intercept the SSL traffic from my Android device.
At some point I'm hoping to build a more full featured actions on google server so I can control my pool from my Google Home, but it'll likely be awhile before I get to that.
Rick Byers you are a pro! I'm glad someone was able to find a better way to do all of this than my attempt, HTML scraping and clicking things inside an invisible browser...
Thanks for taking this idea further! If I still had a pool, I'd be waiting for you to release your version.
Happy to help. If the protocol examples are useful to others I can easily augment them with other scenarios (changing temperature etc...).
Protocol examples would be awesome. I'd try to write something to, at a minimum, turn the spa on and off.
This is great, I was going to MITM the app but you did most of the work. Do you have any examples of control actions like enabling equipment or setting temperatures?
Sorry for the long delay, I finally spent some time on this today. I went through pretty much all the actions I can take in the app for my pool setup and recorded them in my protocol doc.
Some additional things not supported in my config are probably easy to guess. Eg. @blysik, I'd guess you could toggle the spa pump on and off with a GET to https://iaqualink-api.realtime.io/v1/mobile/session.json?actionID=command&command=set_spa_pump&serial=QX&sessionID=NX (with your particular serial and session ID values of course).
Feel free to request comment/edit access on my protocol doc if you want to ask questions there or add additional data for what works in your pool config. I'm planning on creating a reusable Go module (for Google AppEngine) for this and factor out the common logic from https://github.com/rbyers/pooltemp.
Nice hack of the API. I'm super impressed.
I've taken your documentation and created a PHP script to control my iAqualink with curl calls. I can't help but wonder if a similar MITM method could be used to snoop the actual device calls. As it sits now there's it's
Taking out 3-5 of these hops would be nice. I looked into using Squid on my pfsense box to capture the calls, but I'm afraid of messing up my reverse proxy server configuration.
MITM the device<->iAqualink connection would be harder as you'd have to convince the device to trust your SSL root certificate. I don't recall if there's anything in the iAqualink setup UI for that. But personally the iAqualink API seems plenty powerful enough for me.
On Thu, Sep 20, 2018 at 9:53 PM Ben Smith notifications@github.com wrote:
Nice hack of the API. I'm super impressed.
I've taken your documentation and created a PHP script to control my iAqualink with curl calls. I can't help but wonder if a similar MITM method could be used to snoop the actual device calls. As it sits now there's it's
- Alexa -> IFFT
- IFFT -> PhantomJS
- PhantomJS -> iAqualink API
- iAqualink API -> device
Taking out 1-2 of these hops would be nice. I looked into using Squid on my pfsense box to capture the calls, but I'm afraid of messing up my reverse proxy server configuration.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/evancg37/Alexa-Pool-Control/issues/1#issuecomment-423388678, or mute the thread https://github.com/notifications/unsubscribe-auth/ABOJo8dlPN6BQqhes_wwwPTY_DhjkCHSks5udEaqgaJpZM4SjLVu .
RByers You did some great research with this!! I've utilized your examples to build an application that collects my pool data. I was able to figure out some of what I’m after, but there are a few real-time variables I still don’t know how to acquire. I’m looking for additional information including following:
I did notice my “get_home” command returns pool_salinity, spa_salinity, and cover_pool, but the values are always blank.
I'll also mention that some of these variables that I'm after can be seen from the iAquaLink "web" interface by clicking on the Status icon, as seen here...
Thank you for all your efforts.
Jim S.
Cool, glad it's helpful!
My chlorine generator doesn't report data back, and I don't have covers so I can't check that. But I believe anything available only in the 'Web' part of the app will not have an entrypoint in this API (seems like they added the API for the most common things, but fallback to the web interface for the larger variety of things). There's another project somewhere that tries to scrape / automate the HTML from the web interface, but that's brittle so I didn't want to go down that path.
Hi,
Just wondering if you have found the screen scraping to be reliable enough to use?
thanks, Craig