Hi all,
I needed to cover a state when my connectivity to the internet is broken, but I still need to send an SMS to my phone about a triggered alarm.
It exists some online services called SMS Gateways, but you still need connectivity to the internet to use it.
So I have created from my old GSM modem a local SMS gateway and integrated to my HA instance.
You can install it everywhere where you have an installed Python (raspberry pi, general Linux distro, etc.)
You can run my SMS gateway inside Docker as well.
You can find the guide how to install an run it on my GitHub page:
https://github.com/pajikos/sms-gammu-gateway
Home Assistant Integration Example:
Signal Strength sensor
- platform: rest
resource: http://xxx.xxx.xxx.xxx:5000/signal
name: GSM Signal
scan_interval: 30
value_template: '{{ value_json.SignalPercent }}'
unit_of_measurement: '%'
SMS notification
notify:
- name: SMS GW
platform: rest
resource: http://xxx.xxx.xxx.xxx:5000/sms
method: POST_JSON
authentication: basic
username: admin
password: password
target_param_name: number
message_param_name: text
Using in Automation
- alias: Alarm Entry Alert - Garage Door
trigger:
platform: state
entity_id: binary_sensor.garage_door
state: 'on'
condition:
- platform: state
entity_id: alarm_control_panel.alarm
state: 'armed_home'
action:
service: notify.sms_gw
data:
message: 'alert, entry detected at garage door'
target: '+xxxxxxxxxxxx'
GSM Signal Strength Indicator