Tuya night light with WIFI
Source: https://de.aliexpress.com/item/1005004997029225.html
The night light is made by Tuya-module CBU.
All needed pin are accessable. You can flash it without dismount the module
Pin definition for the module as cbu.txt
These pins are used:
P26 - PWM1 - red
P24 - PWM2 - green
P6 - PWM3 - blue
P8 - PWM4 - cool white
P7 - PWM5 - warmwhite
P14 - dInput - PIR-signal
P20 - dInput_n - button
P23 - ADC - brightness (0 = bright; 4096 = dark)
P9 - PWM - sensitivity of PIR, 0-max, 255-min
I do not use HA but IP-Symcon. That is why I can not say something to HA-integration.
Some inner pictures:
I use the device as a simple status signal. In my case for the count of open windows in the case of exit the apartment.
pins explained:
P26; P24; P6; P8; P7
standard PWM output for R,G,B,CW,WW
P20
buttom at the right side of the device
negated
P23
analog brightness signal
0 - sun light
200-400 approx. room light in the evening
4096 - no lights
P14
PIR signal with approx. 5sec switch-off delay
P9
output corresponds with pin SENS of the PIR-module BS-612
there is a small capacitor between signal and ground (no value known).
0 Volt - highest sensitivity
3 Volt - low sensitivity
I do not know if you can output this as PWM or you have to set it as a standard digital output.
Other signal pin were not found.
![[BK7231N - CBU] Tuya Night Light with WiFi: Pin Configuration, PWM, dInput, ADC, PIR Sensitivity [BK7231N - CBU] Tuya Night Light with WiFi: Pin Configuration, PWM, dInput, ADC, PIR Sensitivity](https://obrazki.elektroda.pl/7257331500_1685826455_thumb.jpg)
Source: https://de.aliexpress.com/item/1005004997029225.html
The night light is made by Tuya-module CBU.
All needed pin are accessable. You can flash it without dismount the module
![[BK7231N - CBU] Tuya Night Light with WiFi: Pin Configuration, PWM, dInput, ADC, PIR Sensitivity [BK7231N - CBU] Tuya Night Light with WiFi: Pin Configuration, PWM, dInput, ADC, PIR Sensitivity](https://obrazki.elektroda.pl/1088949700_1685826636_thumb.jpg)
![[BK7231N - CBU] Tuya Night Light with WiFi: Pin Configuration, PWM, dInput, ADC, PIR Sensitivity [BK7231N - CBU] Tuya Night Light with WiFi: Pin Configuration, PWM, dInput, ADC, PIR Sensitivity](https://obrazki.elektroda.pl/4093859300_1685826639_thumb.jpg)
Pin definition for the module as cbu.txt
These pins are used:
P26 - PWM1 - red
P24 - PWM2 - green
P6 - PWM3 - blue
P8 - PWM4 - cool white
P7 - PWM5 - warmwhite
P14 - dInput - PIR-signal
P20 - dInput_n - button
P23 - ADC - brightness (0 = bright; 4096 = dark)
P9 - PWM - sensitivity of PIR, 0-max, 255-min
I do not use HA but IP-Symcon. That is why I can not say something to HA-integration.
Some inner pictures:
![[BK7231N - CBU] Tuya Night Light with WiFi: Pin Configuration, PWM, dInput, ADC, PIR Sensitivity [BK7231N - CBU] Tuya Night Light with WiFi: Pin Configuration, PWM, dInput, ADC, PIR Sensitivity](https://obrazki.elektroda.pl/2320645900_1685827347_thumb.jpg)
![[BK7231N - CBU] Tuya Night Light with WiFi: Pin Configuration, PWM, dInput, ADC, PIR Sensitivity [BK7231N - CBU] Tuya Night Light with WiFi: Pin Configuration, PWM, dInput, ADC, PIR Sensitivity](https://obrazki.elektroda.pl/9017846000_1685827347_thumb.jpg)
![[BK7231N - CBU] Tuya Night Light with WiFi: Pin Configuration, PWM, dInput, ADC, PIR Sensitivity [BK7231N - CBU] Tuya Night Light with WiFi: Pin Configuration, PWM, dInput, ADC, PIR Sensitivity](https://obrazki.elektroda.pl/6710196100_1685827347_thumb.jpg)
I use the device as a simple status signal. In my case for the count of open windows in the case of exit the apartment.
pins explained:
P26; P24; P6; P8; P7
standard PWM output for R,G,B,CW,WW
P20
buttom at the right side of the device
negated
P23
analog brightness signal
0 - sun light
200-400 approx. room light in the evening
4096 - no lights
P14
PIR signal with approx. 5sec switch-off delay
P9
output corresponds with pin SENS of the PIR-module BS-612
there is a small capacitor between signal and ground (no value known).
0 Volt - highest sensitivity
3 Volt - low sensitivity
I do not know if you can output this as PWM or you have to set it as a standard digital output.
Other signal pin were not found.
Cool? Ranking DIY