HC-SR501 Infrared PIR Motion Sensor Module: Difference between revisions
From KlavoWiki
Jump to navigationJump to search
(Created page with "This is what I have done to get the HC-SR501 working with the D1 Mini and Home Assistant. = Device = == Module == 250px = Tasmota Settings = I conn...") |
|||
(2 intermediate revisions by the same user not shown) | |||
Line 4: | Line 4: | ||
== Module == | == Module == | ||
[[IMAGE: HC-SR501.jpg|250px]] | [[IMAGE: HC-SR501.jpg|250px]] | ||
[[IMAGE: D1_Mini.png|300px]] | |||
= Tasmota Settings = | = Tasmota Settings = | ||
Line 15: | Line 15: | ||
<pre> | <pre> | ||
SwitchTopic Kitchen_Sensor | SwitchTopic Kitchen_Sensor | ||
SwitchMode1 1 | |||
SwitchRetain on | SwitchRetain on | ||
</pre> | </pre> | ||
Line 46: | Line 46: | ||
<pre> | <pre> | ||
binary_sensor. | binary_sensor.Kitchen_Sensor: | ||
device_class: motion | device_class: motion | ||
</pre> | </pre> | ||
[[Category : Home Assistant]] [[Category : D1 Mini]] | [[Category : Home Assistant]] [[Category : D1 Mini]] |
Latest revision as of 13:27, 27 January 2020
This is what I have done to get the HC-SR501 working with the D1 Mini and Home Assistant.
Device
Module
Tasmota Settings
I connected the data line to D4 as it was besided the power pins.
Config
Tasmota
SwitchTopic Kitchen_Sensor SwitchMode1 1 SwitchRetain on
Home Assistant
/config/configurations.yaml
binary_sensor: - platform: mqtt name: "Kitchen Sensor" state_topic: "cmnd/Kitchen_Sensor/POWER" payload_on: "ON" payload_off: "OFF" device_class: motion switch: - platform: mqtt name: "Kitchen Sensor" state_topic: "stat/Kitchen_Sensor/POWER" command_topic: "cmnd/Kitchen_Sensor/POWER" payload_on: "ON" payload_off: "OFF" retain: false
/config/customize.yaml
binary_sensor.Kitchen_Sensor: device_class: motion