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 hashes)

Uploaded Source

Built Distribution

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page