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
Last active June 16, 2019 16:31
APRS TCPIP Bake Wetterdaten
[{"id":"d4edf1e8.f7b4","type":"tab","label":"APRS Bake","disabled":false,"info":""},{"id":"9980bb7a.0cc4e8","type":"mqtt in","z":"d4edf1e8.f7b4","name":"Joachim","topic":"/aprs/joachim/bake","qos":"2","datatype":"json","broker":"6f75b16.845ebd","x":166,"y":281,"wires":[["944c4462.a1aa38"]]},{"id":"944c4462.a1aa38","type":"function","z":"d4edf1e8.f7b4","name":"Bake","func":"var temp = msg.payload.sensordatavalues[2].value;\nvar hum = msg.payload.sensordatavalues[3].value;\nvar press = msg.payload.sensordatavalues[4].value;\n\n// Convert Celsius to Fahrenheit / APRS Protocol\nvar tempF = ((temp*1.8)+32); \nvar press2 = (press/100);\nvar hum2 = (hum*1);\n// Erase decimal points\nvar tempP = parseFloat(tempF.toFixed(0)); \nvar pressP = parseFloat(press2.toFixed(0));\nvar humP = parseFloat(hum2.toFixed(0));\n\nvar msg1 = { payload: \"user CALL pass XXXX\" };\nvar msg2 = { payload: \"CALL-1>APRS,TCPIP*:!4808.30N/01125.75E_000/000g000t0\"+tempP+\"r000p000P000h\"+humP+\"b0\"+pressP+\"0wRSW\" }; \nvar msg3 = { payloa
@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 / 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 / anruf.json
Last active July 25, 2023 07:02
Anrufweiterleitung mit Fritzbox und Node-Red
[{"id":"203a9aad.9e133e","type":"tab","label":"Fritzbox","disabled":false,"info":""},{"id":"ecf93999.3965c8","type":"inject","z":"203a9aad.9e133e","name":"Anrufweiterleitung einschalten","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":269,"y":173,"wires":[["a34a96a0.4e7208"]]},{"id":"2eef830c.6f84f4","type":"fritzbox-in","z":"203a9aad.9e133e","device":"4a125cf6.71cc64","name":"Fritz","service":"urn:dslforum-org:service:X_AVM-DE_OnTel:1","action":"SetDeflectionEnable","arguments":"{\"NewDeflectionId\":\"value\",\"NewEnable\":\"value\"}","x":813,"y":258,"wires":[[]]},{"id":"a34a96a0.4e7208","type":"function","z":"203a9aad.9e133e","name":"Anrufweiterleitung Ein","func":"var string = {\"NewDeflectionId\":\"0\",\"NewEnable\":\"1\"};\nmsg.payload = string;\nreturn msg;\n","outputs":1,"noerr":0,"x":560,"y":172,"wires":[["2eef830c.6f84f4"]]},{"id":"d107d06b.f56f68","type":"function","z":"203a9aad.9e133e","name":"Anrufweiterleitung Aus","func":"var string = {\"New
@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":[
@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 / 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 / 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 / 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 / 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":["#