Send SMS with USB GSM modem when alarm triggered

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.

I also don’t see any event for received SMS.

Is it already included on HA 0.112?

According to the release notes linking to pull 37015

Yes, but it seems not be working, the incoming.

No logs at all, no event triggered. Weird.

Some Huawei modems provide 2 serial interfaces, only of them can actually receive SMS notifications but both can send SMS.
If you are in this boat try to change the serial device to the other one.

Can you post your logs?