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 / 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
#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 / 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
@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 / dashboard-flow.json
Last active May 23, 2018 20:41
Beispiel Dashboard Node-Red
[{"id":"75594a12.1defcc","type":"tab","label":"GUI Octopus","disabled":false,"info":""},{"id":"f0c7fba.0248308","type":"mqtt in","z":"75594a12.1defcc","name":"Temperature BME280","topic":"bme280/Temperature","qos":"2","broker":"b73e5ba8.6c53e","x":140,"y":80,"wires":[["4e8ed466.b0d774","199ff16.b22260f"]]},{"id":"86ba80c4.c4c5d","type":"ui_gauge","z":"75594a12.1defcc","name":"","group":"bff7198e.17ad98","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":"8c2038e3.88a13","type":"ui_chart","z":"75594a12.1defcc","name":"","group":"bff7198e.17ad98","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":["#
@unixweb
unixweb / Mytheme.js
Created May 24, 2018 09:00
/home/ubuntu/.node-red/lib/themes
// name: MyTheme
{"theme":{"base-color":{"default":"#4B7930","value":"#4B7930","edited":false},"page-titlebar-backgroundColor":{"value":"#4B7930","edited":false},"page-backgroundColor":{"value":"#111111","edited":false},"page-sidebar-backgroundColor":{"value":"#000000","edited":false},"group-textColor":{"value":"#ffffff","edited":true},"group-borderColor":{"value":"#555555","edited":false},"group-backgroundColor":{"value":"#4b7930","edited":true},"widget-textColor":{"value":"#eeeeee","edited":false},"widget-backgroundColor":{"value":"#4b7930","edited":false},"widget-borderColor":{"value":"#333333","edited":false},"base-font":{"value":"-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif"}},"site":{"name":"Node-RED Dashboard","hideToolbar":"false","allowSwipe":"false","allowTempTheme":"true","dateFormat":"DD/MM/YYYY","sizes":{"sx":48,"sy":48,"gx":6,"gy":6,"cx":6,"cy":6,"px":3,"py":3}}}
@unixweb
unixweb / anycubic-nodered.json
Last active July 5, 2018 08:18
Ancubic i3 Mega with MQTT and Dashboard
[{"id":"d342ce12.10a86","type":"tab","label":"Anycubic","disabled":false,"info":""},{"id":"3dfc13c1.f4ceec","type":"function","z":"d342ce12.10a86","name":"","func":"msg.payload = msg.payload.actual\nreturn msg;\n","outputs":1,"noerr":0,"x":670,"y":280,"wires":[["f8a5d3f2.74807","8e3407ca.94e06"]]},{"id":"f8a5d3f2.74807","type":"debug","z":"d342ce12.10a86","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":850,"y":280,"wires":[]},{"id":"ea246b95.69218","type":"mqtt in","z":"d342ce12.10a86","name":"Tisch Temperatur","topic":"octoprint/temperature/bed","qos":"2","broker":"b73e5ba8.6c53e","x":200,"y":280,"wires":[["7b50d338.96e4fc"]]},{"id":"7b50d338.96e4fc","type":"json","z":"d342ce12.10a86","name":"","property":"payload","action":"","pretty":false,"x":470,"y":280,"wires":[["3dfc13c1.f4ceec"]]},{"id":"4a7536a9.c421b8","type":"json","z":"d342ce12.10a86","name":"","property":"payload","action":"","pretty":false,"x":470,"y":380,"wires":[["e8ac512c.27e97"]]},{"id":"c911
@unixweb
unixweb / volumio.json
Last active December 11, 2018 14:42
Volumio Volume Control via Amazon Echo
[{"id":"5f24c18e.924a48","type":"tab","label":"Radio","disabled":false,"info":"<img src=\"123\">"},{"id":"be7e3ac9.2862e","type":"http request","z":"5f24c18e.924a48","name":"Stop","method":"GET","ret":"txt","url":"http://volumio.local/api/v1/commands/?cmd=stop","tls":"","x":650,"y":240,"wires":[[]]},{"id":"af16ca8d.3f8f9","type":"http request","z":"5f24c18e.924a48","name":"Play","method":"GET","ret":"txt","url":"http://volumio.local/api/v1/commands/?cmd=play","tls":"","x":650,"y":280,"wires":[[]]},{"id":"4da63411.d4be6c","type":"alexa-local","z":"5f24c18e.924a48","devicename":"Radio","inputtrigger":true,"x":310,"y":340,"wires":[["f4da5dcc.f65818","1b8080d0.ae3aaf","38e74a8d.5a903e"]]},{"id":"f4da5dcc.f65818","type":"switch","z":"5f24c18e.924a48","name":"Volumio","property":"payload","propertyType":"msg","rules":[{"t":"cont","v":"off","vt":"str"},{"t":"cont","v":"on","vt":"str"}],"checkall":"true","outputs":2,"x":480,"y":260,"wires":[["be7e3ac9.2862e"],["af16ca8d.3f8f9"]]},{"id":"ae7cd232.77dad8","type":"injec
@unixweb
unixweb / benzinpreis-info.json
Created September 3, 2018 14:48
Benzinpreis Info mit clever-tanken.de
[{"id":"de7f592f.426b4","type":"tab","label":"benzinpreise","disabled":false,"info":""},{"id":"17602fbb.76d9e","type":"html","z":"de7f592f.426b4","name":"","property":"payload","tag":"span","ret":"text","as":"single","x":610,"y":220,"wires":[["d073b7f3.18f4e","60def84f.1b22d"]]},{"id":"90a570f5.03e88","type":"inject","z":"de7f592f.426b4","name":"","topic":"tank1","payload":"","payloadType":"date","repeat":"","crontab":"00 12 * * *","once":false,"onceDelay":0.1,"x":150,"y":220,"wires":[["b2894f43.dcb4e8"]]},{"id":"b2894f43.dcb4e8","type":"http request","z":"de7f592f.426b4","name":"Bavaria Petrol - Munich","method":"GET","ret":"txt","url":"https://www.clever-tanken.de/tankstelle_details/33072","tls":"","x":390,"y":220,"wires":[["17602fbb.76d9e"]]},{"id":"d073b7f3.18f4e","type":"function","z":"de7f592f.426b4","name":"Parse Value","func":"msg.payload = msg.payload[38];\nreturn msg;","outputs":1,"noerr":0,"x":790,"y":220,"wires":[["9c0741c7.a33d58","8874821d.3c10b8"]]},{"id":"c1b8c77f.44295","type":"googlehome-no
@unixweb
unixweb / button.json
Created February 26, 2019 10:09
Beispiel NodeRed Buttons
[{"id":"cf86934d.b64208","type":"tab","label":"Flow 1","disabled":false,"info":""},{"id":"459b119.9863df","type":"inject","z":"cf86934d.b64208","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":253,"y":143,"wires":[["488345cf.1ae6c4"]]},{"id":"488345cf.1ae6c4","type":"debug","z":"cf86934d.b64208","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":507,"y":141,"wires":[]},{"id":"41e23040.abdef","type":"ui_button","z":"cf86934d.b64208","name":"","group":"aba39e2.32562e","order":0,"width":0,"height":0,"passthru":false,"label":"button1","color":"","bgcolor":"","icon":"","payload":"","payloadType":"str","topic":"","x":242,"y":208,"wires":[[]]},{"id":"360e61fc.15dace","type":"ui_button","z":"cf86934d.b64208","name":"","group":"331e6055.3f781","order":0,"width":0,"height":0,"passthru":false,"label":"button2","color":"","bgcolor":"","icon":"","payload":"","payloadType":"str","topic":"","x":239,"y":258,"wires":[