-
-
Notifications
You must be signed in to change notification settings - Fork 3
Firmware downgrade
How to downgrade the firmware on a Kasa smart outlet using the python-kasa command-line program.
-
Unblock the outlet in your firewall if you prevented it from phoning home.
-
pip install python-kasa
-
Get the download URL of the firmware file you want by searching the internet and praying someone posted it, such as https://community.tp-link.com/us/home/forum/topic/582424?replyId=1133436.
http://download.tplinkcloud.com/firmware/KP125_FCC_1.0.8_Build_220130_Rel.174717_2022-0_1650329546294.bin http://download.tplinkcloud.com/firmware/KP125_FCC_1.0.9_Build_230224_Rel.113305_2023-02-24_11.35.10_1680224819337.bin http://download.tplinkcloud.com/firmware/EP10_FCC_1.0.5_Build_221021_Rel.183404_2022-10_1677468018672.bin
-
Make the device download the firmware.
$ kasa --host 192.168.1.100 raw-command system download_firmware '{"url": "http://download.tplinkcloud.com/firmware/KP125_FCC_1.0.8_Build_220130_Rel.174717_2022-0_1650329546294.bin"}'
{}
-
Wait until the download is done, at which point the device will install it and reboot automatically.
$ watch kasa --host 192.168.1.100 raw-command system get_download_state
{'status': 2, 'ratio': 100, 'reboot_time': 5, 'flash_time': 5}
When the status goes back to
0
, that probably means it finished installing and rebooting.{'status': 0, 'ratio': 0, 'reboot_time': 5, 'flash_time': 5}
-
Verify the installed firmware version in the
sw_ver
field of thesysinfo
object.$ kasa --host 192.168.1.100 sysinfo
== System info == {'active_mode': 'none', 'alias': 'Washing machine', 'dev_name': 'Smart Wi-Fi Plug Mini', 'deviceId': '8006A4705E7C7D4488F0EAE63F5238F11EDD0F03', 'err_code': 0, 'feature': 'TIM:ENE', 'hwId': '51F7FD94AB9EFF012B93C4B41A44DB32', 'hw_ver': '1.0', 'icon_hash': '', 'latitude_i': 373548, 'led_off': 0, 'longitude_i': -1219823, 'mac': '10:27:F5:BC:8C:AF', 'mic_type': 'IOT.SMARTPLUGSWITCH', 'model': 'KP125(US)', 'next_action': {'type': -1}, 'ntc_state': 0, 'obd_src': 'tplink', 'oemId': '39559FAFF2ECC2AA8A7A082C4E33B815', 'on_time': 25, 'relay_state': 1, 'rssi': -41, 'status': 'configured', 'sw_ver': '1.0.8 Build 220130 Rel.174717', 'updating': 0}
-
Reapply the block in your firewall if you want to prevent the device from phoning home.