AlexandrErohin / home-assistant-tplink-router

Home Assistant component for TP-Link router administration with sensors, button reboot, switches and device tracking.
https://community.home-assistant.io/t/custom-component-tp-link-router-integration
MIT License
137 stars 16 forks source link

Add support to Archer MR600 v2 #62

Closed ElGatitaux closed 1 month ago

ElGatitaux commented 5 months ago

Hi @AlexandrErohin

I tried by opportunity your great integration with Archer MR600 v2.

Logs

Enregistreur: homeassistant.config_entries Source: config_entries.py:594 S'est produit pour la première fois: 21:44:37 (5 occurrences) Dernier enregistrement: 21:51:11

Error setting up entry http://192.168.1.1 for tplink_router Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/config_entries.py", line 594, in async_setup result = await component.async_setup_entry(hass, self) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/tplink_router/init.py", line 47, in async_setup_entry firmware, status = await hass.async_add_executor_job(TPLinkRouterCoordinator.request, client, callback) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run result = self.fn(*self.args, **self.kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/tplink_router/coordinator.py", line 56, in request data = callback() ^^^^^^^^^^ File "/config/custom_components/tplink_router/init.py", line 43, in callback stat = client.get_status() ^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/tplinkrouterc6u/client.py", line 846, in getstatus , values = self.req_act(acts) ^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/tplinkrouterc6u/client.py", line 1023, in req_act (code, response) = self._request(url, data_str=data, encrypt=True) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/tplinkrouterc6u/client.py", line 1228, in _request return r.status_code, self._encryption.aes_decrypt(r.text) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/tplinkrouterc6u/encryption.py", line 105, in aes_decrypt return unpad(response, 16, 'pkcs7').decode('utf8') ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ UnicodeDecodeError: 'utf-8' codec can't decode byte 0x94 in position 1569: invalid start byte

I'm a beginner, I tried to launch the "TP-Link-Archer-C6U" github but I couldn't get it to work.

Thanks a lot ElGatitaux

AlexandrErohin commented 1 month ago

Hi. Have you tried the latest version?

ElGatitaux commented 1 month ago

Hello, Yes, it's perfect, Thank you !

AlexandrErohin commented 1 month ago

@ElGatitaux Would be great if you could give a star to the repo :) Thanks