Skip to content

Instantly share code, notes, and snippets.

View JohnMcLear's full-sized avatar
🌴
On vacation

John McLear JohnMcLear

🌴
On vacation
View GitHub Profile
@JohnMcLear
JohnMcLear / convertPaxton.js
Last active March 14, 2024 14:00
Convert Paxton
const convertPaxton = (uid) => {
if (!uid) uid = "11223344"
const type = 3;
let result = 0n;
let dec = 0n;
// For each digit in 11223344
uid.split('').forEach(
(digit, index) => {
dec = (getParity(BigInt(digit)) << 4n) + BigInt(digit); // getParity does some funky shit and returns the new BigInt.
// 4n is Numeric 4 but represented in a way that it can iterate with BitWise operators
@JohnMcLear
JohnMcLear / paxton-covert.html
Created March 13, 2024 14:30 — forked from natmchugh/paxton-covert.html
Convert Paxton Fob Data to ids and vice versa
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>Paxton Fob converter</title>
<style>
table, th, td, div {
border: 1px solid black;
}
@JohnMcLear
JohnMcLear / README.md
Created February 27, 2024 19:09
D-Logic uFR NFC device in Field with ESPHome - Quick and Hacky method using HTTP POST

ESPHome config

switch:
  - platform: gpio
    id: nfc
    pin: GPIO10
    name: "nfc"
@JohnMcLear
JohnMcLear / MiboxerFUTC02Z.js
Created March 23, 2022 10:36
Miboxerr zigbee2mqtt external converter addresses TS0505B model and TZ3210 vendor firmware requirements
const exposes = require('zigbee-herdsman-converters/lib/exposes');
const globalStore = require('zigbee-herdsman-converters/lib/store');
const ota = require('zigbee-herdsman-converters/lib/ota');
const extend = require('zigbee-herdsman-converters/lib/extend');
const utils = require('zigbee-herdsman-converters/lib/utils');
const tz = require('zigbee-herdsman-converters/converters/toZigbee');
const e = exposes.presets;
const gledoptoExtend = {
light_onoff_brightness: (options={}) => ({
blueprint:
name: ZHA - Aqara Wireless Remote Switch (Double Rocker 86sw2)
description: Automate your Xiaomi Aqara Wireless Remote Switch (Double Rocker) (lumi.sensor_86sw2 Version) using ZHA events.
domain: automation
input:
aqara_mini_switch:
name: Select the Aqara Wireless Remote Switch (Double Rocker)
description: Aqara Wireless Remote Switch (Double Rocker)
selector:
device:
blueprint:
name: ZHA - Aqara Wireless Remote Switch (Double Rocker 86sw2)
description: Automate your Xiaomi Aqara Wireless Remote Switch (Double Rocker) (lumi.sensor_86sw2 Version) using ZHA events.
domain: automation
input:
aqara_mini_switch:
name: Select the Aqara Wireless Remote Switch (Double Rocker)
description: Aqara Wireless Remote Switch (Double Rocker)
selector:
device:
blueprint:
name: ZHA - Aqara Wireless Remote Switch (Double Rocker)
description: Automate your Xiaomi Aqara Wireless Remote Switch (Double Rocker) using ZHA events.
domain: automation
input:
aqara_mini_switch:
name: Select the Aqara Wireless Remote Switch (Double Rocker)
description: Aqara Wireless Remote Switch (Double Rocker)
selector:
device:
blueprint:
name: ZHA - Aqara Wireless Remote Switch (Double Rocker)
description: Automate your Xiaomi Aqara Wireless Remote Switch (Double Rocker) using ZHA events.
domain: automation
input:
aqara_mini_switch:
name: Select the Aqara Wireless Remote Switch (Double Rocker)
description: Aqara Wireless Remote Switch (Double Rocker)
selector:
device:
'use strict';
/**
* This code is mostly from the old Etherpad. Please help us to comment this code.
* This helps other people to understand this code better and helps them to improve it.
* TL;DR COMMENTS ON THIS FILE ARE HIGHLY APPRECIATED
*/
/**
* Copyright 2009 Google Inc.
*
'use strict';
/**
* This code is mostly from the old Etherpad. Please help us to comment this code.
* This helps other people to understand this code better and helps them to improve it.
* TL;DR COMMENTS ON THIS FILE ARE HIGHLY APPRECIATED
*/
/**
* Copyright 2009 Google Inc.
*