Skip to content

Instantly share code, notes, and snippets.

View jodli's full-sized avatar

Jan-Olaf Becker jodli

View GitHub Profile
@jodli
jodli / unavailable_sensors_detection.yaml
Last active January 22, 2023 21:26
Unavailable sensors detection & notification
blueprint:
name: Unavailable sensors detection & notification for all battery sensors
description: Regularly test all sensors with 'battery' device-class for being unavailable and if so execute an action. This is especially useful for Zigbee devices that drop from the network.
domain: automation
input:
time:
name: Time to test on
description: Test is run at configured time
default: '10:00:00'
selector:
#################
# Initial Setup #
#################
#The command to run, built from the raw link of this gist
#START http://boxstarter.org/package/nr/url?https://gist.githubusercontent.com/cygnull/9546ec8639da7849d3a4098a7ee9a8c7/raw/0ad14b79d360826d83ff462eb072649578ae7d6a/Boxstarter-InitialSetup.txt
#As described here: http://boxstarter.org/Learn/WebLauncher
#########################################

Settings on Xiaomi Yi

Interval: 2s

Resolution: 12M (4608x2592 16:9)

This results in an image every 2 seconds with around 2.6 MB in size. So the total recording time is around 175 minutes (5250 images) for the 16 GB and around 250 minutes (10500 images) for the 32 GB SD card.

{
"__inputs": [
{
"name": "DS_TELEGRAF",
"label": "Telegraf",
"description": "",
"type": "datasource",
"pluginId": "influxdb",
"pluginName": "InfluxDB"
}
@jodli
jodli / generic_commands.md
Last active June 19, 2017 19:03
Useful stuff to remember...

Clear docker logs:

sudo find /var/lib/docker/containers/ -name "*.log*" -exec truncate -s 0 {} \;
@jodli
jodli / speedtest-ifttt.sh
Created April 17, 2016 11:00 — forked from aallan/speedtest-ifttt.sh
Modified version of Henrik Bengtsson's speedtest-cli code which will dispatch the test results to the IFTTT Maker Channel.
#!/usr/bin/env bash
###########################################################################
# Originally written by: Henrik Bengtsson, 2014
# https://github.com/HenrikBengtsson/speedtest-cli-extras
# Modified to use IFTTT by: Alasdair Allan, 2015
# License: GPL (>= 2.1) [http://www.gnu.org/licenses/gpl.html]
###########################################################################
# Character for separating values
# (commas are not safe, because some servers return speeds with commas)