USB Local to zigbee2mqtt

Signed-off-by: Martyn Ranyard <m@rtyn.berlin>
This commit is contained in:
Martyn 2023-11-14 18:20:27 +01:00
parent 42a5392d9c
commit 7948c98c62
2 changed files with 111 additions and 3 deletions

View File

@ -20,18 +20,119 @@ data:
log_output:
- console
channel: 25
network_key:
- 140
- 18
- 129
- 36
- 87
- 2
- 242
- 222
- 178
- 205
- 177
- 160
- 9
- 212
- 115
- 122
experimental:
new_api: true
frontend:
port: 8080
homeassistant: true
serial:
adapter: deconz
port: 'tcp://ser2net.ser2net.svc.cluster.local:3001'
port: '/dev/zig'
mqtt:
base_topic: zigbee2mqtt
include_device_information: true
server: 'mqtt://mosquitto.martyn.berlin'
permit_join: false
devices:
groups:
'0xa4c1385bec2c7f60':
friendly_name: '0xa4c1385bec2c7f60'
'0xa4c138998e1d61b2':
friendly_name: '0xa4c138998e1d61b2'
'0xa4c138dbd3eb65de':
friendly_name: '0xa4c138dbd3eb65de'
'0xa4c1381d71f392c9':
friendly_name: '0xa4c1381d71f392c9'
'0xa4c138bdf9f23a06':
friendly_name: '0xa4c138bdf9f23a06'
'0xa4c1385d80974719':
friendly_name: '0xa4c1385d80974719'
'0xa4c138a05e5e3cfa':
friendly_name: '0xa4c138a05e5e3cfa'
'0x00124b00251e68fa':
friendly_name: '0x00124b00251e68fa'
'0x00124b00251e94b6':
friendly_name: '0x00124b00251e94b6'
'0x00124b00251973af':
friendly_name: '0x00124b00251973af'
'0xa4c138a27426ae88':
friendly_name: '0xa4c138a27426ae88'
'0xa4c138c77b4071a0':
friendly_name: '0xa4c138c77b4071a0'
'0xa4c13803c6901458':
friendly_name: '0xa4c13803c6901458'
'0x00158d000830e5aa':
friendly_name: '0x00158d000830e5aa'
'0x680ae2fffee55de6':
friendly_name: '0x680ae2fffee55de6'
'0x588e81fffe21fbf0':
friendly_name: '0x588e81fffe21fbf0'
'0xf0d1b800001d71bb':
friendly_name: '0xf0d1b800001d71bb'
'0xa4c1380017db181e':
friendly_name: ender3
'0xa4c13886e0e34594':
friendly_name: '0xa4c13886e0e34594'
'0xa4c13815d4b54004':
friendly_name: '0xa4c13815d4b54004'
'0xa4c138f57872ae4d':
friendly_name: '0xa4c138f57872ae4d'
'0xa4c138353fbe5365':
friendly_name: '0xa4c138353fbe5365'
'0xa4c138093448ff93':
friendly_name: '0xa4c138093448ff93'
'0xa4c138851346c56d':
friendly_name: '0xa4c138851346c56d'
'0x00124b00251971fa':
friendly_name: '0x00124b00251971fa'
'0xa4c138de0eac709d':
friendly_name: '0xa4c138de0eac709d'
'0xd0cf5efffebfcc67':
friendly_name: '0xd0cf5efffebfcc67'
'0xa4c138aa6e4afbfd':
friendly_name: '0xa4c138aa6e4afbfd'
external_converters:
- ledvanceA60S.js
ledvanceA60S.js: |
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 e = exposes.presets;
const ea = exposes.access;
const definition = {
zigbeeModel: ['A60S RGBW'],
model: 'A60S RGBW',
vendor: 'Ledvance',
description: 'Ledvance Classic E27 Multicolor',
// Note that fromZigbee, toZigbee and exposes are missing here since we use extend here.
// Extend contains a default set of fromZigbee/toZigbee converters and expose for common device types.
// The following extends are available:
// - extend.switch
// - extend.light_onoff_brightness
// - extend.light_onoff_brightness_colortemp
// - extend.light_onoff_brightness_color
// - extend.light_onoff_brightness_colortemp_color
extend: extend.light_onoff_brightness_colortemp_color(),
};
module.exports = definition;

View File

@ -55,6 +55,7 @@ spec:
- /bin/sh
- -c
- cp /configs/configuration.yaml /data/;
- cp /configs/ledvanceA60S.js /data/;
image: alpine:latest
imagePullPolicy: IfNotPresent
name: copy
@ -105,6 +106,8 @@ spec:
volumeMounts:
- mountPath: /data
name: data
- mountPath: /dev/zig
name: usbdev
dnsPolicy: ClusterFirstWithHostNet
enableServiceLinks: true
hostNetwork: true
@ -116,3 +119,7 @@ spec:
- name: data
persistentVolumeClaim:
claimName: zigbee2mqtt
- name: usbdev
hostPath:
path: /dev/serial/by-id/usb-ITead_Sonoff_Zigbee_3.0_USB_Dongle_Plus_1a3ee6f57a12ec11823821c7bd930c07-if00-port0