Send SMS with USB GSM modem when alarm triggered

Thanks for the feedback, could you file an issue in github?

I am happy to announce that I have a PR that implements incoming SMS notifications

5 Likes

Hi everyone.
I have a Huawei E3531 and I’ve tried to set up sms notification. I’m running my Hass.io under Ubuntu 18.04.4 LTS with docker. I’ve followed the instructions on HA integrations site but without success.
Here is my result (all done with root):

  1. Run lsusb - done. I’ve found out the vendor and product id’s.
  2. I’ve made a file with the name 10-gsm-modem.rules in the udev folder on a blank USB stick and copied the sample text, replaced with my vendor and product id’s.
  3. I’ve rebooted the NUC with both the USB stick and the GSM modem inserted.
  4. After the reboot the ls -l /dev/USB command returns this:
    “ls: cannot access ‘/dev/USB’: No such file or directory”

Please can somebody help me out with this? Thank you.

I believe the rules file and config stick step does not apply for you. This is only required if your are running Hassio under a raspberry PI hardware.
Are you adding the asterisk before and after the word USB?
e.g.: ls -l /dev/*USB*

Thank you for your reply. I had to enter this command:

usb_modeswitch -v 12d1 -p 1f01 -I -M '55534243123456780000000000000011062000000100000000000000000000'

Now my problem is that it does not retain this config and after reboot it goes back to mass storage mode. (I have to enter to above command again and again)

Hi,

I’m trying to unlock Huawei E3372h-153 stick. I’m not able to download the ZIP-pack from the blog linked in modem listing. Does anyone have that ZIP-package and be able to share it?

Thanks

Hello.
I run Hass.io on a PI 4.
I have a Huawei E3531 modem and I created a udev folder on a stick and then a notepad file called 10-gsm-modem.rules. Is the notepad file ok or do I need another type of file?
I’ve found out the vendor and product id’s.
In the notepad file I put the following:

ACTION == "add" \
, ATTRS {idVendor} == "12d1" \
, ATTRS {idProduct} == "1f01" \
, RUN + = "/ sbin / usb_modeswitch -X -v 12d1 -p 1f01"

After the reboot the ls -l /dev/USB command returns this:
ls: /dev/USB: No such file or directory
I put an asterix before and after the word USB.
image

I’ve been trying for two days …
I need help.
THX

Hi,

I got my Huawei E3372h-153 working with this guide: https://markus.relix.de/index.php/Set_Huawei_E3372h_from_hilink_to_stick_mode

This is great news !!! one question does the USB stick with the configuration needs to stay connected all the time ?

Can someone help me?
I really need that.
I want to install a system at a holiday home (there is no internet) and I would like to receive notifications at certain hours.

Depending on your version of Windows Notepad wont work. Please recreate the udev rules file using Notepad++ to be sure.
For Huawei E3531 modem you need to follow this guide to the letter to convert your device to serial mode.

Yes. It must be connected all the time. If you disconnet while hass is active your will need to restart hass. There is no support for recover the connection yet.

Did you convert the device to serial mode? If so, how did you do that?
Where did you get usb_modeswitch -v 12d1 -p 1f01 -I -M '5553424312345678000000000000001106200000010000000000000000'?
I can’t handle it at all.
THX

To make it stick, create a udev rules file with this content in a config USB stick:

ACTION=="add" \
, ATTRS{idVendor}=="12d1" \
, ATTRS{idProduct}=="1f01" \
, RUN+="/sbin/usb_modeswitch -v 12d1 -p 1f01 -I -M '55534243123456780000000000000011062000000100000000000000000000' "

Import this config into hass using the Surpervisor menu and click on “Import form USB config” on the https://hassio:8123/hassio/system

1 Like

That worked very well, thanks !!!

Saw that the PR was implemented on the last version could you let us know how it works ?

1 Like

A new event called sms.incoming_sms will be fired every time an SMS is received by the modem

I’m excited to give incoming sms this a whirl, but after upgrading to core HA v0.112.2 today (in python 3.7 venv on Ubuntu 18.04) I seem to be misunderstanding how to get it working. I’m using a Huawei E3531.

Should we expect to see the sms.incoming_sms shown in the available events list in Developer Tools > Events? If I use the ‘Listen to Events’ tool I don’t see any events fire.

SMS notifications and signal strength sensor (great addition!) work as expected.

Great component!

I have some error get it working.
Sensor stops answering.
Sms service not showing up in services.
Error when receiving sms.

See https://github.com/home-assistant/core/issues/37491

USB modem Huawei E173u

I had it working with gammu in docker image https://github.com/pajikos/sms-gammu-gateway/blob/1cc5486e7b8ca05de1a73105caec2b58a57a912b/Dockerfile

Thanks for the great work!!

After one more reboot. Everything worked fine until received new sms. Sensor stops updating.