I would push this pull request to add a connection module to get WAN status.
It works for me and my FreeboxV6 with V6 API.
from freepybox import Freepybox
# Instantiate Freepybox class using default application descriptor
# and default token_file location
fbx = Freepybox()
# Connect to the freebox with default http protocol
# and default port 80
# Be ready to authorize the application on the Freebox if you use this
# example for the first time
fbx.open('mafreebox.freebox.fr', 80)
# Extract WAN interface status (GET /api/v6/connection/full) using connection API
fbx_connection_status_details = fbx.connection.get_status_details()
print(fbx_connection_status_details)
print('WAN ipv4 address: {0}'.format(fbx_connection_status_details['ipv4']))
print('WAN ipv6 address: {0}'.format(fbx_connection_status_details['ipv6']))
print('WAN status: {0}'.format(fbx_connection_status_details['state']))
print('WAN down bandwidth: {0}'.format(fbx_connection_status_details['bandwidth_down']))
print('WAN up bandwidth: {0}'.format(fbx_connection_status_details['bandwidth_up']))
print('WAN type: {0}'.format(fbx_connection_status_details['type']))
print('WAN media: {0}'.format(fbx_connection_status_details['media']))
# Close the freebox session
fbx.close()
Hello,
I would push this pull request to add a connection module to get WAN status. It works for me and my FreeboxV6 with V6 API.
Regards