Closed patkszen closed 6 years ago
Try setting up the authentication variables using the instructions here.
First, you'll need to navigate to http://192.168.0.1 and enter your login details, but don't login yet.
Open your browser's development console to capture the GET request, after clicking the 'Next' button:
The keys from the GET request are then edited into the code of the SuperHub python file, there are three variables there, one for each respective key. You only need to do this capture procedure once; the python script will be able to log into your router automatically in future unless the router's password is changed.
I'll be looking further into the hub's interface code some more soon so I can get the superhub client to authenticate with passwords.
Hi Jamo
I got that error after placing keys 1,2 and 3 into your code. I've only omitted = sign at the end of the first key - I've tried with it as well, sent result
Oh I see. The =
sign at the end is a part of the key so that's necessary. Are there any space characters etc. present in the key variables? If you're still having problems then I'll look into getting passwords working on the utility.
There were no spaces, I've just copy/pasted keys from the get request. I will double check once I'm back.
I've added the ability for the script to accept passwords in the version 0.1.5, let me know if that works for you.
https://github.com/JamoDevNich/ClientsAPI-SuperHub3/releases/tag/0.1.5
`Yarde Superhub Client API (Part of the Wifi Doorbell Transponder Project) by Nicholas Elliott Version 0.1.4
Searching for superhub (192.168.0.1)... Logging in... Validating login... --! HTTP/1.1 Response Code 401 Received Traceback (most recent call last): File "superhubclientsapi.py", line 232, in
main();
File "superhubclientsapi.py", line 221, in main
raise Exception("The login could not be validated. Retrying usually fixes this random error.");
Exception: The login could not be validated. Retrying usually fixes this random error.
`