Commit Graph

74 Commits

Author SHA1 Message Date
Steven B
4beff228c9
Enable shell extra for installing ptpython and rich (#782)
Co-authored-by: Teemu R. <tpr@iki.fi>
2024-02-20 18:40:28 +00:00
J. Nick Koston
1f62aee7b6
Add TP25 fixtures (#729)
* Add TP25 fixtures

* redump fixture
2024-02-01 19:52:57 +01:00
J. Nick Koston
8657959ace
Add TP15 fixture (#730) 2024-01-31 18:30:19 +01:00
Teemu R
f8e273981c
Add P300 fixture (#717)
* Add P300 fixture

* fixture after update

* Add tests for p300
2024-01-29 18:14:30 +01:00
J. Nick Koston
716b1f82d9
Add support for the S500 (#705)
* Add support for the S500D

* tweak

* Add S505
2024-01-25 09:07:01 +01:00
J. Nick Koston
cba073ebde
Add support for tapo wall switches (S500D) (#704)
* Add support for the S500D

* tweak

* Update README.md
2024-01-25 08:54:56 +01:00
J. Nick Koston
8947ffbc94
Add L930-5 fixture (#694)
* Add L930-5 fixture

* Mark L930-5 as variable temp

* Update readme

* Fix overly greedy _strip_rich_formatting

---------

Co-authored-by: Teemu Rytilahti <tpr@iki.fi>
2024-01-24 22:31:01 +00:00
Teemu R
3f40410db3
Update readme fixture checker and readme (#699) 2024-01-24 09:36:45 +01:00
Teemu R
c1f2f8fe67
Check README for supported models (#684)
* Check README for supported models

* Use poetry for running due to imports

* Update README
2024-01-23 10:14:59 +00:00
Steven B
897db674c2
Add L900-10 fixture and it's additional component requests (#629) 2024-01-10 19:40:36 +01:00
Teemu R
17d96064c2
Mark L900-5 as supported (#617)
* Add fixture for L900-5

* Update readme
2024-01-04 19:52:11 +01:00
gimpy88
c810298b04
Add support for KS205 and KS225 wall switches (#594)
* KS205 Fixture

* KS225 Fixture

* Added Smart.KasaSwitch device type

* Added KS225 to test

* Added variable color temp check

* Added supported devices to readme

* Removed parenthesis

* Updated fixtures

* Fixed for ruff
2024-01-03 19:31:42 +01:00
sdb9696
16ba87378d
Add EP25 smart fixture and improve test framework for SMART devices (#572) 2023-12-08 14:55:14 +01:00
Teemu R
bd23d61687
Update readme with clearer instructions, tapo support (#571)
* Update readme with clearer instructions, tapo support

All in all, making the readme more approachable landing page:

* Link to provisioning docs from the beginning
* Hints about support for tapo devices
* Add some documentation about how to pass credentials
* Clearer usage instructions and links to find more information

* Lint
2023-12-06 22:54:14 +01:00
Steven Bytnar
bfd1d6ae0a
Kasa KP125M basic emeter support (#560)
* Add KP125M basic emeter support.

* Reduce diff.

* PR Comments
2023-12-03 15:41:46 +01:00
Teemu R
bde07d117f
Add some more external links to README (#541)
This updates the README to include more resources for developers intersted as well as some tapo-related links.
2023-11-07 02:15:57 +01:00
Chip Schweiss
f7c22f0a0c
Mark KS2{20}M as partially supported (#508) 2023-09-13 13:58:19 +02:00
J. Nick Koston
677ef9c3ef
Add tests for KP200 (#483)
* Add tests for KP200

This one worked out of the box sans the OUI not being in the list

https://github.com/home-assistant/core/pull/97062

* it is a strip
2023-07-22 23:55:42 +02:00
J. Nick Koston
fde156c859
Add benchmarks for speedups (#473)
* Add benchmarks for speedups

* Update README.md

* Update README.md

Co-authored-by: Teemu R. <tpr@iki.fi>

* relo

* Update README.md

* document benchmark

* Update README.md

---------

Co-authored-by: Teemu R. <tpr@iki.fi>
2023-07-02 01:03:50 +02:00
xinud190
b83986bd51
Add fixture for KP405 Smart Dimmer Plug (#470)
* Add files via upload

* Add to KP405 to dimmers, update README

---------

Co-authored-by: Teemu Rytilahti <tpr@iki.fi>
2023-06-30 02:53:23 +02:00
J. Nick Koston
2d42ca301f
Use orjson when already installed or with speedups extra (#466)
* Use orjson when already installed

* Use orjson when already installed

* fix patch target

* fix patch target

* add speedups extra

* Update README.md

* Update README.md
2023-06-18 01:03:04 +02:00
Teemu R
6be2f387f0
Prepare 0.5.1 (#434) 2023-02-18 22:40:42 +01:00
HankB
e1a30f92e4
fix more outdated CLI examples, remove EP40 from bulb list (#383)
* Fix more outdated cli examples

* remove EP40 (smart strip) from bulb list
2022-10-18 23:37:54 +02:00
Teemu R
f493fa1dca
Clarify information about supported devices (#377)
* Clarify information about supported devices

* Use single backticks
2022-10-17 18:16:40 +02:00
gritstub
57fac9a156
Add fixtures for KS200M (#356) 2022-06-28 18:53:23 +02:00
gritstub
d7295bdf6d
Add fixtures for ES20M (#353) (#354)
Co-authored-by: Teemu R <tpr@iki.fi>
2022-06-28 13:06:34 +02:00
gritstub
4c55289255
Add fixtures for KS230 (#355) 2022-06-28 12:56:36 +02:00
Teemu R
8c93c44440
Update README to add missing models and fix a link (#351) 2022-06-27 17:26:45 +02:00
James Alseth
91ba1d5ac6
Add KP125 test fixture and support note. (#350)
* Add KP125 test fixture and support note.

Signed-off-by: James Alseth <james@jalseth.me>

* mark KP125 having an emeter

Co-authored-by: Teemu R <tpr@iki.fi>
2022-06-27 03:39:57 +02:00
J. Nick Koston
8e6cfd003e
Add fixtures for KP100 (#343)
* Add fixtures for KP100

* readme
2022-05-11 16:02:17 +02:00
J. Nick Koston
d2581bf077
Add fixtures for kl420 (#339)
* Add fixtures for kl420

* readme
2022-04-14 02:51:15 +02:00
Teemu R
a468d520c0
Add KL135 color temperature range (#256) 2021-11-19 18:08:20 +01:00
Teemu R
8a4068c623
Add script to check supported devices, update README (#242)
* check_readme_vs_fixtures.py checks if a device with a fixture is listed in the README
* Add missing entries to README.md
2021-10-25 10:17:35 +03:00
J. Nick Koston
c65705bbbf
Add KL400, KL50 fixtures (#231)
* Add KL400 fixture

* Add KL400 fixture

* Add KL50 fixture

* tweaks
2021-10-08 00:15:32 +02:00
Teemu R
1a3c73e42f
Release 0.4.0 (#221)
This is the first proper python-kasa release since forking from pyhs100.

* Improved I/O handling, including asyncio interface, request merging & connection sharing
* API improvements throughout the whole package
* Support for LED strips
* Improved bulb support (transitions, support for more models)
* Onboarding is now possible without a mobile app
* Improved documentation
* And various other improvements, see the full changelog for details!

Thanks to all contributors, from testers, and issue reporters to those who have submitted pull requests! Thanks also to those who donated test devices to help to make this release happen!

Special thanks for this release go to @basnijholt (initial asyncio port, push to make this fork happen) and @bdraco (fixing the last release blocker, emeter support for powerstrips).

If you are using python-kasa in your projects, we would be happy to hear about it. Feel free to post a note on Github discussions!
If it is a project that could be interesting for other users and/or developers, feel also free to create a PR to add a short note to the README file.
2021-09-27 19:10:05 +02:00
Teemu R
41bed35e01
Use github actions instead of azure pipelines (#206)
* Use github actions instead of azure pipelines

* add codecov badge
2021-09-23 18:25:41 +02:00
Teemu R
47a1405bd2
Add KP115 fixture (#202) 2021-09-21 19:20:59 +02:00
Teemu R
1803a83ae6
Improve testing harness to allow tests on real devices (#197)
* test_cli: provide return values to patched objects to avoid warning about non-awaited calls

* test_cli: restore alias after testing

* smartstrip: remove internal update() calls for turn_{on,off}, set_led

* Make sure power is always a float

* Fix discovery tests

* Make tests runnable on real devices

* Add a note about running tests on a real device

* test_strip: run update against the parent device
2021-09-19 23:45:48 +02:00
mdarnol
2fe1b209d0
Add KL125 bulb definition (#143)
Co-authored-by: Mark Arnold <marnold@nvidia.com>
2021-02-27 15:09:33 +01:00
Flaviof
848c38117b
README.md: Add link to MQTT interface for python-kasa (#140)
Add reference to https://github.com/flavio-fernandes/mqtt2kasa for users
who may be interested in using MQTT to control/monitor devices managed
by python-kasa
2021-02-18 23:24:53 +01:00
Teemu R
8a5c5507c8
add tapo link, fix tplink-smarthome-simulator link (#133)
* add link to tapo p100 project
* fix tplink-smarthome-simulator link
2021-02-07 22:25:42 +01:00
Teemu R
98b40b5072
Improve cli documentation for bulbs and power strips (#123) 2020-12-09 11:13:14 +02:00
Teemu R
c67bda8230
Release 0.4.0.dev1 (#93)
* Release 0.4.0.pre1

* update RELEASING.md

* Fix release naming from .pre to .dev
2020-07-28 16:55:56 +02:00
Teemu R
d30d00a3ff
Add support for lightstrips (KL430) (#74)
* Preliminary support for light strips

* Add color temperature range and cleanup, thanks to @darkoppressor

* Use lightstrip instead of {led,light}strip consistently everywhere
* The cli flag is now --lightstrip

* add apidocs

* Add fixture file for KL430

Signed-off-by: Kevin Wells <darkoppressor@gmail.com>

* Add discovery support, expose effect and length of the strip

* use set_light_state instead of transition_light_state

* Add tests for lightstrip

* add doctests

* Add KL430 to supported devices in README

Co-authored-by: Kevin Wells <darkoppressor@gmail.com>
2020-07-19 22:32:17 +02:00
Teemu R
0edbb4301f
add .readthedocs.yml required for poetry doc builds (#89)
* add .readthedocs.yml required for poetry builds

* require python 3.7 for builds

* Add documentation badge, fix the docs link
2020-07-12 23:28:20 +02:00
Teemu R
713b443dd0
Add parse_pcap to devtools, improve readme on contributing (#84)
* Add parse_pcap to devtools, improve readme on contributing

* simplify context extraction
2020-07-12 23:07:24 +02:00
Teemu R
fccb897a5b
Improve installation instructions (#86)
* Improve installation instructions

* Add simple instructions how to install the package
* Move the list of supported devices to the end of the file

Fixes #60 (hopefully)

* Remove 'see below for devenv instructions'
2020-07-12 22:46:21 +02:00
Teemu R
f9a987ca18
Simplify API documentation by using doctests (#73)
* Add doctests to SmartBulb

* Add SmartDevice doctests, cleanup README.md

* add doctests for smartplug and smartstrip

* add discover doctests

* Fix bulb mock

* add smartdimmer doctests

* add sphinx-generated docs, cleanup readme a bit

* remove sphinx-click as it does not work with asyncclick

* in preparation for rtd hooking, move doc deps to be separate from dev deps

* pytestmark needs to be applied separately for each and every file, this fixes the tests

* use pathlib for resolving relative paths

* Skip discovery doctest on python3.7

The code is just fine, but some reason the mocking behaves differently between 3.7 and 3.8.
The latter seems to accept a discrete object for asyncio.run where the former expects a coroutine..
2020-06-30 02:29:52 +02:00
Teemu R
836f1701b9
Optimize I/O access (#59)
* Optimize I/O access

A single update() will now fetch information from all interesting modules,
including the current device state and the emeter information.

In practice, this will allow dropping the number of I/O reqs per homeassistant update cycle to 1,
which is paramount at least for bulbs which are very picky about sequential accesses.
This can be further extend to other modules/methods, if needed.

Currently fetched data:
* sysinfo
* realtime, today's and this months emeter stats

New properties:
* emeter_realtime: return the most recent emeter information, update()-version of get_emeter_realtime()
* emeter_today: returning today's energy consumption
* emeter_this_month: same for this month

Other changes:
* Accessing @requires_update properties will cause SmartDeviceException if the device has not ever been update()d
* Fix __repr__ for devices that haven't been updated
* Smartbulb uses now the state data from get_sysinfo instead of separately querying the bulb service
* SmartStrip's state_information no longer lists onsince for separate plugs
* The above mentioned properties are now printed out by cli
* Simplify is_on handling for bulbs

* remove implicit updates, return device responses for actions, update README.md instructions. fixes #61
2020-05-24 17:57:54 +02:00
Teemu R
ed57563e8b
Convert to use poetry & pyproject.toml for dep & build management (#54)
* Convert to use poetry and pyproject.toml, update README

* add some resources for contributors

* minor adjustments

* ci: separate tests from linting, run using poetry

* add pytest-mock to dev requirements

* combine running tests and reporting to codecov

* generate both xml and html coverage reports

* add codecov to dev dependencies
2020-05-12 12:11:47 +02:00