Costco Feit Smart Dimmer Tuya Convert Tasmota

Wait. You say I won’t need to reset all the dimmers every power drop if I use Tasmota vs ESPHome?

I have the least amount of problems with Tasmota. Some still prefer ESPHome for their own specific reasons and uses (and like I said it was once the only way to get these to work due to a bug in Tasmota
versions 8.X and below); however, I find Tasmota to be a much better and stable firmware nowadays. I don’t have to do anything special after power removal with my switches running Tasmota.

I see one disadvantage for me - API. ESPHome has some native access to HomeAssistant, can do automations inside, and seems more seamless. Tasmota needs MQTT broker… I might check it out for those dimmers only - if it work it might be worth it. This “sync” loosing bug is very annoying.

The manual dimming stopped after I tried to fix the soldering so I think this one is pooched.Not the best at it yet so I expected failures. I still have one more I can try to fix but could be the same problem. Also one more unflashed.
I saw in a previous post that the mcu rset pin needs to be grounded, is the cut the only way?

@TheEebb did a firmware fix a while back, not sure if that ever got pulled into Tasmota. Moved all my dimmers from yml configs to the Tasmota Integration. My dimmers require a power cycle every so often, that seems to keep them stable. Seems like I have to power cycle with the circuit breaker rather than just a software reboot.
My remaining issue is signal strength on my Costco Feit smart plug. SetOption57 is on, and the plug is close to an AP.

image

The Tuya MCU reset pin does not need to be grounded (which prevents the MCU from talking) if the MCU’s TX (which goes to the ESP’s RX) trace is cut. Re-soldering the trace after flashing is mandatory, otherwise the Tuya MCU won’t be able send information about the switch (i.e. its current status) back to the ESP wifi module. That would definitely explain your switch not reporting switch changes back to HA. If you think your solder job is bad, verify continuity (<10 ohm) to the RX pin hole with a multimeter. Also you should NOT have continuity (a high resistance measurement in the k-ohm or higher is ok) from TX trace and/or your solder job to the Ground pin hole… if you do, you’re shorting your trace repair to the ground plane of the circuit. If you are shorting, desolder your “repair” with some solder wick or a solder sucker, and retry. If your cut is too wide to simply flow solder across, you can use some fine gauge wire (awg 24 or even smaller wire - i.e. larger number like 26, etc.) to jumper from one side of your cut to the other side, or from the side still connected to the Tuya MCU to the pad near the RX pin hole. Below is a pic of everything to help.

Sorry if you know all of this already… not everyone who comes here are the electronics savvy sort, so I’m trying to cover any questions you or another Internet lurker might have.

Updated to explain what I meant by "continuity."

1 Like

No don’t be sorry this is great information. I’m really novice when it comes to soldering circuitry. I’m pretty sure the ground plane is the problem. I def need to grab a new multimeter and il try it out.Thanks!

anyone still use the cloud? I do, and V2 in home assistant doesn’t see the dimmers, even though they are shown in IOT site. I downgraded back to a previous HA version until v2 will see the dimmers.

I have a problem with a dimmer as well. I just started using tuya-local

Used @Technowizard method and I’m using Tasmota 10.0. Thanks!

I have a question about the dimming range settings. Post #2 says to use
DimmerRange 10,1000

But the Tasmota documentation says the range is 0 to 255.

DimmerRange Change dimming range.
<dimmerMin>,<dimmerMax> = set the internal dimming range from minimum to maximum value (0…255, 0…255)

I’ve seen the 1000 value used a few times and I’m curious where that comes from.

1 Like

What connector on the board are u using? Those 4 holes next to the the esp module?

Yes, I’m using the 4 pin holes beneath the ESP/TYWE2S module for the actual flashing portion.

I followed the scrape, cut on the MCU Tx line. I checked that there was no continuity. Good to go. I was able to hold GPIO0 to ground using a safety pin. Tasmotizer said the flash was a success.

I didn’t resolder the TX just yet as I wanted to check that the flash worked by connecting to the Tasmota access point. I flashed the plain tasmota.bin. I reassembled the switch and used a power cord to power it up. I don’t see the AP when I search using my phone or my laptop. The dimmer switch flashes the main button LED for a while and eventually goes solid.

Any tips? What did I do wrong?

Thanks!

If Tasmotizer showed the flash was successful, then resolder the Tuya TX line to the TYWE2S RX trace if you haven’t already done so. If you still can’t see the Tasmota AP, then try the following:

  1. desolder the trace
  2. connect your serial flasher, and get everything to the flash ready point
  3. use Tasmotizer to first Erase the existing firmware
  4. power off completely / disconnect serial flasher from module
  5. reconnect serial flasher, and reflash Tasmota.bin again
  6. reconnect Tuya to TYWE2S trace, and check for Tasmota AP again.

If none of that helps, then I’m at a loss… maybe something went bad or is damaged.

Same exact question MrRMNB.

It comes from whatever the TuyaMCU expects to see. In Post#2 he talks about watching the weblog in Tasmota console (after entering TuyaMCA 21,2. It will spit out the values that the MCU is using.

I am no longer using Tasmota b/c I was unable to get the LED mod that I did (backlight LED hardware mod attached to GPIO4) to work as a proper PWM LED with the TUYA instruction set at the same time.

But as I recall I used the 10,1000 setting and it worked fine. Maybe @Technowizard can shed some light.

Travis over on DigiBlur does a walkthru of a TuyaMCU setup in Tasmota.

Every Tuya based dimmer has a different dimmer range.

This. It’s been a while since I tinkered with this, but IIRC if you set Web log to 4, you can press the dimmer buttons up and down to see that the Tuya MCU is sending command data for 000003E8 (decimal 1000) @ max, and 0000000A (decimal 10) @ min. Since the Tuya MCU is ultimately what’s in charge, we have to speak to it in the manner it expects… which just happens to make the range on “this switch” 10 to 1000. Like @flynmoose said, every Tuya device is potentially different.

This method still works fine if you want to do the GPIO4 → backlight LED mod and makes it easy to get to the setting. You just get two exposed dimmers in HA.

But I’ve migrated to Tasmota and fought with this for a while.

I finally figured out how to do it. TuyaMCU on Tasmota is strange when it comes to having a separate PWM dimmer for the LED from the dimmer for the mains power.

I set up my template like this:

As set above - LED will be ON when mains are off and OFF when mains are on.

THEN - from Console you can issue:
LedPwmMode 1 (PWM Mode)

Then you can use these two commands
LedPwmOff X (where X is 0-255)
LedPwmOn X (where X is 0-255)

So you can change the brightness when it is on or off and those values persist.

OR you can use rules to set based on time of day or relative to sunset.

OR you can send MQTT message to the switch to set a value from some other automation on your home automation platform.

Has anyone had an issue where they can’t connect to the switch via Wifi after resoldering?
I flash successfully, connect to Tasmota while still attached to my FTDI rig, set the wifi credentials. Reboot and successfully connect to Tasmota with the new IP address. Once I resolder to the board, I can’t connect(yes IP is correct and static). I can unsolder & connect via wifi once again but when I resolder, it won’t connect.
Any thoughts here?

UPDATE: Turns out my re-soldering must have been bad. Wrecked two boards and two chips. The other 14 went well though after I reduced the amount of solder I was using.

1 Like

Thanks very much for the Template - that really helped me out!

1 Like