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 / 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 / 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 / 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 / toogle.json
Created March 18, 2019 20:50
Node-Red Toogle Node
[{"id":"3850aecb.ae7fa2","type":"function","z":"2a04a5df.aa15d2","name":"Toogle boolean","func":"/* \nif we receive a true we toogle output\nand store the new state in a local context \nwith a unique name \n*/ \nvar fname = \"toggle1\";\n\nif(msg.payload === true){\n\nif(context.get(fname) === false){\n msg.payload = true; \n}else{\n msg.payload = false;\n}\ncontext.set(fname, msg.payload);\n}\nreturn msg;","outputs":1,"noerr":0,"x":420,"y":120,"wires":[["85e80158.2a284"]]},{"id":"85e80158.2a284","type":"combine-if","z":"2a04a5df.aa15d2","topic":"","name":"","timeout":0,"x":610,"y":120,"wires":[["ebde7127.bff24"],["e169a7ad.1e1898"]]},{"id":"5fd0d0c8.9a891","type":"inject","z":"2a04a5df.aa15d2","name":"","topic":"setup","payload":"true","payloadType":"bool","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":180,"y":120,"wires":[["3850aecb.ae7fa2"]]},{"id":"ebde7127.bff24","type":"debug","z":"2a04a5df.aa15d2","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false"
@unixweb
unixweb / locale.tcl
Created May 10, 2019 13:02
locale.tcl für svxlink zur Deutschen Sprachausgabe von Uhrzeit
###############################################################################
#
# Locale specific functions for playing back time, numbers and spelling words.
# Often, the functions in this file are the only ones that have to be
# reimplemented for a new language pack.
#
###############################################################################
#
# Spell the specified word using a phonetic alphabet
@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