I have an issue with one older sensor with a magnetic reel switch, PB-69W. The template:
{
"vendor": "Tuya",
"bDetailed": "0",
"name": "Full Device Name Here",
"model": "Enter Short Model Name Here",
"chip": "BK7231N",
"board": "TODO",
"flags": "0",
"keywords": [
"TODO",
"TODO",
"TODO"
],
"pins": {
"7": "DoorSnsrWSleep_nPup;1",
"9": "WifiLED;5",
"24": "DoorSnsrWSleep_nPup;2"
},
"command": "",
...........
}
I use two GPIOs (7 - channel 1 for reed switch), (24 - channel 2 for tamper button).
It works well, goes from sleep to wake up on change and sleeps after timeout (60 sec, but I tried also 30 sec)
There is an issue that the sensor does not wake up after cca 6-10 hours without change. I have to remove batteries and put them back. Then it works for half a day.
Build: Created on Dec 17, 2023, at 22:12:49, version 1.17.366
MAC Address: fc:67:1f:07:ce:d0
Chipset: BK7231N
Flags: 0
Version: 1.17.366
I also attempted to identify GPIOs for battery monitoring, which did function, but I encountered some issues as detailed here: https://www.elektroda.com/rtvforum/topic3959103.html. My setup was as follows:
Pin Description Config Channel
6 reset button dInput_n 3
7 reel contact DoorSnsrWSleep_nPup 1
9 WiFi LED WifiLED 5
21 BAT_ADC battery level 4
24 tamper contact DoorSnsrWSleep_nPup 2
Upon realizing the wake-up problem, I disabled the battery driver. I now understand that battery monitoring is a separate issue.
Thank you for your help. It is not extremely important to solve it, maybe I will throw out this one sensor but I am interested to have one sensor with two door contacts and deep sleep (tamper + reel).