JamoDevNich / SuperHub3-CLI

A command-line interface for managing the VM SuperHub 3/ARRIS TG2492S/CE router. Allows listing current/past connected devices, toggle private/guest WLAN, rebooting and viewing router status
17 stars 2 forks source link

Bug: Finding ip address #3

Closed haywirephoenix closed 6 years ago

haywirephoenix commented 6 years ago

I had to comment out line 350-352 ("Finding the superhub") otherwise it throws: "Could not find Superhub, please ensure the correct IP address is set", even though hub exists on that ip.

Do I need to set the correct md5? I also don't get to the menu, just: 192.168.0.1>_

Can still type the commands and they work. Using latest python (3.7.0)

haywirephoenix commented 6 years ago

Yep, I changed find() to print hashlib.md5(html.encode("utf-8")).hexdigest() if the md5 didn't match, then replaced that string with the one in the config. How do people go about finding and setting that?

Mine was cf7777b19bde01785c51e0f2e6654e76

JamoDevNich commented 6 years ago

I'll change the detection system to query the Router Status API instead of hashing the homepage, as it seems to be changed every other firmware update. That should hopefully be a long term fix.

JamoDevNich commented 6 years ago

Try the new version and let me know if there are any issues. https://github.com/JamoDevNich/ClientsAPI-SuperHub3/releases/tag/1.0.1

The menu may not be showing up if you are using silent mode. Does your prompt look similar to this?

Image showing prompt

This is the expected behaviour of silent mode, however if you'd like the menu revealed also, add an 0 parameter to the end of its printx functions.

printx("wlan 0/1 Toggle Private WLAN off/on", 0);
haywirephoenix commented 6 years ago

It's working flawlessly. Thank you!

JamoDevNich commented 6 years ago

No problem :grin: