jcallaghan / home-assistant-config

My Home Assistant configuration & documentation.
https://www.jcallaghan.com/
MIT License
175 stars 8 forks source link

Weather station - Weather/sky camera 🌤📸 #41

Open jcallaghan opened 4 years ago

jcallaghan commented 4 years ago

Weather/sky camera

Notes

Originally posted by @jcallaghan in https://github.com/jcallaghan/home-assistant-config/issues/13#issuecomment-624072861

jcallaghan commented 4 years ago

Sun and moon time lapse

I was planning to use mount the camera on an arm and mount to the weather station frame however I just caught at lovely time lapse of the full moon on a CCTV camera that is West facing.

jcallaghan commented 4 years ago

Found a cool ESP32Cam case/shield on Thingiverse. I will print this to protect the ESP board and then house it in an outdoor-rated case.

image

jcallaghan commented 4 years ago

I will try housing the camera in this IP68 case. Not sure how this will perform in low light and with condensation etc.

Additionally, I may spray paint this black to blend it in more.

image

jcallaghan commented 4 years ago

I picked up a fisheye lens to try. I will take print a cover for the board and take it outside to test with alongside the stock lens.

image

adonno commented 4 years ago

I will try housing the camera in this IP68 case. Not sure how this will perform in low light and with condensation etc.

Additionally, I may spray paint this black to blend it in more.

image

maybe add silica Gel ?

jcallaghan commented 4 years ago

Flashing

Device flashed. Had some trouble with it but when I used 5v it worked a lot better. Don't forget G0 to GND and to remove it when done flashing.

Useful troubleshooting guide for ESP32Cam boards.

jcallaghan commented 4 years ago

Adjustable camera settings

image

jcallaghan commented 4 years ago

Printed the case which fitted very nicely.

image

image

image

image

jcallaghan commented 4 years ago

Will need to include a hole for the wifi antenna.

image

image

jcallaghan commented 4 years ago

Abandoning ESP32Cam for the project

ESPHome doesn't publish a feed so I wasn't able to connect to it via MotionEye. I struggled with connectivity even with an external antenna and it was likely due to this that the video feed had a lot of lag.

I remembered I had an old Foscam FI9901 under the stairs so I dug it out and thought I would try this using this out of the project. I've blocked all internet traffic in and out to it (unless I am doing a firmware update).

Granted the camera position is not equal but the Foscam is able to deliver such a higher quality image and the result of any timelapse will likely be the same.

ESP32Cam

image

Foscam

image

jcallaghan commented 4 years ago

Timelapse software

Insights

Name Calculation Value
Timelapse frequency 5 seconds
Minutes in a day 24 * 60 1,440
Total daily pictures minutes in a day x timelapse frequency 17,280
Video length @ 30fps (mins) (total daily pictures / 30fps) / 60-seconds 9.6
Video length @ 40fps (mins) (total daily pictures / 40fps) / 60-seconds 7.2

Research

image

jcallaghan commented 4 years ago

MotionEye fried my SD card - Docker it is

Not off to a great start with Motion Eye on my Raspberry Pi. It fried my SD card or contributed to some form of corruption. But in a good way, it has forced me to rebuild it and move it over to my Docker server. I used the instructions here to set up MotionEye on Docker.

MotionEye connects to my Foscam via rtsp://0.0.0.0:88/videoMain and it is running on the standard port 8765. I have disabled all the camera components except video and still images. The still image configuration is:

File Name %Y-%m-%d/%v
Image quality: 100%
Capture mode: Interval snapshots
Snapshot interval: 10 seconds
Preserve pictures: For one week
Enable manual snapshots: off

FFMPEG

While researching timelapse I came across ffmpeg and some other useful articles on creating timelapse videos.

Research