Aircoookie/WLED

Loxone integration not working with 13.3

dkennerknecht opened this issue · 13 comments

What happened?

With the upgrade from WLED 0.12.0 (build 2104020) to WLED 0.13.3 (build 2208222)
the integration into Loxone is no longer working.

lx BBBGGGRRR: 0 - 100100100 Loxone RGB value for primary color. Each color (RRR,GGG,BBB) is specified in the range from 0 to 100%.

I have also tried the version with 20bbbtttt but it take no effect.

I also tried the v13.0, v13.1 and v13.2 but i looks like that the Loxone parameters aren't working since v13.0
I already checked the code and WLED_ENABLE_LOXONE is per default enabled

To Reproduce Bug

The following command will work wit 12.0
curl -X POST "http://<IP_ADDRESS>/json" -d '{"seg":{"lx":100100100}}' -H "Content-Type: application/json"
When u try it with any v13.x version nothing will happen but you get the response "success":true

Expected Behavior

The Loxone Parser should set the correct RGB(W) values

Install Method

Binary from WLED.me

What version of WLED?

WLED 0.13.3 (build 2208222)

Which microcontroller/board are you seeing the problem on?

ESP8266

Relevant log/trace output

No response

Anything else?

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct

Try 0.14 and report.

Cannot confirm that.

13.3 (without sound reactive) works fine for me on ESP32.

Try 0.14 and report.

Is v0.14 already released and where can i find it?

@softhack007 @blazoncek
With v0.14, it's also not working.

@blazoncek, according to git blame, the line below was modified 5 month ago, while the rest from lx_parser.cpp is the same since two years. Could it be related to the problem that @dkennerknecht sees ?

strip.getSegment(segId).setColor(secondary, RGBW32(rgbw[0], rgbw[1], rgbw[2], rgbw[3]));

@dkennerknecht Can you confirm, that you have binary with Loxone compiled in? Please use debug build and monitor serial output.

@softhack007 that has nothing to do with ability to change color. 0.14 changed API.

Due to API changes this may be more efficient and semantically correct.
Screenshot 2022-12-17 at 16 38 38

I have tested the above code {"seg":{"lx":100100100}} and my LEDs turned white. I do not know if this is ok or not. but it seems to me that Loxone is working.
This is what I get on debug output:

JSON buffer locked. (14)
LX: Lox primary = 100100100
LX: Lox = 100100100
LX: turn on
LX: segment 0
LX: Lox primary = 100100100
LX: Lox = 100100100
LX: segment 1
JSON buffer released. (14)
JSON buffer locked. (12)

EDIT: Just noticed that original post contains invalid JSON {"seg":{"lx":100100100} which is missing a closing curly brace }.

It does the same with original source and the modified in a post above.
Debug output for original code:

LX: Lox primary = 100100100
LX: Lox = 100100100
LX: turn on
LX: main segment
LX: Lox primary = 100100100
LX: Lox = 100100100
LX: segment 1
LX: Lox primary = 100100100
LX: Lox = 100100100
LX: segment 2

Comment: Differen segment set-up in this case.

@blazoncek The missing end bracket was a typo.
As binary im always using the uploaded versions on git and for those the LOXONE parser should be enabled as default.

lx: BBB GGG RRR when 100100100 is used it should be white, (000000)100 will be red 100%.

@blazoncek It's not so easy to enable the debug an connect via Serial ... for that i have to build a test setup but lets try it.

================== Update 1 ==================

Self Compiled v0.14 b0 with debug enabled <- LX not working

When i try the
curl -X POST "http://192.168.1.107/json" -d '{"seg":{"lx": 100000000}}' -H "Content-Type: application/json"
then I can see in Serial monitor the following:

JSON buffer released. (14)
JSON buffer locked. (14)
LX: Lox primary = 100000000
LX: Lox = 100000000
LX: main segment
JSON buffer released. (14)

================== Update 2 ==================

Self compiled v0.12.0 with debug enabled <- LX is working

Same command as above

LX: Lox primary = 100000000
LX: Lox = 100000000
LX: main segment

================== Update 3 ==================

Self Compiled v0.14 b0 with debug enabled <- LX not working

I added some more debug lines to check if the color value correctly converted, but it looks good so far ...

LX: Lox primary = 100000000
LX: Lox = 100000000
LX: Red = 0.00
LX: Green = 0.00
LX: Blue = 255.00
LX: main segment

================== Update 4 ==================

Self Compiled v0.14 b0 with debug enabled <- LX probably working

I tried to use another segment and for that i configured a new segement (ID:1)
curl -X POST "http://192.168.1.107/json" -d '{"seg":[{"id":0,"lx": 000100000},{"id":1,"lx": 100000000}]}' -H "Content-Type: application/json"
And it works ... but only for the second segment (ID:1), the default segment (ID:0) will not be changed.

LX: Lox primary = 100000
LX: Lox = 100000
LX: Red = 0.00
LX: Green = 255.00
LX: Blue = 0.00
LX: main segment
LX: Lox primary = 100000000
LX: Lox = 100000000
LX: Red = 0.00
LX: Green = 0.00
LX: Blue = 255.00
LX: segment 1

================== Summary ==================

It looks like there is a problem with the segment ID 0 in combination with the LX parameter.

Please check if e8a7802 solves it.
If it does, please close the issue.

@blazoncek your last commit e8a7802 solved the issue
Thank you