Skip to content

Instantly share code, notes, and snippets.

@dadosch
dadosch / main.cpp
Created May 2, 2020 16:53
esp8266 with CCS811 and deep sleep
const int FW_VERSION = 01;
const char* fwUrlBase = "http://someurl.tld/esp_update/";
#include "main.h"
#include <Arduino.h>
#include <ESP8266WiFi.h>
#include <PubSubClient.h>
@dadosch
dadosch / run.sh
Created April 16, 2020 15:20
convert mobotix .al files to wav file
sox -r 8000 -b 8 -c 1 file.al file.wav

Fix for /usr/share/slice/Murmur.ice:9: error: Can't open include file "Ice/SliceChecksumDict.ice"

Ubuntu: install package zeroc-ice-slice

@dadosch
dadosch / codes.csv
Last active January 7, 2018 13:21
sempre_weather
TEMP in °C HUMIDITY % HEXCODE DEC-CODE
22.0 70 f0 a8 c0 1b 88 00 11110000 10101000 11000000 00011011 10001000 000
22.3 96 f0 a8 a0 1b e8 00 11110000 10101000 10100000 00011011 11101000 000
22.2 59 f0 a7 60 1b d2 c0 11110000 10100111 01100000 00011011 11010010 110
22.8 57 f0 a7 20 1c 9d 40 11110000 10100111 00100000 00011100 10011101 010
22.8 70 f0 a8 c0 1c 87 80 11110000 10101000 11000000 00011100 10000111 100
23.0 72 f0 a9 00 1c c8 20 11110000 10101001 00000000 00011100 11001000 001
23.1 66 f0 a8 40 1c f5 60 11110000 10101000 01000000 00011100 11110101 011
23.1 64 f0 a8 00 1c f9 20 11110000 10101000 00000000 00011100 11111001 001
23.4 60 f0 a7 80 1d 40 00 11110000 10100111 10000000 00011101 01000000 000
alternately switching between the two values when pressing a button twice
// on
C84D0C97
Unknown encoding: C84D0C97 (32 bits)
Raw (34): 950 -850 1750 -1750 1800 -850 900 -850 900 -850 900 -4350 900 -900 850 -1750 900 -850 1800 -850 900 -850 900 -850 900 -850 900 -900 850 -900 900 -1700 900
D8C37E2F
Unknown encoding: D8C37E2F (32 bits)
@dadosch
dadosch / script.sh
Created June 5, 2017 23:00
Script to switch on and off Wifi power socket from ALDI Model 45112
#!/bin/bash
prefix="01 40 "
mac="yo ur ma c- -- --"
on="10 5B 94 D4 2E F5 C0 1E 30 2B 1B 7C B7 A7 D8 EA B0"
off="10 66 30 BC FE 88 83 0C B4 EE AB 4A 78 43 56 AB 9F"
hex_string=$prefix$mac$off
@dadosch
dadosch / howto.md
Created May 28, 2017 16:01
How to install zint on Ubuntu

apt install g++ cmake qtbase5-dev qttools5-dev cd /usr/local/src/ ->extract zint cd zint-version cd build cmake .. make make install

@dadosch
dadosch / do_all_containers.sh
Created May 22, 2017 15:42
Script to update all running LXC-Containers
#!/bin/bash
containers=$(sudo lxc-ls --running | sed ':a;N;$!ba;s/\n/ /g')
lxc_command="dpkg-reconfigure tzdata"
echo $lxc_command
for container in $containers; do
echo -e "\e[36m$container\e[0m"
sudo lxc-attach -n $container -- $lxc_command
@dadosch
dadosch / Compile TV Headend.md
Last active December 5, 2021 19:50
TV Headend with Raspberry Pi
apt-get update
apt-get install gcc-4.9 g++-4.9 build-essential
apt-get install unzip git-core pkg-config dvb-apps gettext
apt-get install libcurl4-openssl-dev libssl-dev libavahi-client-dev zlib1g-dev libavcodec-dev libavutil-dev libavformat-dev libswscale-dev
export CC=gcc-4.9
export GCC=gcc-4.9
git clone https://github.com/tvheadend/tvheadend
cd tvheadend
./configure