Currently, the TLS certificate of the FritzBox is not validated, which makes the library vulnerable to machine-in-the-middle attacks.
It would be better to support some kind of certificate pinning by comparing the hash of the FritzBox's certificate with the provided hash.
Another solution would be to compare the fingerprint of the certificate with the provided fingerprint.