How to take a snapshot / record a video with your Foscam IP camera

How to take a snapshot / record a video with your Foscam IP camera

Hi guys,

In this article we have seen how to add a Foscam IP camera to your Home Assistant environment.

Today I want to introduce how to take a snapshot and record a video using your Foscam camera.

What you need in terms of hardware

  1. A Foscam IP camera at your choice connected to your LAN network.

Software configuration

  1. Home Assistant. I'm currently running version?2022.9.4.
  2. Foscam integration?to control your IP camera. As soon as your Foscam IP camera has been integrated in Home Assistant the new entity camera.your_camera_name will become available as well as a list of services to interact with it.
  3. Within your configuration.yaml file you have to add the following lines of code to:

  • define a list of folders that can be used as sources for sending files

allowlist_external_dirs:
? - /config/your_folder_for_camera_snapshots_records        

Home Assistant code (yaml) / procedure

These are the steps you have to follow in order to take a snapshot and record a video:

  • Developer Tools -> Services

No alt text provided for this image

  • Select the service Camera: Take snapshot

No alt text provided for this image

  • Select the entity from which take the snapshot and set the filename to be created for the snapshot. Be carefully to use the same path defined before with the allowlist_external_dirs

No alt text provided for this image

  • Click on the Call Service button to taking the snapshot

No alt text provided for this image

  • Select the service Camera: Record

No alt text provided for this image

  • Select the entity from which recording the video

No alt text provided for this image

  • Set the filename to be created for the video. Be carefully to use the same path defined before with the allowlist_external_dirs
  • Set the video's duration

No alt text provided for this image

  • Click on the Call Service button to recording the video

No alt text provided for this image

  • Open the Media tab on the left of your Home Assistant interface

No alt text provided for this image

  • Browse the folder on which the snapshot and video have been saved to get them:

No alt text provided for this image

Some specifics about the steps above

  1. The path for saving the snapshot and video is strictly related to your Home Assistannce installation.
  2. In my setup Home Assistant is installed and running on a QNAP NAS.

Thank you for reading. ?? I hope you have enjoyed this article.

I'm available for any feedback so, feel free to contact me or share your thoughts in the comments section below.

Your feedbacks will be very appreciated!

Meanwhile,?if you liked this article share it or?subscribe?to my newsletter?about?Home Assistant?to read all previous episodes and still up to date on latest news.

要查看或添加评论,请登录

Emiliano Guerzoni的更多文章

社区洞察

其他会员也浏览了