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.95k stars 29.04k forks source link

Huawei E3276 stops sending SMS until HA restart #110090

Open Morphy99 opened 5 months ago

Morphy99 commented 5 months ago

The problem

I keep having issues sending SMS on my Huawei 4G dongle which is connected to my router. It will stop working with the following in the log:

Logger: homeassistant.components.huawei_lte.notify Source: components/huawei_lte/notify.py:63 Integration: Huawei LTE Error in logs: Could not send to ['tel-number']: 125001: Unknown

A restart of HA resolves this so I'm assuming it's an issue with the integration?

I've enabled debug logging for the integration so I'll wait and see when it goes wrong what that throws up...

What version of Home Assistant Core has the issue?

core-2024.1.6

What was the last working version of Home Assistant Core?

core-2024.1.6

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Huawei

Link to integration documentation on our website

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

Diagnostics information

No response

Example YAML snippet

service: notify.huawei_lte
data:
  message: test

Anything in the logs that might be useful for us?

Logger: homeassistant.components.huawei_lte.notify
Source: components/huawei_lte/notify.py:63
Integration: Huawei LTE
Error in logs: Could not send to ['tel-number']: 125001: Unknown

Additional information

No response

home-assistant[bot] commented 5 months ago

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

Code owner commands Code owners of `huawei_lte` 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 huawei_lte` 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)


huawei_lte documentation huawei_lte source (message by IssueLinks)

Morphy99 commented 5 months ago

I don't really want to share the whole debug log here but I can't see anything related anyway. Is there anything specific I should be looking for? One cause might be a lack of cell coverage and not being able to send the SMS. One of my automations calls the send SMS when the internet ping sensor stops in the hope that although data connectivity dies, cell coverage is still ok. I'll try disabling the sms side of that automation and see if it falls over again.

issue-triage-workflows[bot] commented 2 months ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

scop commented 2 months ago

Error code 125001 is named ERROR_WRONG_TOKEN in the underlying huawei-lte-api library, so this could indicate something wrong with the session management.

If you get a backtrace in error logs when this occurs, could you share at least that?

Morphy99 commented 2 months ago

Thanks for looking into it! I have debug logging enabled but there's no backtrace error just this: image

scop commented 2 months ago

Does this happen every time sending an SMS is attempted, or does sending the message sometimes succeed?

scop commented 2 months ago

And to clarify, when this happens, does the integration stop working completely, or just the SMS sending part of it?

Morphy99 commented 2 months ago

It seems to work after restarting HA then will stop working again after a few minutes. The other entities on the device are continuing to update so I assume it is just the SMS side.