kitopopo wrote: Tuesday 05 January 2021 0:25
waaren wrote: Tuesday 05 January 2021 0:04
kitopopo wrote: Monday 04 January 2021 23:43
The script works almost perfectly, it correctly detects the default color of philips but there seems to be a bug in the green color, when I try to set cool white as the desired color, the color is always executed RGB: ff00ff
you could tryagain after replacing the lines
Code: Select all
bulb.setRGB(betterColor.red, betterColor.green, betterColor.blue)
bulb.dimTo(betterColor.brightness)
with
Code: Select all
bulb.setColor(betterColor.red, betterColor.green, betterColor.blue, betterColor.brightness)
to see if that gives a better result.
Dear @waaren,
Now the scripts works correctly. thanks very much.
I'm really grateful to you, best regrads
Hi dear @waaren,
I have been able to thoroughly test the script and find three small problems that I do not know how to solve.
-------
1) If I select as bettercolor for example r: 10, g: 10 and b: 10, brightness 100, the following pattern is sent to the bulbs:
Code: Select all
Debug: getColor Hue: OpenURL: url = http://127.0.0.1:xxxx/json.htm?type=command¶m=setcolbrightnessvalue&idx=368&brightness=100&color={"m":3,"t":0,"cw":0,"ww":0,"r":10,"g":10,"b":10}
According to the frame sent, the brightness received by the bulbs is not 100, the brightness received by the bulbs is 7
MQTT publish: topic \'zigbee2mqtt/lamps\', payload \'{"brightness":7,"color":{"hue":82,"saturation":56,"x":0.3227,"y":0.329},"color_temp":165,"state":"ON"}\''}
the brightness increases depending on the rgb values you choose, 255,255,255 would be the maximum brightness.
I think this is because mode = 3 is used in the sending sequence. I have done tests sending the command directly with the browser and I think that using mode = 1 or mode = 2 the brightness would be correct.
--------
2) The reading of the colors that the script performs every minute I think is not correct either. If I choose as betterColour the colors r: 200, g: 100, b: 50,
Code: Select all
Debug: getColor Hue: OpenURL: url = http://127.0.0.1:xxx/json.htm?type=command¶m=setcolbrightnessvalue&idx=368&brightness=100&color={"m":3,"t":0,"cw":0,"ww":0,"r":200,"g":100,"b":50}
the colors read by dzvents and that appear in the log in the next few minutes are:
Code: Select all
2021-01-09 19:19:00.685 Status: dzVents: > red: 255
2021-01-09 19:19:00.685 Status: dzVents: > green: 128
2021-01-09 19:19:00.685 Status: dzVents: > blue: 66
if i'm not wrong i think the script should read r: 200, g: 100, b: 50,
--------
3) If at the time the sequence is sent to the bulbs I turn off the bulbs, the sequence is permanently with error in the log until they receive power again, is there any way to cancel the queue? maybe using .cancelQueuedCommands() after the shelly is turned off
2021-01-09 19:36:53.362 Error: (zigbe2mqtt) A Zigbee publish error occured for device 'Philips hue2' with error message: Publish 'set' 'color' to 'Philips hue2' failed: 'Error: Command 0x001788010494a4d3/11 lightingColorCtrl.moveToColor({"transtime":0,"colorx":21148,"colory":21561}, {"timeout":10000,"disableResponse":false,"disableRecovery":false,"disableDefaultResponse":false,"direction":0,"srcEndpoint":null,"reservedBits":0,"manufacturerCode":null,"transactionSequenceNumber":null}) failed (Data request failed with error: 'No network route' (205))'
2021-01-09 19:36:53.362 Error: (zigbe2mqtt) A Zigbee publish error occured for device 'Philips hue1' with error message: Publish 'set' 'color' to 'Philips hue1' failed: 'Error: Command 0x0017880104dc1f87/11 lightingColorCtrl.moveToColor({"transtime":0,"colorx":21148,"colory":21561}, {"timeout":10000,"disableResponse":false,"disableRecovery":false,"disableDefaultResponse":false,"direction":0,"srcEndpoint":null,"reservedBits":0,"manufacturerCode":null,"transactionSequenceNumber":null}) failed (Data request failed with error: 'No network route' (205))'
2021-01-09 19:37:12.079 Error: (zigbe2mqtt) A Zigbee publish error occured for device 'Philips hue4' with error message: Publish 'set' 'color' to 'Philips hue4' failed: 'Error: Command 0x00178801049496be/11 lightingColorCtrl.moveToColor({"transtime":0,"colorx":21148,"colory":21561}, {"timeout":10000,"disableResponse":false,"disableRecovery":false,"disableDefaultResponse":false,"direction":0,"srcEndpoint":null,"reservedBits":0,"manufacturerCode":null,"transactionSequenceNumber":null}) failed (Data request failed with error: 'No network route' (205))'
2021-01-09 19:37:12.181 Error: (zigbe2mqtt) A Zigbee publish error occured for device 'Philips hue3' with error message: Publish 'set' 'color' to 'Philips hue3' failed: 'Error: Command 0x0017880104dc1794/11 lightingColorCtrl.moveToColor({"transtime":0,"colorx":21148,"colory":21561}, {"timeout":10000,"disableResponse":false,"disableRecovery":false,"disableDefaultResponse":false,"direction":0,"srcEndpoint":null,"reservedBits":0,"manufacturerCode":null,"transactionSequenceNumber":null}) failed (Data request failed with error: 'No network route' (205))'
Thank you for your dedication again. Is possible solve this problems?
quiet there is no rush, answer when you have time, thank you very much
a cordial greeting, best regard