krahabb / meross_lan

Home Assistant integration for Meross devices
MIT License
417 stars 45 forks source link

Add support for mss570x three way dimmer switch #325

Closed 7h3ju57 closed 10 months ago

7h3ju57 commented 11 months ago

Is your feature request related to a problem? Please describe. Just started using this addon and so far has worked great. Thing is, that when i attempt to turn on the mss570x dimmer switch, it will blink once. It does this every time the light gets turned on using the addon. Works fine using the meross app and the meross IOT cloud addon. It would be great to be able to only use meross lan and remove the cloud dependency for all my switches. I can provide logs and testing if needed.

Describe the solution you'd like Add support for mss570x, find reason or fix for switch flashing light once when turning switch on.

Describe alternatives you've considered Meross iot cloud

merosslan2.log

krahabb commented 11 months ago

This is likely the same as #218. It was obviously not fixed...but I'm working on a possible better patch ... Keep in touch!

7h3ju57 commented 11 months ago

This is likely the same as #218. It was obviously not fixed...but I'm working on a possible better patch ... Keep in touch!

Looks about right. Let me know if you'd like to test anything out

simbo1984 commented 10 months ago

@krahabb It is working with the dimmers now! Good job 👍🏻

7h3ju57 commented 10 months ago

Working great on aloha. Thanks for the fix!

7h3ju57 commented 7 months ago

@krahabb I think the issue may have returned. If I turn on a light only, works great. If I try to turn on and set brightness within the service call it will flash when turning on. Oddly, within an automation, if I turn on the light, delay 1 second and then change brightness, it works great again.

krahabb commented 7 months ago

I think the problem lies in the 'fast' sequence : turn-on and then set-brightness you achieve when issuing the commands in an automation. This is exactly 'the same error' the component was doing at the time the bug was discovered. After that, I've put some checks and logic in order to (almost) never have to send that sequence back-to-back

Wouldn't it be possible to use only set-brightness in automation? that should already turn on the device

7h3ju57 commented 7 months ago

I'm not sure I can only set the brightness. There are three service calls for lights, turn on, turn off and toggle. If you choose device, you do have an option to increase or decrease brightness but no way of setting it. If you know of another way, I'm open to suggestions.

krahabb commented 7 months ago

I'm pretty sure you can pass in the 'luminance' or 'brightness' (didnt check the docs..) parameter to the turn_on service call. The code, in fact, just receives the turn_on call with (eventual) paramters set by the service call itself. For example when you change the rgb or any other feature from UI, it is always conveyed as a turn_on with all the settings carried over as dynamic parameters