Skip to content

Instantly share code, notes, and snippets.

Avatar
👍
Having fun!

Dennis Heitmann dennisheitmann

👍
Having fun!
View GitHub Profile
@dennisheitmann
dennisheitmann / ping2mqtt.py
Last active Feb 14, 2022
PING statistics to MQTT
View ping2mqtt.py
# MIT License
#
# Copyright (c) 2022 Dennis Heitmann
from icmplib import ping
import paho.mqtt.client
pingHosts = ['192.168.15.194', '192.168.57.111']
mqttServer = '__SERVER__'
@dennisheitmann
dennisheitmann / viessmann-to-influxdb.py
Last active Feb 14, 2022
Viessmann API to InfluxDB (using PyViCare)
View viessmann-to-influxdb.py
# MIT License
#
# Copyright (c) 2022 Dennis Heitmann
import sys
import logging
import datetime
from PyViCare.PyViCare import PyViCare
from influxdb import InfluxDBClient
@dennisheitmann
dennisheitmann / lambda_function.py
Created Jun 7, 2021
Check own MQTT server using AWS lambda and send alarm messages using AWS SNS in case of failure
View lambda_function.py
"""
Check if own MQTT server runs
"""
import json
import paho
import boto3
import paho.mqtt.client as mqtt
import ssl
import time
import os
@dennisheitmann
dennisheitmann / funnyCharacters.py
Last active Feb 14, 2022
Funny Characters (ƒυתתу ¢нαяα¢τєяѕ)
View funnyCharacters.py
# MIT License
#
# Copyright (c) 2021 Dennis Heitmann
import sys
def funnyCharacters(inputtext=""):
linput = inputtext.lower()
def convertChar(inputchar):
mapping = {'a': 'α', 'b': 'в', 'c': '¢', 'd': '∂', 'e': 'є', 'f': 'ƒ', 'g': 'g', 'h': 'н', 'i': 'ι', 'j': 'נ', 'k': 'к', 'l': 'ℓ', 'm': 'м',
@dennisheitmann
dennisheitmann / tuya-power.py
Last active Feb 14, 2022
Tuya Power Socket: Get Voltage and Switch Power (on/off)
View tuya-power.py
#!/usr/bin/python3
#
# MIT License
#
# Copyright (c) 2021 Dennis Heitmann
import sys
import json
import hmac
import hashlib
View corona_rolling.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View OTA_with_IotWebConf_ESP32.ino
#include <WiFi.h>
#include <ESPmDNS.h>
#include <WiFiUdp.h>
#include <ArduinoOTA.h>
int ota_once = 0;
#define HOSTNAME "ESP32TemplateSketch"
#include <IotWebConf.h>
View OTA_with_WifiManager_and_MQTT_esp8266.ino
#include <ESP8266WiFi.h>
#include <ESP8266mDNS.h>
#include <DNSServer.h>
#include <ESP8266WebServer.h>
#include <WiFiManager.h>
#include <WiFiUdp.h>
#include <ArduinoOTA.h>
//#define LED_BUILTIN 2
//unsigned long previousMillis = 0;
@dennisheitmann
dennisheitmann / corona_active_infections.ipynb
Last active Apr 2, 2022
Corona_active_infections.ipynb
View corona_active_infections.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View corona.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.