Skip to content

Instantly share code, notes, and snippets.

View jffz's full-sized avatar

Geoffrey Bachelot jffz

View GitHub Profile
{
"info": {
"_postman_id": "be8810c1-7715-461c-bc34-1a6bc6360387",
"name": "Sonoff_mini",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
},
"item": [
{
"name": "sonoff_on",
"request": {
#!/usr/bin/env python
import time
import json
import paho.mqtt.client as mqtt
import socket
MQTT_BROKER = "192.168.1.5"
MQTT_TOPIC = "hiveos"
TAIL_FILE = "/var/log/hive-agent.log"
MQTT_USER = ""
#!/usr/bin/python3
import argparse
CURR = "/sys/class/backlight/intel_backlight/brightness"
MAX = "/sys/class/backlight/intel_backlight/max_brightness"
def current_brightness():
with open(CURR, 'r') as f:
---------------------------
-- Default awesome theme --
---------------------------
local theme_assets = require("beautiful.theme_assets")
local xresources = require("beautiful.xresources")
local dpi = xresources.apply_dpi
local gfs = require("gears.filesystem")
local themes_path = gfs.get_themes_dir()
@jffz
jffz / frigate.yml
Created September 23, 2022 07:11
5 cams (fhd - 4k) - 6 core lxc no cora
database:
path: /frigate.db
mqtt:
host: [redacted]
topic_prefix: frigate
client_id: frigate
user: [redacted]
password: [redacted]
detectors:
cpu1:
from discord.ext import commands
import discord
import youtube_dl
import asyncio
import logging
log = logging.getLogger(__name__)
# Suppress noise about console usage from errors
youtube_dl.utils.bug_reports_message = lambda: ''
@jffz
jffz / hiveos2mqtt.sh
Last active January 12, 2024 21:43
Publish hiveos logs to mqtt broker
#!/bin/bash
# MQTT settings
BROKER=""
TOPIC=""
USER=""
PASS=""
# Ensure mosquitto-clients is installed
dpkg -s mosquitto-clients >/dev/null 2>&1 || apt update && apt install -y mosquitto-clients