Skip to content

Instantly share code, notes, and snippets.

Avatar

Brian Wilson bdwilson

  • Raleigh, NC
View GitHub Profile
View nextdns-trace.log
# nextdns trace
goroutine 26465 [running]:
main.run.func4(0x0, 0x0, 0xc0003e26d0, 0x5)
/home/runner/work/nextdns/nextdns/run.go:177 +0x80
github.com/nextdns/nextdns/ctl.(*Server).handle(0xc0000ce070, 0x55f000, 0xc00010c000, 0xc0003e26d0, 0x5, 0x0, 0x0, 0x0)
/home/runner/work/nextdns/nextdns/ctl/server.go:125 +0x140
github.com/nextdns/nextdns/ctl.(*Server).handleEvents(0xc0000ce070, 0x55f000, 0xc00010c000)
/home/runner/work/nextdns/nextdns/ctl/server.go:114 +0x154
created by github.com/nextdns/nextdns/ctl.(*Server).run
@bdwilson
bdwilson / flows.json
Last active Jul 13, 2020
Hubitat Node-Red Presence Flow
View flows.json
[
{
"id": "866a2010.a3d2f",
"type": "tab",
"label": "Hubitat Presence",
"disabled": false,
"info": ""
},
{
"id": "66b577d7.f56b48",
@bdwilson
bdwilson / hubitat_backup.sh
Last active Jun 4, 2020
Hubitat Backup (to be run on a Linux/Rpi)
View hubitat_backup.sh
#!/bin/bash
#
# Code borrowed from https://community.hubitat.com/t/solved-downloading-latest-backup-file/18065/5
#
IP=$1
DIR="$2"
if [ $# -eq 0 ]; then
@bdwilson
bdwilson / backup.sh
Last active May 31, 2020
vnstat configuration for Ubiquiti EdgeOS Edgerouter; these files are stored in /config/vnstat. Based on this (https://snippets.khromov.se/vnstat-on-edgerouter-historical-bandwidth-monitoring-and-graphical-dashboard-tutorial/) however the scripts below store the data in memory and only back them up nightly (to save on flash writes)
View backup.sh
cp -Rp /var/log/vnstat /config
@bdwilson
bdwilson / backup_hubitat.sh
Created Mar 21, 2020
Backup hubitat device using last backup file created.
View backup_hubitat.sh
#!/bin/bash
#
# Code borrowed from https://community.hubitat.com/t/solved-downloading-latest-backup-file/18065/5
#
IP=$1
DIR="$2"
if [ $# -eq 0 ]; then
echo "Usage: $0 <IP Address> <Path to store backup>"
else
@bdwilson
bdwilson / wyze.conf
Created Jan 23, 2020
monit configuration file to only stream Wyze cam v2 if the camera is powered on. installed in /etc/monit/conf.d/
View wyze.conf
check host wyze-camera address 192.168.1.42
if failed icmp type echo
count 3 with timeout 5 seconds
2 times within 3 cycles
then exec "/etc/monit/stop_ffmpeg.sh"
else if succeeded for 2 cycles then exec "/etc/monit/start_ffmpeg.sh"
@bdwilson
bdwilson / stop_ffmpeg.sh
Created Jan 23, 2020
monit script to stop ffmpeg only when Wyze Cam V2 is on
View stop_ffmpeg.sh
#!/bin/sh
/usr/bin/screen -XS ffmpeg quit
@bdwilson
bdwilson / start_ffmpeg.sh
Created Jan 23, 2020
monit script to start ffmpeg only when Wyze Cam V2 is on
View start_ffmpeg.sh
#!/bin/sh
# connects to local ffserver starting from /etc/rc.local with: /usr/bin/ffserver &
# Wyze camera on 192.168.1.42 with rtsp server replace user and password with your user/password setup within Wyze app
# make sure you have screen package installed
/usr/bin/screen -dmS ffmpeg ffmpeg -rtsp_transport tcp -i 'rtsp://user:password@192.168.1.42/live' http://127.0.0.1:8090/camera.ffm
@bdwilson
bdwilson / ffserver.conf
Created Jan 23, 2020
ffserver.conf for wyze v2 Octocam
View ffserver.conf
# Port on which the server is listening. You must select a different
# port from your standard HTTP web server if it is running on the same
# computer.
HTTPPort 8090
# Address on which the server is bound. Only useful if you have
# several network interfaces.
HTTPBindAddress 0.0.0.0
# Number of simultaneous HTTP connections that can be handled. It has
View NeoSmart.groovy
/*
* Neo Smart Controller
*
* Calls URIs with HTTP GET for shade open/close/stop/favourite using the Neo Smart Controller
*
* Based on the Hubitat community driver httpGetSwitch
*/
metadata {
definition(name: "Neo Smart Controller-alpha", namespace: "bigrizzo", author: "bigrizz", importUrl: "https://raw.githubusercontent.com/bdwilson/hubitatDrivers/master/NeoSmart.groovy") {
capability "WindowShade"
You can’t perform that action at this time.