This repository has been archived by the owner on Dec 14, 2022. It is now read-only.
forked from shexbeer/philips-airpurifier
-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
18 changed files
with
920 additions
and
2,160 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
[flake8] | ||
max-line-length = 100 | ||
max-complexity = 18 | ||
select = B,C,E,F,W,T4,B9 | ||
per-file-ignores=__init__.py:F401,F403 | ||
# Stuff we ignore thanks to black: https://github.com/ambv/black/issues/429 | ||
ignore = | ||
E111,E121,E122,E123,E124,E125,E126, | ||
E201,E202,E203,E221,E222,E225,E226,E227,E231,E241,E251,E261,E262,E265,E271,E272, | ||
E302,E303,E306, | ||
E502, | ||
E701,E702,E703,E704, | ||
W291,W292,W293, | ||
W391, | ||
W503 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
.DS_Store | ||
logging.conf | ||
Philips-Airpurifier.code-workspace | ||
/custom_components/philips-airpurifier/__pycache__ | ||
__pycache__ | ||
.venv |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,71 @@ | ||
[![hacs_badge](https://img.shields.io/badge/HACS-Default-orange.svg?style=for-the-badge)](https://github.com/custom-components/hacs) | ||
|
||
This is a `Local Push` integration for Philips airpurifiers. | ||
Currently only encrypted-CoAP is implemented. | ||
|
||
## Usage: | ||
```yaml | ||
fan: | ||
platform: philips-airpurifier | ||
platform: philips_airpurifier | ||
host: 192.168.0.17 | ||
protocol: 2 | ||
model: ac4236 | ||
``` | ||
## Configuration variables: | ||
Field | Value | Necessity | Description | ||
--- | --- | --- | --- | ||
platform | `philips-airpurifier` | *Required* | The platform name. | ||
host | 192.168.0.17 | *Required* | IP address of your Purifier. | ||
platform | `philips_airpurifier` | *Required* | The platform name. | ||
host | 192.168.0.17 | *Required* | IP address of the Purifier. | ||
model | ac4236 | *Required* | Model of the Purifier. | ||
name | Philips Air Purifier | Optional | Name of the Fan. | ||
protocol | 2 | Optional | Protocol version (1=HTTP, 2=PLAIN COAP 3=COAP encrypted) | ||
*** | ||
|
||
|
||
## Supported models: | ||
|
||
- AC1214 | ||
- AC2729 | ||
- AC2889 | ||
- AC3059 | ||
- AC3829 | ||
- AC3858 | ||
- AC4236 | ||
|
||
## Is your model not supported yet? | ||
|
||
You can help to get us there. | ||
|
||
Please open an issue and provide the raw status-data for each combination of modes and speeds for your model. | ||
|
||
To aquire those information please follow these steps: | ||
|
||
### Prepare the environment | ||
|
||
```sh | ||
git clone https://github.com/betaboon/philips-airpurifier.git | ||
cd philips-airpurifier | ||
source aioairctrl-shell.sh | ||
``` | ||
|
||
### Aquire raw status-data | ||
|
||
- Use the philips-app to activate a mode or speed | ||
- run the following command to aquire the raw data (still in the venv) | ||
|
||
```sh | ||
aioairctrl --host $DEVICE_IP status --json | ||
``` | ||
|
||
## Debugging | ||
|
||
To aquire debug-logs, add the following to your `configuration.yaml`: | ||
|
||
```yaml | ||
logger: | ||
logs: | ||
custom_components.philips_airpurifier: debug | ||
coap: debug | ||
aioairctrl: debug | ||
``` | ||
|
||
logs should now be available in `home-assistant.log` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
python="python3" | ||
pip="pip3" | ||
manifest=./custom_components/philips_airpurifier/manifest.json | ||
aioairctrl=$(grep -Po '(?<=")aioairctrl[^"]+(?=")' $manifest) | ||
|
||
if ! command -v $python &> /dev/null | ||
then | ||
echo "$python could not be found" | ||
return | ||
fi | ||
|
||
$python -m venv .venv | ||
source .venv/bin/activate | ||
|
||
if ! command -v $pip &> /dev/null | ||
then | ||
echo "$pip could not be found" | ||
return | ||
fi | ||
|
||
$pip install $aioairctrl | ||
aioairctrl --help |
Oops, something went wrong.