Skip to main content

Asynchronous Python client for LetPot hydroponic gardens.

Project description

python-letpot

Asynchronous Python client for interacting with LetPot hydroponic gardens 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:

  • LPH-AIR
  • LPH-MAX
  • LPH-MINI
  • LPH-PRO
  • LPH-SE

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.disconnect(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.6.4.tar.gz (10.7 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.6.4-py3-none-any.whl (12.9 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for letpot-0.6.4.tar.gz
Algorithm Hash digest
SHA256 9ecff9dda23bd65cff67fb83d4fbca2ea13cfe64257a1734925e62ac7cd96dc7
MD5 dd291e2efc92a05bb828a517d1c294a8
BLAKE2b-256 c56749a51ab46d8449ad41b4f17b376572de3d09945cdd203cf52bf22017ce43

See more details on using hashes here.

Provenance

The following attestation bundles were made for letpot-0.6.4.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.6.4-py3-none-any.whl.

File metadata

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

File hashes

Hashes for letpot-0.6.4-py3-none-any.whl
Algorithm Hash digest
SHA256 3e9a4775ed5f3bbd9286a4064109b3bd1411f9aa251dba87c3b1f0f9dff78b2b
MD5 4694b335487d48f2091e5e42ab35e45a
BLAKE2b-256 b0afa0351e9054ec68866d0c13058fbad5450df2e05fca872e84eda009f36e0f

See more details on using hashes here.

Provenance

The following attestation bundles were made for letpot-0.6.4-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