@homebridge-plugins/homebridge-govee
Version:
Homebridge plugin to integrate Govee devices into HomeKit.
498 lines (486 loc) • 10.3 kB
JavaScript
export default {
defaultConfig: {
name: 'Govee',
username: '',
password: '',
ignoreMatter: false,
disableDeviceLogging: false,
httpRefreshTime: 30,
awsDisable: false,
bleDisable: false,
bleRefreshTime: 300,
lanDisable: false,
lanRefreshTime: 30,
lanScanInterval: 60,
bleControlInterval: 5,
colourSafeMode: false,
lightDevices: [],
switchDevices: [],
leakDevices: [],
thermoDevices: [],
fanDevices: [],
heaterDevices: [],
dehumidifierDevices: [],
humidifierDevices: [],
purifierDevices: [],
diffuserDevices: [],
kettleDevices: [],
iceMakerDevices: [],
platform: 'Govee',
},
defaultValues: {
adaptiveLightingShift: 0,
bleControlInterval: 5,
awsColourMode: 'default',
bleRefreshTime: 300,
brightnessStep: 1,
httpRefreshTime: 30,
lanRefreshTime: 30,
lanScanInterval: 60,
lowBattThreshold: 20,
showAs: 'default',
},
minValues: {
adaptiveLightingShift: -1,
bleControlInterval: 5,
bleRefreshTime: 60,
brightnessStep: 1,
httpRefreshTime: 30,
lanRefreshTime: 10,
lanScanInterval: 30,
lowBattThreshold: 1,
},
allowed: {
lightDevices: [
'label',
'deviceId',
'ignoreDevice',
'showAs',
'customAddress',
'customIPAddress',
'adaptiveLightingShift',
'awsBrightnessNoScale',
'awsColourMode',
'brightnessStep',
'scene',
'sceneTwo',
'sceneThree',
'sceneFour',
'musicMode',
'musicModeTwo',
'videoMode',
'videoModeTwo',
'diyMode',
'diyModeTwo',
'diyModeThree',
'diyModeFour',
'segmented',
'segmentedTwo',
'segmentedThree',
'segmentedFour',
],
switchDevices: [
'label',
'deviceId',
'ignoreDevice',
'showAs',
'temperatureSource',
],
leakDevices: ['label', 'deviceId', 'ignoreDevice', 'lowBattThreshold'],
thermoDevices: ['label', 'deviceId', 'ignoreDevice', 'lowBattThreshold'],
fanDevices: ['label', 'deviceId', 'ignoreDevice'],
heaterDevices: ['label', 'deviceId', 'ignoreDevice', 'tempReporting'],
humidifierDevices: ['label', 'deviceId', 'ignoreDevice'],
dehumidifierDevices: ['label', 'deviceId', 'ignoreDevice'],
purifierDevices: ['label', 'deviceId', 'ignoreDevice'],
diffuserDevices: ['label', 'deviceId', 'ignoreDevice'],
kettleDevices: [
'label',
'deviceId',
'ignoreDevice',
'hideModeGreenTea',
'hideModeOolongTea',
'hideModeCoffee',
'hideModeBlackTea',
'showCustomMode1',
'showCustomMode2',
],
iceMakerDevices: ['label', 'deviceId', 'ignoreDevice'],
awsColourMode: ['default', 'rgb', 'redgreenblue'],
showAs: [
'default',
'audio',
'box',
'cooler',
'heater',
'purifier',
'stick',
'switch',
'tap',
'valve',
],
},
models: {
rgb: [
'H6001',
'H6002',
'H6003',
'H6004',
'H6005',
'H6006',
'H6008',
'H6009',
'H600A',
'H600D',
'H6010',
'H6013',
'H601A',
'H601B',
'H601C',
'H601D',
'H6022',
'H6039',
'H6042',
'H6043',
'H6046',
'H6047',
'H6049',
'H604A',
'H604B',
'H604C',
'H604D',
'H6050',
'H6051',
'H6052',
'H6053',
'H6054',
'H6055',
'H6056',
'H6057',
'H6058',
'H6059',
'H605A',
'H605B',
'H605C',
'H605D',
'H6061',
'H6062',
'H6063',
'H6065',
'H6066',
'H6067',
'H6069',
'H606A',
'H6071',
'H6072',
'H6073',
'H6075',
'H6076',
'H6078',
'H6079',
'H607C',
'H6083',
'H6085',
'H6086',
'H6087',
'H6088',
'H6089',
'H608A',
'H608B',
'H608C',
'H608D',
'H6091',
'H6092',
'H6093',
'H6097',
'H6098',
'H6099',
'H60A0',
'H60A1',
'H6101',
'H6102',
'H6104',
'H6107',
'H6109',
'H610A',
'H610B',
'H6110',
'H6114',
'H6116',
'H6117',
'H611A',
'H611B',
'H611C',
'H611Z',
'H6121',
'H6125',
'H6126',
'H6127',
'H6129',
'H612A',
'H612B',
'H612C',
'H612D',
'H612E',
'H612F',
'H6135',
'H6137',
'H6138',
'H6139',
'H613A',
'H613B',
'H613C',
'H613D',
'H613E',
'H613F',
'H613G',
'H6141',
'H6142',
'H6143',
'H6144',
'H6145',
'H6146',
'H6147',
'H6148',
'H614A',
'H614B',
'H614C',
'H614D',
'H614E',
'H6154',
'H6159',
'H615A',
'H615B',
'H615C',
'H615D',
'H615E',
'H615F',
'H6160',
'H6161',
'H6163',
'H6167',
'H6168',
'H6169',
'H616C',
'H616D',
'H616E',
'H6170',
'H6171',
'H6172',
'H6173',
'H6175',
'H6176',
'H6178',
'H6179',
'H617A',
'H617C',
'H617E',
'H617F',
'H6181',
'H6182',
'H6185',
'H6188',
'H618A',
'H618C',
'H618E',
'H618F',
'H6195',
'H6196',
'H6198',
'H6199',
'H619A',
'H619B',
'H619C',
'H619D',
'H619E',
'H619Z',
'H61A0',
'H61A1',
'H61A2',
'H61A3',
'H61A5',
'H61A8',
'H61A9',
'H61B1',
'H61B2',
'H61B3',
'H61B5',
'H61B6',
'H61BA',
'H61BC',
'H61BE',
'H61C2',
'H61C3',
'H61C5',
'H61D3',
'H61D5',
'H61E0',
'H61E1',
'H61E5',
'H61E6',
'H61F2',
'H61F5',
'H61F6',
'H6601',
'H6602',
'H6604',
'H6609',
'H6640',
'H6641',
'H6800',
'H6810',
'H6811',
'H6840',
'H7001',
'H7002',
'H7005',
'H7006',
'H7007',
'H7008',
'H7010',
'H7011',
'H7012',
'H7013',
'H7015',
'H7016',
'H7017',
'H7019',
'H7020',
'H7021',
'H7022',
'H7023',
'H7024',
'H7028',
'H7029',
'H7031',
'H7032',
'H7033',
'H7037',
'H7038',
'H7039',
'H703A',
'H703B',
'H7041',
'H7042',
'H7050',
'H7051',
'H7052',
'H7053',
'H7055',
'H7057',
'H7058',
'H705A',
'H705B',
'H705C',
'H705D',
'H705E',
'H705F',
'H7060',
'H7061',
'H7062',
'H7063',
'H7065',
'H7066',
'H7067',
'H7068',
'H7069',
'H706A',
'H706B',
'H706C',
'H7070',
'H7075',
'H7078',
'H7090',
'H7092',
'H7095',
'H70A1',
'H70A2',
'H70A3',
'H70B1',
'H70B3',
'H70B4',
'H70B5',
'H70BC',
'H70C1',
'H70C2',
'H70C4',
'H70C5',
'H70C7',
'H70C9',
'H70CB',
'H70D1',
'H70D2',
'H70D3',
'H801B',
'H801C',
'H805A',
'H805B',
'H805C',
'H8072',
'H80C4',
'H8604',
'HXXXX', // placeholder for LAN-only configured models
],
switchSingle: ['H5001', 'H5080', 'H5081', 'H5083', 'H5086', 'H7014'],
switchDouble: ['H5082'],
switchTriple: ['H5160'],
sensorLeak: ['H5054', 'H5058'],
sensorThermo: [
'B5178',
'H5051',
'H5052',
'H5053',
'H5055',
'H5071',
'H5072',
'H5074',
'H5075',
'H5100',
'H5101',
'H5102',
'H5103',
'H5104',
'H5105',
'H5108',
'H5174',
'H5177',
'H5179',
'H5183',
'H5190',
],
sensorThermo4: ['H5198'],
sensorMonitor: ['H5106'],
fan: ['H7100', 'H7101', 'H7102', 'H7105', 'H7106', 'H7111'],
heater1: ['H7130', 'H713A', 'H713B', 'H713C'],
heater2: ['H7131', 'H7132', 'H7133', 'H7134', 'H7135'],
dehumidifier: ['H7150', 'H7151'],
humidifier: ['H7140', 'H7141', 'H7142', 'H7143', 'H7145', 'H7147', 'H7148', 'H7149', 'H714E', 'H7160'],
purifier: ['H7120', 'H7121', 'H7122', 'H7123', 'H7124', 'H7126', 'H7127', 'H7128', 'H7129', 'H712C'],
diffuser: ['H7161', 'H7162'],
iceMaker: ['H7172'],
sensorButton: ['H5122'],
sensorContact: ['H5123'],
sensorPresence: ['H5127'],
kettle: ['H7170', 'H7171', 'H7173', 'H7175', 'H717A'],
template: [
'H1162', // https://github.com/homebridge-plugins/homebridge-govee/issues/422
'H5024', // https://github.com/homebridge-plugins/homebridge-govee/issues/835
'H5042', // https://github.com/homebridge-plugins/homebridge-govee/issues/849
'H5043', // https://github.com/homebridge-plugins/homebridge-govee/issues/558
'H5085', // https://github.com/homebridge-plugins/homebridge-govee/issues/951
'H5121', // https://github.com/homebridge-plugins/homebridge-govee/issues/913
'H5126', // https://github.com/homebridge-plugins/homebridge-govee/issues/910
'H5107', // https://github.com/homebridge-plugins/homebridge-govee/issues/803
'H5109', // https://github.com/homebridge-plugins/homebridge-govee/issues/823
'H5125', // https://github.com/homebridge-plugins/homebridge-govee/issues/981
'H5185', // https://github.com/homebridge-plugins/homebridge-govee/issues/804
],
},
matterModels: ['H5085', 'H6022', 'H6099', 'H612B', 'H61F2', 'H6641', 'H6811', 'H7067', 'H706A', 'H706B', 'H706C', 'H7075', 'H70C4'],
awsOutlet1617: ['H5080', 'H5083'],
apiBrightnessScale: ['H6002', 'H6083', 'H6085', 'H6135', 'H6137', 'H7005'],
bleBrightnessNoScale: ['H6052', 'H6058', 'H6102', 'H613B', 'H613D', 'H617E'],
bleColourD: ['H6005', 'H6052', 'H6058', 'H6102', 'H613B', 'H613D', 'H617E'], // appears the same as above
bleColour1501: ['H6053', 'H6072', 'H6102', 'H6199'],
httpRetryCodes: ['ENOTFOUND', 'ETIMEDOUT', 'EAI_AGAIN', 'ECONNABORTED'],
}