Skip to content

Instantly share code, notes, and snippets.

View mhelff's full-sized avatar

Martin Helff mhelff

View GitHub Profile
@mhelff
mhelff / flow.json
Last active December 14, 2020 10:07
Zigbee2mqtt Admin panel
[{"id":"1112a3ea.54efdc","type":"tab","label":"Z2M Admin","disabled":false,"info":""},{"id":"fe321b77.50b858","type":"function","z":"1112a3ea.54efdc","name":"Format Data","func":"var groupname = msg.groupname;\nvar device = flow.get('device');\n\nif (typeof groupname !== undefined && typeof device !== undefined) {\n var action = \"Adding \";\n var what = \" to group \";\n if(msg.payload == \"remove\") {\n action = \"Removing \";\n what = \" from group \";\n }\nvar msg1 = { payload: device, topic: \"zigbee2mqtt/bridge/group/\" + groupname + \"/\" + msg.payload};\nvar msg2 = { payload: action + \" \" + device + what + groupname };\n\nreturn [msg1, msg2];\n}","outputs":2,"noerr":0,"x":770,"y":1980,"wires":[["67f130eb.efef3","f10dea4c.a81728"],["89490386.cf438"]]},{"id":"89490386.cf438","type":"ui_toast","z":"1112a3ea.54efdc","position":"top right","displayTime":"5","highlight":"","outputs":0,"ok":"OK","cancel":"","topic":"System Notification","name":"","x":920,"y":2020,"wires":[]},{"id"
@mhelff
mhelff / flow.json
Created January 23, 2019 00:31
zigbee2mqtt admin panel
This file has been truncated, but you can view the full file.
[{"id":"17dca081.a888af","type":"subflow","name":"Network Map","info":"","category":"Zigbee2MQTT Admin Panel","in":[{"x":260,"y":140,"wires":[{"id":"2403c840.5ce848"}]}],"out":[]},{"id":"7e52b899.b3e908","type":"http in","z":"17dca081.a888af","name":"","url":"/adminpanelapi/networkmap/graphviz","method":"get","upload":false,"swaggerDoc":"","x":200,"y":200,"wires":[["aa57cdac.0dba1"]]},{"id":"d1e8bbf2.b131f8","type":"http response","z":"17dca081.a888af","name":"","statusCode":"","headers":{},"x":704,"y":241,"wires":[]},{"id":"98fc206d.fc33e","type":"function","z":"17dca081.a888af","name":"get from flow","func":"var first='<html><head><meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\"><meta charset=\"utf-8\"><title>Network topology</title></head><body><div id=\"graphviz_svg_div\"></div><script language=\"javascript\" type=\"text/javascript\" src=\"http://viz-js.com/bower_components/viz.js/viz.js\"></script><script type=\"bogus\" id=\"graphviz_input\">';\nvar second='</script><script>document
@mhelff
mhelff / esp8266-basis.ino
Created March 30, 2016 19:12
Basic Arduino sketch for ESP8266 including WifiManager and OTA update
#include <ESP8266WiFi.h>
#include <ESP8266mDNS.h>
#include <ArduinoOTA.h>
#include <WiFiManager.h>
void setup() {
Serial.begin(115200);
Serial.println("Booting");
WiFiManager wifiManager;
@mhelff
mhelff / updategps.sh
Created April 21, 2015 21:28
update gps assist data for sony cameras, place on root of sd card
rm assistme.dat
rm assistme.md5
wget http://control.d-imaging.sony.co.jp/GPS/assistme.dat
wget http://control.d-imaging.sony.co.jp/GPS/assistme.md5
cp assistme.* PRIVATE/SONY/GPS