Closed ReenigneArcher closed 2 years ago
__init__.py: Line 41 to Line 47
try:
about = self._get('about')['[0,0,0,0,0,0]0']
self.__name__ = about['modelName']
self.description = about['description']
self.__version__ = self._get('version')['[0,0,0,0,0,0]0']['softwareVersion'].split()[4]
except:
self.log("Metadata Update Error.")
remove the try
and except
blocks and add print/log statements to attempt to debug the issue
Your code would be something like:
about = self._get('about')['[0,0,0,0,0,0]0']
print(about)
self.__name__ = about['modelName']
self.description = about['description']
self.__version__ = self._get('version')['[0,0,0,0,0,0]0']['softwareVersion'].split()[4]
Note: If you've installed this via pip then your changes will not reflect due to python's cache. Download the script from this repo and import the local file manually
It's highly unlikely that this script will work AS-IS for the AD7200. Instead of a failed attempt at modifying the code as mentioned above, I'd suggest following the instructions mentioned in CONTRIBUTING.md to add support for your model
I ended up writing my own script to reboot the router: https://github.com/ReenigneArcher/JBOHAS/blob/main/scripts/python/tp_link_reboot.py
It runs inside of home assistant using selenium web driver.
hey how did you Manage to run the script inside home assistant ?
I ended up writing my own script to reboot the router: https://github.com/ReenigneArcher/JBOHAS/blob/main/scripts/python/tp_link_reboot.py
It runs inside of home assistant using selenium web driver.
hey how did you Manage to run the script inside home assistant ?
Been quite a while since I added this, so not 100% sure. I think I used this as reference: https://community.home-assistant.io/t/using-selenium-with-chromedriver/259864/5
I think I used a command line sensor, but not 100% sure.
Anyway this will work for an AD7200 router? I am only looking for a method to restart the router using an automation.
My python script is as follows.
which returns the following:
Metadata Update Error.