This integration allows to have a local execution SMS notification. This is ideal when the internet is offline or when the power goes out.
You will need a USB GSM stick modem.
- Huawei E3372-510( Need to unlock it using this guide)
It requires hassos version 3.6 or higher. Check that the modem is recognized by running:
ls -l /dev/*USB*
In home assistant you need to configure your yaml notification as:
notify:
- platform: command_line
name: sms_person1
command: !secret notify_sms_person1
- platform: command_line
name: sms_person2
command: !secret notify_sms_person2
And the screts yaml:
notify_sms_person1: "/config/custom_components/sms/send_sms.sh +1NNNNNNNNNN /dev/ttyUSB2"
notify_sms_person2: "/config/custom_components/sms/send_sms.sh +1NNNNNNNNNN /dev/ttyUSB2"
Replace the NNN for the actual phone numbers
On Raspberry PI 4, you need a udev rule in the config USB stick, for the Huawei E3372-510 stick for it to be recognized. This config is:
udev\10-gsm-modem.rules
ACTION=="add" \
, ATTRS{idVendor}=="12d1" \
, ATTRS{idProduct}=="14fe" \
, RUN+="/sbin/usb_modeswitch -X -v 12d1 -p 14fe"