I am working on a small project at home with a Raspberry Pi using Python to sense motion via a PIR and record a 30 second video when motion is detected - using a night vision camera. This part of the project is working and I decided to use Flask to create an endpoint server so that I could control the camera remotely (e.g. start sensing, end sensing, status page).
When the following app run configuration is used my application works - except the status page HTML is not updating on client side:
app.run(host='192.168.0.47', port=8000, debug=False)
My status endpoint route looks like this:
# status page api to return the log file in HTML format
@app.route('/status')
def status_return():
# create the status page
form_status_page()
return render_template('index.html')
The form_status_page() function creates the index.html file and is updating the file on the server side.
Is there something I need add to force the update? After some interest searches I thought the solution was to change debug to True, but this causes the following error:
picamera.exc.PiCameraMMALError: Failed to enable connection: Out of resources