ct-Open-Source / tuya-convert

A collection of scripts to flash Tuya IoT devices to alternative firmwares
MIT License
4.67k stars 500 forks source link

WiFI-W6B #721

Open DJ-Q opened 4 years ago

DJ-Q commented 4 years ago

I have a "No Neutral" 2 gang touch light switch. The markings on the board say WIFI-W6B and i can see a ESP8285 on board.

I can't get this to flash using tuya convert. The switch seems to connect to the AP and then immediatley comes out of pairing mode. Tuya convert just says

SmartConfig complete. Resending SmartConfig Packets

over and over and then fails with

Device did not appear with the intermediate firmware Check the *.log files in the scripts folder Do you want to try flashing another device? [y/N] n

I have used the same setup to successfully flash smart plugs - so know my installation and method works - is there anything that would stop this switch from accepting tuya convert?

EDV64 commented 3 years ago

Update for my previous posts - today I received a slightly different version of WiFI-W6B:

IMG_20210909_213422_1

In this PCB we can see a different orientation of unmarked chip. After tracing I make sure that pin 5 (not 11 as earlier!) is connected to pin 25 (U0RXD) of ESP8285. When I applied the previous method and lift up pin 5 of unmarked chip, flashing was started.

Wain-PC commented 3 years ago

Hi there. I've recently received a batch of Esooli / Minitiger branded switches with 1, 2 and 3 gangs. All of them have the newer board version which is pictured by @EDV64 in the previous post. However, I was able to flash them with Tasmota using esptool.py without lifting any pins.

Procedure:

  1. Permanently connect GPIO0 pin to GND.
  2. Connect 3.3V, GND, RX, TX to UART.
  3. Run esptool.py
  4. Right after the tool has started briefly connect RST pin with GND. I was using a small screwdriver as the pins on the board are next to each other. The board was recognized by esptool only after this step.

Here are my Tasmota templates for every switch:

{"NAME":"1 Gang","GPIO":[0,288,0,0,0,32,0,0,224,0,0,0,0,0],"FLAG":0,"BASE":1}
{"NAME":"2 Gang","GPIO":[0,288,0,32,33,0,0,0,0,224,225,0,0,0],"FLAG":0,"BASE":1}
{"NAME":"3 Gang","GPIO":[0,52,0,17,19,18,0,0,22,21,23,0,0],"FLAG":0,"BASE":1}
leranp commented 3 years ago

The RST was working for me, without pulling up the PIN in the chip, But i have a random ON/OFF in the switches , i even tried to connect only the PCB and connect to 3.3V , does someone have the same problem? Tried to remove the RF Receiver , but the problem isn't gone

yucanash commented 2 years ago

Please tell me, is this the radio frequency part of 433MHz? Безымянный

EDV64 commented 2 years ago

Please tell me, is this the radio frequency part of 433MHz? Безымянный

"Highly-likely" yes, because the RF (WiFi) antenna interface of ESP8285 has pin2 and connected throw smd to other PCB structure (not shown on your photo, but you can see it on my previous photo in the left-upper corner)

jernest0 commented 2 years ago

Hello. I recently received from the EARU brand with 1 Switch The newest board version shown in @EDV64.

I was able to flash them with Tasmota using esptool.py/Tasmnotizer without desoldering any pins.

Process: As indicated by @Wain-PC

The RF system is not affected by the Firmware change, I have been able to add and remove RF remotes after flashing them with the Manufacturer's instructions. This is the template that worked for me

{"NAME":"WIFI-W6B-1","GPIO":[0,544,0,0,0,32,1,1,224,0,0,0,0,0],"FLAG":0," BASE":18}

kini24 commented 2 years ago

Hello guys! Please help me figure out the firmware of these switches. The other day I received the same one as EDV64 in this comment. I tried to lift both 5 and 11 pins at the same time and separately. And I tried with RST and without it - there is no result. Sometimes the firmware starts, even reaches about 70%, but then it is interrupted with the error "can't receive command response header" and "FLASH_DOWNLOAD_DATA failed". For firmware I use EspEasy Flasher (a small window with a choice of port and firmware, nothing else). Esptool.py can't connect at all. How to flash this damn switch? Never had such problems with them before.

P.S. Sorry, my USB-TTL adapter didn't work properly. Replaced it with another one and everything went well.

Elkropac commented 1 year ago

Update for my previous posts - today I received a slightly different version of WiFI-W6B:

In this PCB we can see a different orientation of unmarked chip. After tracing I make sure that pin 5 (not 11 as earlier!) is connected to pin 25 (U0RXD) of ESP8285. When I applied the previous method and lift up pin 5 of unmarked chip, flashing was started.

Hi, i think, i have this version of PCB. Have you managed to get it flashing without unsoldering pin 5 from unmarked chip?. I tried shortening RST pad (the one between GPI0 and GND) to ground but no luck

EDV64 commented 1 year ago

Update for my previous posts - today I received a slightly different version of WiFI-W6B: In this PCB we can see a different orientation of unmarked chip. After tracing I make sure that pin 5 (not 11 as earlier!) is connected to pin 25 (U0RXD) of ESP8285. When I applied the previous method and lift up pin 5 of unmarked chip, flashing was started.

Hi, i think, i have this version of PCB. Have you managed to get it flashing without unsoldering pin 5 from unmarked chip?. I tried shortening RST pad (the one between GPI0 and GND) to ground but no luck

Hello. First I tried to flash an old revision of pcb "natively" (without unsoldering of pin) and there was no result. According this I unsoldered all revisions, old and new. To solve problem totally you can take a multimeter in tracing mode, connect one probe to pin 25 (RXD of ESP8285) and check other probe to all pins of unmarked chip. Then you need to repeat procedure with first probe on pin 26 (TXD of ESP8285). If you will find a pins of unmarked chip that connected to 25 or 26, it probably will jam to communicate ESP and programmer. So either these pins would be disconnected (unsoldered) either you can try to find and disconnect a power of unmarked chip (but this decision is only my assuption, not tested).

Elkropac commented 1 year ago

Hi, i tried pin 25 and it was connected like on your picture, I did not try pin 26. I also think, that the pad marked as RST on pictures is connected to pin near on corner with dot of unlabeled chip, but shortening it to ground did not make any difference

EDV64 commented 1 year ago

Hi, i tried pin 25 and it was connected like on your picture, I did not try pin 26. I also think, that the pad marked as RST on pictures is connected to pin near on corner with dot of unlabeled chip, but shortening it to ground did not make any difference

It was great if there was two SEPARATE RST pins - one in ESP and other in unlabeled chip. So you can connect second pin to ground and noname chip will be disabled...

Elkropac commented 1 year ago

It was great if there was two SEPARATE RST pins - one in ESP and other in unlabeled chip. So you can connect second pin to ground and noname chip will be disabled...

Just checked it and RST connects to pin 32 on ESP too, so it cannot be used , i guess? So i need to unsolder the pin 5 on unlabeled chip ... oh boy

pritam2016bakshi commented 1 year ago

Do you have 4 gang switch firmware?

Elkropac commented 1 year ago

Hi, i tried pin 25 and it was connected like on your picture, I did not try pin 26. I also think, that the pad marked as RST on pictures is connected to pin near on corner with dot of unlabeled chip, but shortening it to ground did not make any difference

It was great if there was two SEPARATE RST pins - one in ESP and other in unlabeled chip. So you can connect second pin to ground and noname chip will be disabled...

I got back to it yesterday. I tried to desolder pin 1 to have separate RST, but i failed. I think i can cut trace to it to make it separate.

What about the pin 5. If i could unsolder the pin for flashing (which i doubt), do i need to resolder it back for the switch to work properly? I'm also thinking about cutting the trace/path to it. Or is it required to be connected afterwards?

EDV64 commented 1 year ago

General idea is to find and disconnect any points connected to pins 25 and 26 of ESP. To do this you can take a multimeter turned into trace mode, connect one probe to pin 25 of ESP and check other probe to all pins of unlabeled chip consistently. If you find a closured pin - it probably must be unsoldered. Then repeat steps with pin 26 of ESP similarly

Elkropac commented 1 year ago

Yeah i figured out the disconnect part. But my question is: do i need to connect it back after flashing? I really struggled on unsoldering those pins, so i would rather cut the trace, if it's not needed afterwards, for the switch to work properly

Elkropac commented 1 year ago

@EDV64 My problem was this 20230330_095620 It was shortening the power. After resoldering this cap and cutting trace to pin 5 of secondary chip, i was able to flash esphome to the device.

I just need to find correct pins for relays and buttons now (and to hope i did not cut incorrect trace, because i was mad at one point and maybe did something wrong).

Elkropac commented 1 year ago

Ok, so i cut the trace and flashed it. But this trace is needed for button1 to be connected. I managed to repair it, which was hard, because i totally destroyed part of path. Button1 is no less sensitive, but i don't know whether it's caused by my repair or whether it was like that before

brenard commented 1 year ago

Not sure if some tried this, but I was able to flash it without touching the chip:

* wired as on pics UP (vcc->3.3v, rx->tx,tx->rx, gnd->GPi0)

* Hit Tasmotize Button (it started to "ping" the serial port or something like that...not sure)

* and shorted GND and RST on board

* and LED started to blink

* flashed successfully

This method works great on my 1 gang WIFI-W6B 2PH144594A board. Thanks !

brunogp32 commented 1 year ago

FLASH FTDI Wire Diagram: *bridge between GPIO0 and GND image

PINOUT:

GPIO # Component GPIO00 None GPIO01 Led1 GPIO02 None GPIO03 Button1 GPIO04 Button3 GPIO05 Button2 GPIO09 None GPIO10 None GPIO12 Relay2 GPIO13 Relay1 GPIO14 Relay3 GPIO15 None GPIO16 None FLAG None

ESPHOME WIFI-W6B 1GANG:

esphome:
  name: luz-quarto1

esp8266:
  board: esp01_1m

# Enable logging
logger:

# Enable Home Assistant API
api:
  encryption:
    key: "WgIaRs1gMmTMwLYHmsngBrCti+qpO1LQUJ/ab3G+QJo="

ota:
  password: "af8a9a5db9acf8ed381a6576fe090b4f"

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Luz-Quarto1 Fallback Hotspot"
    password: "dHU9lD48y6cq"

captive_portal:
binary_sensor:
  - platform: homeassistant
    entity_id: binary_sensor.interruptores
    id : interruptores
    publish_initial_state: true
  - platform: gpio
    pin:
      number: GPIO5
      mode:
        input: true
        pullup: true
      inverted: true
    on_press:
      then:
        - if:
            condition:
              or:
                - binary_sensor.is_on: interruptores  #child lock
                - not:
                   api.connected:  #works independently of the API

            then:
              - switch.toggle: switch_1
    name: "Botão luz do quarto1"

  - platform: status
    name: "Status luz do quarto1"

switch:
  - platform: gpio
    name: "Luz do quarto 1"
    pin: GPIO12
    id: switch_1

output:
  # Register the blue LED as a dimmable output ....
  - platform: esp8266_pwm
    id: blue_led
    pin: GPIO1
    inverted: true

light:
  # ... and then make a light out of it.
  - platform: monochromatic
    name: "Led interruptor do quarto1"
    output: blue_led
jkwim commented 1 year ago

Thanks to everybody who had commented in this thread. You all made my task easier.

I also recently bought few WiFi-W6B based switches and tried Tuya Converting without success.

Then I found this thread.

So my only way forward was to go Tasmotizer way.

Based on comments here my conclusion was that many of you had not understood the ESP8285/ESP8286 boot mode and flash mode properly.

My previous experience on flashing ESP-01 made my effort a breeze.

BOOT MODES

The ESP8285/82866 chip boots in to different modes based on the GPIO0 and GPIO2 state at startup.

image

If you have access to serial console you would see two modes like these (note that the baudrate needs to be 74880 for the text to be displayed properly):

boot mode (3,6) boot mode (1,6)

The first degit shows the boot mode. 3 denotes normal boot from flash mode while 1 denotes the flashing mode.

In order to change the mode in to Flashing mode you would need to ground GPIO0 and then while GPIO0 is grounded using RESET pin the chip needs to be restarted. The GPIO0 connection can be removed once RESET is performed.

When this mode is detected, Tamotizer will initiate communication and start the flashing process.

Now the easiest way to do this juggling is to setup two momentaray push buttons on a breadboard and perform the action of "Keeping GPIO0 pressed (grounded) and Press and Release of RESET button. Using buttons this action guarantees the change of the mode.

Many skip using ESP-01 module (basically a minimalistc ESP8266 module) because of the difficulty encountered in flashing.

Once you know the above steps you can successfully do it.

Many years back I made my own programming breakout board with two push buttons to easily activate the flashing mode.

image

On the right is a USB to TTL device specifically designed for programming the ESP-01. Unfortunately with device you cannot manually play with GPIO0. So I made a custom breakout board which goes in between so that I have access to all the pins of the ESP-01 module. I have added two puch buttons, one for GPIO0 to be grounded and the other to ground the RESET pin.

image

I got the idea from the following design that I found in the internet.

image

NOW TO PROGRAMMING THE WiFi-W6B

WiFi-W6B exposes following pins via test pads:

image

So all I had to think was to figure out a way to connect these to my programming boards 4x2 female header like this (ignore the background graphics):

image

Looking the different pin headers that I had in my collection, I figured out that I should be able to use a 8x2 female pin header with long pins

image

Wrapped some kind of insulating paper to prevent the pins from touching/shortcircuiting components on the other side. Note that no soldering is required here since the two rows of pins will help to secure the pins on the pads properly. You may bend the pins a little inwards to make them really tight.

image image

I made a custom cable to take this connections to a 4x2 female pin header on my breakout board.

LITTLE BIT ABOUT CUSTOM CABLES (IF YOU ARE INTERESTED)

Some time back I had ordered as assortment of these kind of blank headers (and pins separately hoping to crimp my own jumper cables).

image (The picture shows 2 single row headers glued together to make double row headers).

You pick any standard jumper cable and remove the cable and crimped pin as follows:

  1. Push the cable side in a little bit so that a small gap shown in the picture can be seen
  2. Using a small knife blade carefully lift the small plastic locking tab a little bit and pull out the cable along with the pin.

image

Now you can insert the cable in to your blank header. Make sure that the pins are oriented in the same way as they were inside so that the plastic locking tab gets engaged properly. Its not that difficult.

I had my custom header as shown

image

Plugged in to my breakout board and was ready to go

image

Secured the setup inside an empty cardboard box and got it flashed with Tasmota using Tasmotizer at the first attempt.

image

Hope these additional tips help somebody (I have more units tobe flashed this way so this is going to be simple for me).

jkwim commented 1 year ago

Here is the 3-Gang switch that I have with all my homework embedded

image

nicman23 commented 1 year ago

@jkwim can you share your template? Mine does a weird sound on its receptacle and does not power up - though it works correctly with direct power to the pins

jkwim commented 1 year ago

@jkwim can you share your template? Mine does a weird sound on its receptacle and does not power up - though it works correctly with direct power to the pins

Update: GPIO1 changed in to LEDLink {"NAME":"WiFi-W6B 3-Gang","GPIO":[0,544,0,32,34,33,0,0,225,224,226,0,0,0],"FLAG":0,"BASE":1}

image

Hope this helps.

nicman23 commented 1 year ago

i shorted something and the whole thing blew soooooo i guess we will never know lmao, thanks though

ricmarq commented 1 year ago

Here is the 3-Gang switch that I have with all my homework embedded

image

Hello friends! I have a PCB like this and I intend to solder an open/closed sensor to the TX (GPIO01), but to do this I need to separate the TX from the blue LEDs on the buttons. I cut the line that goes to the Main Blue LED, but I can't find the line that I have to cut to separate it from the blue LEDs on the buttons. Can anyone help? If I don't do it, every time I press the buttons, GPIO01 is placed at 0V...

jkwim commented 1 year ago

Here is the 3-Gang switch that I have with all my homework embedded image

Hello friends! I have a PCB like this and I intend to solder an open/closed sensor to the TX (GPIO01), but to do this I need to separate the TX from the blue LEDs on the buttons. I cut the line that goes to the Main Blue LED, but I can't find the line that I have to cut to separate it from the blue LEDs on the buttons. Can anyone help? If I don't do it, every time I press the buttons, GPIO01 is placed at 0V...

Can you consider using GPIO 2 which is unused for the purpose?

It all depends on the type of sensor. GPIO 2 needs to pulled up during boot.

image

Alternatively you could consider repurposing GPIO10 as they are unused here (in a regular ESP8266 module these pins will be used for external flash but here in this PCB we have ESP8285 which has built in flash).

image

I haven't tried so far (I might in future) but these PINs could be used as normal GPIO pins.

In Tasmota "Generic" profile GPIO9 & GPIO10 can be user defined for ESP8285:

image

In the PCB GPIO9 appears to be connected somewhere but GPIO10 is free. You could directly solder a wire there.

ricmarq commented 1 year ago

Here is the 3-Gang switch that I have with all my homework embedded image

Hello friends! I have a PCB like this and I intend to solder an open/closed sensor to the TX (GPIO01), but to do this I need to separate the TX from the blue LEDs on the buttons. I cut the line that goes to the Main Blue LED, but I can't find the line that I have to cut to separate it from the blue LEDs on the buttons. Can anyone help? If I don't do it, every time I press the buttons, GPIO01 is placed at 0V...

Can you consider using GPIO 2 which is unused for the purpose?

It all depends on the type of sensor. GPIO 2 needs to pulled up during boot.

image

Alternatively you could consider repurposing GPIO10 as they are unused here (in a regular ESP8266 module these pins will be used for external flash but here in this PCB we have ESP8285 which has built in flash).

image

I haven't tried so far (I might in future) but these PINs could be used as normal GPIO pins.

In Tasmota "Generic" profile GPIO9 & GPIO10 can be user defined for ESP8285:

image

In the PCB GPIO9 appears to be connected somewhere but GPIO10 is free. You could directly solder a wire there.

Many thanks. My problem is how to solder wires directly in the ESP... It is so small... GPIO1 is available in the programming interface and it's easy to solder.

user831944 commented 1 year ago

How to turn on RF transmission? What frequency? I bought 10 switches, but only one of them was not flashed into the tasmota, I had to unsolder leg 5, after which the flashing was successful. I installed the tasmota-sensors.bin, GPIO2 as an RFrecv reception. But there is no response to the 433 MHz remote control.

Aeronaut commented 1 year ago

Here is the 3-Gang switch that I have with all my homework embedded

image

Hello! I also got 3 Gang Switches with this PCB. I'm very happy finding this :-)

How to turn on RF transmission? What frequency? I bought 10 switches, but only one of them was not flashed into the tasmota, I had to unsolder leg 5, after which the flashing was successful. I installed the tasmota-sensors.bin, GPIO2 as an RFrecv reception. But there is no response to the 433 MHz remote control.

Have you tried SerialSend4 0 in Tasmota Console?

user831944 commented 1 year ago

Have you tried SerialSend4 0 in Tasmota Console?

yes, I just tried it - no reaction to the external 433 MHz remote

I also don’t know if there is a separate GPIO for the blue backlighting of the buttons (this is not a separate LED on the top of the board)

Raddie12 commented 11 months ago

Hi, Verkabelung I also managed to flash the W6B with ESPHOME without soldering. I also ask me now if I could use the 433 MHz antenna to receive some signals, but can´t find the right GPIO or the right Code... "# Example configuration entry remote_receiver: pin: number: GPIO?? inverted: True mode: INPUT_PULLUP dump: all " Has anyone managed to get some signals or to send some?

user831944 commented 11 months ago

For more convenience, it is better to take a clothespin with 6 pins from aliexpress.

2.54mm Single row 6P (it is similar to this one, but with 6 contacts) 1

protectivedad commented 11 months ago

I'm trying to get the RF to work. For my board the markings are

Update for my previous posts - today I received a slightly different version of WiFI-W6B:

IMG_20210909_213422_1

In this PCB we can see a different orientation of unmarked chip. After tracing I make sure that pin 5 (not 11 as earlier!) is connected to pin 25 (U0RXD) of ESP8285. When I applied the previous method and lift up pin 5 of unmarked chip, flashing was started.

This is the same layout as I have. I think that I finally understand how it is working, and I'd like some feedback. The 8-pin chip is equivalent to SYN531R. It has a data out on pin 5 which goes to the "8-bit MCU?" (16-pin chip) on pin 7. When you hold the pad it puts the 8-bit MCU into learning mode. Pressing the remote button sends the code to the 8-bit MCU. Pressing the remote button will now initial a "pad" press and ESP will control the relay/led.

From this understanding, Tasmota has no need for any RF code to work as designed.

Why is the 16-pin chip pin 5 connected to the RX of the esp? What is it's purpose and has anyone used it for anything?

What about diverting the data out pin of the SYN531R to the ESP RX to "spy" the signals? Any thoughts on this?

I am hoping to get the switch to be a generic RF receiver to allow a 3 button remote to control the switch and other devices by a mqtt broker.

protectivedad commented 11 months ago

When I originally disconnected the pad on the 8-bit MCU I pulled up the pad. I had reconnected it with a very fine gauge wire. That made it easy for me to disconnect it and reroute the ESP RX pin to the SYN531R DO. Then I needed tasmota-sensor and setting GPIO3 as RFrecv gave me:

19:28:46.651 RSL: RESULT = {"Time":"2023-12-15T19:28:46","RfReceived":{"Data":"0xBUTTONA","Bits":24,"Protocol":1,"Pulse":411}}
19:28:52.347 RSL: RESULT = {"Time":"2023-12-15T19:28:52","RfReceived":{"Data":"0xBUTTONA","Bits":24,"Protocol":1,"Pulse":411}}
19:28:54.914 RSL: RESULT = {"Time":"2023-12-15T19:28:54","RfReceived":{"Data":"0xBUTTONC","Bits":24,"Protocol":1,"Pulse":411}}
19:28:57.435 RSL: RESULT = {"Time":"2023-12-15T19:28:57","RfReceived":{"Data":"0xBUTTONB","Bits":24,"Protocol":1,"Pulse":411}}

For my three different remote buttons.

There is some type of interference because the protocol and bits will jumble on occasion. Still looking into it.

user831944 commented 11 months ago

I got a new version of the 2 key switch Now the esp board is soldered separately.

photo1704116225 photo1704116225 (2)

It was possible to read the name of the chip, which is apparently responsible for the transmission of 433mhz The manual for HS80F551S3 is in сhinese language, I have not yet understood what it is for. photo1704116225 (1)

photo1704116225 (3) now I'm figuring out how to flash it and which pins are responsible for data exchange with the 433MHz chip

protectivedad commented 11 months ago

It was possible to read the name of the chip, which is apparently responsible for the transmission of 433mhz The manual for HS80F551S3 is in сhinese language, I have not yet understood what it is for.

Looks like what I described in my post. Only it is a 16bit MCU. I now have five of the original switches sniffing the 433mhz chip and Tasmota takes care of publishing and acting on the information. I don't know why the makers went and put the extra MCU in there when the esp8266 can take care of it all by itself. I think you'd need the 8/16-bit source code or new firmware to make the chip worthwhile. You can look at the Sonoff 433mhz RF bridge for a device that has the intermediate MCU reprogrammed. If you don't mind sharing, where did you get the new items with the TYWE3S board?

user831944 commented 11 months ago

If you don't mind sharing, where did you get the new items with the TYWE3S board?

I always bought from the same online store https://aliexpress.ru/item/4001027951594.html (seller Esooli Online Store) This time I bought two additional switches, one came standard, with a connected GPIO RX and a leg on a chip with empty markings (standard, to put tasmota here this leg need to be unsoldered) and the second one indicated above. Externally they do not differ in any way. On the packaging of the first there is the number SKU675079294216, and on the second, with the TYWE3S chip - SKU694836802561 I'm glad that the TYWE3S chip apparently does not have RX and TX soldered, it will most likely be flashed without problems. I hope to check this in just 3 days.

Moreover, I hope that the HS80F551S3 chip will come with GPIO14 and GPIO16, VCC & GND from TYWE3S. Maybe this will be enough for tasmota to be able to control the 433 MHz receiver?

protectivedad commented 11 months ago

Moreover, I hope that the HS80F551S3 chip will come with GPIO14 and GPIO16, VCC & GND from TYWE3S.

Only if it is reprogrammed. From the unmarked chip boards, interfering with one button pin will stop them all from working. I have some one button and two button boards with the unmarked chips. With the one button I spy the 433mhz chip with gpio3 but with the two button gpio3 and gpio4 are used so I attach it to gpio5. When I was doing this I noticed if I overrode the wrong gpio all the buttons stop working. I could still control the relays externally but the buttons no longer responded. Hence, I think the unmarked chip controls the esp. Which makes sense since it stores the remote codes that are used to trigger the esp and it needs to read the button to determine the button the remote code will control. So I think the unmarked controls the esp which will trigger the relays. Good luck. I'll appreciate any information you gather.

JostBrand commented 10 months ago

Since this is the only page which mentions the wifi-w6b. I can confirm that an alternative version called "XNG-wifi-w6b" is also flashable for tasmota with the layout provided above.

Connect GPIO0 to GRND and then restart the chip with connecting RST to GRND aswell. The LED stays off.

To have it all in one place (stolen from above):

1 gang:

{"NAME":"JR-SEU01-1","GPIO":[0,157,0,0,0,17,0,0,21,0,0,0,0],"FLAG":7,"BASE":2}

2 gang:

{"NAME":"JR-SEU01-2","GPIO":[0,157,0,17,18,0,0,0,0,21,22,0,0],"FLAG":7,"BASE":2}

jkwim commented 10 months ago

Since this is the only page which mentions the wifi-w6b. I can confirm that an alternative version called "XNG-wifi-w6b" is also flashable for tasmota with the layout provided above.

Connect GPIO0 to GRND and then restart the chip with connecting RST to GRND aswell. The LED stays off.

To have it all in one place (stolen from above):

1 gang:

{"NAME":"JR-SEU01-1","GPIO":[0,157,0,0,0,17,0,0,21,0,0,0,0],"FLAG":7,"BASE":2}

2 gang:

{"NAME":"JR-SEU01-2","GPIO":[0,157,0,17,18,0,0,0,0,21,22,0,0],"FLAG":7,"BASE":2}

Yes, XNG-wifi-w6b is more common now.

sovjet commented 9 months ago

Hello, would anyone know what is this part of PCB? Would switch still work if i cut that part out?

image
jkwim commented 8 months ago

That's the antenna for RF part

sovjet commented 8 months ago

That's the antenna for RF part

Just to make sure, this is about 433Mhz RF part? It has nothing to do with WiFi?

EDV64 commented 8 months ago

That's the antenna for RF part

Just to make sure, this is about 433Mhz RF part? It has nothing to do with WiFi?

Wi-Fi antenna is in the upper left corner and connected to ESP chip

jon-daemon commented 8 months ago

I have switches with 1,2,3 and 4 touch sensors and I want to replace tuya with esphome on all of them.

I converted one of them with 1 sensor. The touch sensors are connected to the unlabeled chip and it sends the signals to the ESP chip. I had to desolder pin 5 of the unlabeled chip which was connected to Rx. I opened another switch with 1 sensor and found that the unlabeled chip has a different orientation. Maybe some of the 1-3 sensors switches have the same connections but I still have some work to do on the others.

Does anybody know what chip is that and what is its purpose?

I will post my findings after converting all of my switches.

jkwim commented 8 months ago

Please post some pictures otherwise we would not know which switch you are talking about. There are many different PCBs discovered by different users.

jon-daemon commented 8 months ago

I created a repo here to post my findings and photos of my switches.

I already have flashed one of them with esphome and another with esphome-kickstart to verify that they use the same pins for inputs/outputs, although the connections to the unknown 16 pin chip are different. They both have 1 sensor and 1 relay but one is labeled as WIFI-W6C while the other doesn't have any label on the pcb.

I will proceed with my 2 and 3 sensors which seem to have the same connections on the pcb. The 4 sensors switches use a module soldered on the pcb and I will probably need to investigate further the connections on them.

After verifying that everything is working properly I will upload my esphome config for all of them.

jkwim commented 8 months ago

I created a repo here to post my findings and photos of my switches.

I already have flashed one of them with esphome and another with esphome-kickstart to verify that they use the same pins for inputs/outputs, although the connections to the unknown 16 pin chip are different. They both have 1 sensor and 1 relay but one is labeled as WIFI-W6C while the other doesn't have any label on the pcb.

I will proceed with my 2 and 3 sensors which seem to have the same connections on the pcb. The 4 sensors switches use a module soldered on the pcb and I will probably need to investigate further the connections on them.

After verifying that everything is working properly I will upload my esphome config for all of them.

4 GANG Switch uses WR3 Module:

WR3 is a low-power embedded Wi-Fi module that Tuya has developed. Embedded with the Wi-Fi network protocol stack and rich library functions, it also consists of a highly integrated RF chip (RTL8710BN) and an external flash chip.

https://github.com/arendst/Tasmota/issues/6434#issuecomment-1356328800 Hi, I just flashed ESPHome on a SP22 plug with RTL8710BN using LibreTuya. https://github.com/kuba2k2/libretuya I posted the config on their Discord. https://github.com/libretiny-eu/libretiny

Probably WR3 can be replaced by ESP-12F module: The connections on pins shown in Blue needs to be scrutinized.

image

jon-daemon commented 8 months ago

Thank you. I haven't started investigating the 4 gang yet. I have used ltchiptool to flash a bk7231n. If the process is the same I will I think I will be able to flash the RTL8710BN. I flashed my 1/2/3 gangs with esphome and they are working fine. I had to unsolder pin5 of the unlabeled chip to start communicating with the serial adapter. I tried many times without unsoldering and sometimes I could start the communication with lower baud rate but I couldn't upload the firmware.