channelclick(channel){
if (this.channels[channel]) {
this.channels[channel] = 0;
} else {
this.channels[channel] = 100;
}
But just change the value is to simple, isn't it??
regards
Czy wolisz polską wersję strony elektroda?
Nie, dziękuję Przekieruj mnie tam channelclick(channel){
if (this.channels[channel]) {
this.channels[channel] = 0;
} else {
this.channels[channel] = 100;
}
channelclick(channel){
if (this.channels[channel]) {
this.channels[channel] = 0;
} else {
if (this.outputchannelrolenames[channel] === 'Rel' || this.outputchannelrolenames[channel] === 'Rel_n'){
this.channels[channel] = 1;
} else {
this.channels[channel] = 100;
}
}
this.channelchange(channel);
},
theosoft wrote:BTW. Firefox mostly has a bad responsetime. I have to wait 5 sec. Chrome does show the content of the device internal html immediately.
Is there an explanation for that? Is it only my firefox with this behavior?
p.kaczmarek2 wrote:@jimbolaya it's the same as with other devices. Check if you have anything else connetced on TX/RX line. Maybe a MCU or a button or anything?
p.kaczmarek2 wrote:but I don't know if you aware of it or not, but RTL8710BN is a totally different chip than BK7231T/N,
p.kaczmarek2 wrote:So you would have basically to redo all the work again in order to support Beken chips.
p.kaczmarek2 wrote:And you have still 0 Beken-related code in the codebase...
p.kaczmarek2 wrote:With OpenBeken HAL system, adding new platforms is very easy
kuba2k2 wrote:Today I was able to run ESPHome on RTL8710BN - I'm probably the first in the world to do this
kuba2k2 wrote:See? "HAL" means the same for any project.
p.kaczmarek2 wrote:pepesuriano wrote:UART has been impossible to me and I cannot find info on how to flash with SPI.
did you read @DarkMan1 post? he had issues with CP2102 UART to USB converter but CH340 worked for him, maybe you need second usb to uart converter as well?
I have flashed a lot of bk devices and all of them worked so far.
git config --global core.autocrlf truep.kaczmarek2 wrote:I tought I usedpreviously but maybe I forget it or set it incorrectly. Let's see how it works now.git config --global core.autocrlf true
I am adding hsv library.
git config --global core.autocrlf trueDark Man wrote:
P23 how to read brightness and send to HA
Dark Man wrote:
P6 to turn on both PWMs for a certain amount of time
rawilson wrote:@ p.kaczmarek2 it looks like the GU10 bulbs available in Poland woj14415 are based on WBLC5 + SM2135Eh - I2C communication. After dismantling, it turned out that the CLK line is connected to pin 26, date to pin24. Would you provide information on how to configure this bulb?
void Setup_Device_LSC_Smart_Connect_Plug_CB2S_WF02GE(){
CFG_ClearPins();
PIN_SetPinRoleForPinIndex(6, IOR_Relay);
PIN_SetPinChannelForPinIndex(6, 1);
PIN_SetPinRoleForPinIndex(7, IOR_Button);
PIN_SetPinChannelForPinIndex(7, 1);
PIN_SetPinRoleForPinIndex(8, IOR_LED1);
PIN_SetPinChannelForPinIndex(8, 1);
PIN_SetPinRoleForPinIndex(26, IOR_LED2);
PIN_SetPinChannelForPinIndex(26, 1);
CFG_Save_SetupTimer();
}p.kaczmarek2 wrote:Dark Man wrote:P23 how to read brightness and send to HA
ADC? You would have to run the ADC itself on Beken at all, I haven't touched that yet.
https://github.com/tuya/tuya-iotos-embeded-sd...1t/bk7231t_os/beken378/driver/saradc/saradc.h
It is a pity that the functions from here are unresolved and there is no C:
https://github.com/tuya/tuya-iotos-embeded-sd...1t_os/beken378/func/user_driver/BkDriverAdc.h
Dark Man wrote:P6 to turn on both PWMs for a certain amount of time
This could be done with commands, although it probably isn't complete yet, but I can try to prepare you for this support. This has to be done much sooner than the ADC.
TL;DR: 100 % flash-success reported on BK7231 T/N modules [Elektroda, p.kaczmarek2, post #19906676]; “OpenBK7231T now boots on three chip families” [Elektroda, p.kaczmarek2, post #19883071] Use QIO image for BK7231N, UA for BK7231T; erase only 0×11000-0×1EF000. Why it matters: a single workflow now replaces vendor firmware on 60 + low-cost IoT boards.
• Supported MCUs: BK7231T, BK7231N, XR809 (Wi-Fi + BLE) [Elektroda, 19883071] • Recommended UART speed: 921 600 bps for write, 115 200 bps for read [Elektroda, 19857664] • Flash sizes: Typical 2 MB on-chip; config area starts @ 0×1EF000 [Elektroda, post #19893493] • OTA format: .rbl (gzip + AES, served by HTTP) [Elektroda, btsimonh, post #19880525] • Typical power: 5 V @ 500 mA to AMS1117 input for safe programming [Elektroda, ExploWare, post #19853546]
python bk7231tools.py read_flash -d COMx --no-verify-checksum -s 0 -c 512 dump.bin for T/N chips (2 MB, 512 × 4 KB) [GitHub bk7231tools].http-here --host 0.0.0.0 8000). In WebApp → OTA tab → enter http://<IP>:8000/firmware.rbl; device backs up filesystem, flashes, restores settings [Elektroda, btsimonh, post #19880525]OpenBK7231T, then OpenBK7231T_App into /apps. Build: ./build_app.sh apps/OpenBK7231T_App OpenBK7231T_App git (Linux) or Cygwin on Windows; ensure build-essential and gcc-arm-none-eabi installed [Elektroda, boozeman, post #19885620]