Rainmeter is my favourite way to put live information on a spare monitor. The one thing it refuses to do is fetch an image from an HTTPS address with a self-signed certificate. Almost every IP camera on my network has exactly that, so the WebParser measure just sits there and the tile stays blank.

There is no option in Rainmeter to ignore certificate errors, and I did not want to install a proper certificate on every camera. The fix I settled on is a tiny local proxy: a Python script that fetches the snapshot from the camera over HTTPS without verifying the certificate, and hands it back to Rainmeter over plain HTTP on localhost.

The proxy

The whole thing is a Flask app of about twenty lines. Each route maps a short name to a camera snapshot URL.

from flask import Flask, Response
import requests, urllib3

urllib3.disable_warnings()
app = Flask(__name__)

CAMERAS = {
    "front": "https://camera-front.lan/snap.jpeg",
    "drive": "https://camera-drive.lan/snap.jpeg",
}

@app.route("/cam/<name>")
def cam(name):
    r = requests.get(CAMERAS[name], verify=False, timeout=5,
                     auth=("viewer", "secret"))
    return Response(r.content, mimetype="image/jpeg",
                    headers={"Cache-Control": "no-store"})

app.run(host="127.0.0.1", port=5000)

It listens on 127.0.0.1 only, so nothing else on the network can reach it, and the camera credentials never leave the PC. Use a read-only camera account if your cameras support one.

Running it as a Windows service

I did not want a console window open all day, so I wrapped the script with NSSM (the Non-Sucking Service Manager).

nssm install CamProxy "C:\Python\python.exe" "C:\camproxy\app.py"
nssm set CamProxy AppDirectory C:\camproxy
nssm set CamProxy Start SERVICE_AUTO_START
nssm start CamProxy

It now starts with Windows and restarts itself if Python falls over.

The Rainmeter side

Rainmeter only needs to download a file from the proxy and show it.

[MeasureFront]
Measure=WebParser
URL=http://127.0.0.1:5000/cam/front
Download=1
UpdateRate=1

[MeterFront]
Meter=Image
MeasureName=MeasureFront
W=480
H=270

With UpdateRate=1 and the skin’s Update=1000, you get roughly one frame a second, which is plenty for a glance at who is at the door.

Why not just fix the certificates?

You can, and for anything exposed outside the LAN you should. For a handful of cameras that only ever talk to one PC, the proxy is less work, it keeps the credentials in one file, and it gives me a place to add things later, such as resizing the snapshot or caching it for several skins. It became the foundation of the full CCTV and weather display I wrote about later.