Skip to main content

A python library to view maps from Tuya robot vacuums

Project description

tuya-vacuum

tuya-vacuum is a python library to view maps from Tuya robot vacuums.

Installation

Use the package manager pip to install tuya-vacuum.

pip install tuya-vacuum

Usage

from tuya_vacuum.tuya import TuyaCloudAPI
import requests

# Create a new TuyaCloudAPI instance
tuya = TuyaCloudAPI(
    origin="https://openapi.tuyaus.com",
    client_id="<Client ID>",
    client_secret="<Client Secret>"
)

# Request the current realtime map data from the cloud
device_id = "<Device ID>"
response = tuya.request("GET", f"/v1.0/users/sweepers/file/{device_id}/realtime-map")

# Get the layout and path data using the returned map urls
layout_data = requests.get(response["result"][0]["map_url"]).content.hex()
path_data = requests.get(response["result"][1]["map_url"]).content.hex()

# Parse the map data
vacuum_map = VacuumMap(layout_data, path_data)

# Save the map as an image
image = vacuum_map.to_image()
image.save("output.png")

Compatability List

This is a list of all currently tested devices. Create a new issue to add your device.

Device Support
Lefant M1

Special Thanks

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tuya_vacuum-0.1.1.tar.gz (20.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tuya_vacuum-0.1.1-py3-none-any.whl (15.1 kB view details)

Uploaded Python 3

File details

Details for the file tuya_vacuum-0.1.1.tar.gz.

File metadata

  • Download URL: tuya_vacuum-0.1.1.tar.gz
  • Upload date:
  • Size: 20.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for tuya_vacuum-0.1.1.tar.gz
Algorithm Hash digest
SHA256 68c10fe285087100868f92ff9f8cc751737f0a8300aacf7bfb49b7d6f2a0442b
MD5 8005bb01de2ae079e72f2262b62c69d1
BLAKE2b-256 c53634b5805e3439b2663ce5ca34e0bae1b10884059470dc2a3b8a9c51cb40c6

See more details on using hashes here.

Provenance

The following attestation bundles were made for tuya_vacuum-0.1.1.tar.gz:

Publisher: publish.yml on jaidenlabelle/tuya-vacuum

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tuya_vacuum-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: tuya_vacuum-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 15.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for tuya_vacuum-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 65039d07378142b5473f6d92a547968ba185d54644f11e04af4ad0db850f9cec
MD5 8281e4a5f226a3ae96889abc2bea0241
BLAKE2b-256 7890b633d5ad24f982e455d133ded5b3fe40ace1b55a0b6640ca18b86881f585

See more details on using hashes here.

Provenance

The following attestation bundles were made for tuya_vacuum-0.1.1-py3-none-any.whl:

Publisher: publish.yml on jaidenlabelle/tuya-vacuum

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page