cziter15 / ha-tplink-mr6400-sms-notify

📲 HACS Integration harnessing the capabilities of the TP-Link MR6400, a 4G router, to provide optimized and rapid SMS sending functionality for the HomeAssistant notification platform.
MIT License
3 stars 0 forks source link

websocket_api script: Error executing script #2

Open jalohax opened 1 year ago

jalohax commented 1 year ago

I have tried to use this integration already few times, and all of them has failed. Today I had some more time so I tried to gather some logs.

How the setup is made as for now:

But the service falls by itself, I can see errors:

Logger: custom_components.mr6400sms.devices.router
Source: custom_components/mr6400sms/devices/router.py:53
Integration: mr6400sms ([documentation](https://github.com/cziter15/ha-tplink-mr6400-sms-notify), [issues](https://github.com/cziter15/ha-tplink-mr6400-sms-notify/issues))
First occurred: 18:52:23 (2 occurrences)
Last logged: 18:52:24

    Retrying login (1 of 3) due to exception {Invalid encryption key request because of status 500}
    Retrying login (2 of 3) due to exception {int() can't convert non-string with explicit base}
Logger homeassistant.helpers.script.websocket_api_script
Source: custom_components/mr6400sms/devices/mr6400.py:96
Integration: mr6400sms ([documentation](https://github.com/cziter15/ha-tplink-mr6400-sms-notify), [issues](https://github.com/cziter15/ha-tplink-mr6400-sms-notify/issues))
First occurred: 18:52:25 (1 occurrences)
Last logged: 18:52:25
websocket_api script: Error executing script. Unexpected error for call_service at pos 1: Token is missing. Please login first.

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 468, in _async_step
    await getattr(self, handler)()
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 704, in _async_call_service_step
    response_data = await self._async_run_long_action(
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 666, in _async_run_long_action
    return long_task.result()
           ^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 1969, in async_call
    response_data = await coro
                    ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2006, in _execute_service
    return await target(service_call)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/notify/legacy.py", line 264, in _async_notify_message_service
    await self.async_send_message(**kwargs)
  File "/config/custom_components/mr6400sms/notify.py", line 28, in async_send_message
    await self.router_client.send_message(phone_numbers, message)
  File "/config/custom_components/mr6400sms/devices/router.py", line 71, in send_message
    await self._send_sms(phone, message)
  File "/config/custom_components/mr6400sms/devices/mr6400.py", line 96, in _send_sms
    raise RouterException("Token is missing. Please login first.")
custom_components.mr6400sms.devices.router.RouterException: Token is missing. Please login first.
cziter15 commented 1 year ago

Looks like differences in router fimware / hw version.

Mine is: Firmware Version:1.11.0 0.9.1 v0001.0 Build 200325 Rel.56677n Hardware Version:TL-MR6400 v4