Skip to content

Instantly share code, notes, and snippets.

View unixweb's full-sized avatar
🏠
Working from home

Joachim Hummel unixweb

🏠
Working from home
View GitHub Profile
@unixweb
unixweb / doors.json
Created May 23, 2018 11:04
Node-Red Icons
[{"id":"29e0e77c.6d3b78","type":"ui_template","z":"ca55e714.8cafb8","group":"fe3b5a9c.4026c","name":"Türe Terrasse","order":0,"width":"3","height":"4","format":"<p> <center>Terrasse</center> </p>\n<div ng-bind-html=\"msg.payload\"></div>\n</body>","storeOutMessages":true,"fwdInMessages":true,"templateScope":"local","x":580,"y":160,"wires":[[]]},{"id":"a4747682.28e728","type":"inject","z":"ca55e714.8cafb8","name":"Open","topic":"","payload":"<img src=\"https://node.unixweb.eu/pic/doors/door-9-128.png\">","payloadType":"str","repeat":"","crontab":"","once":false,"x":372.8833312988281,"y":227,"wires":[["29e0e77c.6d3b78"]]},{"id":"39d0caec.09b4d6","type":"inject","z":"ca55e714.8cafb8","name":"Close","topic":"","payload":"<img src=\"https://node.unixweb.eu/pic/doors/door-10-128.png\">","payloadType":"str","repeat":"","crontab":"","once":true,"x":372.8833312988281,"y":287,"wires":[["29e0e77c.6d3b78"]]},{"id":"20881627.4a9f92","type":"change","z":"ca55e714.8cafb8","name":"","rules":[{"t":"change","p":"payload","pt":
@unixweb
unixweb / flow.json
Created May 12, 2018 16:36
Octopus first steps flow.json = for Node-Red / octopus-start.ino = for Arduino IDE
[{"id":"7b3f4073.b32038","type":"tab","label":"GUI Octopus","disabled":false,"info":""},{"id":"dc513135.edb458","type":"mqtt in","z":"7b3f4073.b32038","name":"Temperature BME280","topic":"bme280/Temperature","qos":"2","broker":"279e0107.125de6","x":140,"y":80,"wires":[["8400de8a.3268","a177ec04.34a648"]]},{"id":"b9589d65.e88848","type":"ui_gauge","z":"7b3f4073.b32038","name":"","group":"1ee64821.04fba","order":1,"width":0,"height":0,"gtype":"gage","title":"Temperature BME280","label":"° Celsius","format":"{{value}}","min":0,"max":"50","colors":["#00b500","#e6e600","#ca3838"],"seg1":"30","seg2":"31","x":740,"y":80,"wires":[]},{"id":"91c5dd29.7d6be","type":"ui_chart","z":"7b3f4073.b32038","name":"","group":"1ee64821.04fba","order":4,"width":0,"height":0,"label":"Temperature BME280","chartType":"line","legend":"false","xformat":"HH:mm:ss","interpolate":"linear","nodata":"","dot":false,"ymin":"","ymax":"","removeOlder":1,"removeOlderPoints":"","removeOlderUnit":"3600","cutout":0,"useOneColor":false,"colors":["#1f
#include <ESP8266WiFi.h>
#include <PubSubClient.h>
#include <SparkFunBME280.h>
#include <Wire.h>
#include <Adafruit_BME680.h>
String matrixausgabe_text = " "; // Ausgabetext als globale Variable
volatile int matrixausgabe_index = 0;// aktuelle Position in Matrix
@unixweb
unixweb / sensor-dht22.py
Last active May 8, 2018 12:15
Read Sensors Data from DHT11 / DHT22 and push the data into a InfluxDB every 5 seconds
import Adafruit_DHT
import requests
from time import sleep
import time
DELAY_INTERVAL = 5
dht_sensor = Adafruit_DHT.DHT22
DHT_PIN = 4
@unixweb
unixweb / sensor-dht22.py
Created May 6, 2018 09:37
Read Sensors Data from DHT11 / DHT22 and push the data into a InfluxDB
# Copyright (c) 2014 Adafruit Industries
# Author: Tony DiCola
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
@unixweb
unixweb / simbutler.py
Last active June 4, 2019 17:35
GSM Raspberry Pi SMS Butler
# SIMBUTLER.py
# pip install pyserial
import RPi.GPIO as GPIO
import serial
import time, sys
import datetime
P_BUTTON = 24 # Button, adapt to your wiring
@unixweb
unixweb / fritzbox.json
Created March 4, 2018 13:08
Anwesendheit prüfen über Fritzbox
[{"id":"8193bec1.ab0e2","type":"function","z":"12894464.d36a6c","name":"format output","func":"msg.payload = msg.payload.NewActive\nreturn msg;\n","outputs":1,"noerr":0,"x":640,"y":160,"wires":[["e10b8db6.e65618"]]},{"id":"e10b8db6.e65618","type":"debug","z":"12894464.d36a6c","name":"","active":true,"tosidebar":true,"console":false,"complete":"false","x":850,"y":160,"wires":[]},{"id":"1df720be.9bcdb7","type":"fritzbox-in","z":"12894464.d36a6c","device":"226d6f30.6449e","name":"","service":"urn:dslforum-org:service:Hosts:1","action":"GetSpecificHostEntry","arguments":"{\"NewMACAddress\":\"value\"}","x":410,"y":160,"wires":[["8193bec1.ab0e2"]]},{"id":"a24eaab8.1743c","type":"inject","z":"12894464.d36a6c","name":"20:82:C0:26:86:FE","topic":"","payload":"{\"NewMACAddress\":\"30:X7:XD:XX:XX:XX\"}","payloadType":"json","repeat":"","crontab":"","once":false,"onceDelay":"","x":190,"y":160,"wires":[["1df720be.9bcdb7"]]},{"id":"226d6f30.6449e","type":"fritzbox-config","z":"","name":"","host":"192.168.1.1","port":"49000
@unixweb
unixweb / google-home-flow.json
Last active January 7, 2018 08:42
Google Home Speech with Node-Red
[{"id":"bb4433fd.83e2e8","type":"mqtt in","z":"7178696f.8022","name":"Air Pressure","topic":"pressure/p1","qos":"2","broker":"f0d962da.ee7f7","x":113,"y":75.99996948242188,"wires":[["5f72bbfe.d37b3c"]]},{"id":"5f72bbfe.d37b3c","type":"function","z":"7178696f.8022","name":"Time and Date","func":"// (1) wandelt timestamo ins ISO Datumformat um\n//msg.timestamp= new Date().toISOString()\n\n// (2) beliebiges Datum festlegbar: hier: YYYY-MM-DD HH:MM.SS\n// (Ausgabeformat wird am Ende zusammengestellt)\nvar now = new Date(); \nvar year = now.getFullYear();\nvar month = now.getMonth()+1; \nvar day = now.getDate();\nvar hour = now.getHours();\nvar minute = now.getMinutes();\nvar second = now.getSeconds(); \nif(month.toString().length == 1) {\nvar month = '0'+month;\n}\nif(day.toString().length == 1) {\nvar day = '0'+day;\n} \nif(hour.toString().length == 1) {\nvar hour = '0'+hour;\n}\nif(minute.toString().length == 1) {\nvar minute = '0'+minute;\n}\nif(second.toString().length == 1) {\nvar sec
@unixweb
unixweb / moon-calender.json
Last active December 3, 2017 20:14
Moon Calender for Node-Red to implement in any smarthome solution
[{"id":"c22423c2.1e727","type":"inject","z":"43367500.55eb6c","name":"make request","topic":"","payload":"","payloadType":"date","repeat":"3600","crontab":"","once":false,"x":146,"y":168.00000190734863,"wires":[["995dc366.8a14e"]]},{"id":"995dc366.8a14e","type":"http request","z":"43367500.55eb6c","name":"","method":"GET","ret":"txt","url":"https://www.timeanddate.de/mond/phasen/deutschland/muenchen","tls":"","x":356.51953887939453,"y":167.0000057220459,"wires":[["c82b2ba.c1f4bd8"]]},{"id":"c82b2ba.c1f4bd8","type":"html","z":"43367500.55eb6c","name":"","tag":"div.three p","ret":"html","as":"single","x":559.5195541381836,"y":166.99999809265137,"wires":[["4f5c03b6.a6543c"]]},{"id":"4f5c03b6.a6543c","type":"function","z":"43367500.55eb6c","name":"Parse msg","func":"// outputs: 2\nmsg.payload = msg.payload[0]; \nreturn msg;","outputs":1,"noerr":0,"x":757.5195846557617,"y":165.00000476837158,"wires":[["da31befc.20712"]]},{"id":"da31befc.20712","type":"switch","z":"43367500.55eb6c","name":"","property":"payload","p
@unixweb
unixweb / fritz-box-callmonitor.json
Last active March 28, 2018 23:16
FritzBox Call Monitor with Web Push Notification
[
{
"id": "5201f39c.5bf36c",
"type": "inject",
"z": "bce2c081.53f4e",
"name": "Click to Test",
"topic": "Test Caller",
"payload": "{\"type\":\"INBOUND\",\"id\":\"0\",\"timestamp\":\"21.11.17 10:15:45\",\"caller\":\"0151123456789\",\"callee\":\"89898989\"}",
"payloadType": "json",
"repeat": "",