-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Help with Tuya door/window sensor please? #5389
Comments
Did you follow a process similar to this - https://github.com/arendst/Sonoff-Tasmota/wiki/Configuration-Procedure-for-New-Devices? Question - where you able to flash this OTA or did you have to open it use a serial adapter? Does this device go to sleep after inactivity or with the magnet present? Mike |
Hi Meingraham, I flashed with serial adapter using the latest Tasmota firmware. No I didn’t follow the process! S, |
And yes I can confirm that the device is going to sleep mode after the magnetic switch goes on/off. |
Yes, the latest TASMOTA, but by which method - hooking up wires or wirelessly using Tuya-convert? See if that configuration process works for you to find the GPIO configuration for the device. |
Soldering the RS232 USB adapter and flashing directly. Thanks, |
Thanks for adding the photo's! I ordered a few of these also (have not received them yet). I was hoping they used the tywe3s board since the description listed "Tuya App" etc. I see from your photo's they also appear to have broken out the pins needed to flash firmware (as you have already done). This will be my first adventure into Tasmota and I am hoping to use the "Tuya-Convert" method. If that doesn't work I will do as you did and use a serial to USB. One question (for anyone who knows). I see the Ground (G) and power (V) are marked. The other two are listed as N and S. Do you know which is Transmit and which is Receive? I'm new to this and wasn't sure (I'm guessing they are marked from another language?). Thanks! EDIT: Fixed "OTA" method to "Tuya-Convert" to be clear as to what I hope to do. |
Hi cbmboy, Please wire your RS232 to USB as per picture below! Then use the https://github.com/nodemcu/nodemcu-flasher/tree/master/Win64/Release application to flash the device with the latest Tasmota Firmware using the following config: Baudrate 115200, Flash size 1 MByte, Flash speed 40 MHz , SPI Mode DOUT You need to connect GPIO 0 and GROUND while connecting the board to USB. Good luck. |
@senadaruc This would make the process much easier if these assumptions are correct. Thanks! |
@senadaruc There has to be a extra electronic which sends ESP to off. |
cbmboy, the button will not put the CPU to program mode so I soldered the GPIO 0 and used the ground to force the program mode. jason2866, here is the picture of the board: https://user-images.githubusercontent.com/14252382/53700282-e67e6800-3df0-11e9-8d70-f2aba5dd420c.JPG |
No label on the interesting IC |
The device connects to internet only when you trigger the magnetic switch. |
The N,G,S and V board pins/holes are not connected into TX,RX or VCC !! only G is ground. S, |
Other GPIOs are not connected? Like Gpio 4, 12, 13 or 14? |
Thanks for the information! |
There should be at least two correct? (Asking as I am still new and trying to learn) |
There is no voltage output from other GPIO's !! is there other way to test the GPIO's ? |
Ok so I triggered the magnetic switch and tried to see which GPIO is giving me continuity connection between GND and GPIO output but unfortunately, none of them is closing the circuit! |
The magnetic switch does not trigger a Gpio from the ESP chip |
Aha ok so now I managed to get some ON/OFF messages at the Tasmota console using the Manzoku Strip Module but is not ideal since the default config is switch but I need a sensor, any help bout this? |
how to change the default timer for the sleep mode ?? |
I have not worked in Tasmota yet (waiting for devices) but is this something that it can be setup to do? |
@senadaruc Tasmota uses NO Deep Sleep, it is not possible/wanted by design. This means CPU is always on. See https://github.com/arendst/Sonoff-Tasmota/wiki/energy-saving Tasmota is not intended or designed to use with battery powered devices |
@cbmboy You get a Info from device (via mqtt) that it is (or was) online. This info can be used in your Home Automation solution. |
Ok thanks @blakadder, so now, the LSC Door sensor is flashed with the last Tasmota version v8.1.0 Doris (only hard method works) I tried to apply this config :
But I still have the issue with MQTT : only "Off" and never changes to "On"... |
The tuya received string has two serial messages in it, something is wrong there |
@blakadder |
nothing you can do here, its how the sensor is designed and it depends on how long you need to connect to wifi and your broker |
Hi all. Thanks for all the information that you gave in this thread. I did the flash *using the 4 pin available (inverting tx/rx as they are connected to the esp). I have the tasmota loaded and it works. My problem is that I cannot see the switch On/off but only this message is received in the console when I shift the magnetic sensor: 0:00:05 TYA: Send "55aa000200010305" I tried to increase log to level 4 in tasmota to understand which are the dpID but no success. anything is shown in the log. can you point me in the right direction? Danilo |
Hello all, I got myself this device and try to flash to tasmota-bin (v8.2) with esptool.py (v2.8) The flashing starts OK, but consistently gives an error at 8% of the upload. sudo esptool.py --port /dev/ttyUSB0 --baud 115200 write_flash -fs 1MB -fm dout 0x0 tasmota.bin |
Bad power supply from usb serial adapter Please check the Contributing Guideline and Policy and the Support. Thanks. Support InformationSee Documentation for more information. |
battery powered device as well so it could be going to sleep on you |
Hi,
It’s because it switches off after 7 secs. Keep on activating it using the magnet sensor while you flash it and it will work.
After that pay attention to the rules to send the mqtt... that was my problem. If you have problems let me know and I will put the link has been useful for me.
Bye
D
… Il giorno 21 mar 2020, alle ore 11:57, Bert ***@***.***> ha scritto:
Hello all, I got myself this device and try to flash to tasmota-bin (v8.2) with esptool.py (v2.8)
I used the info from https://templates.blakadder.com/TYMC-1.html but it doesn't mention any special parameters or memory layout.
The flashing starts OK, but consistently gives an error at 8% of the upload.
Does anyone have any idea what could be wrong here?
sudo esptool.py --port /dev/ttyUSB0 --baud 115200 write_flash -fs 1MB -fm dout 0x0 tasmota.bin
esptool.py v2.8
Serial port /dev/ttyUSB0
Connecting....
Detecting chip type... ESP8266
Chip is ESP8266EX
Features: WiFi
Crystal is 26MHz
MAC: bc:dd:c2:60:e0:8a
Uploading stub...
Running stub...
Stub running...
Configuring flash size...
Compressed 580480 bytes to 399923...
Writing at 0x00008000... (12 %)
A fatal error occurred: Invalid head of packet (0x00)
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Brilliant! Thanks. I had it on 3.3V from the FTDI. I thought that fixed the going to sleep issue. |
Great
Please let me know how many seconds it takes to connect your WiFi network when the event (on/off) is generated.
To me 5-6 seconds and sometime There isn’t enough time to send the mqtt message because the esp is switched off.
I tried to minimise the connection time but unsuccessful.
To see that you have to stay on Tasmota console after you configured the WiFi
D
Inviato da iPhone
… Il giorno 21 mar 2020, alle ore 13:17, Bert ***@***.***> ha scritto:
Brilliant! Thanks. I had it on 3.3V from the FTDI. I thought that fixed the going to sleep issue.
I powered it from the pads, not directly to the module. Maybe that was the reason?
But it is flashed now:-) Moving to phase 2.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Hi Dmartella, will do. Meanwhile can you tell me how you kept it from switching off while configuring it? Does it make a difference if I provide power directly to the ESP8266 module? (A opposite to the broken out pins for 3v3 and GND next to the MCU) |
Hi Bert
Just activating it before it switches off. To do this, every 3-4 sec move the magnet sensor near the reed sensor. If you do this, the circuit will not switch off . So while flashing you have to maintain it alive moving the sensor on/off. There are other way (using mqtt or activate the WiFi search) but more complex. I think that powering directly the esp works as well, but I avoided to do that.
Hope it helps
D
Inviato da iPhone
… Il giorno 22 mar 2020, alle ore 07:24, Bert ***@***.***> ha scritto:
Hi Dmartella, will do. Meanwhile can you tell me how you kept it from switching off while configuring it? Does it make a difference if I provide power directly to the ESP8266 module? (A opposite to the broken out pins for 3v3 and GND next to the MCU)
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Hi dmartella, |
Also Mine should be in my profile right?
Inviato da iPhone
… Il giorno 27 mar 2020, alle ore 19:43, Bert ***@***.***> ha scritto:
Hi dmartella,
I have things going with MQTT. i am however getting a flood of Stat, power and RESULT Mqtt messages. I'd like to compare notes with you. But this is not really the place for a discussion. Please send me a private mail. My address is in my profile.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Nope, it isn't in your profile. Or I'm looking in the wrong place:-) |
hi blakadder, have the same sensor now here and working already. The aim is to have it - without soldering - "online" for reconfiguring, if necessary. I did not attach RX / TX / GPIO0 anywhere, only the power. Thanks for any hints. :-) BR |
Like any other ESP 12F module it is required to pull EN high and GPIO15 low in order for the module to boot into the flashed firmware so your idea won't work. reference http://glyncowles.blogspot.com/2015/07/programming-and-running-esp12-e.html |
For everyone, who is looking for a firmware for this device to connect with a MQTT broker, have a look here: https://github.com/klausahrenberg/WDoorSensor |
I flashed ESP-12E but I do not connect to wifi. Do you have any information about this? |
You can ask to klausahrenberg, the author of WDoorSensor by opening an issue at https://github.com/klausahrenberg/WDoorSensor/issues |
Hi, I guess, you followed the flashing instructions here: https://github.com/klausahrenberg/WDoorSensor/blob/master/Flashing.md Then, proceed with initial configuration (Wifi settings): https://github.com/klausahrenberg/WDoorSensor#initial-configuration After this, the sensor should send messages to your MQTT broker at every door opening/closing in following json structure: |
I did it up to install following the instructions. I uploaded the .bin file. but I could not configure it. I power the Esp but I cannot flash the light, do you know which pin corresponds to the reset button on the TUYA in ESP8266. Thank You. |
I'm a little confused. Ok, flashing with esp tool was successfull, right?
|
Yes. I flashed with esp tool.
|
Ok, now I know your idea. But I have to say, it will not work. The door sensor is not just an ESP12E. It has a second controller (MCU) where the reset button, the LED and complete battery management is connected to. MCU and ESP talks via serial communication to each other. ESP does only the WIFI things, the MCU is the logic itself. |
Two years later but hey, got the same question, but Tuya WiFi door/window sensor now looks like this internally: and yep, the question now is, what's that chip and how to flash it? |
Ah, but here is the spec: https://developer.tuya.com/en/docs/iot/cbu-module-datasheet?id=Ka07pykl5dk4u In which I can clearly identify pins marks TX1, Tx2, RX1, RX2, GND and 3VC (which I suspect is your VCC) but the RX/TX confusion aside, GPIO is mentioned on 8 pins other! And needs some more skill to read than I have off-hand. |
This is based on BK7231N and not an ESP. So it's not Tasmota compatible |
Dears,
I managed to flash this Tuya door/window sensor with Tasmota and all work perfectly except that I can't find the right configuration for the module.
The specification and pictures of the device:
Description:
1.Detect open/close status of the door/window,compatibe with Tuya
2.Battery: AAAx 2 (not included ) Standby time: 5 years
3.Use time:1 years (15 times/day) 2years(7 times/day)
4.Standby current:10uA Wireless Type:2.4GHz
5.Protocol:IEEE 802.11b/g/n Wifi distance:45m
6.Operating Temperature:0℃~ 40℃ (32°F~104°F)
7.Free APP:Tuyasmart, one key setup wifi or ap mode connection with wifi .
8.Works with Alexa Echo and google home.
Specifications:
This is a smart door sensor which can work dependently without hub , and can be compatible with Alexa and google home assistant , Besides, it can IFTTT other smart items . Also, it can associate 2 device sot work to creat your own scene and shart your devices to others directly
how to work :
2.Register and login
Package Included:
1*smart sensor
https://www.aliexpress.com/item/Home-Door-Window-Detector-WiFi-App-Notification-Alerts-Battery-Operated-Home-Security-Sensor-Work-with-Alexa/32973283622.html
Picture of the board:
https://user-images.githubusercontent.com/14252382/53700281-e67e6800-3df0-11e9-85cd-8eb4a040cc78.JPG
Picture of the board:
https://user-images.githubusercontent.com/14252382/53700282-e67e6800-3df0-11e9-8d70-f2aba5dd420c.JPG
Thanks,
The text was updated successfully, but these errors were encountered: