FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Add update interface for iot and expose it through cli by rytilahti · Pull Request #856 · python-kasa/python-kasa · GitHub

Repository navigation

Add update interface for iot and expose it through cli - #856

Draft
rytilahti wants to merge 9 commits into
masterfrom
feat/device_update
Draft

rytilahti wants to merge 9 commits into
masterfrom
feat/device_update

Conversation

Copy link
Copy Markdown
Member

This PR adds some initial code to explore implementing firmware update functionality through a common interface.
Bases on #791

  • Adds Firmware and FirmwareUpdate interfaces
  • Adds ability to show the available updates for IOT devices

Example with P110:

$ kasa --host 192.168.xx.xx firmware
No --type or --device-family and --encrypt-type defined, discovering for 5 seconds..
Update available!
Current firmware: 1.2.3 Build 230425 Rel.142542
Version 1.3.0 Build 230905 Rel.152200 released at 2023-10-31
Release notes
=============
Modifications and Bug Fixes:
1. Improved stability and performance.
2. Enhanced local communication security.
=============

Example with KP115:

$ kasa --host 192.168.xx.xx firmware

No --type or --device-family and --encrypt-type defined, discovering for 5 seconds..
Update available!
Current firmware: 1.0.16 Build 210205 Rel.163735
Version 1.0.20 Build 221125 Rel.092759 released at 2022-12-22
Release notes
=============
Modifications and Bug Fixes:
1.Fixed the bug that plug may not sync time instantly after change time zone.
2.Enhanced network stability of the plug.
3.Improved performance of the plug.
=============

TBD:

  • Decide if having common interfaces like this makes sense from design perspective
  • Implement update() for IOT devices

rytilahti added the enhancement New feature or request label Apr 22, 2024
rytilahti added 3 commits May 7, 2024 17:36
* Expose current and latest firmware as features
* Implement update loop that blocks until the update is complete
rytilahti force-pushed the feat/smartdevice_update branch from 81e4ae2 to 39e6aac Compare May 7, 2024 15:41
rytilahti added 4 commits May 7, 2024 17:45
* Expose current and latest firmware as features
* Implement update loop that blocks until the update is complete
rytilahti force-pushed the feat/device_update branch from 8871717 to fc122ea Compare May 7, 2024 15:55
Base automatically changed from feat/smartdevice_update to master May 8, 2024 23:43

codecov Bot commented May 14, 2024 •
edited
Loading

Copy link
Copy Markdown

Codecov Report

Attention: Patch coverage is 59.84848% with 53 lines in your changes are missing coverage. Please review.

Project coverage is 90.42%. Comparing base (67b5d7d) to head (06c5e55).

Files Patch % Lines
kasa/iot/modules/cloud.py 50.00% 30 Missing ⚠️
kasa/cli.py 36.36% 21 Missing ⚠️
kasa/smart/modules/firmware.py 83.33% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #856      +/-   ##
==========================================
- Coverage   91.15%   90.42%   -0.74%     
==========================================
  Files          78       79       +1     
  Lines        5156     5272     +116     
  Branches     1254     1280      +26     
==========================================
+ Hits         4700     4767      +67     
- Misses        362      411      +49     
  Partials       94       94              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Copy Markdown
Member Author

Just a side note, the update for smart doesn't currently handle change in the encryption protocol & keeps looping until aborted when it tries to fetch the state after flashing.

This file contains hidden or 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request no-stale

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL