Skip to content

Instantly share code, notes, and snippets.

@timleland
timleland / gist:4c55cbf55b3d98c019177a4ea36860a1
Created March 10, 2025 15:25
RTSP Home Dashboard Live Streamer
#include <opencv2/opencv.hpp>
#include <SDL2/SDL.h>
#include <thread>
#include <atomic>
#include <vector>
#include <mutex>
#include <iostream>
std::vector<std::string> rtsp_urls = {
"rtsp://URL",
[Unit]
Description=Google Home Outlets
After=syslog.target network-online.target
[Service]
Type=simple
User=googlehome
ExecStart=/home/pi/googlehome.py
Restart=on-failure
RestartSec=10
# If you uncomment the following line, homebridge will log more
# You can display this via systemd's journalctl: journalctl -f -u homebridge
# DEBUG=*
#!/usr/bin/env python
import urllib, json, subprocess, time
lastCommandDate = None
url = 'https://spreadsheets.google.com/feeds/list/YOUR_SPREADSHEET_ID/1/public/values?alt=json'
while True:
time.sleep(.5)
{
"bridge":{
"name":"Homebridge",
"username":"",
"port":51925,
"pin":"xxx-xx-xxx"
},
"description":"iHome",
"accessories":[