GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Add update interface for iot and expose it through cli by rytilahti · Pull Request #856 · python-kasa/python-kasa

Conversation

@rytilahti

@rytilahti rytilahti commented Apr 22, 2024

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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@rytilahti rytilahti added the enhancement New feature or request label Apr 22, 2024
rytilahti added 3 commits May 7, 2024 17:36
@rytilahti
Improve smartdevice update module
e9dfdf6
* Expose current and latest firmware as features
* Implement update loop that blocks until the update is complete
@rytilahti
Fix linting
fd86891
@rytilahti
Fix after rebasing
39e6aac
@rytilahti
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
@rytilahti
Improve smartdevice update module
06fe4e7
* Expose current and latest firmware as features
* Implement update loop that blocks until the update is complete
@rytilahti
Fix linting
3429821
@rytilahti
Add update interface for iot and expose it through cli
6dcc275
@rytilahti
Fix issues after rebasing
fc122ea
@rytilahti
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
@sdb9696
Merge remote-tracking branch 'upstream/master' into feat/device_update
06c5e55
@codecov

codecov Bot commented May 14, 2024 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@rytilahti rytilahti mentioned this pull request May 20, 2024
Dynamic entity creation for tplink home-assistant/core#111151
Closed
1 of 20 tasks
@rytilahti
Fix update for smart devices
64eed4f
@rytilahti

rytilahti commented Aug 31, 2024

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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@sdb9696 sdb9696 added the no-stale label Sep 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

enhancement New feature or request no-stale

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@rytilahti @sdb9696
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.