Request Status message from Home Assistant (no external access needed)

Request Status message from Home Assistant (no external connection needed)


Workflow:

  1. Send an email from [email protected] to [email protected]
  2. Home Assistant Polls on the [email protected] email account and Response with an email including Status Information

Requirement

You need an Email account only for Home Assistant. Example: [email protected]


Configuration in Home Assistant

Unread Email Sensor:

sensor:
  - platform: imap
    name: imap_state_req
    server: imap.strato.de
    port: 993
    username: [email protected]
    password: 123abc!

SMTP Notification

notify:
  - name: smtp_state_ans
    platform: smtp
    server: smtp.strato.de
    port: 587
    timeout: 15
    sender: [email protected]
    starttls: true
    username: [email protected]
    password: 123abc!
    recipient:
      - [email protected] 
    sender_name: Home Assistant

Automation (The snapshot1.jpg is only to make it work - it seems like a bug. The .jpg don’t have to exist!)

automation:
  - id: statreq
    alias: Reagiere auf Status Anfragen
    trigger:
      platform: state
      entity_id: sensor.imap_state_req
    action:
      service: notify.smtp_state_ans
      data_template:
        title: 'Home Assistant Status'
        message: 'Status'
        data:
            images:
                - /home/pi/snapshot1.jpg
            html: >
                 This is my email text! <br>
                 Status Alarmanlage: {{ states.binary_sensor.myownsensorentity.state }}  <br>
                 Temperature: {{ states.sensor.myownsensorentity.state }} 

Security

The email will be send only to your own email account. In this example: [email protected]
Nobody can grab your Information.


3 Likes