milo526 / homebridge-tuya-web

Hoobs and Homebridge plugin for Tuya devices using Home Assistant Tuya Web Api
MIT License
217 stars 93 forks source link

'Color Temperature': characteristic was supplied illegal value #491

Closed sparklesrainbow closed 1 year ago

sparklesrainbow commented 1 year ago

Getting this error during reboot and initialization. This hangs homebridge. These are Costco bought Feit lights.

[07/11/2022, 21:55:03] [TuyaWebPlatform] [MBR1] Characteristic.ColorTemperature - Characteristic 'ColorTemperature' will receive value lower than allowed mired (-1901) since provided Tuya kelvin value (36294) exceeds configured maximum Tuya kelvin value (2000). Please update your configuration! [07/11/2022, 21:55:03] [@milo526/homebridge-tuya-web] This plugin generated a warning from the characteristic 'Color Temperature': characteristic was supplied illegal value: number -1901 exceeded minimum of 140. See https://homebridge.io/w/JtMGR for more info. [07/11/2022, 21:55:03] [@milo526/homebridge-tuya-web] Error: at ColorTemperature.Characteristic.characteristicWarning (/var/lib/homebridge/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:2138:105) at ColorTemperature.Characteristic.validateUserInput (/var/lib/homebridge/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:2050:14) at ColorTemperature.Characteristic.updateValue (/var/lib/homebridge/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:1457:20) at LightAccessory.setCharacteristic (/var/lib/homebridge/node_modules/@milo526/homebridge-tuya-web/src/accessories/BaseAccessory.ts:272:55) at ColorTemperatureCharacteristic.updateValue (/var/lib/homebridge/node_modules/@milo526/homebridge-tuya-web/src/accessories/characteristics/colorTemperature.ts:116:22) at LightAccessory.updateState (/var/lib/homebridge/node_modules/@milo526/homebridge-tuya-web/src/accessories/BaseAccessory.ts:420:9) at LightAccessory.updateAccessory (/var/lib/homebridge/node_modules/@milo526/homebridge-tuya-web/src/accessories/BaseAccessory.ts:413:10) at TuyaWebPlatform.refreshDeviceStates (/var/lib/homebridge/node_modules/@milo526/homebridge-tuya-web/src/platform.ts:192:41) at TuyaWebPlatform.discoverDevices (/var/lib/homebridge/node_modules/@milo526/homebridge-tuya-web/src/platform.ts:314:16) at processTicksAndRejections (node:internal/process/task_queues:96:5) [07/11/2022, 21:55:03] [TuyaWebPlatform] [Color Lights] Characteristic.Brightness - Characteristic 'Brightness' will receive value higher than allowed (272.22222222222223) since provided Tuya value (255) exceeds configured maximum Tuya value (100). Please update your configuration! [07/11/2022, 21:55:03] [@milo526/homebridge-tuya-web] This plugin generated a warning from the characteristic 'Brightness': characteristic was supplied illegal value: number 272 exceeded maximum of 100. See https://homebridge.io/w/JtMGR for more info. [07/11/2022, 21:55:03] [@milo526/homebridge-tuya-web] Error: at Brightness.Characteristic.characteristicWarning (/var/lib/homebridge/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:2138:105) at Brightness.Characteristic.validateUserInput (/var/lib/homebridge/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:2054:14) at Brightness.Characteristic.updateValue (/var/lib/homebridge/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:1457:20) at LightAccessory.setCharacteristic (/var/lib/homebridge/node_modules/@milo526/homebridge-tuya-web/src/accessories/BaseAccessory.ts:272:55) at BrightnessCharacteristic.updateValue (/var/lib/homebridge/node_modules/@milo526/homebridge-tuya-web/src/accessories/characteristics/brightness.ts:112:22) at LightAccessory.updateState (/var/lib/homebridge/node_modules/@milo526/homebridge-tuya-web/src/accessories/BaseAccessory.ts:420:9) at LightAccessory.updateAccessory (/var/lib/homebridge/node_modules/@milo526/homebridge-tuya-web/src/accessories/BaseAccessory.ts:413:10) at TuyaWebPlatform.refreshDeviceStates (/var/lib/homebridge/node_modules/@milo526/homebridge-tuya-web/src/platform.ts:192:41) at TuyaWebPlatform.discoverDevices (/var/lib/homebridge/node_modules/@milo526/homebridge-tuya-web/src/platform.ts:314:16) at processTicksAndRejections (node:internal/process/task_queues:96:5)

sparklesrainbow commented 1 year ago

Here is my configuration

Got credentials { 'access_token': '', 'expires_in': 864000, 'refresh_token': '', 'token_type': 'bearer'} Getting devices Got devices { 'header': {'code': 'SUCCESS', 'payloadVersion': 1}, 'payload': { 'devices': [ { 'data': { 'brightness': '1000', 'color_mode': 'white', 'color_temp': 1000, 'online': True, 'state': 'false'}, 'dev_type': 'light', 'ha_type': 'light', 'icon': 'https://images.tuyaus.com/smart/icon/ay1540090202974nPnzF/161544356620be39815e1.png', 'id': 'eb37caf958e9f46d1848g8', 'name': 'Office1'}, { 'data': { 'brightness': '255', 'color_mode': 'white', 'color_temp': 1000, 'online': True, 'state': 'false'}, 'dev_type': 'light', 'ha_type': 'light', 'icon': 'https://images.tuyaus.com/smart/icon/ay1547545924859HGF4T/1589593757fb4d5dd1685.png', 'id': 'ebf76582e9abcc76e37uj4', 'name': 'Color Lights 3'}, { 'data': { 'brightness': '255', 'color_mode': 'white', 'color_temp': 1282, 'online': False, 'state': 'true'}, 'dev_type': 'light', 'ha_type': 'light', 'icon': 'https://images.tuyaus.com/smart/icon/ay1547545924859HGF4T/1589593757fb4d5dd1685.png', 'id': 'ebdbfb86a7c517d153crdo', 'name': 'Color Lights 2'}, { 'data': { 'brightness': '1000', 'color_mode': 'white', 'color_temp': 1000, 'online': True, 'state': 'false'}, 'dev_type': 'light', 'ha_type': 'light', 'icon': 'https://images.tuyaus.com/smart/icon/ay1540090202974nPnzF/161544356620be39815e1.png', 'id': 'ebc080d2859293a119vosb', 'name': 'Office3'}, { 'data': { 'brightness': '1000', 'color_mode': 'white', 'color_temp': 1000, 'online': True, 'state': 'false'}, 'dev_type': 'light', 'ha_type': 'light', 'icon': 'https://images.tuyaus.com/smart/icon/ay1540090202974nPnzF/161544356620be39815e1.png', 'id': 'ebdd6a5806ae6206e15y1h', 'name': 'Office2'}, { 'data': { 'brightness': '255', 'color_mode': 'white', 'color_temp': 1000, 'online': False, 'state': 'true'}, 'dev_type': 'light', 'ha_type': 'light', 'icon': 'https://images.tuyaus.com/smart/icon/ay1517349698958w8yNe/1590026971cb65f562015.png', 'id': 'eb07dd518e06668a5c2j8f', 'name': 'Media 2'}, { 'data': { 'brightness': '1000', 'color_mode': 'white', 'color_temp': 36294, 'online': False, 'state': 'true'}, 'dev_type': 'light', 'ha_type': 'light', 'icon': 'https://images.tuyaus.com/smart/solution/143006/37e69c2be34b7642_cover.png', 'id': 'ebfd172e3b97c8c1cbrn0x', 'name': 'MBR3'}, { 'data': { 'brightness': '1000', 'color_mode': 'white', 'color_temp': 36294, 'online': False, 'state': 'true'}, 'dev_type': 'light', 'ha_type': 'light', 'icon': 'https://images.tuyaus.com/smart/solution/143006/37e69c2be34b7642_cover.png', 'id': 'ebc57749aada6cb5a6mu3s', 'name': 'MBR2'}, { 'data': { 'brightness': '255', 'color_mode': 'white', 'color_temp': 1000, 'online': False, 'state': 'true'}, 'dev_type': 'light', 'ha_type': 'light', 'icon': 'https://images.tuyaus.com/smart/icon/ay1517349698958w8yNe/1590026971cb65f562015.png', 'id': 'eb1098ff66e775509ftcdt', 'name': 'Color Lights 4'}, { 'data': { 'brightness': '1000', 'color_mode': 'white', 'color_temp': 36294, 'online': False, 'state': 'true'}, 'dev_type': 'light', 'ha_type': 'light', 'icon': 'https://images.tuyaus.com/smart/solution/143006/37e69c2be34b7642_cover.png', 'id': 'eb1d9d007cdd637b6bcxsi', 'name': 'MBR1'}, { 'data': { 'brightness': '255', 'color_mode': 'white', 'color_temp': 1318, 'online': False, 'state': 'true'}, 'dev_type': 'light', 'ha_type': 'light', 'icon': 'https://images.tuyaus.com/smart/icon/ay1517349698958w8yNe/1590026971cb65f562015.png', 'id': 'eb1381309a40131ccasiyv', 'name': 'Color Lights'}, { 'data': { 'brightness': '1000', 'color_mode': 'white', 'color_temp': 1000, 'online': True, 'state': 'false'}, 'dev_type': 'light', 'ha_type': 'light', 'icon': 'https://images.tuyaus.com/smart/icon/ay1540090202974nPnzF/161544356620be39815e1.png', 'id': 'eb4317a2fabd19f210bemo', 'name': 'Office4'}, { 'data': { 'brightness': '255', 'color_mode': 'white', 'color_temp': 1035, 'online': False, 'state': 'true'}, 'dev_type': 'light', 'ha_type': 'light', 'icon': 'https://images.tuyaus.com/smart/icon/ay1547545924859HGF4T/1589593757fb4d5dd1685.png', 'id': 'eb708ffb8e532f83beyx3k', 'name': 'Color Lights'}, { 'data': { 'brightness': '255', 'color_mode': 'white', 'color_temp': 1000, 'online': True, 'state': 'false'}, 'dev_type': 'light', 'ha_type': 'light', 'icon': 'https://images.tuyaus.com/smart/icon/ay1517349698958w8yNe/1571837684330fdce5ee4.png', 'id': '3616144040f520127127', 'name': 'FrontDoor'}, { 'data': { 'brightness': '255', 'color_mode': 'white', 'color_temp': 1000, 'online': False, 'state': 'true'}, 'dev_type': 'light', 'ha_type': 'light', 'icon': 'https://images.tuyaus.com/smart/icon/ay1517349698958w8yNe/1590026971cb65f562015.png', 'id': 'eb15a128ba9f3af322ayxk', 'name': 'Media 1'}, { 'data': {'online': True, 'state': False}, 'dev_type': 'switch', 'ha_type': 'switch', 'icon': 'https://images.tuyaus.com/smart/icon/ay1518058362399MS7Ky/1638934342088c57b03d0.jpg', 'id': '070004558cce4e238b48_1', 'name': 'Switch 1'}, { 'data': {'online': True, 'state': False}, 'dev_type': 'switch', 'ha_type': 'switch', 'icon': 'https://images.tuyaus.com/smart/icon/ay1518058362399MS7Ky/1638934342088c57b03d0.jpg', 'id': '070004558cce4e238b48_2', 'name': 'Switch 2'}, { 'data': {'online': True, 'state': False}, 'dev_type': 'switch', 'ha_type': 'switch', 'icon': 'https://images.tuyaus.com/smart/icon/ay1518058362399MS7Ky/1638934342088c57b03d0.jpg', 'id': '070004558cce4e238b48_3', 'name': 'Switch 3'}, { 'data': {}, 'dev_type': 'scene', 'ha_type': 'scene', 'id': 'rFVnEWYQniMGnLSY', 'name': 'Turn on all sockets'}, { 'data': {}, 'dev_type': 'scene', 'ha_type': 'scene', 'id': '80lAr7abgPK8wb4M', 'name': 'Turn off all sockets'}], 'scenes': []}}

milo526 commented 1 year ago

Please read the following wiki article to find out how to configure your devices to solve this problem.

https://github.com/milo526/homebridge-tuya-web/wiki/Something-will-receive-higher-or-lower-value-than-allowed

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.