Skip to content

Instantly share code, notes, and snippets.

View thomasvt1's full-sized avatar

Thomas van Tilburg thomasvt1

View GitHub Profile
esphome:
name: water-meter
esp8266:
board: d1_mini
restore_from_flash: true
# Enable logging
logger:
@thomasvt1
thomasvt1 / dsmr-logger.yaml
Created September 6, 2021 19:42
DSMR Logger 4.5 for esphome
esphome:
name: dsmr-logger
platform: ESP8266
board: nodemcu
# Enable logging
logger:
baud_rate: 0
# Enable Home Assistant API
@thomasvt1
thomasvt1 / dynamic.toml
Created December 17, 2019 12:45
dynamic.toml
# dynamic.toml
## dynamic configuration
[http.routers]
[http.routers.redirecttohttps]
entryPoints = ["web"]
middlewares = ["httpsredirect"]
rule = "HostRegexp(`{host:.+}`)"
service = "noop"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE params SYSTEM "params.dtd">
<params name="Practice">
<section name="Header">
<attstr name="name" val="Practice"/>
<attstr name="description" val="Practice"/>
<attnum name="priority" val="100"/>
<attstr name="menu image" val="data/img/splash-practice.png"/>
@thomasvt1
thomasvt1 / your-plugin-name.php
Last active February 1, 2019 07:49
Wordpress demo plugin
<?php
/*
Plugin Name: Your plugin name goes here.
Plugin URI: Your website/blog address goes here.
Description: Removes unnecessary clutter from WPHead.
Version: 1.0.0
Author: Your name goes here.
Author URI: Your website/blog address goes here.
*/
<?php
/**
* Processes the message requested
*
* @param $update
*/
function processMessage($update)
switch ($update["queryResult"]["action"]) {
from bluetooth import *
import sys
import RPi.GPIO as GPIO
import time
import random
#If using python 2
if sys.version < '3':
input = raw_input
import bluetooth
import threading
import requests
from time import sleep
import RPi.GPIO as GPIO
#Set up GPIO
GPIO.setmode(GPIO.BCM)
@thomasvt1
thomasvt1 / device-tracker.php
Created November 8, 2017 15:48
Web(IFTTT)>MQTT Device Tracker usefull for Home Assistant
<?php
ini_set('display_errors', 1);
require("phpMQTT.php");
$key = "XXXXX"; // The API key
$server = "XXXXX"; // change if necessary
$port = XXXXX; // change if necessary
$username = "XXXXX"; // set your username
$password = "XXXXX"; // set your password
// GetCode.ino
//
// Basic example for the TOTP library
//
// This example uses the opensource SwRTC library as a software real-time clock
// you can download from https://github.com/leomil72/swRTC
// for real implementation it's suggested the use of an hardware RTC
#include "sha1.h"
#include "TOTP.h"