Skip to main content

Python API for Culligan products

Project description

Culligan

A discovery for Culligan smart water products

Water Softener

The Excel sheet contains a listing of endpoints and what is needed for interaction with the Aylanetworks API. This data was gathered from proxy traffic.

The powershell module is a way to interact with the endpoints via Powershell.

The python code is for packageability and publishing to PyPi as a module.

The softener does have an http webpage for wifi status and connect/disconnect. Local control of the device does not seem possible without understanding how Ayla sends commands to the device.

Ayla References

This device is integrated by/with Ayla Networks and (generally) uses their documentation.

See Ayla-iot-unofficial

Local Wifi Module Doc

Direct doc linked from the reference above: salesforce doc

Installation

From PyPi

pip install culligan

Build from source

pip install build
pip build
pip install culligan

Library Requirements

Requires typical http interaction and datatype packages like requests, aiohttp, ujson, and the ayla-iot-unofficial module to handle devices and communication.

User Requirements

Reqiures a username and password (typically a smart device's app login credentials). The Culligan specific app_id is included in the package (obtained from the Culligan app).

Usage

Class Object

Instantiate a new class object through new_culligan_api() or Culligan() directly.

Access Tokens

The Culligan() object will call sign_in() automatically to obtain Culligan IoT and Ayla access_tokens. Then, it will instantiate an AylaApi() object with the Ayla access_token (no sign_in() required).

Use Culligan for communication with the Culligan IoT domain. Use the Ayla property of the Culligan object for direct communication with Ayla Networks.

Devices

Gather devices by calling the Ayla.get_devices().

By default, calling get_devices() will return a list of class specific device objects with updated properties for use.

See ayla-iot-unofficial/device.py for implemented device classes.

Typical Operation

python3 -m pip install Culligan
import Culligan

USERNAME = 'me@email.com'
PASSWORD = '$7r0nkP@s$w0rD'

CulliganApi = new_culligan_api(username, password)
CulliganApi.sign_in()
CulliganApi.Ayla = CulliganApi.get_ayla_api()

device_list = CulliganApi.Ayla.list_devices()
devices = CulliganApi.Ayla.get_devices()

# Example Water Softener Devices
softener = devices[0]

softener.capacity_remaining_gallons
softener.set_vacation_mode()

License

MIT

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

culligan-1.1.7.tar.gz (12.9 kB view details)

Uploaded Source

Built Distribution

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

culligan-1.1.7-py3-none-any.whl (11.5 kB view details)

Uploaded Python 3

File details

Details for the file culligan-1.1.7.tar.gz.

File metadata

  • Download URL: culligan-1.1.7.tar.gz
  • Upload date:
  • Size: 12.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for culligan-1.1.7.tar.gz
Algorithm Hash digest
SHA256 edcd2f3a5aa685ae4e61d64e4d1d56ad5f1ac12d27ce074ed11b25eb4dab1927
MD5 9f5e304bd381ec18c7c6ca5c01c9ac49
BLAKE2b-256 5ac86557695c65549d600b2de1c0054abf611d1ac5433e7fd5691e5828126c31

See more details on using hashes here.

File details

Details for the file culligan-1.1.7-py3-none-any.whl.

File metadata

  • Download URL: culligan-1.1.7-py3-none-any.whl
  • Upload date:
  • Size: 11.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for culligan-1.1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 d47faf536e0bbf04d4ee7e3e1a1c9e3237feba84d8e2ee243ab8f4ffe3356fcb
MD5 b9f07f717b36198a65089201d2e44a72
BLAKE2b-256 e689dc8142f7545cceb7ec85111beaa9f6da19ee25e861c14775953de018ce75

See more details on using hashes here.

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