pytapo
pytapo copied to clipboard
Strange Issue: Stok Error with VPN Enabled
I am having a strange issue where I get a stok error whenever my VPN is enabled?
Exception: Error: Invalid stok value, Response: {"error_code": -40401, "result": {"data": {"code": -40407, "encrypt_type": ["1", "2"], "key": "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC7QdgMKoS6Gl0oq4TLfeldgM6%2fikwuuS8fp0RzNVpPD9CrxRzL3X3%2f4WD0sji33NQOuk59ZSZprgHw6x9%2bEEpjDXGDDLZvba%2bsQ5jk%2f2uBxyKTUjM8jtzr%2fK9I79uTGxSWK7Hlh4gb6kwBXdN%2bqdy0uTdZPn1cWCVqAf5%2fJHmx9wIDAQAB", "nonce": "lU3L7xDN"}}
Same code works fine without vpn.
user = "User" # user you set in Advanced Settings -> Camera Account
password = "password" # password you set in Advanced Settings -> Camera Account
host = "some remote wan ip" # ip of the camera, example: 192.168.1.52
tapo = Tapo(host, user, password)