Skip to content

Instantly share code, notes, and snippets.

View deepcoder's full-sized avatar

Dave Proffer deepcoder

View GitHub Profile
@deepcoder
deepcoder / gist:e9aee1209faf9f6a7f40ba7c05d5a541
Created September 16, 2023 22:24
blitzortung lighting map image capture
#! /usr/bin/env python3
# blitzortung_capture.py
from selenium import webdriver
from selenium.webdriver.firefox.options import Options
from PIL import Image
options = Options()
@deepcoder
deepcoder / birdnet_to_mqtt.py
Last active May 21, 2024 16:49
BirdNET to MQTT publishing for Home Assistant consumption
#! /usr/bin/env python3
# birdnet_to_mqtt.py
#
# 202306171542
#
# monitor the records in the syslog file for info from the birdnet system on birds that it detects
# publish this data to mqtt
#
import time
@deepcoder
deepcoder / gist:3d9ae7041e2bc40221e37fb2061b2969
Created February 16, 2023 02:36
python3 skimage program to look at noise level of most recent .jpg file in directory and do action based on noise level
#! /usr/bin/env -S python3 -u
# python3 routine using scikit image library to determine of foscam camera has had been blinded at night
# and switched to day mode due to car headlights
# program looks at most recent still image captured from camera and check image noise level using scikit image measure
# 202109071212
#
# example output:
# runtime : 1.42 , adjusting camera, response : <Response [200]>, noise level : 3.3104319013
#
@deepcoder
deepcoder / gist:3aa75b2368e048c030bc5f79f9870680
Created February 10, 2023 01:05
python3 code to test decoding Aranet4 CO2 sensor advertising packet. TODO : add code to OpenMQTTGateway decoder library
#! /usr/bin/env python3
# aranet4-decode.py
# decode aranet4 co2 monitor BLE advertising packets
# 202302091406
#
# https://github.com/Anrijs/Aranet4-ESP32/blob/main/src/Aranet4.h
# ":" (colon) in C struct - what does it mean? [duplicate]
# https://stackoverflow.com/questions/8564532/colon-in-c-struct-what-does-it-mean
#
# typedef struct AranetManufacturerData {
@deepcoder
deepcoder / gist:73fd88b4079d58dd5f60a041836dad65
Created April 13, 2022 16:11
purple aqi sensors to home assistant MQTT sensors
# home assistant sensors
# Purple AQI monitors
- platform: mqtt
name: 'Purple AQI SP01'
state_topic: "purple-aqi/SP01"
unit_of_measurement: "AQI"
value_template: "{{ value_json.aqi }}"
json_attributes_topic: "purple-aqi/SP01"
@deepcoder
deepcoder / rsyslog_example.c
Created November 18, 2020 00:37
language C : simple function to log message to remote syslog server via UDP port 514
// rsyslog_example.c
// 202011171619
//
// gcc -o rsyslog_example rsyslog_example.c
//
// simple function to log message to remote syslog server via UDP port 514
//
// why is this NOT part of the standard syslog library?????
//