| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| # Deprecated API | ||
|
|
||
| ```{currentmodule} kasa | ||
| ``` | ||
| The page contains the documentation for the deprecated library API that only works with the older kasa devices. | ||
|
|
||
| If you want to continue to use the old API for older devices, | ||
| you can use the classes in the `iot` module to avoid deprecation warnings. | ||
|
|
||
| ```py | ||
| from kasa.iot import IotDevice, IotBulb, IotPlug, IotDimmer, IotStrip, IotLightStrip | ||
| ``` | ||
|
|
||
|
|
||
| ```{toctree} | ||
| :maxdepth: 2 | ||
|
|
||
| smartdevice | ||
| smartbulb | ||
| smartplug | ||
| smartdimmer | ||
| smartstrip | ||
| smartlightstrip | ||
| ``` |
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| # How-to Guides | ||
|
|
||
| This page contains guides of how to perform common actions using the library. | ||
|
|
||
| ## Discover devices | ||
|
|
||
| ```{eval-rst} | ||
| .. automodule:: kasa.discover | ||
| ``` | ||
|
|
||
| ## Connect without discovery | ||
|
|
||
| ```{eval-rst} | ||
| .. automodule:: kasa.deviceconfig | ||
| ``` | ||
|
|
||
| ## Get Energy Consumption and Usage Statistics | ||
|
|
||
| :::{note} | ||
| In order to use the helper methods to calculate the statistics correctly, your devices need to have correct time set. | ||
| The devices use NTP and public servers from [NTP Pool Project](https://www.ntppool.org/) to synchronize their time. | ||
| ::: | ||
|
|
||
| ### Energy Consumption | ||
|
|
||
| The availability of energy consumption sensors depend on the device. | ||
| While most of the bulbs support it, only specific switches (e.g., HS110) or strips (e.g., HS300) support it. | ||
| You can use {attr}`~Device.has_emeter` to check for the availability. | ||
|
|
||
|
|
||
| ### Usage statistics | ||
|
|
||
| You can use {attr}`~Device.on_since` to query for the time the device has been turned on. | ||
| Some devices also support reporting the usage statistics on daily or monthly basis. | ||
| You can access this information using through the usage module ({class}`kasa.modules.Usage`): | ||
|
|
||
| ```py | ||
| dev = SmartPlug("127.0.0.1") | ||
| usage = dev.modules["usage"] | ||
| print(f"Minutes on this month: {usage.usage_this_month}") | ||
| print(f"Minutes on today: {usage.usage_today}") | ||
| ``` |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| ```{include} ../../README.md | ||
| ``` | ||
|
|
||
| ```{toctree} | ||
| :maxdepth: 2 | ||
|
|
||
| Home <self> | ||
| cli | ||
|
Comment thread
sdb9696 marked this conversation as resolved.
|
||
| library | ||
| contribute | ||
| SUPPORTED | ||
| ``` | ||
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| # Library usage | ||
|
|
||
| ```{currentmodule} kasa | ||
| ``` | ||
| The page contains all information about the library usage: | ||
|
|
||
| ```{toctree} | ||
| :maxdepth: 2 | ||
|
|
||
| tutorial | ||
| guides | ||
| topics | ||
| reference | ||
| deprecated | ||
| ``` |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,134 @@ | ||
| # API Reference | ||
|
|
||
|
Comment thread
sdb9696 marked this conversation as resolved.
|
||
| ```{currentmodule} kasa | ||
| ``` | ||
|
|
||
| ## Discover | ||
|
|
||
| ```{eval-rst} | ||
| .. autoclass:: kasa.Discover | ||
| :members: | ||
| ``` | ||
|
|
||
| ## Device | ||
|
|
||
| ```{eval-rst} | ||
| .. autoclass:: kasa.Device | ||
| :members: | ||
| :undoc-members: | ||
| ``` | ||
|
|
||
| ## Modules and Features | ||
|
|
||
| ```{eval-rst} | ||
| .. autoclass:: kasa.Module | ||
| :noindex: | ||
| :members: | ||
| :inherited-members: | ||
| :undoc-members: | ||
| ``` | ||
|
|
||
| ```{eval-rst} | ||
| .. automodule:: kasa.interfaces | ||
| :noindex: | ||
| :members: | ||
| :inherited-members: | ||
| :undoc-members: | ||
| ``` | ||
|
|
||
| ```{eval-rst} | ||
| .. autoclass:: kasa.Feature | ||
| :noindex: | ||
| :members: | ||
| :inherited-members: | ||
| :undoc-members: | ||
| ``` | ||
|
|
||
| ## Protocols and transports | ||
|
|
||
| ```{eval-rst} | ||
| .. autoclass:: kasa.protocol.BaseProtocol | ||
| :members: | ||
| :inherited-members: | ||
| :undoc-members: | ||
| ``` | ||
|
|
||
| ```{eval-rst} | ||
| .. autoclass:: kasa.iotprotocol.IotProtocol | ||
| :members: | ||
| :inherited-members: | ||
| :undoc-members: | ||
| ``` | ||
|
|
||
| ```{eval-rst} | ||
| .. autoclass:: kasa.smartprotocol.SmartProtocol | ||
| :members: | ||
| :inherited-members: | ||
| :undoc-members: | ||
| ``` | ||
|
|
||
| ```{eval-rst} | ||
| .. autoclass:: kasa.protocol.BaseTransport | ||
| :members: | ||
| :inherited-members: | ||
| :undoc-members: | ||
| ``` | ||
|
|
||
| ```{eval-rst} | ||
| .. autoclass:: kasa.xortransport.XorTransport | ||
| :members: | ||
| :inherited-members: | ||
| :undoc-members: | ||
| ``` | ||
|
|
||
| ```{eval-rst} | ||
| .. autoclass:: kasa.klaptransport.KlapTransport | ||
| :members: | ||
| :inherited-members: | ||
| :undoc-members: | ||
| ``` | ||
|
|
||
| ```{eval-rst} | ||
| .. autoclass:: kasa.klaptransport.KlapTransportV2 | ||
| :members: | ||
| :inherited-members: | ||
| :undoc-members: | ||
| ``` | ||
|
|
||
| ```{eval-rst} | ||
| .. autoclass:: kasa.aestransport.AesTransport | ||
| :members: | ||
| :inherited-members: | ||
| :undoc-members: | ||
| ``` | ||
|
|
||
| ## Errors and exceptions | ||
|
|
||
| ```{eval-rst} | ||
| .. autoclass:: kasa.exceptions.KasaException | ||
| :members: | ||
| :undoc-members: | ||
| ``` | ||
|
|
||
| ```{eval-rst} | ||
| .. autoclass:: kasa.exceptions.DeviceError | ||
| :members: | ||
| :undoc-members: | ||
| ``` | ||
|
|
||
| ```{eval-rst} | ||
| .. autoclass:: kasa.exceptions.AuthenticationError | ||
| :members: | ||
| :undoc-members: | ||
| ``` | ||
|
|
||
| ```{eval-rst} | ||
| .. autoclass:: kasa.exceptions.UnsupportedDeviceError | ||
| :members: | ||
| :undoc-members: | ||
| ``` | ||
|
|
||
| ```{eval-rst} | ||
| .. autoclass:: kasa.exceptions.TimeoutError | ||
| :members: | ||
| :undoc-members: | ||
| Back | FazBrowse Home | New Git URL |
Uh oh!
There was an error while loading. Please reload this page.