lafriks / python-karcher

Kärcher Home Robots python client
MIT License
8 stars 1 forks source link

Decode net_status ip and mac fields #9

Open lafriks opened 7 months ago

lafriks commented 7 months ago

It's probably encrypted, did you try use method decrypt from utils.py?

No joy there, it's not a base64 string. And when I base64-encode it first and then feed that stuff to karcher.utils.decrypt, I get an error TypeError: ord() expected a character, but string of length 0 found.

Anyway, I'm behind a carrier-grade NAT, and I'm getting \x4c\x4e\xba\xbe in the ip field today, and it looks like I'm getting mapped to 176.114.240.18 by my ISP's CGNAT. The previous value a few weeks ago was \x4c\x5e\x9e\xbe. The local IPv4 address of the robot is currently 172.30.70.12.

I reconfigured my router so that it assigns a different address, 172.30.70.13, and after power-cycling the device, it's now L\\u001e\x80\xbe (yeah, that's 9 bytes now, not 4: 0x4c, 0x5c, 0x75, 0x30, 0x30, 0x31, 0x65, 0x80, 0xbe). One reboot later, it's L\xde\xe0\xbe, AKA \x4c\xde\xe0\xbe.

Originally posted by @jktjkt in https://github.com/lafriks/python-karcher/issues/7#issuecomment-1937831449