mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-25 10:17:23 +00:00
Update sms.markdown
This commit is contained in:
parent
be3f86f07b
commit
d15726e316
@ -1,6 +1,49 @@
|
|||||||
# Local SMS notifications integration via GSM Modem
|
---
|
||||||
This integration allows to have a local execution SMS notification. This is ideal when the internet is offline or when the power goes out.
|
title: "SMS"
|
||||||
|
description: "SMS notification via GSM modem."
|
||||||
|
ha_category:
|
||||||
|
- Notifications
|
||||||
|
ha_release: 0.104.5
|
||||||
|
---
|
||||||
|
|
||||||
|
The `sms` integration allows to have a local execution SMS notification. This is ideal when the internet is offline or when the power goes out.
|
||||||
|
|
||||||
|
To enable those notifications in your installation, add the following to your `configuration.yaml` file:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
# Example configuration.yaml entry
|
||||||
|
sms:
|
||||||
|
device: /dev/ttyUSB2
|
||||||
|
|
||||||
|
notify:
|
||||||
|
- platform: sms
|
||||||
|
name: sms_person1
|
||||||
|
phone_number: !secret notify_sms_person1
|
||||||
|
- platform: sms
|
||||||
|
name: sms_person2
|
||||||
|
phone_number: !secret notify_sms_person2
|
||||||
|
```
|
||||||
|
And the screts yaml:
|
||||||
|
```
|
||||||
|
sms_person1: "+1NNNNNNNNNN"
|
||||||
|
sms_person2: "+1NNNNNNNNNN"
|
||||||
|
```
|
||||||
|
Replace the NNN for the actual phone numbers
|
||||||
|
|
||||||
|
{% configuration %}
|
||||||
|
device:
|
||||||
|
description: The gsm modem device.
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
{% endconfiguration %}
|
||||||
|
|
||||||
|
To use notifications, please see the [getting started with automation page](/getting-started/automation/).
|
||||||
|
|
||||||
|
It requires hassos version [3.6](https://github.com/home-assistant/hassos/releases/tag/3.6) or higher.
|
||||||
|
Check that the modem is recognized by running:
|
||||||
|
```
|
||||||
|
ls -l /dev/*USB*
|
||||||
|
```
|
||||||
# Required Hardware
|
# Required Hardware
|
||||||
You will need a USB GSM stick modem.
|
You will need a USB GSM stick modem.
|
||||||
## List of modems known to work:
|
## List of modems known to work:
|
||||||
@ -8,32 +51,9 @@ You will need a USB GSM stick modem.
|
|||||||
Need to unlock it using [this guide](http://blog.asiantuntijakaveri.fi/2015/07/convert-huawei-e3372h-153-from.html))
|
Need to unlock it using [this guide](http://blog.asiantuntijakaveri.fi/2015/07/convert-huawei-e3372h-153-from.html))
|
||||||
## [List of modems that may work](https://www.asus.com/event/networks_3G4G_support/)
|
## [List of modems that may work](https://www.asus.com/event/networks_3G4G_support/)
|
||||||
|
|
||||||
# Configuration
|
|
||||||
It requires hassos version [3.6](https://github.com/home-assistant/hassos/releases/tag/3.6) or higher.
|
|
||||||
Check that the modem is recognized by running:
|
|
||||||
```
|
|
||||||
ls -l /dev/*USB*
|
|
||||||
```
|
|
||||||
|
|
||||||
## Home Assistant config
|
## Home Assistant config
|
||||||
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
|
|
||||||
|
|
||||||
## Note about Raspberry
|
## Note about Raspberry PI 4
|
||||||
On Raspberry PI 4, you need a udev rule in the config USB stick, for the [Huawei E3372-510 stick](https://www.amazon.com/gp/product/B01N6P3HI2/ref=ppx_yo_dt_b_asin_title_o00_s00?ie=UTF8&psc=1) for it to be recognized.
|
On Raspberry PI 4, you need a udev rule in the config USB stick, for the [Huawei E3372-510 stick](https://www.amazon.com/gp/product/B01N6P3HI2/ref=ppx_yo_dt_b_asin_title_o00_s00?ie=UTF8&psc=1) for it to be recognized.
|
||||||
This config is:
|
This config is:
|
||||||
```
|
```
|
||||||
@ -48,3 +68,5 @@ ACTION=="add" \
|
|||||||
|
|
||||||
## More details:
|
## More details:
|
||||||
- [Original thread discussion](https://community.home-assistant.io/t/send-sms-with-usb-gsm-modem-when-alarm-triggered/28942/38)
|
- [Original thread discussion](https://community.home-assistant.io/t/send-sms-with-usb-gsm-modem-when-alarm-triggered/28942/38)
|
||||||
|
|
||||||
|
#
|
||||||
|
Loading…
x
Reference in New Issue
Block a user