Open ahume opened 10 months ago
I'd be interested to know this too - looking to automate some things with my kids' Yoto players from Home Assistant, a documented API would be awesome!
Hopping onto this train as well - using the API with HA would be spectacular indeed!
I was looking for home assistant integration and came into this. I was considering start a python library and reverse engineering the app. It looks like some official approach may be out or coming. Following for more.
From a code standpoint it looks like most is here but I suspect we need an access token:
I tried sniffing traffic but it looks like they are doing cert pinning in the app. I have a few others ways to try get around that. I will try at some point and see.
@cdnninja - for what it's worth, I ran this sample app and was able to authenticate just fine, even though the access token is hard coded to 'access_token'
Excellent. Good to know.
I'm thinking I start a GitHub repo for a python api library. Once we get that roughly working can do the home assistant front end.
Don't know if this might be of use to us?
Good find. That doesn't look to support login but rather steals the session from a browser. I'll get a repo setup for us to move this chat to. I'll post it when created.
Just noticed @gregyoto with commits on this repo in the last week. Would be great to get an understanding from him on the possible developments with this API. :)
Yes they did. I am going to get started on a wrapper. I can always align if Yoto makes an official announcement. My impression is they are considering it. Shell of a repo is here: https://github.com/cdnninja/yoto_api
Following after looking to see if there was a way to integrate to HA ...
wen
Would be great to have the card library integrated in Home Assistant as a media source - I've scraped the JSON and it's straightforward to grab the card artwork and MP3 link from the JSON result
endpoint: https://api.yotoplay.com/card/family/library
Something like (poorly written PHP):
foreach response["cards"] as card {
id = card.cardID
cover = card.content.cover.imageL
details = get_json("https://api.yotoplay.com/card/details" + id)
chapters = details.card.content.chapters
stream_urls = array()
foreach chapters as chapter {
array_push(stream_urls, chapter.tracks[0].trackUrl)
}
}
I couldn't sniff the traffic. If you could come to my repo and help out I'm happy to build the home assistant side. Just could use a hand on api.
FYI will be my last post here. The shell of a Home assistant integration are now put together. Should be working soon. It isn't truly function but wanted to post here to let others know.
Is this a public and documented API for developers to build applications with? If so, where can I learn more, and how can I create an oauth app id, etc...?