Skip to content

Instantly share code, notes, and snippets.

Avatar

Skylar Sadlier skylord123

  • Skylar.Tech LLC
  • č̶̢ṙ̶̥̩e̴̮̞̓͝e̵̤͚͌̈́ṕ̵͈͖y̸̨͗̑ ̶̧̍͒y̴̭̰͒̾o̴̯̹͝u̸͖̾̚ ̷͇̊͆c̶͈͚͐à̸̛̙r̸͇͙̅e̷̹̓
View GitHub Profile
@skylord123
skylord123 / esphome_config.yaml
Last active Jul 16, 2022
Wiegand ESP32-POE config
View esphome_config.yaml
esphome:
name: west_warehouse_access_control
platform: ESP32
board: esp32-poe
includes:
- custom_components/wiegand_device/wiegand_device.h
ethernet:
use_address: west_warehouse_access_control
type: LAN8720
@skylord123
skylord123 / wiegand_device.h
Created Jun 8, 2021
My edits for ESPHOME Wiegand
View wiegand_device.h
#include "esphome.h"
#include <sstream>
/**
* Wiegand Reader Custom Device
*
* Copied from https://github.com/monkeyboard/Wiegand-Protocol-Library-for-Arduino
* Implemented by Greg Doerr (https://github.com/gdoerr)
*
* In my example, hooked to an Olimex ESP32-POE device connected to a Retekess H1EM-W
@skylord123
skylord123 / flow.json
Created Jan 20, 2020
Hue remote disabling input_boolean in Home Assistant from Node-RED
View flow.json
[{"id":"f984031f.c223d","type":"hue-switch","z":"ff717302.0c688","name":"Living room switch","bridge":"d2b1d65b.cbe438","sensorid":"6","x":290,"y":3680,"wires":[["229b2298.8b45fe","65985f7.4e331a"]]},{"id":"65985f7.4e331a","type":"switch","z":"ff717302.0c688","name":"Off button","property":"payload.name","propertyType":"msg","rules":[{"t":"eq","v":"Off","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":500,"y":3720,"wires":[["ffb041d6.1476d"]]},{"id":"229b2298.8b45fe","type":"switch","z":"ff717302.0c688","name":"On button","property":"payload.name","propertyType":"msg","rules":[{"t":"eq","v":"On","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":500,"y":3660,"wires":[["fe8a3935.8a63d8"]]},{"id":"fe8a3935.8a63d8","type":"switch","z":"ff717302.0c688","name":"action","property":"payload.action","propertyType":"msg","rules":[{"t":"eq","v":"holded","vt":"str"},{"t":"eq","v":"short released","vt":"str"},{"t":"eq","v":"long released","vt":"str"}],"checkall":"true","repair":false,"outputs":3,"
@skylord123
skylord123 / skylar.tech.conf
Last active Nov 16, 2019
Ghost blog letsencrypt example for skylar.tech
View skylar.tech.conf
# I used to redirect all traffic to https but that broke
# letsencrypt validation because it needs to run on http.
#server {
# listen 80;
# server_name skylar.tech;
# return 301 https://$host$request_uri;
#}
server {
listen 80;
@skylord123
skylord123 / gist:0cf2d2e3c558b3c928be3bd242ebf4b7
Created Oct 23, 2019
Node-RED flow only fire on payload changes
View gist:0cf2d2e3c558b3c928be3bd242ebf4b7
[{"id":"59ea6981.ad14b8","type":"mqtt in","z":"582717cf.467f78","name":"","topic":"some/input/channel","qos":"2","datatype":"auto","broker":"5a59e251.9e1d4c","x":1110,"y":260,"wires":[["fe4cd5f9.d74f98"]]},{"id":"577b26e7.fcf1c8","type":"change","z":"582717cf.467f78","name":"","rules":[{"t":"set","p":"someinput_last_value","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1470,"y":260,"wires":[["e47f530b.00cea"]]},{"id":"fe4cd5f9.d74f98","type":"switch","z":"582717cf.467f78","name":"","property":"someinput_last_value","propertyType":"flow","rules":[{"t":"neq","v":"payload","vt":"msg"}],"checkall":"true","repair":false,"outputs":1,"x":1270,"y":260,"wires":[["577b26e7.fcf1c8"]]},{"id":"5a59e251.9e1d4c","type":"mqtt-broker","z":"","name":"","broker":"192.168.1.10","port":"1883","clientid":"","usetls":false,"compatmode":true,"keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","willTopic":"","willQos":"0","willPayload":""}]
View grafana-power-usage-dashboard.json
{
"__inputs": [
{
"name": "DS_GOLIATH_INFLUXDB",
"label": "goliath influxdb",
"description": "",
"type": "datasource",
"pluginId": "influxdb",
"pluginName": "InfluxDB"
}
@skylord123
skylord123 / example.js
Created Aug 12, 2019
Home Assistant open card full screen by entity ID
View example.js
(function(ev, detail, entity=null) {
ev = new Event(ev, {
bubbles: true,
cancelable: false,
composed: true,
});
ev.detail = detail || {};
if(entity) {
entity.dispatchEvent(ev);
} else {
@skylord123
skylord123 / mqtt_helper.py
Last active Jul 30, 2017
Helper class for paho-mqtt to quickly integrate into existing sensor code (with reliable connection handling)
View mqtt_helper.py
# Author: Skylar Sadlier
# Author URL: https://github.com/skylord123
# Script Link: https://gist.github.com/skylord123/a54ce88aa79dfcd268a1cd92b499883d
import paho.mqtt.client as mqtt_client
# - Class Terminal -
# Uses curses to draw data to the terminal window.
class MQTT_Helper():
@skylord123
skylord123 / sithous.js
Last active Feb 22, 2017
Associative array helpers
View sithous.js
/**
*
* @param a
* @param b
* @param options
* ignoreMissingKeys (false) => if true will only compare keys that exist in both objects.
* caseSensitive (true) => if false strings will be compared without case sensitivity
* boolComparison (false) => if true will also compare using the Boolean values (helps match empty strings '' and NULL for example)
* @returns {boolean}
*/
@skylord123
skylord123 / gist:892b6e30b724b81a8a48
Created Nov 11, 2015
Linux machine to chromcast server
View gist:892b6e30b724b81a8a48
Following is taken from: https://plus.google.com/111475821387295047208/posts/KDEfS6S2hyk
-------------------------
How to turn your Linux machine into a Chromecast Server
Stream YouTube, Netflix, Hulu, Etc. from your smartphone or tablet onto your server or laptop. ...without buying Chromecast hardware...
Prerequisite- Install Google Chrome on your Desktop. Install Chromecast application onto your portable device.