Costco Feit Smart Dimmer Tuya Convert Tasmota

Thanks for the reply. If I’m understanding your original comment correctly, you’re trying to reliably turn on the light? So I’ll skip that part.

However, the Setoption20 parameter seems to be EXACTLY what I am looking for. I will try it tonight and see if I get more predictable behaviour. Thank you! I’m honestly not sure how I missed that since I am using Setoption19 in my gear. You’d think I’d have seen that next line down!

Ok I just fired up the Setoption20 “ON” for one of the dimmers and it doesn’t seem to turn on now when I send MQTT commands from HA dashboard. The tasmota result doesn’t show “POWER = ON” like it used to either (it showed on, but only actually turned on soooometimes).

But now the buttons in HA are broken - they don’t turn the lights on anymore. So I messed around with it and then turned off Setoption19 (Auto-discovery) and then turned it back on again. Annoyingly it created a new entity with the same name but “_2” added to the end. However, it now appears to turn on/off when commanded, as well as I can change the dimmer level in the background.

So THANK YOU FOR TIP! I had stalled out on this project and wasn’t sure about installing more of these if I couldn’t control them as I wanted. So Thank you again!

Next task is figuring out groups so I can do 3-way dimmers and have physical dimming control from both switch locations.

1 Like

sorry whats the reason for cutting that trace and soldering again?

Also, I flashed one already and connects while using the usb adapter. However, the status led continues to blink. Should it be fine once I install it into the wall?

To make sure that other MCU does not interfere with your flashing. It’s connected to the same pins, and uses that to send control commands.

Okay cool. Well the flash worked so I guess I did it right. Hopefully my newbie solder job worked after.

So right now the only thing that doesnt seem is when I manually adjust the dimmer on the switch it doesnt report that back to HA.

When I change the dimmer from HA I get these unknown messages in the log even though I see the status lights move.

[17:18:36][C][tuya:030]:   Configuration will be reported when setup is complete. Current init_state: 0
[17:18:36][C][tuya:031]:   If no further output is received, confirm that this is a supported Tuya device.
[17:18:38][V][tuya:349]: Sending Tuya: CMD=0x00 VERSION=0 DATA=[(0)] INIT_STATE=0
[17:18:52][W][api.connection:078]: ESPHome Logs 2021.9.1 (10.0.0.30): Connection reset
[17:18:52][V][api:107]: Removing connection to ESPHome Logs 2021.9.1 (10.0.0.30)
[17:18:53][V][tuya:349]: Sending Tuya: CMD=0x00 VERSION=0 DATA=[(0)] INIT_STATE=0
[17:18:58][D][light:035]: 'livingroom_light' Setting:
[17:18:58][D][light:050]:   Brightness: 72%
[17:18:58][D][tuya:499]: Setting datapoint 2 to 721
[17:18:58][W][tuya:502]: Setting unknown datapoint 2
[17:18:58][V][tuya:349]: Sending Tuya: CMD=0x06 VERSION=0 DATA=[02.02.00.04.00.00.02.D1 (8)] INIT_STATE=0
[17:18:58][D][tuya:499]: Setting datapoint 1 to 1
[17:18:58][W][tuya:502]: Setting unknown datapoint 1
[17:18:58][V][tuya:349]: Sending Tuya: CMD=0x06 VERSION=0 DATA=[01.01.00.01.01 (5)] INIT_STATE=0

Figured there was an issue with tx from the cut. Tried repairing it and now the manual dimmer buttons dont work. So im thinking it totally messed this one up

Make sure when you re-soldered the TX line back together that you are not accidentally soldering it to the ground plane (i.e. the larger copper areas outside of the traces. It doesn’t quite sound like the case, but I’d double check it with a multimeter to verify you don’t have a short if you’re still having weird problems. As for your dimmer buttons not talking to HA, that sounds like firmware setup issue. From your log it looks like you’re using ESPHome, which I don’t personally use anymore due to occasional communication / heartbeat drop outs. Read through the first few months of this post for proper ESPHome setup, as in those days Tasmota had its own communication issue, so ESPHome was what most of us were using to get some resemblance of functionality.

1 Like

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!