paullj1 / TreatLife-HomeKit

Open source firmware for the TreatLife DS0X dimmer switches for native HomeKit use.
MIT License
9 stars 5 forks source link

Tuya dimmer mode #9

Closed boboxx closed 2 years ago

boboxx commented 2 years ago

What TUYA mode is used on the dimmers in this firmware? I just loaded this on a few switch and unless I have the % set to max I get a weird flickering on the other lights I have in the same room. This is my ensuite bathroom where I have a light over the vanity and ceiling. When I was using the Tuya FW I had them set to Mode 1 and didnt have that issue.

paullj1 commented 2 years ago

So it doesn’t look like I’m actually exposing that or setting it. I must be using the default (zero?) for all 12 or so I’m using. Unfortunately, in order to expose it, I’d need to write an iOS app and expose it as a custom accessory.

I think you have two options:

  1. Pull the source, and manually add a function on boot to send the correct Tuya message to set it (looks like I enumerated it in the header files, so you shouldn’t have a problem guessing which ID to use). Shouldn’t be more than one line of code honestly.
  2. I don’t seem to have this problem anywhere, but none of my bulbs are fluorescent. Maybe try using LEDs or incandescent/halogen?

I’ll try to think of a way to implement changing the mode without having an app, but the best I might be able to do is expose an additional “switch” accessory that can toggle between zero and one? Open to other options too if you’ve got any ideas!

On Thu, Jul 28, 2022 at 15:39 boboxx @.***> wrote:

What TUYA mode is used on the dimmers in this firmware? I just loaded this on a few switch and unless I have the % set to max I get a weird flickering on the other lights I have in the same room. This is my ensuite bathroom where I have a light over the vanity and ceiling. When I was using the Tuya FW I had them set to Mode 1 and didnt have that issue.

— Reply to this email directly, view it on GitHub https://github.com/paullj1/TreatLife-HomeKit/issues/9, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACDPSB2PYWRKMTAH2KXWZULVWLOWTANCNFSM546NCB4A . You are receiving this because you are subscribed to this thread.Message ID: @.***>

boboxx commented 2 years ago

Thanks Paul I will have a look. I started looking at the code but I done see a lot of comments and I'm not very familiar with the code. With of these lights are LED.

It's not something I needed to changed after the lights where setup, so for me I would not need a control panel or a specific app to make the change. If you did wanted to implement the feature, I would probably add it to the WIFI setup gage. (same for the Min-Max dimming value.