Closed Dark-Noir closed 2 years ago
Hi, sorry for the late reply, was really busy. I cannot reproduce your issue here, I need more info. What type of light do you have? bulb, rgb led, etc.. Please also post a screenshot of the node configuration
Hey, thanks for the reply, here are the screenshot.
You see i use two nodes for the same lamp, with the only difference that the upper one has a json output:
Maybe this issue has something to do with my node-red version, i am still on v1.2.9, but had no time to update it yet 😅
I don't think the issue is the node-red version, but still cannot reproduce, neither with 2 nodes as you used. Maybe I'm wrong, but I suspect the issue is not in the Tasmota node but instead somewhere else in your flow. Are you able to reproduce the issue in a clean flow with only the tasmota nodes?
Ah i found the issue when i delete the "Percentage to 0-255 Brightness" node: which is directly behind the output of your node and connect it straight to "Kelvin to CT" node, the brightness issue is fixed, but ct is still wrong, i also have to delete the "Kelvin to CT" node: only then your node works fine. Unfortunately i need these two nodes to convert the output of your node for Alexa (node-red-contrib-amazon-echo), maybe i could use the function for it, but my java script skills are not the best 😅
The the issue is not in the tasmota node but in your flow, I suspect you are creating some sort of loop and I think your Kelvin to CT conversion is not right. I'm closing this, feel free to reopen if you find that the error is in my nodes.
Here is a exported flow
[{"id":"c349dc8f.15a998","type":"tab","label":"Flow 1","disabled":false,"info":""},{"id":"c6ebe476.f403a8","type":"Tasmota Light","z":"c349dc8f.15a998","broker":"","device":"your device","name":"","outputs":1,"uidisabler":false,"fullTopic":"","cmndPrefix":"","statPrefix":"","telePrefix":"","qos":1,"retain":false,"havedimmer":true,"havetemp":true,"havecolors":true,"tempformat":"K","colorsformat":"RGB","x":690,"y":100,"wires":[["32068f0c.4ca548"]]},{"id":"b630a650.a52ff","type":"range","z":"c349dc8f.15a998","minin":"6500","maxin":"2000","minout":"200","maxout":"383","action":"scale","round":true,"property":"payload.ct","name":"Kelvin to CT","x":1350,"y":100,"wires":[["d11569c0.ba84d8"]]},{"id":"32068f0c.4ca548","type":"range","z":"c349dc8f.15a998","minin":"1","maxin":"100","minout":"4","maxout":"254","action":"clamp","round":true,"property":"payload.bright","name":"Percentage to 0-255 Brightness","x":1110,"y":100,"wires":[["b630a650.a52ff"]]},{"id":"7c60416e.21d2c","type":"inject","z":"c349dc8f.15a998","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"true","payloadType":"bool","x":410,"y":60,"wires":[["c6ebe476.f403a8"]]},{"id":"d88c4931.a94ce8","type":"inject","z":"c349dc8f.15a998","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"false","payloadType":"bool","x":410,"y":100,"wires":[["c6ebe476.f403a8"]]},{"id":"d11569c0.ba84d8","type":"debug","z":"c349dc8f.15a998","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1570,"y":80,"wires":[]}]
I can reproduce it with it, just enter your tasmota device/mqtt broker.
oh gosh... yes, I can reproduce the issue now.. but is sooo WEIRED... seems the scale node is doing something nasty I will check better tomorrow
This should be fixed now, can you please test the new 0.9.12 release and confirm that it works for you?
Yeah i already tested it and it works fine in my flow, thank you 👍
Great :)
Hey,
i use the "Light" node in the json output mode, everything seems to work fine. But when i sent a msg.payload with true or false the brightness value are increasing.
Example: On with 1% Turn off, value is now 4% Turn on again, value is now 12% Turn off again, value is now 32% etc..
After some turn off and on's the value can go far beyond 100%:
Also the ct values jumps to a wrong value around ~400-500 when the correct ct value are ~5300:
Issue not occur when using the node with splitted outputs.