I ended up buying a https://www.amazon.com/NooElec-NESDR-Mini-Compatible-Packages/dp/B009U7WZCA/ after having some concern about which dongle to get due to some complaints of them getting hot, but this one doesn’t get hot and I had it shipped from China to get it cheaper. Used an old raspberry pi2 with a custom image that had rtl433 and some other stuff already installed.
I downloaded a Raspberry Pi image that already had everything I would need (rtl_433 for sniffing, supervisor for launching rtl_433 on startup) from this video and followed the first half of this guide ( https://www.youtube.com/watch?v=z1y6j8-V7J0&feature=emb_title ) for setting up pushing it to my HAS MQTT server. rtl_433 has a library built-in for Simplisafe and an MQTT messaging service built-in so you don’t need to mess with python scripts.
Using that guy’s image, I used putty/kitty to SSH in. I then set the device to use a static IP (google this if you don’t know how) and edited my supervisor.conf (to make rtl_433 autostart on boot and restart on crashes);
sudo nano /etc/supervisor/conf.d/rtl_433.conf
with;
command=/home/pi/rtl_433/build/src/rtl_433 -R 102 -F "mqtt://IPOFYOURMQTTSERVER:1883,user="mqtt username",pass="mqtt password",events=Simplisafe"
and also ran
sudo raspi-config
to change my timezone on the preconfigured image and enabled auto login on the pi.
sudo nano /etc/supervisor/conf.d/rtl_433.conf
with contents
command=/home/pi/rtl_433/build/src/rtl_433 -q -R 102 -F "mqtt://LOCALMQTTSERVERIPHERE:1883,user="YOURMQTTBROKEUSERNAMEHERE",pass="YOURMQTTPASSWORDHERE",events=Simplisafe"
user=pi
autostart=yes
autorestart=yes
startretries=100
stderr_logfile=/var/log/rtl_433/rtl_433.err.log
stdout_logfile=/var/log/rtl_433/rtl_433.log
and then an automation for each sensor.
here are two separate automations for automations.yaml. one pushes notifications to an LGTV and the other announces sensor open messages to a google home speaker. each sensor has it’s own automation because i also have a page in my lovelace ui that allows me to toggle off and on each one in case i don’t want to monitor a certain sensor on certain days.
- id: '1610264389167'
alias: Justin's TV - Justin's Room South Window Sensor
description: 1P8JN
trigger:
- platform: mqtt
topic: Simplisafe
condition:
- condition: template
value_template: '{{ trigger.payload_json.device == "1P8JN" }}'
action:
- choose:
- conditions:
- condition: template
value_template: '{{ trigger.payload_json.extradata == "Contact Open" }}'
sequence:
- service: notify.bedroom_tv
data:
message: Justin's Room South Window Opened
data:
icon: /config/www/images/window-open.png
- id: '1610330537969'
alias: CCMini - Jon South Window
description: 1PBWF
trigger:
- platform: mqtt
topic: Simplisafe
condition:
- condition: template
value_template: '{{ trigger.payload_json.device == "1PBWF" }}'
action:
- choose:
- conditions:
- condition: template
value_template: '{{ trigger.payload_json.extradata == "Contact Open" }}'
sequence:
- service: tts.google_translate_say
data:
entity_id: media_player.home_assistant_speaker
message: South Window Open, Jon's Room
- conditions:
- condition: template
value_template: '{{ trigger.payload_json.extradata == "Contact Closed Giving
False Alerts" }}'
sequence:
- service: tts.google_translate_say
data:
entity_id: media_player.home_assistant_speaker
message: South Window Open, Jon's Room
default: []
- delay: '6'
mode: single
and for a Lovelace sensor setup;
in configuration.yaml, we’ll add some input_text labels for each sensor to make the initial state of the label not say “Unknown” and just be blank instead, so our sensor cards aren’t cluttered with “Unknown” messages for sensors that haven’t been triggered yet;
input_text:
mostrecentlyusedsensor:
name: Unavailable
initial: ''
lastusedsidedoor:
name: Unavailable
initial: ''
lastusedgaragehallwaydoor:
name: Unavailable
initial: ''
in automations.yaml, we will make a single automation that checks our MQTT messages for each sensor’s name in a “Contact Open” status. when it sees this, it writes the date to our friendly name labels we made above.
- id: '1610658657522'
alias: Most Recent Entry Sensor
description: Most Recently Triggered
trigger:
- platform: mqtt
topic: Simplisafe
condition:
- condition: template
value_template: '{{ trigger.payload_json.extradata == "Contact Open" }}'
action:
- choose:
- conditions:
- condition: template
value_template: '{{ trigger.payload_json.device == "1P7U5" }}'
sequence:
- service: input_text.set_value
data:
value: '{{ now().strftime("%a, %b %d at %I:%M %p")}}'
entity_id: input_text.lastusedsidedoor
- conditions:
- condition: template
value_template: '{{ trigger.payload_json.device == "1M6WC" }}'
sequence:
- service: input_text.set_value
data:
value: '{{ now().strftime("%a, %b %d at %I:%M %p")}}'
entity_id: input_text.lastusedgaragehallwaydoor
default: []
mode: single
repeat with a new condition: template
for every sensor you have ( trigger.payload_json.device is the serial of your respective sensor ).
For a card that shows the most recently triggered sensor, we will use this automation snippet. Append a new condition: template for each sensor.
- id: '1610658647527'
alias: Most Recent Entry Sensor Overall
description: Most Recently Triggered Overall
trigger:
- platform: mqtt
topic: Simplisafe
condition:
- condition: template
value_template: '{{ trigger.payload_json.extradata == "Contact Open" }}'
action:
- choose:
- conditions:
- condition: template
value_template: '{{ trigger.payload_json.device == "1P7U5" }}'
sequence:
- service: input_text.set_value
data:
value: Side Door on {{ now().strftime("%a, %b %d at %I:%M %p")}}
entity_id: input_text.mostrecentlyusedsensor
- conditions:
- condition: template
value_template: '{{ trigger.payload_json.device == "1M6WC" }}'
sequence:
- service: input_text.set_value
data:
value: Garage Hallway Door on {{ now().strftime("%a, %b %d at %I:%M %p")}}
entity_id: input_text.mostrecentlyusedsensor
default: []
mode: single
and the Lovelace markdown card code for most recently used sensor;
type: markdown
content: |
<ha-icon icon="mdi:alert"></ha-icon> {{ states('input_text.mostrecentlyusedsensor') }}
title: Most Recently Activated
and for doors and windows;
type: markdown
content: |-
<ha-icon icon="mdi:door"></ha-icon> Side Door -
{{ states('input_text.lastusedsidedoor') }}
---
<ha-icon icon="mdi:door"></ha-icon> Front Door -
{{ states('input_text.lastusedfrontdoor') }}
---
<ha-icon icon="mdi:door"></ha-icon> Patio Door -
{{ states('input_text.lastusedpatiodoor') }}
title: Doors
type: markdown
content: |
<ha-icon icon="mdi:window-closed-variant"></ha-icon> Left Bay Window -
{{ states('input_text.lastusedleftbaywindow') }}
---
<ha-icon icon="mdi:window-closed-variant"></ha-icon> Right Bay Window -
{{ states('input_text.lastusedrightbaywindow') }}
---
<ha-icon icon="mdi:window-closed"></ha-icon> Kitchen Window -
{{ states('input_text.lastusedkitchenwindow') }}
title: Windows