Skip to content

Instantly share code, notes, and snippets.

#include "FastLED.h"
// V = Vanity
// N = Nightlight
#define LED_TYPE WS2811
#define COLOR_ORDER GRB
#define V_TRIGGER_PIN 6
#define N_TRIGGER_PIN 5
#include "FastLED.h"
class Vanity
{
public:
Vanity(CRGB *leds, int NUM_LEDS){
this->num_leds = NUM_LEDS;
this->_state = false;
this->_leds = leds;
@PaulWieland
PaulWieland / README.md
Last active October 10, 2024 19:13
Wind Gauge with Compass

This is a dashboard widget for displaying wind speed and direction in one gauge.

The gauge takes three inputs from msg.payload:

  1. speed (number)
  2. speed_unit (string) - Any string you want displayed after the speed, e.g. MPH, KMH, KTS, etc
  3. degrees (0-360 to for compass direction)

An example input node is included. You can replace it with your own data source (e.g. wunderground PWS)

@PaulWieland
PaulWieland / gist:6891a3f7cddb9e90fee056467674af99
Last active January 11, 2018 12:46
node-red template demonstrating angular scope usage
[{"id":"9b2dc340.c1d408","type":"ui_template","z":"b9fac2e9.a93d88","group":"64704468.613964","name":"Angular Example","order":0,"width":"4","height":"1","format":"<script>\n (function(scope){\n var numbers = [\"zero\",\"one\",\"two\",\"three\",\"four\"];\n \n // $watch fires each time the node is triggered in the flow\n scope.$watch('msg', function(msg) {\n // Here we are going to use angular scope variables\n // (not jquery selectors) to update the value in our widget\n scope.display_text = numbers[msg.payload];\n })\n })(scope);\n</script>\n<style>\n span{\n height: 20px;\n }\n</style>\n\n<span style=\"color: blue\" ng-bind-html=\"msg.payload\"></span>\n<span style=\"color: red\" ng-bind-html=\"display_text\"></span> <!-- binding the display_text variable to the div -->\n<!-- <span style=\"color: green\">{{display_text}}</span> Another way of rendering display_text variable -->\n","storeOutMessages":true,"fwdInMessages":

devices configured in insteon-terminal

listDevices()
test_modem                     18.b8.8d
torch                          31.57.c9
dining                         31.50.35

Test adding the torch switch as a controller of dining switch in group 1, with on level 255, ramp rate 31 & button 1

I think this action performs the following steps:

# BUILD node-rfc from source
FROM node:lts-slim
COPY cmake-3.17.3-Linux-x86_64.sh /tmp/
# Copy the cloned PR of node-rfc to be built
COPY ./node-rfc /tmp/build/node-rfc
COPY ./node-red-contrib-saprfc /tmp/build/node-red-contrib-saprfc
COPY ./ZScaler2.pem /tmp/ZScaler2.pem
@PaulWieland
PaulWieland / flow.json
Created March 23, 2021 15:48
Global Cache Control With NodeRED
[
{
"id":"1eca8288.a05af5",
"type":"debug",
"z":"516ed999.56f778",
"name":"State and source output",
"active":false,
"tosidebar":true,
"console":false,
"tostatus":false,
@PaulWieland
PaulWieland / convert.js
Last active May 5, 2021 19:57
Convert Room EQ Wizard Filters to LADSPA ACDf asoundrc format
var i = 0;
/* Paste in equalizer setting from Room EQ Wizard */
var x = `
Filter 4: ON PK Fc 86.7 Hz Gain -7.4 dB Q 4.165
Filter 7: ON PK Fc 112 Hz Gain 18.0 dB Q 5.692
Filter 8: ON PK Fc 126 Hz Gain -14.5 dB Q 9.308
Filter 9: ON PK Fc 154 Hz Gain -12.8 dB Q 4.865
Filter 10: ON PK Fc 210 Hz Gain -13.0 dB Q 3.347
Filter 11: ON PK Fc 285 Hz Gain -3.3 dB Q 5.000
// Parses a new line separated string of micros() captured from an arduino
// Each entry is a switch from LOW to HIGH or HIGH to LOW
// The line always starts and finishes HIGH.
function parseBtnMessage(timeString){
// Turn the string of times into an array
times = timeString.split("\n");
// Find the start of the first message sent by the button
// The button sends two long pulses which are approx 1300 and 1200 each.