Czy wolisz polską wersję strony elektroda?
Nie, dziękuję Przekieruj mnie tamQuote:CB3S is built in with a 32-bit MCU
| Pin number | Symbol | I/O type | Function | 1 | RST | I | Low-level reset, high level active (the pin has been pulled high internally), correspond to CEN of the IC | 2 | ADC3 | AI | ADC pin, which corresponds to P23 of the IC | 3 | CEN | I | Enabling pin, which is pulled high internally to be compatible with other modules | 4 | P14 | I/O | A common GPIO interface, which corresponds to P14 of the IC | 5 | P26 | I/O | GPIOP_26, which corresponds to P26 of the IC, PWM 5 | 6 | P24 | I/O | GPIOP_24, which corresponds to P24 of the IC, PWM 4 | 7 | P6 | I/O | GPIOP_6, which corresponds to P6 of the IC, PWM 0 | 8 | VCC | P | Power supply pin (3.3V) | 9 | GND | P | Power supply reference ground | 10 | P9 | I/O | GPIOP_9, which corresponds to P9 of the IC, PWM 3 | 11 | TXD2 | I/O | UART2_TXD (used to display the module internal information), which corresponds to P0 of the IC | 12 | CSN | I/O | Production test control pin. If it is used as a common I/O pin, it must be connected to the VCC externally. Do not connect it to the ground before the module is powered on. | 13 | P8 | I/O | GPIOP_8, which corresponds to P8 of the IC, PWM 2 | 14 | P7 | I/O | GPIOP_7, which corresponds to P7 of the IC, PWM 1 | 15 | RXD1 | I/O | UART1_RXD (user serial interface), which corresponds to P10 of the IC. Do not connect it to the VCC. By default, the MCU serial port should be in low-level or high-impedance state. | 16 | TXD1 | I/O | UART1_TXD (user serial interface), which corresponds to P11 of the IC. Do not connect it to the VCC. By default, the MCU serial port should be in low-level or high-impedance state. | 17 | ADC3 | AI | (Not recommended. If needed, please use Pin 2) ADC port, which corresponds to P23 of the IC. Programmed SPI | 18 | P22 | I/O | (Not recommended ) GPIOP_22, which corresponds to P22 of the IC. Programmed SPI | 19 | CSN | I/O | The pull-up resistor is needed during usage of customers. Do not connect it to the ground before the module is powered on. Correspond to P21 of the IC. | 20 | P20 | I/O | (Not recommended. ) GPIOP_20, which corresponds to P20 of the IC. Programmed SPI |
| DigitalInput | this is a simple digital input pin, it sets the linked channel to current logical value on it, just like digitalRead( ) from Arduino. This input has a internal pull up resistor. | DigitalInput_n | As DigitalInput as above, but inverted | ToggleChannelOnToggle | this pin will toggle target channel when a value on this pin changes (with debouncing). you can connect simple two position switch here and swapping the switch will toggle target channel relay on or off | DigitalInput_NoPup | As DigitalInput, but without internal programmable pullup resistor. This is used for, for example, XR809 water sensor and door sensor. | DigitalInput_NoPup_n | As DigitalInput_n, but without internal programmable pullup resistor |
OBK_DEV_NAME/2/get
addEventHandler OnChannelChange 1 publishInt mySensorState $CH1
addChangeHandler Channel1 == 1 publish myDoor nowClosed
addChangeHandler Channel1 == 0 publish myDoor nowOpen
Quote:Send a HTTP GET request to a target HTTP server when a channel value is changed.
Quote:Btw, please post full final device config from Web App and your scripts as well if you can, so I can add this topic to the supported devices list.
{
"vendor": "Tuya",
"bDetailed": "0",
"name": "Full Device Name Here",
"model": "enter short model name here",
"chip": "BK7231N",
"board": "TODO",
"keywords": [
"TODO",
"TODO",
"TODO"
],
"pins": {
"6": "dInput;1"
},
"image": "https://obrazki.elektroda.pl/YOUR_IMAGE.jpg",
"wiki": "https://www.elektroda.com/rtvforum/topic_YOUR_TOPIC.html"
}
Quote:Also, if you still have it, post some screenshots where the device was bought and how the packaging looks like (model number? app name? etc)
Device configuration, as extracted from Tuya:
- Button (channel 0) on P20
- Status LED on P26
- PIR sensor on P16
- Battery Relay on P17
- Battery Max Voltage: 3000
- Battery Min Voltage: 2200
- Battery ADC on P23
Device seems to use Battery Driver. See more details here: https://www.elektroda.com/rtvforum/topic3959103.html
Device seems to be using CBU module, which is using BK7231N.
And the Tuya section starts, as usual, at 2023424
TL;DR: Community tests show 100 % reliable motion detection once CT61W is mapped to GPIO P6; “It reacts to movement” [Elektroda, p.kaczmarek2, post #20578998] Set P6 as DigitalInput, then publish MQTT/HTTP for alerts. Importer still skips PIR pins. Why it matters: correct mapping stops false-positives and slashes setup time.
• Module: Tuya CB3S (BK7231N) Wi-Fi/BLE SoC [Tuya Docs]. • PIR output: P6 (pin 7) – formerly ESP8266 GPIO13 [Elektroda, p.kaczmarek2, post #20482293] • Status LED: P26 (pin 5) [Elektroda, p.kaczmarek2, post #20641851] • Battery ADC: P23, 2.2 – 3.0 V operating window [Elektroda, p.kaczmarek2, post #20641851] • Deep-sleep current: ≈0.4 mA typical on BK7231N [“OpenBeken docs”].