Skip to content

Instantly share code, notes, and snippets.


Peter Hansen empi89

View GitHub Profile
View ethernetrelay.ino
#include <SPI.h>
#include <PubSubClient.h>
#include <Ethernet.h>
#define DEBUG
#ifdef DEBUG
#define DEBUG_PRINT(x) Serial.println (x)
#define DEBUG_PRINT(x)
View OneWireEthernetMqtt.ino
#include <SPI.h>
#include <PubSubClient.h>
#include <Ethernet.h>
#include <OneWire.h>
#include <DallasTemperature.h>
#define DEBUG
#ifdef DEBUG
#define DEBUG_PRINT(x) Serial.println (x)
empi89 /
Created Jun 12, 2016
Send 1-wire temperatures to mqtt
#!/usr/bin/env python
import time
import paho.mqtt.client as mqtt
publishing_period = 1000
mqtt_host = "XXX"
def read_temperature(device_id):
View gist:2239a87a37fc479c0b0e
### Keybase proof
I hereby claim:
* I am empi89 on github.
* I am empi89 ( on keybase.
* I have a public key whose fingerprint is C3ED D3E9 3ECB 54FD E723 5A05 DD81 7FF8 14BE 9E4F
To claim this, I am signing this object:
empi89 / import.php
Last active Feb 7, 2018
FHEM filelog to dblog mysql migration
View import.php
* Script for migrating existing FileLog logfiles to the history database table.
* Howto:
* 1. Setup DbLog database tables and setup logging to database.
* 2. Wait until your devices are listed in the current-table of the database.
* 3. edit mysql username/password/database in this script
* 4. php <scriptname> <path_to_logfile>
empi89 / rabbitmq.log
Created May 3, 2013
Rabbitmq logfile
View rabbitmq.log
=INFO REPORT==== 3-May-2013::09:56:46 ===
accepting AMQP connection <0.2649.0> ( ->
=ERROR REPORT==== 3-May-2013::09:56:46 ===
** Generic server <0.2653.0> terminating
** Last message in was {limit_prefetch,1,1}
** When Server state == {lim,1,<0.2654.0>,false,[],0}
** Reason for termination ==
** {{badmatch,false},