PIR Motion help

Hi all

Newbie here. I need help with setting up a PIR sensor with my raspberry pi and linking it to HA. I have lights which are controlled by MQTT as a switch which I have integrated it fine with HA.

I now want to make use of my PIR hanging around in the house and want the MQTT lights to turn on when a motion is detected and go off after 15 seconds.

Can anyone please help me with this?

Many thanks.

Welcome ! What you want to achieve can be done using automations… Look at https://home-assistant.io/getting-started/automation/
to get an idea of how it works. If you can’t get it to work show your config here and we’ll try and help to get it working… Happy automating !

Hi

Thanks for the reply.

I have had a look into that earlier but I need my PIR motion sensor to be working. If I was to connect my PIR to my pi it won’t work efficiently as my pi is hidden behind my TV. I need a esp8266 chip to integrate with my PIR and HA which is running on the pi.

I do require a script for the esp8266 chip for the PIR which is the hard part. I guess integrating it with HA will be the last part and straightforward !