logo elektroda
logo elektroda
X
logo elektroda

[BK7231T] My HTTP server, configurator, MQTT support from Home Assistant

p.kaczmarek2 178089 1242
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
  • #1081 20323512
    p.kaczmarek2
    Moderator Smart Home
    @ferguson88 do you remember where and when you got these LSPA9 on W600? Is this something new?
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #1082 20323531
    ferguson88
    Level 11  
    @p.kaczmarek2 This socket is noname from aliexpress bought in 2020. They were quite popular back then. On many forums you could read descriptions of connecting the esp8266 wires. I did that myself too. Currently, you can also get ESP-02S modules, which have the same shape and pin layout as TW-02.
  • #1083 20323977
    bogran
    Level 7  
    Hi!
    I have a WIFIPO120FWT SmartPlug 16A (Nedis) but can't find any teardown for tuya-cloudcutter. Looks like some people have managed to flash BK7231T, but I'm curious which profile is then used? I tested with test_device_exploitable.py and per comment it is exploitable since it "seems to be 'frozen'".
  • ADVERTISEMENT
  • #1084 20324141
    ferbulous
    Level 18  
    bogran wrote:
    Hi!
    I have a WIFIPO120FWT SmartPlug 16A (Nedis) but can't find any teardown for tuya-cloudcutter. Looks like some people have managed to flash BK7231T, but I'm curious which profile is then used? I tested with test_device_exploitable.py and per comment it is exploitable since it "seems to be 'frozen'".


    You can choose the correct profile based on the tuya firmware version.
    And you can use lightleak to dump the stock firmware bin wirelessly for the pinout details from the json file.

    https://github.com/tuya-cloudcutter/lightleak
  • #1085 20324460
    p.kaczmarek2
    Moderator Smart Home
    ferbulous wrote:
    @p.kaczmarek2
    With my scheduled router reboot (close to 5 am daily)
    I noticed my N device took longer to reconnect while T reconnects instantly.
    Is there a timer event if wifi offline I can use to trigger restart with the script?

    Can you do an experiment - power off and power on the problematic device manually and see if it also takes so long to connect to WiFi?

    But do not do it during router reboot, just do it at a random time.
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #1086 20324985
    ferbulous
    Level 18  
    p.kaczmarek2 wrote:
    Can you do an experiment - power off and power on the problematic device manually and see if it also takes so long to connect to WiFi?

    It reconnects just fine after power cycle, sometimes it does go offline at random time and for quite a while even with the ping option enabled
    Would this script work as temporary solution?

    
    //delay script to start after 15 seconds on startup so device can connect to wifi
    delay_s 15
    //starts event id 01 with 2 minuter then restarts openbk
    alias myboot addRepeatingEventID 01 120 1 restart
    //cancel event id 01 timer
    alias noboot cancelRepeatingEvent 01
    if MQTTState 0 then myboot else noboot
  • #1087 20325791
    bogran
    Level 7  
    ferbulous wrote:
    You can choose the correct profile based on the tuya firmware version.
    And you can use lightleak to dump the stock firmware bin wirelessly for the pinout details from the json file.
    https://github.com/tuya-cloudcutter/lightleak


    Ok, lot of stuff to get lightleak working, and unfortunately I don't have a device (ESP32/ESP8266/BK7231 or RTL8710B with LibreTuya) which seems to be the deal breaker for me at the moment.
    Thanx for great clarification.
  • #1088 20325927
    ferbulous
    Level 18  
    @bogran the lightleak is optional and you probably won’t need to dump your firmware now there’s pinout available on the openbk database.

    You’ll just need to run cloudcutter on a pi or any arm board to flash it ota. If you start getting ‘A-xxx’ prefix instead of ‘Smartlife-xxx’ after running the script then it can be flashed
  • #1089 20326046
    bogran
    Level 7  
    ferbulous wrote:
    @bogran the lightleak is optional and you probably won’t need to dump your firmware now there’s pinout available on the openbk database.

    You’ll just need to run cloudcutter on a pi or any arm board to flash it ota. If you start getting ‘A-xxx’ prefix instead of ‘Smartlife-xxx’ after running the script then it can be flashed


    Ok, sounds great. Then it's maybe just me not understanding how to put the last bits and pieces together. I guess you mean the pinout at https://templates.blakadder.com/nedis_WIFIPO120FWT.html? But then when reading about the flash script it says

    Quote:
    Example: ./run_flash.sh -p avatar-asl04-tv-backlight -f custom_firmware_UG_file.bin


    and I thought you were supposed to supply the script with the json listed on devices? If I have the correct pinout from the link above, I guess I have to format a proper json for the flash script?
  • #1090 20326087
    ferbulous
    Level 18  
    @bogran I didn't have to specify anything
    just run the script ./run_flash.sh
    it's gonna ask for the firmware you want to flash (downlaod firmware to custom-firmware directory)
    then just pick the profile based on your device firmware
  • #1091 20326478
    p.kaczmarek2
    Moderator Smart Home
    @ferbulous this script might need some fixes, but in general, if the "ping watchdog" doesn't work then I am not sure what might be happening. We might need to investigate it a bit more, any possibility of getting UART log of such device?
    In worst case I might consider adding some kind of self-logging history to the LittleFS.....

    Important release coming:
    We will have a working IoT device simulator soon. It's basically an OpenBeken running on Windows with extra schematic editor. It will allow you to write scripts and test them easily on your PC. You can also export your design and send it to me, so I can check the scripts, etc, etc.
    Examples:
    [BK7231T] My HTTP server, configurator, MQTT support from Home Assistant
    [BK7231T] My HTTP server, configurator, MQTT support from Home Assistant
    [BK7231T] My HTTP server, configurator, MQTT support from Home Assistant
    @ferbulous , I remember you had very good ideas for scripts, can you take the time and list here what you'd think would be cool to do with scripting?

    We can even send power usage data (voltage, current, etc) to PHP server with our scripting system and SendGet command.

    OpenBeken development will now go really fast, with the ability to run firmware on Windows... our Windows port can even control Tasmota Device Groups devices (send and receive!), send HTTP GET's and much more... even LittleFS is emulated on Windows.
    Helpful post? Buy me a coffee.
  • #1092 20327556
    ferbulous
    Level 18  
    p.kaczmarek2 wrote:
    this script might need some fixes, but in general, if the "ping watchdog" doesn't work then I am not sure what might be happening. We might need to investigate it a bit more, any possibility of getting UART log of such device?
    In worst case I might consider adding some kind of self-logging history to the LittleFS.....


    It's a light bulb, the self-logging history to LittleFS probably would help in this case
    I tried adding that script with the if and then

    //delay script to start after 15 seconds on startup so device can connect to wifi
    delay_s 15
    //starts event id 01 with 2 minuter then restarts openbk
    alias myboot addRepeatingEventID 01 120 1 restart
    //cancel event id 01 timer
    alias noboot cancelRepeatingEvent 01
    if MQTTState 0 then myboot else noboot
    if MQTTState 1 then noboot else myboot


    but i'm getting this error

    Info:EVENT:CMD_Alias: the alias you are trying to use is already in use (as an alias or as a command)
    Info:EVENT:CMD_Alias: the alias you are trying to use is already in use (as an alias or as a command)
    Info:EVENT:CMD_If: second argument always must be 'then', but it's '0'


    p.kaczmarek2 wrote:
    I remember you had very good ideas for scripts, can you take the time and list here what you'd think would be cool to do with scripting?

    I'll help with anyway I can although I'm not that good with scripting
  • #1093 20327581
    omelchuk890
    Level 11  
    @ferbulous
    just as an idea
    if MQTTState==0 then myboot else noboot
    or
    if !MQTTState then myboot else noboot

    p.s.
    if you can tell me what language to write scripts in, then it will be useful for me. I'll try to learn the syntax.
  • #1094 20328050
    bogran
    Level 7  
    ferbulous wrote:
    @bogran I didn't have to specify anything
    just run the script ./run_flash.sh
    it's gonna ask for the firmware you want to flash (downlaod firmware to custom-firmware directory)
    then just pick the profile based on your device firmware


    The problem now is just that there are multiple versions of the fw matching the version that my Nedis device has. So, I have Main Module: V1.0.2 and the script shows:

       1.0.2 - BK7231N / oem_bk7231n_dctrl_switch
     > 1.0.2 - BK7231T / bk7231t_common_user_config_ty
       1.0.2 - BK7231T / cuco_sw5_bk_common
       1.0.2 - BK7231T / oem_bk7231s_control_switch
       1.0.2 - BK7231T / oem_bk7231s_light_mix4to5_db_rmd


    the N-version is not applicable, since the device has WB3S, but there are multiple T-versions. Then if I eg chose bk7231t_common_user_config_ty then the next step is to chose brand, but then only Minoston shows up as an option. But you're saying that it does not matter if the brand does not match, but that the fw version is more important? How should I pick the correct type, ie bk7231t_common_user_config_ty vs the other options?
  • #1095 20328116
    ferbulous
    Level 18  
    @bogran yeah, if the current profile doesn’t work, just keep trying the next one. Bring the device closer to rpi so the script can finish the ota

    Added after 1 [minutes]:

    @omelchuk890 didn’t work for me though, just starts the reboot after 15 seconds
  • #1096 20328151
    bogran
    Level 7  
    ferbulous wrote:
    @bogran yeah, if the current profile doesn’t work, just keep trying the next one. Bring the device closer to rpi so the script can finish the ota


    I tried all profiles, but none is showing Nedis:

    
     > 1.0.2 - BK7231T / bk7231t_common_user_config_ty
    [?] Select the brand of your device: Minoston
     > Minoston
    
     > 1.0.2 - BK7231T / cuco_sw5_bk_common
    [?] Select the brand of your device: Gosund
     > Gosund
    
     > 1.0.2 - BK7231T / oem_bk7231s_control_switch
    [?] Select the brand of your device: KOGAN
     > KOGAN
    
     > 1.0.2 - BK7231T / oem_bk7231s_light_mix4to5_db_rmd
    [?] Select the brand of your device: TreatLife
     > TreatLife
    


    Maybe you used different custom fw than I? I just picked the newest:

    
    [?] Select your custom firmware file: OpenBK7231T_UG_1.15.130.bin
     > OpenBK7231T_UG_1.15.130.bin
    

    Otherwise I don't understand how to get the correct one for my Nedis device.

    Added after 13 [minutes]:

    Just checked the src code, and it seem that 1.15.x version has Nedis commented out

    OpenBK7231T_App-1.15.161/src/httpserver/http_fns.c://   { Setup_Device_NedisWIFIPO120FWT_16A, "Nedis WIFIPO120FWT SmartPlug 16A"},

    while the latest 1.14 does not

    OpenBK7231T_App-1.14.143/src/httpserver/http_fns.c:     { Setup_Device_NedisWIFIPO120FWT_16A, "Nedis WIFIPO120FWT SmartPlug 16A"},

    Maybe that's the problem. Then I need to find if there's a 1.15 which has the profile.

    Added after 10 [minutes]:

    Well, that didn't help. Same problem with Nedis not showing up, when trying with OpenBK7231T_App-1.14.143. Just realized it's the cloudcutter code that has the manufacturers in it's code, not the fw :/.
  • #1097 20328271
    pepesuriano
    Level 9  
    Hello, I have a tuya smart plug which I couldn't flash via uart because some electrical thing is preventing the program to flash it. Is still uart the only way to flash it or there are some new ways to flash it?
  • #1098 20328408
    ferbulous
    Level 18  
    @bogran no, with tuya-cloudcutter, it's all about the firmware version, not the model/brand name of the device. If Gosund/Treatlife ect is listed, then choose that one
    So you've picked all the profiles for 1.0.2 (T) but you're still not getting the 'A-xxx' after running the run_flash script?
    Then you might need to consider using lightleak app that can dump your firmware wirelessly.
    Once you have the firmware bin, you can request for new profile in cloudcutter github page, so far this only works for T device (haven't had success with N..yet) after I tested it
  • #1099 20328467
    bogran
    Level 7  
    ferbulous wrote:
    @bogran no, with tuya-cloudcutter, it's all about the firmware version, not the model/brand name of the device. If Gosund/Treatlife ect is listed, then choose that one
    So you've picked all the profiles for 1.0.2 (T) but you're still not getting the 'A-xxx' after running the run_flash script?
    Then you might need to consider using lightleak app that can dump your firmware wirelessly.
    Once you have the firmware bin, you can request for new profile in cloudcutter github page, so far this only works for T device (haven't had success with N..yet) after I tested it


    Ok, then I get it. I chose Gosund and just a switch that appeared as next option and then I got:

    
    ==> Toggle Tuya device's power off and on again 6 times, with ~1 sec pauses in between, to enable AP mode. Repeat if your device's SSID doesn't show up within ~30 seconds. For smart plugs long press the reset button on the device for about 5 seconds. See https://support.tuya.com/en/help/_detail/K9hut3w10nby8 for more information.
    Scanning for known AP SSID prfixes: "A-" "GRID-" "Geeni-" "Globe Suite-" "LDV SMART+-" "Lumary-" "Merkury-" "Nexxt Home-" "SL-CreeLighting-" "SL-FLSNT-" "SmartLife-" "TreatLife-SL-" "UltraPro-" "Woox-" "atomi-smart-" "iHome-" 
    .
    Found access point name: "SmartLife-8555", trying to connect..
    Device 'wlan0' successfully activated with 'dfdd78e3-cbd0-4a6d-a6df-86ad10bf14de'.
    Connected to access point.
    Waiting 1 sec to allow device to set itself up..
    Running initial exploit toolchain..
    Exploit run, saved device config to!
    output=/work/configured-devices/MpM63HRiBZlX.deviceconfig
    Saved device config in /work/configured-devices/MpM63HRiBZlX.deviceconfig
    ==> Turn the device off and on again once. Repeat 6 more times if your device's SSID doesn't show up within ~5 seconds. For smart plugs long press the reset button on the device for about 5 seconds. See https://support.tuya.com/en/help/_detail/K9hut3w10nby8 for more information.
    Scanning for known AP SSID prfixes: "A-" "GRID-" "Geeni-" "Globe Suite-" "LDV SMART+-" "Lumary-" "Merkury-" "Nexxt Home-" "SL-CreeLighting-" "SL-FLSNT-" "SmartLife-" "TreatLife-SL-" "UltraPro-" "Woox-" "atomi-smart-" "iHome-" 
    .
    Found access point name: "SmartLife-8555", trying to connect..
    Error: Connection activation failed: (53) The Wi-Fi network could not be found.
    ..
    Found access point name: "SmartLife-8555", trying to connect..
    Device 'wlan0' successfully activated with 'dfaa33e3-caa1-3b2d-b6bb-46bb11aa22de'.
    Connected to access point.
    Configured device to connect to 'cloudcutterflash'
    Device is connecting to 'cloudcutterflash' access point. Passphrase for the AP is 'abcdabcd' (without ')
    Flashing custom firmware ..
    ==> Wait for 20-30 seconds for the device to connect to 'cloudcutterflash'. This script will then show the firmware upgrade requests sent by the device.
    Using WLAN adapter: wlan0
    Dec 10 17:39:06 dnsmasq[15]: started, version 2.80 cachesize 150
    Dec 10 17:39:06 dnsmasq[15]: compile time options: IPv6 GNU-getopt DBus i18n IDN DHCP DHCPv6 no-Lua TFTP conntrack ipset auth DNSSEC loop-detect inotify dumpfile
    Dec 10 17:39:06 dnsmasq-dhcp[15]: DHCP, IP range xx.xx.xx.xx -- xx.xx.xx.yy, lease time 12h
    Dec 10 17:39:06 dnsmasq-dhcp[15]: DHCP, sockets bound exclusively to interface wlan0
    Dec 10 17:39:06 dnsmasq[15]: read /etc/hosts - 8 addresses
    Configuration file: /dev/stdin
    wlan0: Could not connect to kernel driver
    Using interface wlan0 with hwaddr aa:aa:aa:aa:aa:aa and ssid "cloudcutterflash"
    wlan0: interface state UNINITIALIZED->ENABLED
    wlan0: AP-ENABLED 
    
    Dec 10 17:40:07 dnsmasq-dhcp[15]: 2017981830 available DHCP range: xx.xx.xx.xx -- xx.xx.xx.yy
    Dec 10 17:40:07 dnsmasq-dhcp[15]: 2017981830 client provides name: wlan0
    Dec 10 17:40:10 dnsmasq-dhcp[15]: 2017981830 DHCPDISCOVER(wlan0) bb:bb:bb:bb:bb:bb 
    Dec 10 17:40:10 dnsmasq-dhcp[15]: 2017981830 tags: wlan0
    . . .logs removed. . .
    [W 221210 17:40:11 iostream:1404] SSL Error on 12 ('xx.xx.xx.xx', 49153): [SSL: DECRYPTION_FAILED_OR_BAD_RECORD_MAC] decryption failed or bad record mac (_ssl.c:1129)
    Using PSK v1 - Received PSK ID version 02
    
    

    so, no sign of A-xxx.
  • #1100 20328471
    p.kaczmarek2
    Moderator Smart Home
    We will provide extensive scripting documentation soon.
    Users will be able to write and run scripts in simulator, so it will be easy to learn the syntax.
    Simulator will also come with a predefined set of examples and uses cases.
    [BK7231T] My HTTP server, configurator, MQTT support from Home Assistant
    You will be able to create a "virtual" OBK device on windows and play around with web page, with LittleFS, with events
    Helpful post? Buy me a coffee.
  • #1101 20329014
    Dark Man
    Level 13  
    I made a button for a new light bulb and I would like to use it and apply a few rolls as in Tasmota
    CW bulb with channels 4 and 5 set
    Button on P24.

    I've read the Wiki but it doesn't list all the event events that I could use for the "addEventHandler" command

    I would like:
    - after pressing the button, the Toggle function would work (setting the pin to BTN_TGL_ALL always activates the maximum brightness), but after turning on the light, it would set the appropriate color and brightness of the CW light,
    - when double clicked, the light turned off after 60 minutes
    - after holding down the button, you could change the brightness alternately, e.g. 15% 30% 45% 60% 75% 100%
    I am able to write something similar in Tasmota, but how to do it here? :)

    I'm counting on your help, THX
  • #1103 20329272
    p.kaczmarek2
    Moderator Smart Home
    Dark Man wrote:

    I would like:
    - after pressing the button, the Toggle function would work (setting the pin to BTN_TGL_ALL always activates the maximum brightness), but after turning on the light, it would set the appropriate color and brightness of the CW light,
    - when double clicked, the light turned off after 60 minutes
    - after holding down the button, you could change the brightness alternately, e.g. 15% 30% 45% 60% 75% 100%
    I am able to write something similar in Tasmota, but how to do it here? :)

    See this simulation (made on "Virtual OpenBeken" on Windows):



    Code:
    
    
    // 
    // SetButtonTimes [ValLongPress] [ValShortPress] [ValRepeat]
    // Each value is times 100ms.
    // Defaults:
    //  SetButtonTimes 10 3 5
    // more responsive hold:
    SetButtonTimes 10 3 5
    
    // shortcut for command. Repetas time is 10 sec, repeats count is 1
    alias add_turnoff_event addRepeatingEvent 10 1 led_enableAll 0
    
    // toggles light state - not needed, done automatically
    //addEventHandler OnClick 7 led_enableAll toggle
    // exec alias
    addEventHandler OnDblClick 7 add_turnoff_event
    // turn on and do add_dimmer 5 with bWrapInteadOfClamp enabled
    addEventHandler OnHold 7 backlog led_enableAll 1; add_dimmer 5 1
    

    [BK7231T] My HTTP server, configurator, MQTT support from Home Assistant
    Save the version you have now and you probably need to OTA to the latest version, but I'm not sure.
    [BK7231T] My HTTP server, configurator, MQTT support from Home Assistant
    [BK7231T] My HTTP server, configurator, MQTT support from Home Assistant
    The button has the second channel set to 10 (unused channel) to bypass the default behavior of changing its state when double clicked
    Helpful post? Buy me a coffee.
  • #1104 20329483
    bogran
    Level 7  
    ferbulous wrote:
    @bogran any luck with the other profiles?


    Yes, finally I got
    
    ==> Turn the device off and on again once. Repeat 6 more times if your device's SSID doesn't show up within ~5 seconds. For smart plugs long press the reset button on the device for about 5 seconds. See https://support.tuya.com/en/help/_detail/K9hut3w10nby8 for more information.
    Scanning for known AP SSID prfixes: "A-" "GRID-" "Geeni-" "Globe Suite-" "LDV SMART+-" "Lumary-" "Merkury-" "Nexxt Home-" "SL-CreeLighting-" "SL-FLSNT-" "SmartLife-" "TreatLife-SL-" "UltraPro-" "Woox-" "atomi-smart-" "iHome-" 
    ..
    Found access point name: "SmartLife-8555", trying to connect..
    Error: Connection activation failed: (53) The Wi-Fi network could not be found.
    ....
    Found access point name: "A-8555", trying to connect..
    Device 'wlan0' successfully activated with '88ac386c-fd10-463e-a94a-0b6eac7b2eda'.
    Connected to access point.
    Configured device to connect to 'cloudcutterflash'
    Device is connecting to 'cloudcutterflash' access point. Passphrase for the AP is 'abcdabcd' (without ')
    Flashing custom firmware ..
    ==> Wait for 20-30 seconds for the device to connect to 'cloudcutterflash'. This script will then show the firmware upgrade requests sent by the device.
    Using WLAN adapter: wlan0
    .
    . logs removed
    .
    [I 221211 12:25:41 web:2271] 200 GET /files/OpenBK7231T_UG_1.14.143.bin (xx.xx.xx.xx) 6490.30ms
    [DEVICE OTA] Responding to device OTA HTTP request range: bytes=0-445231/445232
    Sending firmware update message {"data":{"firmwareType":0},"protocol":15,"t":1670761543} using protocol 2.2
    Firmware update messages triggered. Device will download and reset. Exiting in 30 seconds.
    

    Then it just went dark and not responding to anything. Guess the device is dead/bricked and there's nothing more to do about that :-x ?
  • #1105 20329494
    ferbulous
    Level 18  
    bogran wrote:
    Then it just went dark and not responding to anything. Guess the device is dead/bricked and there's nothing more to do about that ?


    It's not bricked, if it doesn't respond or broadcast Openbeken AP that you could've flashed the wrong firmware for the chip (eg T firmware for N device and vice versa) and that would require serial method to reflash it again.
    Which profile that worked for your device?
  • ADVERTISEMENT
  • #1106 20329519
    bogran
    Level 7  
    ferbulous wrote:

    It's not bricked, if it doesn't respond or broadcast Openbeken AP that you could've flashed the wrong firmware for the chip (eg T firmware for N device and vice versa) and that would require serial method to reflash it again.
    Which profile that worked for your device?


    It actually broadcasts AP - OpenBK7231T_XXXXXXXX. Does this mean something can be done?
    According to all docs I've read it should be T fw. The profile was KOGAN.
  • #1107 20329531
    ferbulous
    Level 18  
    @bogran then you’ve successfully flashed openbkt on it
    Now you need to configure the pinout, select your device from the web application
  • #1108 20329575
    bogran
    Level 7  
    ferbulous wrote:
    @bogran then you’ve successfully flashed openbkt on it
    Now you need to configure the pinout, select your device from the web application


    Yes, sorry I was too fast in my conclusions. Just read in the doc "The access point will come up on 192.168.4.1"...so I was using the wrong address and it actually works. Thanx a lot for all the help. Very appreciated!
  • #1109 20329801
    p.kaczmarek2
    Moderator Smart Home
    Good job @bogran , I'm happy to see your OBK is running! If you have any issues or feature requests, please let us know.
    Helpful post? Buy me a coffee.
  • #1110 20329979
    Dark Man
    Level 13  
    It's strange that my written post from the night has disappeared (I can't see it) - post No. 1091. Today, under this post number, there is something else. Fortunately, you managed to read it and quote it.
    [BK7231T] My HTTP server, configurator, MQTT support from Home Assistant

    p.kaczmarek2 wrote:
    Code:
    //
    // SetButtonTimes [ValLongPress] [ValShortPress] [ValRepeat]
    // Each value is times 100ms.
    // Defaults:
    // SetButtonTimes 10 3 5
    // more responsive hold:
    SetButtonTimes 10 3 5

    // shortcut for command. Repeats time is 10 sec, repeats count is 1
    alias add_turnoff_event addRepeatingEvent 10 1 led_enableAll 0

    // toggles light state - not needed, done automatically
    //addEventHandler OnClick 7 led_enableAll toggle
    // exec alias
    addEventHandler OnDblClick 7 add_turnoff_event
    // turn on and do add_dimmer 5 with bWrapInteadOfClamp enabled
    addEventHandler OnHold 7 backlog led_enableAll 1; add_dimmer 5 1

    Great, great job, but can you somehow make it so that when you hold the button (OnHold), when it reaches 100% brightness, the brightness again starts from zero or starts to go down, and at zero it goes up again.

    The second thing:
    With 5 PWM channels set in the GUI, the configuration for HA generated in the GUI reflects one light source (good!) and not 5 separate entities, while for the CW bulb it generates only 2 entities (for each channel separately). Could you (preferably) add such a configuration in the GUI (maybe even with a switch or as one entity or each separately :) ) or at least specify what the configuration for a CW bulb would look like?

Topic summary

The discussion revolves around the development and implementation of custom firmware for devices using the BK7231T and BK7231N chips, particularly focusing on creating a mini HTTP server, MQTT support, and integration with Home Assistant. Users share their experiences flashing various smart devices, troubleshooting issues related to UART connections, and configuring GPIO pins for different functionalities. The conversation also touches on the challenges of maintaining WiFi connectivity, the importance of proper pin configuration, and the potential for using I2C for additional device control. Several users report successful firmware updates and the addition of new features, including support for various sensors and devices.
Summary generated by the language model.
ADVERTISEMENT