One of the UK suppliers (PiHut? Pimoroni? One of those two) was advertising a webcam for Pis.Bosse_B wrote: ↑Tue Aug 18, 2020 3:11 pmI would like to be able to watch some equipment I control through an RPi3 unit so I can verify correct operation.
I am myself across the ocean from the RPi3 and the prototype so it would be a way to monitor what happens...
It is possible to direct tech people on location to set it up if it is not too complex, either on a second RPi or the one I use for control.
This sounds exactly like what I need!DAI-X wrote: ↑Tue Aug 18, 2020 8:43 pmI have built something similar to what I think you are after
Put simply I used "web.py" This is a simple python-based http server which runs a python script when you connect to an IP address on a Pi equipped with a USB webcam (ebay special!). I can do this anywhere via my phone browser.
The web.py script when requested takes a photo, and then generates and returns a simple html page with the image embedded in it.
The beauty if this is it has no performance overhead unless the webpage is actually requested. It works well if you only want static images infrequently / on request. It does take a few seconds to take the photo and update the webpage but I suspect this won't be a problem to you either. It runs on a Pi 1 so maybe a 3 would be quicker.
if you want some more info I can post some code to help you
Code: Select all
import web import time import commands import urllib urls = ( '/', 'index' ) data="" class index: def GET(self): a=commands.getoutput("sudo fswebcam -d /dev/video0 --fps 3 -S 3 --subtitle CAMERA -r 640x480 /home/pi/web.py/static/camera.jpg") data= '<!DOCTYPE html>' data=data+'<html>' data=data+'<body>' data=data+'<b> CAMERA OUTPUT </b>' data=data+'<img src="/static/camera.jpg" alt="HTML5 Icon">' data=data+'<body>' data=data+'<html>' return data if __name__ == "__main__": app = web.application(urls, globals()) time.sleep(1) app.run()