Skip to content

fritzconnection --reconnect and fritzstatus seems to use a no longer existing service name #236

@calestyo

Description

@calestyo

Hey.

At least on my 7590 AX with version 8.0 it says:

$ fritzconnection -e -u foo -p bar --reconnect

fritzconnection v1.14.0
FRITZ!Box 7590 AX at https://cerf
FRITZ!OS: 8.0

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/fritzconnection/core/fritzconnection.py", line 453, in call_action
    service = self.device_manager.services[service_name]
              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^
KeyError: 'WANIPConn1'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/bin/fritzconnection", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/usr/lib/python3/dist-packages/fritzconnection/cli/fritzinspection.py", line 167, in main
    execute()
  File "/usr/lib/python3/dist-packages/fritzconnection/cli/fritzinspection.py", line 162, in execute
    run_inspector(inspector, args)
  File "/usr/lib/python3/dist-packages/fritzconnection/cli/fritzinspection.py", line 150, in run_inspector
    inspector.fc.reconnect()
  File "/usr/lib/python3/dist-packages/fritzconnection/core/fritzconnection.py", line 507, in reconnect
    self.call_action("WANIPConn1", "ForceTermination")
  File "/usr/lib/python3/dist-packages/fritzconnection/core/fritzconnection.py", line 455, in call_action
    raise FritzServiceError(f'unknown service: "{service_name}"')
fritzconnection.core.exceptions.FritzServiceError: unknown service: "WANIPConn1"

There are however the following commands shown in introspection:

Service:            WANPPPConnection1
Action:             ForceTermination
Parameters:

    Name                                  direction     data type
...
Service:            WANIPConnection1
Action:             ForceTermination
Parameters:

    Name                                  direction     data type

So I guess WANIPConn1 was simply renamed to WANIPConnection1?


Similarly:

$ fritzstatus -e -u foo -p bar 

fritzconnection v1.14.0
FRITZ!Box 7590 AX at https://cerf
FRITZ!OS: 8.0

FritzStatus:

    is linked             : unsupported attribute "is_linked"
    is connected          : unsupported attribute "is_connected"
    external ip (v4)      : unsupported attribute "external_ip"
    external ip (v6)      : unsupported attribute "external_ipv6"
    internal ipv6-prefix  : unsupported attribute "ipv6_prefix"
    uptime                : unsupported attribute "str_uptime"
    bytes send            : unsupported attribute "bytes_sent"
    bytes received        : unsupported attribute "bytes_received"
    max. bit rate         : unsupported attribute "str_max_bit_rate"

Looking in the code, these seem to use WANIPConn (**note that here the code doesn't have the trailing 1 as above) but my FritzBox shows e.g. the following commands in introspection, e.g. for the external IP:

Service:            WANPPPConnection1
Action:             GetExternalIPAddress
Parameters:

    Name                                  direction     data type

    NewExternalIPAddress                     out ->     string
...
Service:            WANIPConnection1
Action:             GetExternalIPAddress
Parameters:

    Name                                  direction     data type

    NewExternalIPAddress                     out ->     string

So might be named differently in newer firmwares?

Thanks,
Chris.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions