BTicino F418U2: support for WHO=1, DIM=4 status frames

I use a BTicino F418U2 dimmer with the openHAB OpenWebNet binding.
When the light is switched fully ON or OFF using a physical switch or the MyHOME app, the actuator reports its status using WHO=1, DIM=4 frames.
openwebnet4j 0.14.0 does not recognize DIM=4 for lighting messages and logs Unsupported DIM: 4.
As a result, the openHAB Brightness item is not updated, although commands sent from openHAB continue to work.
Intermediate dimming levels reported through DIM=1 work normally.
I verified that DIM=4 values from 100 to 200 represent brightness levels from 0% to 100%.
The patch adds DIMMER_STATUS_LEVEL_100(4) to Lighting.DimLighting.
It also adds isDimmerLevel100() and allows parseDimmerLevel100() to process both DIM=1 and DIM=4 frames.
Unit tests cover 0%, 10%, 100%, existing DIM=1 behaviour and an invalid value.
I tested the patched binding with openHAB 5.1.4, 5.2.0 and 5.2.1 and a real F418U2, and the state updates correctly without the previous warnings.
The problem is documented in openHAB issue #21082 and openwebnet4j issue #41.
The proposed upstream solution is available in openwebnet4j pull request #42.

Great you care about the DIM=4 problem, thank you :smiley:. I also have reported a problem regarding DIM=4 when I use temporization commands (timed light), see here:

https://github.com/openhab/openhab-addons/issues/19859

Would be great if your enhancements could also fix this.

Hello Stefan, In your error log you can see this messag: “unication.BUSConnector.message.event] - BUS-MON <<<<<<<< *#1*25#4#01*4*100*1##
2025-12-22 09:57:38.897 [DEBUG] [nwebnet4j.communication.FrameChannel] - -FC-BUS-MON Trying readUntilDelimiter…
2025-12-22 09:57:38.898 [DEBUG] [rnal.handler.OpenWebNetBridgeHandler] - ownIdFromMessage(*#1*25#4#01*4*100*1##) → 1.25h4h01”.

This is exactly the problem solved in DIM 4 issue. What version op OPENHAB are you using?

Hello @Joop_Raeven, glad ro read your work could also help with my problem. Actually i use some Python code in HABApp to fix that but as I am not a good coder I will be happy to remove that as soon as the binding supports it :smiley:.

I use openhabian on rPi 5 and was on OpenHAB 5.2.0 (Release Build) for about four weeks. Since yesterday in the evening i updated to OpenHAB 5.2.1.

As soon as I integrate the patch from @Joop_Raeven , a beta of the binding could be tested by Stefan so he can also check it.