Skip to main content

A simple client to control the Philips AC2889 air purifier.

Project description

https://dl.circleci.com/status-badge/img/gh/marcinooo/philips-air-purifier/tree/main.svg?style=svg

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:

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


Download files

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

Source Distribution

philips-air-purifier-ac2889-2.0.0.tar.gz (7.6 kB view details)

Uploaded Source

Built Distribution

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

philips_air_purifier_ac2889-2.0.0-py3-none-any.whl (8.2 kB view details)

Uploaded Python 3

File details

Details for the file philips-air-purifier-ac2889-2.0.0.tar.gz.

File metadata

File hashes

Hashes for philips-air-purifier-ac2889-2.0.0.tar.gz
Algorithm Hash digest
SHA256 ca2c8a2a98fd8e8111192f311a1ae71d3d9c40ecf37c11fbebb6dde544c3fbc4
MD5 d0fcdb85cde508562f5dd940c6dd4b44
BLAKE2b-256 f55b12cc1fd6d6f340bdef98d3742fd25472c6bf15a3b129419ade243447d7cb

See more details on using hashes here.

File details

Details for the file philips_air_purifier_ac2889-2.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for philips_air_purifier_ac2889-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 461d1471c56bf42dc7d4dc9870f768f40c4f61656d4a4499022b54625b9f25c8
MD5 e6e72552aed980c98552e857bd9cd193
BLAKE2b-256 bf40ad5463d2679b2abf9f19e3de289e10d59ec9e94fcce8cd6d1974ab42fac3

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