home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
69.86k stars 28.96k forks source link

signal_messenger component requests alias instead of phone number since 0.84 add-on #119832

Open dreem2001 opened 3 weeks ago

dreem2001 commented 3 weeks ago

The problem

I updated add-on "Signal Messenger" https://github.com/haberda/signal-addon/tree/main to 0.84 Now it's impossible to send message using service notify.<name> From UI Developer Tools I receive error: Failed to call service notify.<name>. Unknown error Also in HA logs:

First occurred: 12:00:00 PM (18 occurrences)
Last logged: 11:16:18 PM

Error doing job: Task exception was never retrieved (None)
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/core.py", line 2741, in async_call
    response_data = await coro
                    ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2784, in _execute_service
    return await target(service_call)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/notify/legacy.py", line 275, in _async_notify_message_service
    await self.async_send_message(**kwargs)
  File "/usr/src/homeassistant/homeassistant/components/notify/legacy.py", line 251, in async_send_message
    await self.hass.async_add_executor_job(
  File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/signal_messenger/notify.py", line 105, in send_message
    self._signal_cli_rest_api.send_message(
  File "/usr/local/lib/python3.12/site-packages/pysignalclirestapi/api.py", line 259, in send_message
    raise exc
  File "/usr/local/lib/python3.12/site-packages/pysignalclirestapi/api.py", line 254, in send_message
    raise SignalCliRestApiError(json_resp["error"])
pysignalclirestapi.api.SignalCliRestApiError: org.signal.libsignal.usernames.MissingSeparatorException: Username must contain a '.'

Workaround is to create alias in Signal account and use it instead of phone number in configuration of notification service.

Hardware: OrangePI 5B OS: Armbian 24.5.1 Bookworm with Linux 6.1.43 HA core: 2024.6.3 HA supervisor: 2024.06.0 Signal Addon: 0.84

What version of Home Assistant Core has the issue?

2024.6.3

What was the last working version of Home Assistant Core?

2024.6.3

What type of installation are you running?

Home Assistant Supervised

Integration causing the issue

signal_messenger

Link to integration documentation on our website

https://www.home-assistant.io/integrations/signal_messenger/

Diagnostics information

First occurred: 12:00:00 PM (18 occurrences)
Last logged: 11:16:18 PM

Error doing job: Task exception was never retrieved (None)
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/core.py", line 2741, in async_call
    response_data = await coro
                    ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2784, in _execute_service
    return await target(service_call)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/notify/legacy.py", line 275, in _async_notify_message_service
    await self.async_send_message(**kwargs)
  File "/usr/src/homeassistant/homeassistant/components/notify/legacy.py", line 251, in async_send_message
    await self.hass.async_add_executor_job(
  File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/signal_messenger/notify.py", line 105, in send_message
    self._signal_cli_rest_api.send_message(
  File "/usr/local/lib/python3.12/site-packages/pysignalclirestapi/api.py", line 259, in send_message
    raise exc
  File "/usr/local/lib/python3.12/site-packages/pysignalclirestapi/api.py", line 254, in send_message
    raise SignalCliRestApiError(json_resp["error"])
pysignalclirestapi.api.SignalCliRestApiError: org.signal.libsignal.usernames.MissingSeparatorException: Username must contain a '.'

### Example YAML snippet

```yaml
Old configuration, doesn't work:
notify:
  - name: <name>
    platform: signal_messenger
    url: "http://127.0.0.1:8090"
    number: "+12345678900"
    recipients:
      - +10987654321 

Workaround:
notify:
  - name: <name>
    platform: signal_messenger
    url: "http://127.0.0.1:8090"
    number: "+12345678900"
    recipients:
      - alias.00

Anything in the logs that might be useful for us?

No response

Additional information

No response

home-assistant[bot] commented 3 weeks ago

Hey there @bbernhard, mind taking a look at this issue as it has been labeled with an integration (signal_messenger) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `signal_messenger` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Renames the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign signal_messenger` Removes the current integration label and assignees on the issue, add the integration domain after the command. - `@home-assistant add-label needs-more-information` Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue. - `@home-assistant remove-label needs-more-information` Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


signal_messenger documentation signal_messenger source (message by IssueLinks)