Costco Feit Smart Dimmer Tuya Convert Tasmota

Thank you @123 Taras. Yes, I assumed this much i.e., that one would need the original firmware. I was hoping that somehow the dimmer had a built-in factory reset ‘switch/mechanism’ to revert it to the same condition it was when new. Many devices out there have such option, be it your smart-phone or the @20 Wyze camera.

Thus, let me rephrase my question then.

  1. Is there a ‘factory-reset’ option in the switch/dimmer?
  2. If not, is the original firmware available somewhere?
  3. Has anyone tried flashing then reverting back to the original firmware.

The above is really the essence of my question.

Unless you overwrite the firmware like you’ve done with the Feit switches. That’s why there’s no ‘factory reset’ because that would be part of the original (now overwritten) firmware.

It appears your only option is to get the original firmware from someone who may have saved a copy prior to overwriting it with Tasmota firmware.

We’re getting there 
 slowly :slight_smile:

No, I have not flashed mine yet. So then, is it possible to download/save the on-board/original firmware, and reload at a later stage?

Have a look at Tasmotizer.

First bullet point in its feature list:

Automatic backup of current ESP image before flashing: in case you want to return to manufacturer firmware. Now supporting backup sizes up to 16MB.

You may need to do some reading in the Tuya Convert Wiki.

Or this and this.

Andy

Thank you @123 and @mxr662. It seems there is more reading ahead in my near future :slight_smile:

Happy Holidays.

I can confirm serial flashing works with the latest batch.

I used ESPHome Integrated into HA and created the following script:

esphome:
  name: dimmer
  platform: ESP8266
  board: esp01_1m

wifi:
  ssid: "XXXXXXXXXX"
  password: "XXXXXXXXXX"

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Dimmer 1 Fallback Hotspot"
    password: "XXXXXXXXXX"

captive_portal:

# Make sure logging is not using the serial port
logger:
  baud_rate: 0
  level: NONE

# Enable Home Assistant API
api:
  password: "XXXXXXXXXX"

ota:
  password: "XXXXXXXXXX"

# My dimmer used the hardware serial port on the alternate pins
uart:
  rx_pin: GPIO3
  tx_pin: GPIO1
  baud_rate: 9600

# Register the Tuya MCU connection
tuya:

# Make the light
light:
  - platform: "tuya"
    name: "test4387"
    dimmer_datapoint: 2
    switch_datapoint: 1
    min_value: 10
    max_value: 1444

In the ESPHome interface you can click three dot menu -> Compile -> Download Binary.

I hooked up 3.3V, Ground, TX, RX to the FTDI USB serial converter and IO0 was hooked up so I could disconnect it from ground after it booted up.

I used esptool.py (installed through pip - comes with python) to erase the flash and then program the ESPHome binary at address 0x0. I had to power cycle and redo the IO0 ground at startup each time.

I then used my router to assign a “static” IP on my DHCP tables.

Home assistant reports its running Firmware: 1.15.3.

Yes you can restore the original firmware if you have a backup copy of it. Tasmota can do OTA updates with non-Tasmota firmwares; however, I don’t believe you’ll be able to do this with the original firmware (or most ESP devices’ OEM firmwares) like 123 Taras alluded to above. The problem is size
 most OEM firmwares fill up / utilize the entire chipset memory (typically 1MB on most ESP devices). To do OTA updates the incoming firmware must be less than half the available memory’s space (half to save the uploaded file, and the other half to unpack and install it on to). You’ll need to flash the original OEM firmware back on the device serially because of that limitation.

Actually, we are in agreement on how to restore the original firmware.

What I said was to explore using Tasmotizer, implying a hard-wired connection, not OTA, (given that the latest models of these switches are incompatible with tuya-convert).

drjb hasn’t flashed the device yet so is able to backup the original firmware with Tasmotizer. Restoring the original firmware will require the same technique (hard-wired) and not OTA.

Oh I know that you know this Taras, lol! It just kind of read like someone could restore the OEM firmware that way, and I didn’t want drjb to misunderstand or get confused when that didn’t work.

If anybody is interested in potential solution; move to ESPHome for those dimmers. I have flashed two out of four dimmers with ESPHome firmware few days ago and on the very same dimmers that did fail with Tasmota FW. So far, all of them are working fine. The other two did fail few times already with Tasmota FW (9.2.0) with missing “heartbeat” and with a need for power cycle to get them going again.

I do not know what Tasmota FW is doing differently compared to ESPHome in terms of communication with the MCU but it does not work properly. The ESPHome is the way to go until this is root caused and fixed with Tasmota binaries.

1 Like

I bought these dimmers in early November, and sadly, as others have reported, are not flashable via tuya-convert. I really didn’t want to return these given I’ve installed 5 of these already (took some time given how crowded some of my gang boxes were), because they were cheap (on sale), and because they worked fairly well (both physically and via Wi-Fi).

I recently discovered local tuya, which I am now using to control them. This isn’t as ideal as Tasmota, but they are fully functional and not connected / dependent on a third party app or service.

Hoping someone discovers an OTA fix some time in the future. I don’t have the tools and patience to crack these open to flash serially.

@alexm011
Are you saying that the ESPHome binary worked OTA with the latest models, or did you have to physically flash it?

I also bought several of these dimmers in Nov when they were on sale, and found this discussion while looking for firmware to override the minimum dimming level (I emailed Feit and was told the lowest possible level it would dim is 30%). I also run a HA server, so would prefer to have them taken out of the cloud as well. That and the Feit app is horrible.

I’m new to this whole Tuya-Convert process, and after getting the Wemos and Pi setup, then failing to flash Tasmota OTA I finally read the last few posts here. sigh

In hopes of adding some additional info, I tore one apart yesterday hoping to gain some insight and mapped most of the pinouts from the HT66F0185 MCU, so hope this helps. Might try to reverse engineer the MCU/Wifi board if I have time this weekend.

  1. GND
  2. Oscillator
  3. Oscillator
  4. LED 60%
  5. Testpoint (ICP Addr)
  6. LED - 40%
  7. LED - 20%
  8. Testpoint (ICP Clock)
  9. N/C - Routes to a noplace resistor to pin 18 (see pin 18).
  10. Best I can tell, this pin is used to control the load. It routes through the header to mains board and controls a phototriac which I believe regulates the Igt for the AC Load’s main triac.
  11. TYWE2S TX pin
  12. TYWE2S RX pin
  13. LED - On/Off Button
  14. Button - Dimmer Down
  15. On/Off Button
  16. Routes to a 10 resistor then to U3 (noplace 5 pin IC) and mains board header.
  17. Routes to mains board header though a noplace diode.
  18. Button - Dimmer Up
  19. LED - 100%
  20. LED - 80%
  21. Routes to mains board where it’s connected to AC Neutral through two series 1MΩ resistors and a fuse.
  22. +3.3V

Few other notes:

  • Wasn’t able to trace pins 8 & 11, though they could just be N/C
  • All buttons and LEDs are active low.
  • Buttons have an external 10kΩ pull-up to +3.3V
  • 5 Brightness LEDs have a series 1kΩ to +3.3V
  • On/Off LED only has a series 100Ω to +3.3V (why it’s so much brighter). There’s also a pad for a 2nd parallel LED. So if you wanted to make this dimmer, you’d have to replace the resistor with another value, or PWM the pin, which appears to be possible since it’s controlled by the MCU’s PTM output pin for Timer1.
1 Like

I assume the initial connection must be a physical one (OTA becomes possible after the stock firmware is replaced). ESPHome isn’t like tuya-convert which pretends to be the Tuya Cloud service thereby making the initial connection OTA (and immediately permitting OTA updates). New Tuya firmware patched this vulnerability.

Correct. The FW update was done by desoldering the module and connecting to a programmer. As @123 entioned, they patched the Tuya FW and disable OTA update back in Feb/Mar.
After using ESPHome FW for the past few days, I still experience some issues; sometimes, the lights do not turn on (or off) via the HA app. Also, sometimes, the lights just turn off by themselves without any commands been sent. Physical buttons always work properly. So, it seems that those cheap dimmers have some issues. I am still not able to figure out what exactly the issue is.
I have hard time giving up on them since I got six of them.

I wouldn’t call them cheap dimmers 
 but ‘reasonably’ priced instead. :slight_smile:

Hi, could you please guide me or share your YAML for how you did this? I could not find a template for dimmer switch. Thanks.

Also, because Tuya-convert no longer works, you may need to physically flash the device. I followed the steps at https://community.smartthings.com/t/costco-cheap-feit-smart-dimmer-wifi/208142 and it worked as expected. I was able to put Tasmota on it directly that way, and then you can do an online (from the UI) firmware replacement from Tasmota to ESPHome (or you could do ESP Home directly—I did Tasmota first because I knew it would be easy to quickly verify it connected and worked).

Finally had time to desolder the TYWE2S module today, flashed it with the latest Tasmota binary and seems to be working. I was able to get it connected to wifi and open the module. I haven’t configured it yet, but at least the flash was successful.

For anyone planning to do it, here’s what I did. I set the heat gun to 300C/575F and put on a small 5-7mm nozzle. I started by heating up the board directly under the large ground pads until it was somewhat hot to the touch, then flipped it over and clamped it in a pair of helping hands. Starting with one of the rear gnd pads, I focused the heat gun on the pad while very gently lifting up on the corner until until I could see the solder reflow, then lifted it just a bit more to clear the pad. Still holding it up, I let the solder solidify before letting it back down. Then repeated the same process with the other side, sometimes having to swap sides, until both rear pads were free. Finally, I heated up the front solders while slowly lifting up on the antenna end until they came loose. The rear pads are obviously the most difficult, and took 2-4 minutes before breaking loose. Just take it slow and don’t rush it. The front solders came off in about 10 seconds. On the 3rd one I actually added a bit of leaded solder to all the pads first and seemed like the whole process took less than half the time. But not sure if that helped, or I was just getting better at it.

Once flashed, I was able to just solder it back on. First you need to completely clean off the pads so using some solder braid. This is important so it sits flat. Then I put a piece of tape on the back to hold it in place and just added solder to the front pads, and held the iron there for a few more seconds so it would wick up underneath. The ground pads were a bit trickier since there was almost no pad showing, so I just scraped off enough of the solder mask so the iron was touching bare copper.

Just trying out LocalTuya and got the dimmer working as a switch, but can’t seem to get the settings right to work as a dimmer from Home Assistant. What settings did you use?