A simple client to control the Philips AC2889 air purifier.
Project description
- Author:
marcinooo
- Tags:
philips air purifier, python, client, api
- abstract:
A simple client to control the Philips AC2889 air purifier.
Description
The package is a simple interface for controlling the Philips AC2889 air purifier. It allows read parameters and set parameters.
Philips AC2889:
Installation
Install from PyPi:
pip install philips-air-purifier-ac2889
Install from github:
$ pip install git+https://github.com/marcinooo/philips-air-purifier.git
Usage
Simple example:
from philips_air_purifier_ac2889 import AirPurifier
philips_air_purifier = AirPurifier(host='192.168.1.21').connect()
data = philips_air_purifier.get()
print(data)
print('Power on...')
philips_air_purifier.set(pwr='1') # power on
if isinstance(data['om'], int) and int(data['om']) <= 2:
new_speed = str(int(data['om']) + 1)
print(f'Increasing device speed from {data["om"]} to {new_speed}...')
else:
new_speed = '1'
print(f'Decreasing device speed from {data["om"]} to {new_speed}...')
philips_air_purifier.set(mode='M', om=new_speed)
List of all allowed parameters you can find in dictionary:
import pprint
from philips_air_purifier_ac2889 import ALLOWED_PARAMETERS
pprint.pprint(ALLOWED_PARAMETERS)
See examples directory :grinning:.
License
license (MIT)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file philips-air-purifier-ac2889-2.0.0.tar.gz.
File metadata
- Download URL: philips-air-purifier-ac2889-2.0.0.tar.gz
- Upload date:
- Size: 7.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ca2c8a2a98fd8e8111192f311a1ae71d3d9c40ecf37c11fbebb6dde544c3fbc4
|
|
| MD5 |
d0fcdb85cde508562f5dd940c6dd4b44
|
|
| BLAKE2b-256 |
f55b12cc1fd6d6f340bdef98d3742fd25472c6bf15a3b129419ade243447d7cb
|
File details
Details for the file philips_air_purifier_ac2889-2.0.0-py3-none-any.whl.
File metadata
- Download URL: philips_air_purifier_ac2889-2.0.0-py3-none-any.whl
- Upload date:
- Size: 8.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
461d1471c56bf42dc7d4dc9870f768f40c4f61656d4a4499022b54625b9f25c8
|
|
| MD5 |
e6e72552aed980c98552e857bd9cd193
|
|
| BLAKE2b-256 |
bf40ad5463d2679b2abf9f19e3de289e10d59ec9e94fcce8cd6d1974ab42fac3
|