-
-
Notifications
You must be signed in to change notification settings - Fork 8
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
AsusData.CLIENTS is not serialiazble when trying to convert to JSON #436
Comments
Hello, In order to get data = loop.run_until_complete(router.async_get_data(AsusData.CLIENTS))
print(json.dumps(data, indent=4, default=str)) will result in something like this: {
"00:AA:11:BB:22:CC": "AsusClient(state=<ConnectionState.DISCONNECTED: 0>, description=AsusClientDescription(name='XBOX', mac='00:AA:11:BB:22:CC', vendor='MSFT 5.0 XBOX'), connection=AsusClientConnection(type=<ConnectionType.DISCONNECTED: 'disconnected'>, ip_address=None, ip_method=None, internet_state=None, internet_mode=<InternetMode.UNKNOWN: 'unknown'>, node=None, online=False, aimesh=None))"
} for some random Xbox client as an only member of |
Hi again, thanks for the quick reply! But this means that values are not converted like BTW, is there any chance to set the chanspec of a given WLAN (e.g. 5Ghz) programmatically? Thanks, |
json.dumps just returns you a string representation of any object. You would need to work with the original objects and not with JSON data for any useful action As per the chanspec, it should be possible to control it. Everything that can be done from the Web UI, can be done from the library. The question is only to implement it properly |
I was just wondering that other json.dumps operations like For the second question: Do you have any pointers how to address this, please? Or do you mean, that it would take some time / donation ☕️ to incorporate into your library? |
Most of the results of I would need some time. Still need to finish something else before that, which is in the waiting list for a long time. But in terms of a week or two, this should be possible |
Hello @Vaskivskyi,
I really like your library, as I want to do some automation with it (specifically switching back 5GHz Channels to DSF >100 if Radar-Detection swaps it with something like 36 / 40 and the like).
However I think I bumped into an error
data= loop.run_until_complete(router.async_get_data(AsusData.CLIENTS)
if I do the following
Any clues? Did I miss something?
Thank you,
Joachim
The text was updated successfully, but these errors were encountered: