kbr / fritzconnection

Python-Tool to communicate with the AVM Fritz!Box by the TR-064 protocol and the AHA-HTTP-Interface
MIT License
304 stars 59 forks source link

version 0.8.5: returns wrong version; ip-address heuristics changed #51

Closed wfjm closed 3 years ago

wfjm commented 4 years ago

The only change in version 0.8.5 is, as a0e202b02 suggests, that the lxml dependency changed. Installing it with pip gives a different picture, done on an Ubuntu 18.04 system:

virtualenv --no-site-packages venv
. ./venv/bin/activate
pip install fritzconnection
pip list
  fritzconnection 0.8.5
  lxml            4.5.1

fritzconnection  -s
  FritzConnection:
  version:            0.8.4

So lxml is indeed 4.5.1, but the fritzconnection command still returns 0.8.4.

Beyond that, the ip-address heuristics seems to have changed. My setup is

  fritz.box         192.168.178.1
  fritz.repeater    192.168.178.39

The 0.8.4 fritzconnection finds the fritz.box without -i option.'

fritzconnection -s
  FritzConnection:
  version:            0.8.4
  model:              FRITZ!Box 7590
  Servicenames:
                    WANCommonIFC:1
                    .... 

The 0.8.5 fritzconnection doesn't find a device (empty list). When 0.8.5 fritzconnection is called with -u and -p and without -i is finds the fritz.repeater.

fritzconnection -s
  FritzConnection:
  version:            0.8.4
  model:              None  
  Servicenames:
  ()

fritzconnection -p xxx -u xxx -s
  FritzConnection:  
  version:            0.8.4
  model:              FRITZ!Repeater 3000
  Servicenames:
                    DeviceConfig:1
                    DeviceInfo:1
                    Hosts:1
                    UserInterface:1
                    WLANConfiguration:1
                    WLANConfiguration:2
                    WLANConfiguration:3
                    WLANConfiguration:4

It seems that the code base changed in a different way than suggested by a0e202b02.

kbr commented 4 years ago

Well, the changes at a0e202b02 are the real changes, nothing else has changed additionally in a magic way. But the version-info in the fritzconnection module has not been updated to 0.8.5; seems to be that I simply forgot this. However, beside the lxml version, there is no functional difference between 0.8.4 and 0.8.5 - it's exactly the same code.

If you have multiple fritz-devices and don't provide an address (the -i option), the first box responding in the network wins. Works fine with just one device, but not with multiple routers.

wfjm commented 4 years ago

OK. I'm aware that was sloppy when I omitted the -i option. The wrong version string than put me on a wild-goose chase :).

kbr commented 3 years ago

I think we can close this. Please feel free to reopen in case of need.