ha-venta icon indicating copy to clipboard operation
ha-venta copied to clipboard

LED control not working properly

Open rgr101 opened this issue 11 months ago • 6 comments

When entering the color picker wheel it appears quite dark and it doesn't respond properly, e.g. when picking any color, sometimes the Venta's LED stripe color changes, but only once, and the picker jumps back into the center. A second color change in one 'picking session' will do nothing.

The brightness slider works but always shows 100% and doesn't change the real brightness of the LED stripe.

Interesting: The on/off switch works properly, and also the favourites buttons do a real color change and the picker jumps somewhere on the circle; however, there is some difference between the picked and the real color.

  • HomeAssistant: 2024.12.5
  • ha-venta: e.g. v0.11.2
  • Venta LW74: Firmware: 1.2 (shown by ha-venta) resp. 0.2.6.5 (shown by Venta-App)

rgr101 avatar Jan 19 '25 15:01 rgr101

Hey,

As far as I remember this device just won't accept all the colors that are possible to set via HA. I left it as it is simply because I did not find any way to limit the available range on the component level. It's very likely that's why it sometimes stuck (as the wrong value confuses the software? and sometime the closest color is chose instead), you can check how it behaves at http://<device-ip> control panel.

The slider thing is interesting, can you see the proper value in the Venta app or on device control panel page? Could you enable the debug mode and play around with the slider, download the logs and attach it here?

Michsior14 avatar Jan 19 '25 17:01 Michsior14

Hey,

thx -- I have now noticed that the colors in the Venta app and also in the web browser interface react very strangely; not much different from your HA integration. So the problem is more likely with Venta... ;) Can you tell me the syntax for the color commands (according to the source code it is an "html string"??), then I could play around with direct commands on the browser line and maybe find out something?

No, in the Venta app the slider level (represented in the Venta app by the outer ring of the color picker?) does not change when adjusted in HA. And the browser interface only seems to be unidirectional, here I only ever see the RGB levels in an “neutral” position

Regarding debug mode - I'll be happy to do it asap...

rgr101 avatar Jan 20 '25 14:01 rgr101

Can you tell me the syntax for the color commands (according to the source code it is an "html string"??), then I could play around with direct commands on the browser line and maybe find out something?

It's a hex string. You can see the command that this integration sends in here: https://github.com/Michsior14/ha-venta/blob/main/custom_components/venta/venta_entity.py#L461-L465

Michsior14 avatar Jan 20 '25 14:01 Michsior14

OK, I now found out how to control the colors directly via terminal commands:

e.g. full RED:

curl -X POST "http:///datastructure"
-H "Content-Type: application/json"
-d '{"Action":{"LEDStrip":"#FF0000"}}'

By sending this command, the colour will be set and all other values are returned, including the color value, but: the old one.

With that, I have encountered, that FF0000 is definitely out of range, because, by resending the command, the new color will get the old colour and then being returned and this was 640000! Ok, valid colours are between 00...64 (hex) and - aah! - this means 0-100 (%) decimal! So, we have 'only' 100 steps per colour - I guess we can live with that.

Unfortunately, it seems that Venta internally miscalculates something, because I recognized some more strange returns:

By sending eg. 640064 (full r/b = magenta), Venta returns 320032; sending 646464 returns 212121 - WHYYYY???

My idea is that they - for whatever reason - limit the total added number to 64? And after some additional tests it seems they repetitive decrease every colour value by one until the total number is below or equal 64. Very strange!

And: sending 000000 (blackout) just does nothing!

Hmm - this explains the strange behaviour of the color picker! (Fun fact: Venta themselves struggle with it: In the Venta app as well as web interface). But how to deal with it? Best would be if we'd tell Venta and they correct it by a firmware update - but are the devices OTA updateable at all? Or dealing with it by implementing a very sophisticated algorithm...

Let me try to talk to Venta first. I'm kind to a neighbour to them as they're located in my region in Southern Germany, and already had a good conversation with them...

rgr101 avatar Jan 20 '25 20:01 rgr101

I would assume the modules are updatable, but I think it's more likely (unfortunately) they will migrate this model to Tuya rather than continue fixing their current formware.

Michsior14 avatar Jan 20 '25 20:01 Michsior14

Yes, I suspect you‘re right! On the other hand, the LED control isn‘t really mission critical for a humidifier, there are more important functions…

rgr101 avatar Jan 20 '25 23:01 rgr101