Skip to content

Commit

Permalink
Dial support for sim800l component
Browse files Browse the repository at this point in the history
  • Loading branch information
spilin committed Feb 21, 2021
1 parent b387f24 commit 45a589f
Showing 1 changed file with 33 additions and 3 deletions.
36 changes: 33 additions & 3 deletions components/sim800l.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ Sim800L Component
=================

.. seo::
:description: Instructions for setting up the SIM800L GSM module to send and receive SMS in ESPHome.
:description: Instructions for setting up the SIM800L GSM module to dial, send and receive SMS in ESPHome.
:image: sim800l.jpg
:keywords: SMS SIM800L GSM

The ``SIM800L`` Component provides the ability to send and receive SMS text messages. The device must be
The ``SIM800L`` Component provides the ability to dial, send and receive SMS text messages. The device must be
connected via a :doc:`UART bus </components/uart>` supporting both receiving and transmitting line.
The UART bus must be configured at the same speed of the module which is by default 9600bps.
The required connection wires are ``+VCC``, ``GND``, ``RX`` and ``TX``.
Expand Down Expand Up @@ -92,6 +92,27 @@ Send a SMS message to a phone recipient using this action in automations.
message: !lambda |-
return id(reed_switch).state ? "Door is now OPEN" : "Hey door just CLOSED";
.. _sim800l-dial_action:

``sim800l.dial`` Action
---------------------------

Dial to a phone recipient using this action in automations.

.. code-block:: yaml
on_...:
then:
- sim800l.dial:
recipient: '+15551234567'
# Templated:
- sim800l.dial:
recipient: !lambda |-
if (id(reed_switch).state) return "+15551234567";
else return "15551234568";
Configuration options:

- **recipient** (***Required**, string, :ref:`templatable <config-templatable>`): The message recipient.
Expand All @@ -112,7 +133,7 @@ Getting started with Home Assistant
-----------------------------------

The following code will get you up and running with a configuration updating received messages
on Home Assistant and will also setup a service so you can send messages with your SIM800L.
on Home Assistant and will also setup a service so you can send messages and dial with your SIM800L.

.. code-block:: yaml
Expand All @@ -126,6 +147,12 @@ on Home Assistant and will also setup a service so you can send messages with yo
- sim800l.send_sms:
recipient: !lambda 'return recipient;'
message: !lambda 'return message;'
- service: dial
variables:
recipient: string
then:
- sim800l.dial:
recipient: !lambda 'return recipient;'
text_sensor:
- platform: template
Expand Down Expand Up @@ -159,6 +186,9 @@ To trigger the automation from Home Assistant you can invoke the service with th
data:
recipient: "+15551234567"
message: "Hello World!"
- service: esphome.livingroom_dial
data:
recipient: "+15551234567"
Relay management commands received from an authorized sender:
Expand Down

0 comments on commit 45a589f

Please sign in to comment.