8000 Add WallSwitch device type and autogenerate supported devices docs by sdb9696 · Pull Request #758 · python-kasa/python-kasa · GitHub
[go: up one dir, main page]

Skip to content

Add WallSwitch device type and autogenerate supported devices docs #758

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 29 commits into from
Mar 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
489437b
Autogenerate supported devices docs
sdb9696 Feb 16, 2024
255d936
Test
sdb9696 Feb 16, 2024
a3fb0ec
Add summary view to readme and drop table
sdb9696 Feb 19, 2024
82a21b0
Merge remote-tracking branch 'upstream/master' into auto_gen_supported
sdb9696 Feb 23, 2024
b1bc30b
Update post review
sdb9696 Feb 23, 2024
4aea604
Merge remote-tracking branch 'upstream/master' into auto_gen_supporte…
sdb9696 Feb 26, 2024
729ac71
Remove star from tapo versions
sdb9696 Feb 27, 2024
44b4e59
Merge remote-tracking branch 'upstream/master' into auto_gen_supported
sdb9696 Feb 27, 2024
207876d
Move generate-supported and run as pre-commit hook
sdb9696 Feb 28, 2024
28e8cda
Merge remote-tracking branch 'upstream/master' into auto_gen_supported
sdb9696 Feb 28, 2024
4093283
Move device type logic into kasa
sdb9696 Feb 28, 2024
d865d95
Fix
sdb9696 Feb 28, 2024
5d8bcff
Fix
sdb9696 Feb 28, 2024
0b89b35
Fix
sdb9696 Feb 28, 2024
3949412
Fix
sdb9696 Feb 28, 2024
bb13939
Consolidate device type logic
sdb9696 Feb 28, 2024
673f3c7
Fix
sdb9696 Feb 28, 2024
daefd90
Merge remote-tracking branch 'upstream/master' into auto_gen_supported
sdb9696 Feb 28, 2024
b2da548
Remove script from pyproject.toml
sdb9696 Feb 28, 2024
e5cc543
Move device type roll ups out of kasa
sdb9696 Feb 28, 2024
8900442
Missed DeviceType update
sdb9696 Feb 28, 2024
63e8fae
Add info to the two hook definitions
sdb9696 Feb 28, 2024
cd5eff5
Detect if running in CI
sdb9696 Feb 28, 2024
7e075a3
Fix
sdb9696 Feb 28, 2024
7415896
Remove extra hook
sdb9696 Feb 28, 2024
54c0e54
Update post review
sdb9696 Feb 28, 2024
591fb25
Tweak the wording and drop the supported enum
sdb9696 Mar 1, 2024
6789507
Merge remote-tracking branch 'upstream/master' into auto_gen_supported
sdb9696 Mar 1, 2024
6a1c4cf
Rename switch to wall switch
sdb9696 Mar 1, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ jobs:
run: |
python -m pip install --upgrade pip poetry
poetry install
- name: "Check supported device md files are up to date"
run: |
poetry run pre-commit run generate-supported --all-files
- name: "Linting and code formating (ruff)"
run: |
poetry run pre-commit run ruff --all-files
Expand All @@ -47,9 +50,6 @@ jobs:
- name: "Run check-ast"
run: |
poetry run pre-commit run check-ast --all-files
- name: "Check README for supported models"
run: |
poetry run python -m devtools.check_readme_vs_fixtures


tests:
Expand Down
11 changes: 11 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,14 @@ repos:
hooks:
- id: doc8
additional_dependencies: [tomli]

- repo: local
hooks:
- id: generate-supported
name: Generate supported devices
description: This hook generates the supported device sections of README.md and SUPPORTED.md
entry: devtools/generate_supported.py
language: system # Required or pre-commit creates a new venv
verbose: true # Show output on success
types: [json]
pass_filenames: false # passing filenames causes the hook to run in batches against all-files
128 changes: 20 additions & 108 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -220,120 +220,32 @@ Note, that this works currently only on kasa-branded devices which use port 9999

## Supported devices

In principle, most kasa-branded devices that are locally controllable using the official Kasa mobile app work with this library.

The following lists the devices that have been manually verified to work.
**If your device is unlisted but working, please open a pull request to update the list and add a fixture file (use `python -m devtools.dump_devinfo` to generate one).**

### Plugs

* HS100
* HS103
* HS105
* HS107
* HS110
* KP100
* KP105
* KP115
* KP125
* KP125M [See note below](#newer-kasa-branded-devices)
* KP401
* EP10
* EP25 [See note below](#newer-kasa-branded-devices)

### Power Strips

* EP40
* HS300
* KP303
* KP200 (in wall)
* KP400
* KP405 (dimmer)

### Wall switches

* ES20M
* HS200
* HS210
* HS220
* KS200M (partial support, no motion, no daylight detection)
* KS220M (partial support, no motion, no daylight detection)
* KS230
The following devices have been tested and confirmed as working. If your device is unlisted but working, please open a pull request to update the list and add a fixture file (use `python -m devtools.dump_devinfo` to generate one).

### Bulbs

* LB100
* LB110
* LB120
* LB130
* LB230
* KL50
* KL60
* KL110
* KL120
* KL125
* KL130
* KL135

### Light strips

* KL400L5
* KL420L5
* KL430

### Tapo branded devices

The library has recently added a limited supported for devices that carry Tapo branding.

At the moment, the following devices have been confirmed to work:

#### Plugs

* Tapo P110
* Tapo P125M
* Tapo P135 (dimming not yet supported)
* Tapo TP15

#### Bulbs

* Tapo L510B
* Tapo L510E
* Tapo L530E

#### Light strips

* Tapo L900-5
* Tapo L900-10
* Tapo L920-5
* Tapo L930-5

#### Wall switches

* Tapo S500D
* Tapo S505

#### Power strips

* Tapo P300
* Tapo TP25

#### Hubs

* Tapo H100
<!--Do not edit text inside the SUPPORTED section below -->
<!--SUPPORTED_START-->
### Supported Kasa devices

### Newer Kasa branded devices
- **Plugs**: EP10, EP25<sup>\*</sup>, HS100<sup>\*\*</sup>, HS103, HS105, HS110, KP100, KP105, KP115, KP125, KP125M<sup>\*</sup>, KP401
- **Power Strips**: EP40, HS107, HS300, KP200, KP303, KP400
- **Wall Switches**: ES20M, HS200, HS210, HS220, KP405, KS200M, KS205<sup>\*</sup>, KS220M, KS225<sup>\*</sup>, KS230
- **Bulbs**: KL110, KL120, KL125, KL130, KL135, KL50, KL60, LB100, LB110, LB120, LB130
- **Light Strips**: KL400L5, KL420L5, KL430

Some newer hardware versions of Kasa branded devices are now using the same protocol as
Tapo branded devices. Support for these devices is currently limited as per TAPO branded
devices:
### Supported Tapo<sup>\*</sup> devices

* Kasa EP25 (plug) hw_version 2.6
* Kasa KP125M (plug)
* Kasa KS205 (Wifi/Matter Wall Switch)
* Kasa KS225 (Wifi/Matter Wall Dimmer Switch)
- **Plugs**: P100, P110, P125M, P135, TP15
- **Power Strips**: P300, TP25
- **Wall Switches**: S500D, S505
- **Bulbs**: L510B, L510E, L530E
- **Light Strips**: L900-10, L900-5, L920-5, L930-5
- **Hubs**: H100

<!--SUPPORTED_END-->
<sup>*</sup>&nbsp; Model requires authentication<br>
<sup>**</sup> Newer versions require authentication

**If your device is unlisted but working, please open a pull request to update the list and add a fixture file (use `python -m devtools.dump_devinfo` to generate one).**
See [supported devices in our documentation](SUPPORTED.md) for more detailed information about tested hardware and software versions.

## Resources

F438
Expand Down
210 changes: 210 additions & 0 deletions SUPPORTED.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,210 @@
# Supported devices

The following devices have been tested and confirmed as working. If your device is unlisted but working, please open a pull request to update the list and add a fixture file (use `python -m devtools.dump_devinfo` to generate one).

<!--Do not edit text inside the SUPPORTED section below -->
<!--SUPPORTED_START-->
## Kasa devices

Some newer Kasa devices require authentication. These are marked with <sup>*</sup> in the list below.

### Plugs

- **EP10**
- Hardware: 1.0 (US) / Firmware: 1.0.2
- **EP25**
- Hardware: 2.6 (US) / Firmware: 1.0.1<sup>\*</sup>
- Hardware: 2.6 (US) / Firmware: 1.0.2<sup>\*</sup>
- **HS100**
- Hardware: 1.0 (UK) / Firmware: 1.2.6
- Hardware: 4.1 (UK) / Firmware: 1.1.0<sup>\*</sup>
- Hardware: 1.0 (US) / Firmware: 1.2.5
- Hardware: 2.0 (US) / Firmware: 1.5.6
- **HS103**
- Hardware: 1.0 (US) / Firmware: 1.5.7
- Hardware: 2.1 (US) / Firmware: 1.1.2
- Hardware: 2.1 (US) / Firmware: 1.1.4
- **HS105**
- Hardware: 1.0 (US) / Firmware: 1.2.9
- Hardware: 1.0 (US) / Firmware: 1.5.6
- **HS110**
- Hardware: 1.0 (EU) / Firmware: 1.2.5
- Hardware: 2.0 (EU) / Firmware: 1.5.2
- Hardware: 4.0 (EU) / Firmware: 1.0.4
- Hardware: 1.0 (US) / Firmware: 1.0.8
- **KP100**
- Hardware: 3.0 (US) / Firmware: 1.0.1
- **KP105**
- Hardware: 1.0 (UK) / Firmware: 1.0.5
- Hardware: 1.0 (UK) / Firmware: 1.0.7
- **KP115**
- Hardware: 1.0 (EU) / Firmware: 1.0.16
- Hardware: 1.0 (US) / Firmware: 1.0.17
- Hardware: 1.0 (US) / Firmware: 1.0.21
- **KP125**
- Hardware: 1.0 (US) / Firmware: 1.0.6
- **KP125M**
- Hardware: 1.0 (US) / Firmware: 1.1.3<sup>\*</sup>
- **KP401**
- Hardware: 1.0 (US) / Firmware: 1.0.0

### Power Strips

- **EP40**
- Hardware: 1.0 (US) / Firmware: 1.0.2
- **HS107**
- Hardware: 1.0 (US) / Firmware: 1.0.8
- **HS300**
- Hardware: 1.0 (US) / Firmware: 1.0.10
- Hardware: 2.0 (US) / Firmware: 1.0.12
- Hardware: 2.0 (US) / Firmware: 1.0.3
- **KP200**
- Hardware: 3.0 (US) / Firmware: 1.0.3
- **KP303**
- Hardware: 1.0 (UK) / Firmware: 1.0.3
- Hardware: 2.0 (US) / Firmware: 1.0.3
- **KP400**
- Hardware: 1.0 (US) / Firmware: 1.0.10
- Hardware: 2.0 (US) / Firmware: 1.0.6

### Wall Switches

- **ES20M**
- Hardware: 1.0 (US) / Firmware: 1.0.8
- **HS200**
- Hardware: 1.0 (US) / Firmware: 1.1.0
- Hardware: 2.0 (US) / Firmware: 1.5.7 10000
- Hardware: 5.0 (US) / Firmware: 1.0.2
- **HS210**
- Hardware: 1.0 (US) / Firmware: 1.5.8
- **HS220**
- Hardware: 1.0 (US) / Firmware: 1.5.7
- Hardware: 1.0 (US) / Firmware: 1.5.7
- Hardware: 2.0 (US) / Firmware: 1.0.3
- **KP405**
- Hardware: 1.0 (US) / Firmware: 1.0.5
- **KS200M**
- Hardware: 1.0 (US) / Firmware: 1.0.8
- **KS205**
- Hardware: 1.0 (US) / Firmware: 1.0.2<sup>\*</sup>
- **KS220M**
- Hardware: 1.0 (US) / Firmware: 1.0.4
- **KS225**
- Hardware: 1.0 (US) / Firmware: 1.0.2<sup>\*</sup>
- **KS230**
- Hardware: 1.0 (US) / Firmware: 1.0.14

### Bulbs

- **KL110**
- Hardware: 1.0 (US) / Firmware: 1.8.11
- **KL120**
- Hardware: 1.0 (US) / Firmware: 1.8.6
- **KL125**
- Hardware: 1.20 (US) / Firmware: 1.0.5
- Hardware: 2.0 (US) / Firmware: 1.0.7
- Hardware: 4.0 (US) / Firmware: 1.0.5
- **KL130**
- Hardware: 1.0 (EU) / Firmware: 1.8.8
- Hardware: 1.0 (US) / Firmware: 1.8.11
- **KL135**
- Hardware: 1.0 (US) / Firmware: 1.0.6
- **KL50**
- Hardware: 1.0 (US) / Firmware: 1.1.13
- **KL60**
- Hardware: 1.0 (UN) / Firmware: 1.1.4
- Hardware: 1.0 (US) / Firmware: 1.1.13
- **LB100**
- Hardware: 1.0 (US) / Firmware: 1.4.3
- **LB110**
- Hardware: 1.0 (US) / Firmware: 1.8.11
- **LB120**
- Hardware: 1.0 (US) / Firmware: 1.1.0
- **LB130**
- Hardware: 1.0 (US) / Firmware: 1.6.0

### Light Strips

- **KL400L5**
- Hardware: 1.0 (US) / Firmware: 1.0.5
- Hardware: 1.0 (US) / Firmware: 1.0.8
- **KL420L5**
- Hardware: 1.0 (US) / Firmware: 1.0.2
- **KL430**
- Hardware: 2.0 (UN) / Firmware: 1.0.8
- Hardware: 1.0 (US) / Firmware: 1.0.10
- Hardware: 2.0 (US) / Firmware: 1.0.11
- Hardware: 2.0 (US) / Firmware: 1.0.8
- Hardware: 2.0 (US) / Firmware: 1.0.9


## Tapo devices

All Tapo devices require authentication.

### Plugs

- **P100**
- Hardware: 1.0.0 / Firmware: 1.1.3
- Hardware: 1.0.0 / Firmware: 1.3.7
- **P110**
- Hardware: 1.0 (EU) / Firmware: 1.0.7
- Hardware: 1.0 (EU) / Firmware: 1.2.3
- Hardware: 1.0 (UK) / Firmware: 1.3.0
- **P125M**
- Hardware: 1.0 (US) / Firmware: 1.1.0
- **P135**
- Hardware: 1.0 (US) / Firmware: 1.0.5
- **TP15**
- Hardware: 1.0 (US) / Firmware: 1.0.3

### Power Strips

- **P300**
- Hardware: 1.0 (EU) / Firmware: 1.0.13
- Hardware: 1.0 (EU) / Firmware: 1.0.7
- **TP25**
- Hardware: 1.0 (US) / Firmware: 1.0.2

### Wall Switches

- **S500D**
- Hardware: 1.0 (US) / Firmware: 1.0.5
- **S505**
- Hardware: 1.0 (US) / Firmware: 1.0.2

### Bulbs

- **L510B**
- Hardware: 3.0 (EU) / Firmware: 1.0.5
- **L510E**
- Hardware: 3.0 (US) / Firmware: 1.0.5
- Hardware: 3.0 (US) / Firmware: 1.1.2
- **L530E**
- Hardware: 3.0 (EU) / Firmware: 1.0.6
- Hardware: 3.0 (EU) / Firmware: 1.1.0
- Hardware: 3.0 (EU) / Firmware: 1.1.6
- Hardware: 2.0 (US) / Firmware: 1.1.0

### Light Strips

- **L900-10**
- Hardware: 1.0 (EU) / Firmware: 1.0.17
- Hardware: 1.0 (US) / Firmware: 1.0.11
- **L900-5**
- Hardware: 1.0 (EU) / Firmware: 1.0.17
6219 - Hardware: 1.0 (EU) / Firmware: 1.1.0
- **L920-5**
- Hardware: 1.0 (US) / Firmware: 1.1.0
- Hardware: 1.0 (US) / Firmware: 1.1.3
- **L930-5**
- Hardware: 1.0 (US) / Firmware: 1.1.2

### Hubs

- **H100**
- Hardware: 1.0 (EU) / Firmware: 1.2.3
- Hardware: 1.0 (EU) / Firmware: 1.5.5


<!--SUPPORTED_END-->
Loading
0