Skip to content

Instantly share code, notes, and snippets.

View 9zigen's full-sized avatar
🎯
Focusing

Alexey Volkov 9zigen

🎯
Focusing
View GitHub Profile
@9zigen
9zigen / alab-co2-sensor-v1.2.js
Last active January 12, 2026 09:53
alab-co2-sensor-v1.2
const {binary, temperature, humidity, co2, numeric} = require('zigbee-herdsman-converters/lib/modernExtend');
const definition = {
zigbeeModel: ['Alab-CO2-1.2'],
model: 'Alab-CO2',
vendor: 'Alab',
description: '[Zigbee CO2 Sensor](https://www.tindie.com/products/a_lab_technology/zigbee-co2-sensor-v2/)',
extend: [
temperature(),
humidity(),
"""Module to handle quirks of the Alap CO2 Sensor.
manufacturer specific attributes to control displaying and specific configuration.
"""
import logging
import zigpy.profiles.zha as zha_p
from zigpy.quirks import CustomCluster, CustomDevice
from zigpy.zcl.clusters.homeautomation import Diagnostic
from zhaquirks import Bus, LocalDataCluster, QuickInitDevice
const {deviceEndpoints, numeric, onOff, commandsOnOff, binary, quirkAddEndpointCluster} = require('zigbee-herdsman-converters/lib/modernExtend');
const definition = {
zigbeeModel: ['alab.switch'],
model: 'alab.switch',
vendor: 'Alab',
description: 'Four channel relay board with four inputs',
extend: [
deviceEndpoints({
endpoints: {"l1":1,"l2":2,"l3":3,"l4":4,"in1":5,"in2":6,"in3":7,"in4":8}}
@9zigen
9zigen / alab-relay-board.js
Created November 25, 2023 21:42
inputs as switch
/* Custom converter for 4/8/12 channel zigbee switch */
const {
fromZigbeeConverters,
toZigbeeConverters,
exposes
} = require('zigbee-herdsman-converters');
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 {} = 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;
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 {} = 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;
const {binary, temperature, humidity, numeric} = require('zigbee-herdsman-converters/lib/modernExtend');
const definition = {
zigbeeModel: ['Alab-CO2-1.0', 'Alab-CO2-1.1'],
model: 'Alab-CO2-1.1',
vendor: 'Alab',
description: '[Zigbee CO2 Sensor](https://www.tindie.com/products/a_lab_technology/zigbee-co2-sensor-v2/)',
extend: [
temperature(),
humidity(),
const {binary, temperature, humidity, numeric, battery} = require('zigbee-herdsman-converters/lib/modernExtend');
const definition = {
zigbeeModel: ['Alab-PhSensor-1.0'],
model: 'Alab-PhSensor-1.0',
vendor: 'Alab',
description: '[DiY Wireless PH Sensor](https://github.com/9zigen/zigbee-ph-sensor)',
extend: [
temperature(),
humidity(),
#######################################################################
# CUSTOM NGINX CS-CART SETUP
# Simon Nicklin @SimonNjO
#######################################################################
#######################################################################
# A default configuration for domains and IP address.
#######################################################################
server {
@9zigen
9zigen / rpi3_iot_server.md
Created January 9, 2019 00:07 — forked from xoseperez/rpi3_iot_server.md
Raspberry Pi 3 with Mosquitto, Node-RED, InfluxDB, Grafana and Nginx (as a reverse proxy)