interactionresearchstudio / NaturewatchCameraServer

A Python / OpenCV camera server to stream Pi camera content to a remote client through a website.
https://mynaturewatch.net
GNU General Public License v3.0
103 stars 48 forks source link

Some alterations that improve stability for me #4

Closed MrChaz closed 6 years ago

MrChaz commented 6 years ago

Add a threading lock around saving a file so we only do one at a time. Add some try/except blocks to stop the changedetector from completely stopping the case of some error Make sure we clear the image buffers before updating them to prevent a crash when they're presumably not empty (https://stackoverflow.com/questions/40065328/picameravalueerror-incorrect-buffer-length-for-resolution-1920x1080)

mikevanis commented 6 years ago

Hi @MrChaz, thanks for this. I'll give it a whirl and implement it in the next release. We're scheduled to release the next one this week.

MrChaz commented 6 years ago

I've made some more changes to hopefully check the input values match what the camera expects and recover from a possible error if they don't Also exposed an API for getting the temperature

mikevanis commented 6 years ago

We have now merged this. Unfortunately, we can't accept the CPU temperature method and GET request, as it's not a mainstream feature. Feel free to debate our decision on the forum with other users :)

Thanks for your logging and stability enhancements 🥇 @MrChaz 🥇