Skip to main content

Asynchronous Python client for LetPot hydroponic gardens and watering systems.

Project description

python-letpot

Asynchronous Python client for interacting with LetPot hydroponic gardens and watering systems via the manufacturer's cloud. You can listen for status updates (push) and change device settings.

The following models should be supported, although only LPH-AIR is tested:

  • Hydroponic gardens
    • LPH-AIR
    • LPH-MAX
    • LPH-MINI
    • LPH-PRO
    • LPH-SE
  • Watering systems
    • DI-2/DI-3 (Automatic Watering System 2.0)

Example usage

import aiohttp
import asyncio

from letpot.client import LetPotClient
from letpot.deviceclient import LetPotDeviceClient


async def main():
    async with aiohttp.ClientSession() as session:
        client = LetPotClient(session)

        auth = await client.login("email@example.com", "password")
        # store auth for future use, and use in constructor

        devices = await client.get_devices()
        print(devices)

        device_client = LetPotDeviceClient(auth)
        device_serial = devices[0].serial_number
        await device_client.subscribe(device_serial, lambda status: print(status))
        await device_client.request_status_update(device_serial)
        
        # do work, and finally
        device_client.unsubscribe(device_serial)


asyncio.run(main())

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

letpot-0.7.0.tar.gz (12.0 kB view details)

Uploaded Source

Built Distribution

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

letpot-0.7.0-py3-none-any.whl (14.2 kB view details)

Uploaded Python 3

File details

Details for the file letpot-0.7.0.tar.gz.

File metadata

  • Download URL: letpot-0.7.0.tar.gz
  • Upload date:
  • Size: 12.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for letpot-0.7.0.tar.gz
Algorithm Hash digest
SHA256 6c042d3c249b3d8465cb5e35ae1df1744c45506e65cc8c5cd90a27d0bd5c3f08
MD5 1dcb2ea373daf937ef744289f4273d2b
BLAKE2b-256 e7abab365821398b2664b23addfcae3bc84c4c6e0af4c0a538cdce7e0d99d563

See more details on using hashes here.

Provenance

The following attestation bundles were made for letpot-0.7.0.tar.gz:

Publisher: release.yml on jpelgrom/python-letpot

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

File details

Details for the file letpot-0.7.0-py3-none-any.whl.

File metadata

  • Download URL: letpot-0.7.0-py3-none-any.whl
  • Upload date:
  • Size: 14.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for letpot-0.7.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0137ec25ca4c365dd64d9e0ecded8141a81d4cf8cef47ea169a7adca6e822e0b
MD5 0761a24eccb0031d310f25cda7634294
BLAKE2b-256 5373592ea1fb076ff7315986c0ac4950002aaf1112048c3609e63be0d8c068ae

See more details on using hashes here.

Provenance

The following attestation bundles were made for letpot-0.7.0-py3-none-any.whl:

Publisher: release.yml on jpelgrom/python-letpot

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