So that’s it. I need once again your help guys because IR Remote is working perfectly, (almost) everything is perfect, except the colors that does not match the ones I try to set on the OH APP and on the Control screen.
This sounds like the easier one to tackle to begin with.
What does your events.log show you when you try to use the UI to command it? Anything in your openhab.log at time?
That’s encouraging, basic MQTT setup is good.
You might find it useful to get a tool like mqtt.fx so that you can observe MQTT traffic through your broker.
Okay, i suppose you have not linked any Item to this.
So you’d probably be interested in what was sent to the device, if anything.
That was what the mqtt.fx or similar was for.
What are you supposed to send, what is different?
Thank you for your kind offer. For now I will try to make it work by other means. If I see I am not able to, I might just get back to you.
Numbers basically. It expects to receive a value and for some reason, or it is incorrectly formated and the device cannot read, making it always zero, or really nothing is being sent, which I doubt.
Regarding MQTT.FX, as far as I could understand, it’s not something easy peasy and straightforward to do, because it seems that it does not work out-of-the-box for Raspbian since it’s an ARM arquitecture.
Is there any other way to track MQTT communications?
There are other diagnostic tools. You don’t need to run them on your pi, they run anywhere and subscribe to your broker, wherever that is.
Otherwise, you need to use use your head.
What topic should you be sending commands to?
What payload should be sent to that topic? A number? or JSON? or?
Hum, maybe I am not using it the right way, but isn’t this basically the same thing using this MQTT.FX or checking the Tasmota console on the equipment?
Hi,
I had a similar problem with the module LC02 it’s RGBW.
Try this settings:
Module Generic (18)
D1 GPIO5 ----> PWM2 (38)
D6 GPIO12 ----> PWM1 (37)
D7 GPIO13 ----> PWM3 (39)
D8 GPIO15 ----> PWM4 (40)
Thanks @Alien but I had already tried that configuration with no success. Also, if I set those configurations like that, with my IR Remote I get Red changed by Green so I need to have the setup like so in order to have it working correctly:
In Tasmota Console this is what reaches there:
16:05:51 MQT: stat/LuzesRGB/RESULT = {“POWER”:“ON”,“Dimmer”:98,“Color”:“250,128,120,0”,“HSBColor”:“4,52,98”,“Channel”:[98,50,47,0]}
This makes no sense because colors seem to be sent wrong from OH.
And if I select the Channel type “Color value (Hue,Saturation,Brightness)” it’s even worst:
16:16:47 MQT: stat/LuzesRGB/RESULT = {“POWER”:“ON”,“Dimmer”:39,“Color”:“14,51,100,0”,“HSBColor”:“214,86,39”,“Channel”:[5,20,39,0]}
And that’s it, colors are finally properly syncronized!
EDIT
Since this is the post marked with as Solution, for Dimmer I just had to select the Channel type as “Percentage value” because that’s what works for Dimmer.
SUGGESTION: Change name of that Channel type to “Percentage value (e.g. Dimmer)” so that people can avoid losing hours and hours like I’ve lost because of something as simple as a Channel type name.
Now, although the main topic here is solved, I still haven’t figured out why Dimmer is not working correctly. I’ve tested the same logic with Dimmer channel/item regarding JSONPATH, but it did not worked. It still get’s always zero.
You listen to the topic you think you are sending data on
What makes you think that?
All MQTT payloads are technically strings, but quotemarks are not normally applied.
There is nothing in the channel config you showed us earlier that would add quotes to the format.
Have you found out what format you actually want to send? You can manually send that topic/payload from mqtt.fx and see if it works, for a better idea of what you’re trying to achieve
Ok, so it seems that MQTT.FX it’s not needed in this case.
Here’s the steps I did:
In the terminal I entered this: openhab-cli console
That started OpenHab console and then I inserted this: log:set DEBUG org.openhab.binding.mqtt
Then I just went to the item in Paper UI Control panel and set it to a value (ex: 42).
Then I went and checked the OH log file in /var/log/openhab2/openhab.log
I then saw this line: 2020-03-14 11:06:57.837 [DEBUG] [qtt.generic.AbstractMQTTThingHandler] - Successfully published value 0.42000000 to topic cmnd/LuzesRGB/Dimmer
Which means this is being sent as a decimal value instead of an integer.
EDIT
Now in Paper UI I changed my REGEX expression to this: REGEX:.(.2)
But in log I get this:
2020-03-14 11:29:23.925 [DEBUG] [ab.binding.mqtt.generic.ChannelState] - Transformation ‘0.40000000’ returned null on ‘REGEX’, discarding message
2020-03-14 11:29:23.930 [DEBUG] [qtt.generic.AbstractMQTTThingHandler] - Successfully published value 0.40000000 to topic cmnd/LuzesRGB/Dimmer
Okay, you found out what was being sent, and it’s not what you want.
(0.42 is 42% expressed as a fraction of 1, by the by)
Why are you not seeing that at the Tasmota console, is the topic correct?
Check the channel type used for your Dimmer Item … are you using number or dimmer type channel, different behaviours.