New issue
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
Support for disabling Remote Access #519
Comments
This is implemented but untested and not implemented in the cli tool, see python-kasa/kasa/modules/cloud.py Lines 51 to 53 in 84a501b
The cli tool allows executing raw commands, so you could try the same command like this (also documented here:
As my test device is not added to any cloud account, I'm just getting this:
Please report back if it works (and what was the response), that would help to improve and add this functionality to the cli tool, too. |
I have tried this on three different devices. It certainly returns a boat load of information for sure! Device 1 - HS103 (US) HW 2.1 FW 1.1.4 Build 210409 Rel.113427 Device 2 - EP25 (US) HW 1.0 FW 1.0.10 Build 230423 Rel.134727 Device 3 - HS105 (US) HW 1.0 FW 1.5.6 Build 191114 Rel.104204 Looks like Device 1 maybe worked. Device 2 and 3 both failed most likely because they are presently being blocked by Pi-Hole. This suggests they need to unlink from the cloud itself so access may be required for this to work. I will remove this block and attempt this again later today. A bit short on time right now. EDIT Running this command again on Device 1 returns this: Thanks! |
Okay, so while this app did report on Device 2 and 3 the cloud error above, it still actually worked. After I removed the block, the two devices that seemingly failed, were indeed unbound. Brilliant!! I have ran this now on 17 devices and it worked on all of them. Thank you! I saved all the output logs for each device. If you want to look at them, please let me know. |
Thanks for reporting back and glad it worked! I'd guess that the device resets itself into a state where it cannot be remotely controlled, but it still tries to inform the server (e.g., to allow removing the device from server-side device list) about the fact. Let's keep this issue still open until the cli tool has a way to manage cloud settings. |
Interesting thing to note. Even though my devices are all unbinded to the cloud, they STILL call home. However, it does not now cause them to reset or do a dhcp renew as before, even with the block re-enabled in Pi-Hole. I have been watching them in Wireshark. |
Also interesting to note: After a few days, my Kasa phone app now has zero devices. It wants me to add them to the cloud to become available locally. Damn dirty apes! I mean Apps! :) So it looks like going forward (I still have 3 power monitoring switches I have not yet added), it looks as though I have to add them via the app, to the cloud, then use the command line to unlink them. What a load of crap this has become! More research needed. EDIT: I am going to factory reset a few devices and see if they again get added locally before adding any new devices. This is most peculiar to say the least. |
Is "offline" provisioning not working for those devices? I haven't tested it with all of my devices, but it worked fine with my most recent additions (KP115, KL130, EU versions). |
I'm not really sure what's going on. The app shows zero devices initially, but when I click on Add, it asks if I want to "Choose from discovered devices (17)", so it knows they are present. If I then tap on this, it says "Discovered Devices: Please add the unlinked devices to your Kasa account so you can access more features thought the Kasa app." and it then shows me all all my devices, but this is ONLY to Link them to my account, not to control them. It's not a big deal as I only use the app to add new devices anyway. I control them all via Home Assistant which continues to see and control them all just fine. I just added a new EP25(US) smart plug. It immediately wanted to do a firmware update once added and I could not get it to go back from this page. I killed the app, restarted it and the device now shows up as a local device. It is presently running sw_ver': '1.0.6 Build 210928 Rel.185924'. It wants to update the device to 1.0.10 Build 230423 Rel 134727. The Remote Control Button is currently present under the device settings for now, and turned off. I wonder if it will still be there if I update it? EDIT: Did the FW update and to my surprise the Remote Control button is still present. Also, I believe the app dropping my existing devices is most likely a bug in the Kasa app and certainly has nothing to do with python-kasa. I will just simply reset and re-add them at some point. Edit2: Just reset and re-added an older device (HS103). Now the EP25 I just added above disappeared and the newly reset device is the only one showing. If I disconnect my phone from WiFi and run the Kasa app, no devices show as expected. But whenever I go back onto the WiFi, still no devices. This is most certainly a Kasa app bug. I will remove and reinstall it later this evening and see if that fixes it. |
Would it be possible to add support for disabling Remote Access? The Kasa app once had this feature for each device but was apparently removed at some point. Now all my devices are Remotely accessible and I do not want this, but I see no way to disable it. Simply blocking INet access in the router causes them to constantly request a new DHCP address while blocked, but work fine when not blocked.
The text was updated successfully, but these errors were encountered: