Skip to main content

Introduction

Early days of this API. Plan is to use this for home assistant. So far basic device data comes back including online. The library of cards is also populated. Pause command functions. Not other commands work yet.

Credit

A big thank you to @buzzeddesign for helping to sniff some of the API and make sense of it. Thank you to @fuatakgun for creating to core architecture is based on over in kia_uvo.

Example Test Code

To run this code for test I am doing:

from pathlib import Path
import logging
import sys
import os

path_root = r"C:path to files GitHub\main\yoto_api"
sys.path.append(str(path_root))
from yoto_api import *

logging.basicConfig(stream=sys.stdout, level=logging.DEBUG, format='%(asctime)s %(name)s %(levelname)s:%(message)s')
logger = logging.getLogger(__name__)

ym = YotoManager(username="username", password="password")
ym.check_and_refresh_token()
ym.update_player_status()
print (ym.players)
ym.connect_to_events()
# Pauses the first player
ym.pause_player(next(iter(ym.players)))
# Sleep will let the terminal show events coming back. For dev today.
time.sleep(60)

Usage

For additional methods not mentioned below follow the file here for all functionality: https://github.com/cdnninja/yoto_api/blob/master/yoto_api/YotoManager.py

Check and refresh token will pull the first set of data. It also should be run regularly if you keep your code running for days. It will check if the token is valid. If it isn’t it will refresh the token. If this is first run of the command and no data has been pulled it will also run update_player_status() and update_cards() for you.

ym.check_and_refresh_token()

Check and refresh token will pull the first set of data. It also should be run regularly if you keep your code running for days. It will check if the token is valid. If it isn’t it will refresh the token. If this is first run of the command and no data has been pulled it will also run update_player_status() and update_cards() for you.

ym.update_player_status()

Connects to the MQTT broker. This must be run before any command and also get get useful data.

ym.connect_to_events()

Pauses the player for the player ID sent. ID can be found in ym.players.keys()

ym.pause_player(player_id: str)

Updates the library of cards. This is done as part of check_refresh_token so only needed if data is stale.

ym.update_cards()

Contains player object will data values you can access.

ym.players

Contains the library of cards. Each card being an object with the data values you can use.

ym.library

Other Notes

This is not associated or affiliated with yoto play in any way.

Metadata

Release files for yoto-api 1.18.8

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for yoto-api 1.18.8
File Size Uploaded Provenance Actions
yoto_api-1.18.8.tar.gz 23.4 kB Without provenance Details for yoto_api-1.18.8.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for yoto-api 1.18.8
File Interpreter ABI Platform Actions
yoto_api-1.18.8-py3-none-any.whl Python 3 none any Details for yoto_api-1.18.8-py3-none-any.whl

Total release size: 45.7 kB

Release files / yoto_api-1.18.8.tar.gz

Download URL yoto_api-1.18.8.tar.gz
Size 23.4 kB
Tags Source
SHA-256 checksum
How to use checksums
fb903de7f9f87a76b4c9d54ea8ad6aa8dfeafdebed96260c46210693d587f5af
BLAKE2b-256 checksum
How to use checksums
48c2373c5edeb8f05a3f4fda40230b76c2d663f396f8e2fd8609d5836cbb28af
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.12.3

Release files / yoto_api-1.18.8-py3-none-any.whl

Download URL yoto_api-1.18.8-py3-none-any.whl
Size 22.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c3caccced16de09c98d0003dda3d83cc999fdace7bd4b14c1057c2b83a386392
BLAKE2b-256 checksum
How to use checksums
b6b714b4e1de77cf934ccedfdb7c80637fa62ff0be2ef764ac2947a973f094a7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.12.3

Security for yoto-api 1.18.8

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.18.8 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page