Skip to content

Instantly share code, notes, and snippets.

View Koenkk's full-sized avatar
💭
🐝

Koen Kanters Koenkk

💭
🐝
  • ASML
  • The Netherlands, Helmond
  • 14:38 (UTC +01:00)
  • LinkedIn in/koenkanters
View GitHub Profile
This file has been truncated, but you can view the full file.
5/1/2019, 11:13:57 PM - info: Logging to directory: '/home/koen/Git/zigbee2mqtt/data/log/2019-05-01.23-13-57'
5/1/2019, 11:13:57 PM - debug: Removing old log directory '/home/koen/Git/zigbee2mqtt/data/log/2019-05-01.23-02-19'
5/1/2019, 11:13:58 PM - debug: Using zigbee-shepherd with settings: '{"net":{"panId":6754,"extPanId":[221,221,221,221,221,221,221,221],"channelList":[11],"precfgkey":"HIDDEN"},"dbPath":"/home/koen/Git/zigbee2mqtt/data/database.db","coordBackupPath":"/home/koen/Git/zigbee2mqtt/data/coordinator_backup.json","sp":{"baudRate":115200,"rtscts":true}}'
5/1/2019, 11:13:58 PM - debug: Loaded state from file /home/koen/Git/zigbee2mqtt/data/state.json
5/1/2019, 11:13:58 PM - debug: Saving state to file /home/koen/Git/zigbee2mqtt/data/state.json
5/1/2019, 11:13:58 PM - info: Starting zigbee2mqtt version 1.3.1 (commit #3108825)
5/1/2019, 11:13:58 PM - info: Starting zigbee-shepherd
5/1/2019, 11:13:59 PM - info: zigbee-shepherd started
5/1/2019, 11:13:59 PM - info: Coordinator firmware version: '20190
/* jshint node: true */
'use strict';
var fs = require('fs'),
util = require('util'),
EventEmitter = require('events');
var Q = require('q'),
_ = require('busyman'),
zclId = require('zcl-id'),
@Koenkk
Koenkk / Install Node.js 10 on Raspberry Pi 1 or zero
Last active February 15, 2023 20:50
Install Node.js 10 on Raspberry Pi 1 or zero
NODE=10.17.0
wget https://nodejs.org/dist/v$NODE/node-v$NODE-linux-armv6l.tar.xz
tar -xvf node-v$NODE-linux-armv6l.tar.xz
sudo cp -R node-v$NODE-linux-armv6l/* /usr/local/
rm -rf node-v$NODE-linux-armv6l node-v$NODE-linux-armv6l.tar.xz
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
@Koenkk
Koenkk / zStackAdapter.js
Created February 29, 2020 14:28
Improve LQI
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
@Koenkk
Koenkk / TS0504B.js
Last active December 23, 2021 16:37
TS0504B with white channel support
const tz = require('zigbee-herdsman-converters/converters/toZigbee');
const extend = require('zigbee-herdsman-converters/lib/extend');
const libColor = require('zigbee-herdsman-converters/lib/color');
const tzLocal = {
light_color_white: {
key: ['color'],
convertSet: async (entity, key, value, meta) => {
const color = libColor.Color.fromConverterArg(value);
console.log(color);
const fz = require('zigbee-herdsman-converters/converters/fromZigbee');
const tz = require('zigbee-herdsman-converters/converters/toZigbee');
const exposes = require('zigbee-herdsman-converters/lib/exposes');
const reporting = require('zigbee-herdsman-converters/lib/reporting');
const extend = require('zigbee-herdsman-converters/lib/extend');
const ota = require('zigbee-herdsman-converters/lib/ota');
const tuya = require('zigbee-herdsman-converters/lib/tuya');
const utils = require('zigbee-herdsman-converters/lib/utils');
const e = exposes.presets;
const ea = exposes.access;
const fz = require('zigbee-herdsman-converters/converters/fromZigbee');
const tz = require('zigbee-herdsman-converters/converters/toZigbee');
const exposes = require('zigbee-herdsman-converters/lib/exposes');
const reporting = require('zigbee-herdsman-converters/lib/reporting');
const extend = require('zigbee-herdsman-converters/lib/extend');
const ota = require('zigbee-herdsman-converters/lib/ota');
const tuya = require('zigbee-herdsman-converters/lib/tuya');
const utils = require('zigbee-herdsman-converters/lib/utils');
const globalStore = require('zigbee-herdsman-converters/lib/store');
const e = exposes.presets;