Skip to content

Instantly share code, notes, and snippets.

View kleini's full-sized avatar

Marcus Klein kleini

  • Open-Xchange
  • Olpe
View GitHub Profile
@kleini
kleini / docker-compose.yml
Created March 27, 2019 19:46
Docker compose for HomieMonitor docker image
version: '3.2'
services:
homieMonitor:
container_name: homieMonitor
environment:
- HM_MQTT_HOST=192.168.1.1
- HM_MQTT_PORT=1883
- HM_MQTT_SSL_ENABLE_FLAG=true
- HM_MQTT_USER=mqtt
- HM_MQTT_PASS=superSecret
@kleini
kleini / bash
Last active June 4, 2019 08:08
Find Debian/Ubuntu packages without installed dependencies
First of all we list packages during upgrade, that are not marked as automatically handled:
aptitude search -F '%p' --disable-columns '~U' | while read PACKAGE; do sudo apt-mark showmanual $PACKAGE; done
Second I want to find even those packages, that are already automatically handled but are still installed although nothing
installed depends on it
aptitude search -F '%p' --disable-columns '~U' | while read PACKAGE; do echo -n "$PACKAGE "; apt-cache rdepends $PACKAGE | tail +3 | while read RDEPEND; do dpkg --get-selections | egrep "^${RDEPEND}.*\s" | wc -l; done | paste -sd+ | bc; done
@kleini
kleini / telegraf.conf
Last active October 31, 2024 08:49
Pump MQTT data from a Victron Energy Cerbo GX with Telegraf into InfluxDB v2
[[inputs.mqtt_consumer]]
servers = ["ssl://192.168.0.102:8883"]
## Topics that will be subscribed to.
topics = [
"venus/N/+/#",
]
username = "telegraf"
password = "superSecret"
@kleini
kleini / evcc.yaml
Last active February 7, 2025 16:23
how to invert Shelly 3EM in EVCC
meters:
- name: grid1
type: custom
power:
source: http
uri: http://shelly%40test.de:[email protected]/status
jq: .emeters | map(.power) | add
scale: -1
energy:
source: http