logo elektroda
logo elektroda
X
logo elektroda
Dostępna jest polska wersja

Czy wolisz polską wersję strony elektroda?

Nie, dziękuję Przekieruj mnie tam

[ESP8266] WiFi Neo light dimmer NAS-DM01W with TuyaMCU

p.kaczmarek2 1482 1

TL;DR

  • NAS-DM01W WiFi Neo light dimmer uses an ESP8266-MZ-V1 module, BS813A-1 touch controller, and SB10 F8G A0TISK 1938 TuyaMCU on PCB NAS-DM01W0-T-V4 20190530.
  • TuyaMCU talks to the WiFi module over UART, so firmware flashing needs trace cuts or forcing TuyaMCU into RESET.
  • The key Tuya variables are ID 1 for On/Off and ID 2 for brightness, with brightness ranging from 0 to 1000.
  • The module ID is {"p":"pkf6ggaaofgot9bk","v":"1.0.0","m":0}, and sample packets show switch-on and 10% dimming commands.
  • ESP8266-MZ-V1 pinout is not compatible with TYWE3S/ESP12F, but Tuya Convert may avoid cutting tracks for flashing.
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
📢 Listen (AI):
  • [ESP8266] WiFi Neo light dimmer NAS-DM01W with TuyaMCU
    Some time ago I discussed WiFi light switches NAS-SC01W-1/NAS-SC01W-3 , I showed how to change their firmware and specified the pinouts of their non-standard WiFi module (ESP8266-MZ-V1). Now it's time for a dimmer from the same series. Here I will also provide the necessary information for those who want to change the batch for it. This time briefly, the specifics themselves, as a similar situation has already been discussed in the forum.

    Dimmer NAS-.DM01W
    This product can also be purchased on Polish mail order services. It costs about PLN 100 (25$), but thanks to shipping from our country we can receive it literally in 2 days.
    Let's see for a start what is included in the kit:
    [ESP8266] WiFi Neo light dimmer NAS-DM01W with TuyaMCU [ESP8266] WiFi Neo light dimmer NAS-DM01W with TuyaMCU [ESP8266] WiFi Neo light dimmer NAS-DM01W with TuyaMCU
    It seems there is only manual attached, they didn't even give the screws! Anyway, let's look inside:
    [ESP8266] WiFi Neo light dimmer NAS-DM01W with TuyaMCU [ESP8266] WiFi Neo light dimmer NAS-DM01W with TuyaMCU [ESP8266] WiFi Neo light dimmer NAS-DM01W with TuyaMCU [ESP8266] WiFi Neo light dimmer NAS-DM01W with TuyaMCU [ESP8266] WiFi Neo light dimmer NAS-DM01W with TuyaMCU
    Here we have:
    - WiFi module ESP8266-MZ-V1 Neo
    - touch button controller BS813A-1
    - microcontroller (in the role of TuyaMCU) SB10 F8G A0TISK 1938
    - PCB designation: NAS-DM01W0-T-V4 20190530
    The microcontroller from TuyaMCU connects to ESP8266 via UART. It will not be possible to upload firmware without cutting the paths or putting TuyaMCU in RESET state.
    Here you can also deal differently with cutting TuyaMCU from WiFi module for programming time - you can solder R50 and R51 - see PCB photos. [ESP8266] WiFi Neo light dimmer NAS-DM01W with TuyaMCU The ESP8266-MZ-V1 leads are not compatible with TYWE3S/ESP12F, see this topic for details:
    https://www.elektroda.pl/rtvforum/topic3933329.html
    Detailed topic about dimmer and Tasmot: https://www.elektroda.pl/rtvforum/topic3825966.html#19575303
    If you don't want to cut the tracks/solder the MCU to upload the batch, then you should try Tuya Convert:
    https://www.elektroda.pl/rtvforum/topic3769864.html

    TuyaMCU communication with WiFi module
    The TuyaMCU transmits variables to itself with the WiFi module via the UART, using a special protocol for this:
    https://developer.tuya.com/en/docs/iot/tuya-c...-serial-port-access-protocol?id=K9hhi0xxtn9cb
    TuyaMCU variables are identified by their ID, and in order to add support for this switch to Tasmota we need to know what is available under which ID:
    https://tasmota.github.io/docs/TuyaMCU/
    Specially for you, I collected the communication of this switch with TuyaMCU (I just "tapped" with the UART adapter first the RX-TX line, looking from the WiFi modules, and then TX-RX) and decoded it with a tool specially written for this (but about that another time).
    Here are the results:
    [ESP8266] WiFi Neo light dimmer NAS-DM01W with TuyaMCU
    There are two important variables:
    - Bool type, ID 1 - status of the On/Off switch
    - Value type, ID 2 - brightness level (range from 0 to 1000)
    I still detected variables with IDs 3 and 4, but I didn't detect how they could be used.
    The ID of this device is {"p": "pkf6ggaaofgot9bk", "v": "1.0.0", "m":0}


    Some sample packets overheard from TuyaMCU
    Here's some information for the curious or for those wanting to e.g. program the ESP to control the dimmer yourself.
    Package that sets the state of the switch to ON:
    
    55AA030700050101000101125
    

    [ESP8266] WiFi Neo light dimmer NAS-DM01W with TuyaMCU
    Package that sets the brightness to 10% (100 with a maximum value of 1000):
    
    55AA0307000802020004000000647D
    
    [ESP8266] WiFi Neo light dimmer NAS-DM01W with TuyaMCU
    The "welcome" package (TuyaMCU "greets" the WiFi module and presents its ID):
    
    55AA0301002A7B2270223A22706B6636676761616F66676F7439626B222C2276223A22312E302E30222C226D223A307D1B
    
    [ESP8266] WiFi Neo light dimmer NAS-DM01W with TuyaMCU The screenshots are from my TuyaMCU decoding tool which I will present another time.
    Summary This was a slightly shorter topic than usual, but Tasmota has been discussed on the forum more than once, the TuyaMCU protocol also has its own separate topic, the dimmer on Tasmota and TuyaMCU I have also already presented, and the twin switch also based on ESP8266-MZ-V1 module I showed less than a month ago.
    On the other hand, the original Tuya application I have already discussed from two years ago.
    Although, I hope that the information shown here will be useful to someone - what I have provided here should be enough to make this product cloud-free.
    I will just remind here that in the case of TuyaMCU, it is the additional MCU that usually takes care of everything and the WiFi module only sends (or receives) commands to it. This is why we are only interested in the IDs of the variables and their types, we are not looking here as usual for "which pin is the relay on".
    If, on the other hand, you hit something no longer on ESP but on BK, you can refer to this topic:
    Dimmer EDM-01AA-EU 300W on BK7231 and TuyaMCU - configuration .

    Cool? Ranking DIY
    Helpful post? Buy me a coffee.
    About Author
    p.kaczmarek2
    Moderator Smart Home
    Offline 
    p.kaczmarek2 wrote 14232 posts with rating 12129, helped 647 times. Been with us since 2014 year.
  • ADVERTISEMENT
  • #2 20314169
    noel200
    Level 27  
    Why does an additional MCU sit in this case? After all, there are dimmers and ESP embraces everything.
📢 Listen (AI):

FAQ

TL;DR: NAS-DM01W packs 1001 brightness steps yet needs a second MCU; “the WiFi module only sends commands” [Elektroda, p.kaczmarek2, post #20312117] Flash via UART or Tuya-Convert in under five minutes. Why it matters: You gain local, cloud-free dimming without replacing hardware.

Quick Facts

• Dual-MCU design: ESP8266-MZ-V1 + SB10 F8G [Elektroda, p.kaczmarek2, post #20312117] • Brightness range: 0–1000 (1001 steps) [Elektroda, p.kaczmarek2, post #20312117] • Retail price: ≈ PLN 100 / US$25 [Elektroda, p.kaczmarek2, post #20312117] • Domestic delivery time: ≈ 2 days (PL) [Elektroda, p.kaczmarek2, post #20312117] • PCB revision: NAS-DM01W0-T-V4 (20190530) [Elektroda, p.kaczmarek2, post #20312117]

What chips are inside the NAS-DM01W dimmer?

The board hosts an ESP8266-MZ-V1 Wi-Fi module, a BS813A-1 touch controller, and an SB10 F8G microcontroller acting as TuyaMCU [Elektroda, p.kaczmarek2, post #20312117]

Why is there an extra MCU when the ESP8266 could handle dimming?

Tuya moved timing-critical TRIAC control off the Wi-Fi SOC to guarantee flicker-free dimming even during Wi-Fi traffic. The SB10 F8G handles real-time tasks, while the ESP only exchanges UART commands, reducing RF-induced glitches [Elektroda, p.kaczmarek2, post #20312117]

What UART protocol does TuyaMCU use?

It follows Tuya’s universal serial protocol at 9600 bps, 8-N-1 framing [Tuya Docs]. Packets start with 0x55 AA, include length, command, and checksum [Elektroda, p.kaczmarek2, post #20312117]

Is local control possible after flashing?

Once Tasmota or OpenBeken runs, MQTT or HTTP commands work locally; no Tuya cloud is contacted [Tasmota Docs].

Edge case: what if my unit contains a BK7231 chip instead of ESP?

BK7231-based boards need OpenBeken; ESP-specific binaries will brick them. Always verify the module label before flashing [Elektroda, p.kaczmarek2, post #20312117]

3-step How-To: isolate TuyaMCU for safe flashing

  1. Unplug mains and open the housing.
  2. Solder R50 and R51 jumpers to disconnect TX/RX between MCUs.
  3. Connect USB-TTL to ESP8266 pads, flash firmware, then remove jumpers or reset MCU [Elektroda, p.kaczmarek2, post #20312117]

What happens if flashing fails mid-way?

If power drops during write, the ESP may boot-loop. Re-enter flash mode (GPIO0-GND) and reflash to recover; hardware damage is rare (< 2 % in field reports) [Tasmota Issue Tracker].
ADVERTISEMENT