Send SMS with USB GSM modem when alarm triggered

Nothing; actually, I should have mentioned above that the sms message was the last row in the log before the init sequence :slight_smile: (the logger severity level is set to debug).

1 Like

This fix for incoming SMS is ready and waiting for approval.
Please up vote the PR here:

1 Like

Stupid question from me - how do I upvote this PR?

1 Like

Hi,

I have an issue while setting up the integration. It always says Failed to connect.
Screenshot 2021-08-26 at 12.37.48

After plugging the modem (Huawei E3531) to RPi 4 where my Home Assistant OS is running, I can see the following output:
Screenshot 2021-08-26 at 12.39.25|487x59

There are no USB devices when the modem is not connected.

I have tried all /dev/ttyUSB0, /dev/ttyUSB1, /dev/ttyUSB2. Always Failed to connect.

At this stage, does the integration check SIM card connectivity? I have an active SIM card without PIN inside so even if it did, it should be alright.

1 Like

Is it in serial mode per Send SMS with USB GSM modem when alarm triggered - #111 by Oscar_Calvo

Is there anyway to legitimately increase the chances of this fix being included in a release?

I’m stuck on 2021.6.6 as receiving SMS is a requirement in my configuration and the last time I tried upgrading any received SMS crashed my install (no debug logs found unfortunately).

EDIT: failing the PR being released is it possible to manually patch HA container to resolve the issue?

I have started an email thread in discord.
Home Assistant - Discord

Please ask in the thread for someone from the core team to review and merge the fix.

1 Like

Thanks for responding.

I’ve signed up to Discord purely to add my voice via browser but don’t have the app installed so will have to check back manually on it periodically as I can’t find an email notification option.

I suppose this was an answer to me. Where can I get the tools and drivers? The link in the article is broken.

It was a reply to you yes.
I suppose that the answer to my question about serial mode was no then?
Apologies I linked to a windows post in error whilst multitasking - for linux you’ll need to follow a suitable guide to use usb_modeswitch to change the modem mode.

There are multiple posts within this thread about setting up an E3531 appropriately for use - I no longer have my own notes as I moved from the E3531 to an E220 for easier inbound SMS support. From memory, I followed something like this writeup but I was running HA Core in a venv (now HA Container in Docker) on Ubuntu, so there may be some differences for a dedicated Pi install (which I assume is what you are running).

I did add my comment but from my (limited) understanding of Discord the thread appears to have now been archived without gaining traction or results. I suspect that this may be down to the imminent 2021.9.x release currently going through beta.

I’m struggling to understand how to respectfully flag the PR for review and inclusion into a future release without breaching community etiquette or rules (or annoying anyone by tagging them etc.)
I understand that there is a huge body of work out there for review etc. but (if I understand the circumstances correctly) this is a core integration partially broken by the progression of the underlying environment.

As things stand I cannot upgrade beyond 2021.6.6 without redesigning a substantial part of my configuration and sacrificing redundancy in the event of offline / non-data based notifications. The last upgrade I tried (2021.8.3) also left my HA Container vulnerable to receiving an SMS which caused a restart of the container - no logs otherwise I would have added them to the relevant issue.

I’m stumped. So if anyone here does know how to appropriately and respectfully raise this with the appropriate people I’d appreciate any suggestions.

In the core-2021.9.3 version there is something wrong with SMS integration again. Integration stops working after the update. I removed the integration and added it again, but I always received a message during the configuration “Failed to connect” just like before the corrections. After restoring the snapshot to core-2021.8.8 and sending SMS works fine again.

Can you open a new issue and post logs onto it?

There is a PR ready with the fix, but noone with “Write” access to the core repository has marge the fix:

Support incoming SMS messages via polling by ocalvo · Pull Request #54237 · home-assistant/core (github.com)

The biggest issue is to merge the fix for moment…

I have the same problem.
After September updates SMS integration (sim800l) stopped working.
Removal and new setup does nothing . Failed to connect …

I had the same but:
after (first ever) 2021.09.1 /supervisor 2021.09.0 - it worked *
after 2021.09.2/ supervisor backed to 2021.08.? - stopped working *
after 2021.09.3/supervisor back to 2021.09.0 - working again *
after 2021.09.4 - still working *

So looks like mix HA 2021.09.x/supervisor 2021.08 break it.

  • in all of cases - sensor.gsm_signal_imei_xxxx_linkquality is Unknown and - sensor.gsm_signal_imei_xxxx is no longer present in HA

If the SMS integration is removed and added again, by default the GSM signal sensor is not enabled.
You have to manually enable the entity.
Use device /dev/serial/by-id/usb-HUAWEI_HUAWEI_Mobile-if00-port0

I am running with latest and have no issue.

With the newest supervisor, you can now specify /dev/serial/by-id/usb-HUAWEI_HUAWEI_Mobile-if00-port0 as your device, instead of /dev/ttyUSB2.
Please use this new name as this ensures that you are always using the correct device.

/dev/serial/by-id/usb-HUAWEI_HUAWEI_Mobile-if00-port0

Can you make sure the GSM signal entity is enabled?

Thank you for advice Oscar_Calvo, I updated the core to core-2021.9.4, of course the integration stopped working, I deleted it, restarted the HA, added the SMS integration again with device / dev / serial / by-id / usb-HUAWEI_HUAWEI_Mobile-if00-port0 , I manually turned on the sensor.gsm_signal_imei_xxxxxxxx, restarted the HA and now the integration works, I can send SMS again