Record camera feed based on motion detection

Sorry, another noob question. I’m totally new to HA. I finally got my Yi camera integrated and now I’d like it to record based on motion detection. Is there by any chance a guide for that? Thanks!

Update: I tried to create such an automation, but I quickly ran into issues (mainly because of my lack of understanding how HA works). For example, my camera (which is working, BTW) does not appear in the devices list…

Update 2: i-hack-v4 supposedly supports motion detection- the manual says " MQTT - detect motion directly from your home server!"

Use frigate here in the forum …it’s the 100% solution for CCTV

Thanks. I just read about Frigate and it appears to be an overkill. I don’t need object detection - the camera has motion detection capabilities and that’s all I need.

Ok …I Just realized without stream component it’s without delay but has only a few pics per second … well enough I guess

Thanks. I’m starting to wonder - should I be using HA for this to begin with? Maybe a dedicated NVR software is the way to go…