So I looked around for a bit and I didn’t see anything on this. So I figured it might be best for me to post this.
For this we will be using a eMACROS Pro 4 Solar Driveway Alarm with App, 1/2 Mile Wireless Range.
You will need to have RTL system like RTL-SDR Blog V3 R860 RTL2832U 1PPM TCXO HF Bias Tee SMA Software Defined Radio with Dipole Antenna Kit.
After plugging this in, in your add on get this GitHub - pbkhrv/rtl_433-hass-addons: Collection of Home Assistant add-ons that use rtl_433
And you will need MQTT MQTT - Home Assistant
After getting this and starting RTL go to your file manager and add (or replace your config with) the following settings. Note the custom decoder line:
# Output to Home Assistant
output mqtt://core-mosquitto:1883,user=YOUR_USER,pass=YOUR_PASS,retain=0
output kv
# Standard Frequency
frequency 433.92M
# CRITICAL: Custom Decoder for eMacros FSK
# This listens for the specific pulse width and modulation of the HS-006W
decoder n=eMacros,m=FSK_PWM,s=412,l=1240,r=14224,g=1252,t=328,y=0
For the username and password just make a separate account on the home assistant and password.
Save and restart the add on. Then go to the devices and go down to mqtt. Look for Mosquitto Mqtt Broker, and click the gear. Put
rtl_433/+/events
in Listen to a topic.
What you want to do then is start listing and walk in front of the sensor. You should see eMacros and stop it when you do.
Now for this next part you can spend all day working it, but AI is really good at this. Let it know you are trying to add the eMacro’s sensors to your home assistant, you scan it, and paste in what you logged.
Or you can take a look a the code. The signal will look fragmented (like count: 50), but the last few codes are consistent and unique to each sensor.
"codes": ["{1}8", "{1}8", ... "{2}4", "{1}8", "{3}e"]
Write down the unique ending code for each sensor.
Now you need to simply make the sensor in configuration.yaml.
Use the prior or have the AI write it for you, but it should be something like
mqtt:
binary_sensor:
# Sensor 1: Driveway (Ends in 3e)
- name: "Driveway Alarm"
unique_id: "driveway_motion_mqtt"
state_topic: "rtl_433/+/events"
device_class: motion
off_delay: 5
value_template: >
{% if value_json.model == 'eMacros' and '{3}e' in value_json.codes %}
ON
{% else %}
OFF
{% endif %}
# Sensor 2: Side Yard (Ends in 1f)
- name: "Side Yard"
unique_id: "side_yard_motion_mqtt"
state_topic: "rtl_433/+/events"
device_class: motion
off_delay: 5
value_template: >
{% if value_json.model == 'eMacros' and '{1}f' in value_json.codes %}
ON
{% else %}
OFF
{% endif %}
Then restart the machine. Then they should show up in your device list.
Now you have the sensor hooked up
