BastianPoe / owlet_api

Unofficial Python API for the Owlet Smart Baby Monitor
MIT License
59 stars 9 forks source link

EU uses different servers and API key #1

Open Mirarkitty opened 5 years ago

Mirarkitty commented 5 years ago

I decompiled the Owlet-Europe app to get this info and it works fine with this change for me. Please add this support to the command.


...
    base_user_url = 'https://user-field-eu.aylanetworks.com/users/'
    base_properties_url = 'https://ads-field-eu.aylanetworks.com/apiv1/'
...
                    'app_id': "Owlet-Android-EU-rw-id",
                    'app_secret': "Owlet-Android-EU-OUJNUe5e79pPxvB0tMUaaUif-8o",
timdonovanuk commented 5 years ago

Where did you find the info? I've decompiled the US Android app and cannot find the app_id or secret :( By the way, it's worth just using the US apk, the app is much better for some weird reason!

Mirarkitty commented 5 years ago

I can't use the US apk? It doesn't even see my account. Ayla has a different user list for EU and US. :/

The EU app sucks so I'm even considering making my own but I haven't figured out how the notifications work.

The secret is base-64-encoded here:

sources/com/owletcare/owlet/BuildConfig.java: public static final String AYLA_APP_SECRET = "T3dsZXQtQW5kcm9pZC1FVS1PVUpOVWU1ZTc5cFB4dkIwdE1VYWFVaWYtOG8=";

timdonovanuk commented 5 years ago

Can't you create a new account? I just used the US apk from the start, so registered I guess with a US account (used fake phone number). Although my Owlet came with a US plug, so maybe there are hardware differences and an EU Owlet wont even show up in the US app :(

There is no AYLA_APP_SECRET in the US apk. Damn. Been looking over and searching so many files but no luck.

Mirarkitty commented 5 years ago

No, the base station just refused the US app, couldn't get through the registration. Also my units are blocked from using the new US app from the play store. I blame GDPR. Unit is through amazon.co.uk with an EU power supply. (The owlet uk store wouldn't ship to sweden, but amazon would.)

You could do it the alternative way and run https mitm. But it's a bit harder since you need to repack the apk to allow mitm attacks.

freekeys commented 3 years ago

Any idea if this is still working please?

Mirarkitty commented 3 years ago

I'm still getting owlet data at least?