Costco Feit Smart Dimmer Tuya Convert Tasmota

@TheEebb Sorry, but no go on all accounts. I even recompiled your files as well, just to make sure I didn’t mess anything up the first time around… still no bueno. If I cut power to the switch, whether I’m configuring via module or my template (and yes I’m setting your Tuya TX Special 108 option), it still requires a reset 6 and reconfiguration.

I think there is some confusion with my post about on/off and brightness. Brightness change never refers to trying to turn on/off the switch, so consider that mention to be between 1-100%, never “0.” Basically WiFi commands are not updating the switch, be it web server or something like HA. When the switch goes back to its “old ways” (like after a physical power cycle), WiFi DOES update the switch again, but with the dreaded Off/On/On/On/Off issue.

Mind you electrically controlled devices (e.g. anything connected to “Load” on the switch) still turn On/Off and brighten just fine with physical button presses… it has always done this, even on stock Tasmota… it just doesn’t update the “software” correctly, so things like HA and automations function improperly. So basically what I’m seeing when your firmware is doing something “different” than stock firmare are:

  1. Physical switch changes for “Loads” function correctly;
  2. Physical switch changes for “Automations” function correctly;
  3. WiFi switch changes for “Loads” do not function at all;
  4. WiFi switch changes for “Automations” function correctly;
  5. Soft restarts do not affect your firmware changes; and
  6. Hard restarts (power removal & reapplication) do affect your firmware changes.

Hope this helps in the bug hunt, and again what you’re doing is super appreciated! :slight_smile:

Ok, I think I understand. Were you never able to make changes to the brightness remotely? Or could you only make changes on occasion? Because you mentioned you were able to get it to sync up. Or did you mean you were manually syncing up the dimmer level by clicking the physical buttons until they matched the values set remotely?

If you have not tried this I suggest testing the following. Turn the dimmer on first- either remote by using the POWER MQTT topic or physically using the switch. Then try remotely adjusting the dimmer values. Does it update?

By loads you mean changes pushed to the switch and by automations I assume you mean triggered by the dimmer and not automations that results in a change to the dimmer? If automations that trigger changes to the dimmer still work there maybe another issue at play that is not directly related to the dimmer itself.

This would be consistent with how the firmware works. Changes to the serial pins are not affected during a restart; it retains the previous settings until tasmota is loaded again with new settings (which would be the same settings in case of a restart command).

This is interesting as reset 6 erases the flash region from the end of the program code (tasmota firmware) to the end of flash memory (where all sorts of settings are stored) then copies back the wifi settings. Assuming this works consistently this maybe an issue with the base arduino code. This is actually one of the things I wanted people on this forum to test out. In my case the opposite is true. Whether I remove power or reflash my firmware I cannot remove the changes to the serial pins. They remain until I zero out the flash. So my fix appeared permanent on my dimmer. Since erasing the entire flash does appear to reproduce the original issue this might be a bigger issue that is not confined to this particular product.

I’ll create a special build for you to try out.

So the syncing part was with an Automation device, in this case another WiFi bulb not physically connected to the switch, that is being controlled by the switch. It was 5:30am when I was testing this originally, so it really wasn’t doing what I was thinking at first. I hadn’t yet realized that the software control wasn’t updating the switch, so when you made a physical button press the WiFi bulb would jump to where the switch was last physically changed to. I would mostly disregard this part.

By “Loads” I mean devices that are physically connected to and controlled by the switch… basically no different than a dumb switch would do. For “Automations” in #4’s context, I was including this to be thorough… the “triggered by the dimmer and not automations” would be more in line with #2. I know #4 is all internal to the HA automation, but again I was including it to be thorough, as I’m testing the switch by using two end devices (an incandescent bulb physically connected/powered/controlled by the switch, and a remotely operated WiFi bulb NOT physically connected/powered/controlled by the switch) simultaneously.

Yes I appear to need to do a “reset 6” to clear the device module and/or template configuration. I’ve tried a soft restart, as well as just setting it to another module (a sonoff basic for example), saving, and then putting it back to the Tuya MCU w/TX Special; in both cases it was still functioning like stock Tasmota. Again just to reiterate a previous point, when the switch is functioning like “stock” Tasmota, updating / controlling the switch via WiFi works perfectly fine - be it On/Off toggles, or brightness adjustments. Your current firmware fixes the physical button presses (i.e. the Off/On/On/On/Off bug), but breaks the WiFi control for me. If the latter didn’t occur, I would consider your firmware a solid and acceptable fix… even with power removal necessitating a moderate amount of reconfiguration to get the switch working again. I’m willing to keep trying fixes, so I’ll keep an eye out for your special build.

Ok. I’m a bit confused. So with the fix you cannot control the dimmer at all either through the web interface or through HA? So its not just the dimmer levels but on off as well. But anything you do to the dimmer physically is appears over wifi. Correct?

EDIT: I cannot replicate the complete failure on of remote (wifi) control on my end but try something for me. Try reset 4 instead of reset 6 and see if it works. Reset 4 does not zero out the flash it only resets to default settings but keeps wifi settings.

Correct. With your fix, all the physical button presses work; however, nothing I do via WiFi (HA & Web Server) update any aspect of the dimmer switch itself. So if the switch is on and say at 100% brightness (so all green LEDs on), and I turn it “off” via the web server; the switch will remain physically on @ 100% brightness… including whatever is physically connected/powered by it. So again, your firmware fixes the the physical button presses, which in turn do register with HA and the Web server, but breaks it in reverse (HA & Web server do not register with the switch.

I’ll give reset 4 a shot and see what it does.

edit: forgive the original post about dimmer brightness being what was affected. Like I said earlier after fact, it was 5:30am when I wrote that… I wasn’t all there… lol.

If you don’t mind answering. Did you buy these from Costco? or somewhere else. The dimmers I’m testing on were sold as singles on Amazon. I’m wondering if there’s a difference between the two.

Costco.

FCC ID: SYW-DIMWIFI
IC: 20416-DIMWIFI

Same info that OP Andy has (though he has BYW, instead of SYW… it’s clearly an “S” though… :stuck_out_tongue: )

Here is the FCC link that comes up when searching the ID #. Here’s another link for internals that someone took apart, which I verified on one of my own are the same. Do your switches match?

I have a SYW dimmer as well. What revision is yours? Its the laser engraved numbers below these. Mine is 205-19-52

The one I’m currently testing is 205-19-44. I’ve got like 15 of these lying around the house, as I’ve been swapping them out with Martin Jerry dimmers (still have a few installed for their 3-Way ability, hence my interest in getting this to work), so I’ll check to see if I have a -52. FYI some of the switch I bought from Costco online, which while a 3-pk, were actually individual boxed items… might be the same revision.

52 I believe is not important. 205 should be the revision; 19 = 2019 and 52 = last week of the year. Your were likely produced at an earlier date.

EDIT:
It doesn’t look like I can make any additional posts on this topic since I just registered for this forum.

Anyway…

Its good to know that reset 4 does not work. Its means whatever data is stored isn’t being modified by your typical tasmota settings. I’ll look into the base code and see if the arduino code is storing values separate from tasmota.

I’m also going to be mining one of the unmodded dimmers have here for more data before make additional releases. After our discussion I had unanswered questions about the original functionality so I did some preliminary testing. The original dimmer does not immediately initialize the MCU connection. It takes a few seconds and is apparent because the led blinks before tuning solid. Additionally it stores the dimmer value and forwards it later. Tasmota does not store the dimmer value after it is reported by the MCU. I don’t know if the original dimmer has a function to query this from the MCU or if its merely storing this data itself. So many questions… this might take some time.

1 Like

Yep 44 is my most current of my uninstalled/unused ones. I did buy all of mine I believe in December 2019…

Also I don’t know if I ever noticed this, but when the firmware is doing its Off/On/On/On/Off bug, any button press will get it past this bug. In other words if the switch is off and I turn it on, if before I turn it off I hit one of the brightness buttons once (which won’t register), the following mains button press will turn off just fine. If that’s at all helpful… probably mentioned above at some point, and I just don’t remember.

edit: also I forgot to mention, but the reset 4 option didn’t seem to make any difference other than necessitating that I also put in the MQTT info as well afterwards.

I tried to flash one of these, but after it got passed the part where you pick with binary to load (I chose Tasmota), the whole process crashed for some reason and I couldn’t ever find the Tasmota AP on my network. brick it? I’ve tried to reflash multiple times but I never get past this step. I power-cycled the switch several times with no luck.

After hours of debugging, I tried to flash again using the same process, even with a new rPI image, but the flashing stalls on the “waiting for the upgraded device to appear” message and just keeps displaying dots (see below). Is there any way to re-flash this device or did I just brick this device?
Any help would be appreciated.

If it crashed during a firmware load, yeah you likely bricked it. Though it might be possible to reflash it via the USB to TTL serial method, I haven’t seen anyone document the correct pinout or a GPIO 0 point to ground out to get it into flash mode. Probably not worth the time / effort honestly, and if you got it from Costco… well just saying.

@agglomerator What is the FCC ID and IC from the back of the dimmer?

@Technowizard Yes, all 8 of mine are:
FCC ID: SYW-DIMWIFI
IC: 20416-DIMWIFI

the firmware is doing its Off/On/On/On/Off bug

I wonder if this is now addressed in Tasmota 8.3.0. I ask because I saw lots of PWM updates in the Changelog. I personally went the ESPHome route with my dimmers, but am curious to see if they’d work well with Tasmota 8.3 and the PWM changes.

One of us should flash 8.3 and verify. Maybe update this ticket…

  • Tuya Convert to 7.0.0.3
    image

  • powercycle

  • reset 6
    image

  • flash to 8.1 minimal
    image

  • powercycle

  • reset 6

  • flash to 8.1

  • reset 6

  • powercycle

  • flash to latest

  • reset 6
    image

And the missed button press is still here, well still missing. The switch did not report the the ‘Off’ press just after 00:45:23

Andy

00:45:17 MQT: stat/dimmer4/POWER = ON
00:45:21 MQT: tele/dimmer4/STATE = {"Time":"2020-05-15T00:45:21","Uptime":"0T00:04:07","UptimeSec":247,"Heap":26,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":35,"MqttCount":1,"POWER":"OFF","Dimmer":50,"Fade":"OFF","Speed":1,"LedTable":"ON","Wifi":{"AP":1,"SSId":"chicken","BSSId":"10:DA:43:89:59:6D","Channel":9,"RSSI":100,"Signal":-42,"LinkCount":1,"Downtime":"0T00:00:05"}}
00:45:21 MQT: stat/dimmer4/RESULT = {"POWER":"OFF"}
00:45:21 MQT: stat/dimmer4/POWER = OFF
00:45:23 MQT: tele/dimmer4/STATE = {"Time":"2020-05-15T00:45:23","Uptime":"0T00:04:09","UptimeSec":249,"Heap":26,"SleepMode":"Dynamic","Sleep":10,"LoadAvg":19,"MqttCount":1,"POWER":"ON","Dimmer":50,"Fade":"OFF","Speed":1,"LedTable":"ON","Wifi":{"AP":1,"SSId":"chicken","BSSId":"10:DA:43:89:59:6D","Channel":9,"RSSI":100,"Signal":-41,"LinkCount":1,"Downtime":"0T00:00:05"}}
00:45:23 MQT: stat/dimmer4/RESULT = {"POWER":"ON"}
00:45:23 MQT: stat/dimmer4/POWER = ON
00:46:25 MQT: tele/dimmer4/STATE = {"Time":"2020-05-15T00:46:25","Uptime":"0T00:05:11","UptimeSec":311,"Heap":26,"SleepMode":"Dynamic","Sleep":10,"LoadAvg":61,"MqttCount":1,"POWER":"ON","Dimmer":50,"Fade":"OFF","Speed":1,"LedTable":"ON","Wifi":{"AP":1,"SSId":"chicken","BSSId":"10:DA:43:89:59:6D","Channel":9,"RSSI":100,"Signal":-40,"LinkCount":1,"Downtime":"0T00:00:05"}}

I missed this one, probably mentioned above :confused:

Anyone got one open with a serial connection?