logo elektroda
logo elektroda
X
logo elektroda

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

p.kaczmarek2 178092 1242
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
  • #811 20115349
    p.kaczmarek2
    Moderator Smart Home
    I have never tested a Tuya smart door lock before. Can you make some photos and provide a short description how is it supposed to work?
    Is it the one with the keyboard? Is it TuyaMCU-based?

    Will do my best to get it working.

    Simple TCP server notes added to readme:
    https://github.com/openshwprojects/OpenBK7231T_App/blob/main/README.md
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #812 20115419
    marioalmeida
    Level 10  
    p.kaczmarek2 wrote:
    I have never tested a Tuya smart door lock before. Can you make some photos and provide a short description how is it supposed to work?
    Is it the one with the keyboard? Is it TuyaMCU-based?

    It is base on Tuya but not sure if it has TuyaMCU or controlled directly by any Beken chip. Once I am back in U.A.E, will get more details on the same. This is lock that I have https://amzn.eu/d/9j0uPzS
  • ADVERTISEMENT
  • #813 20116773
    p.kaczmarek2
    Moderator Smart Home
    It would be exciting to see a teardown of such device.

    Secondary VUE panel updated - now it displays the device chip name:
    [BK7231T] My HTTP server, configurator, MQTT support from Home Assistant

    Added SetOption13 equivalent for immediate button reactions - see flags:
    [BK7231T] My HTTP server, configurator, MQTT support from Home Assistant
    Helpful post? Buy me a coffee.
  • #814 20118503
    daniel114
    Level 2  
    Thanks for setting up this project, it's excellent. There's not much non-Tuya equipment readily available in Australia, and of that, I think everything is based on the new modules nowadays. I can't stand the Tuya Cloud stuff.

    I managed to get one of these flashed yesterday, and have it up and running nicely in Home Assistant:

    Deta Grid Connect Smart 3 Gang Switch (6903HA Series 2)

    It runs the WB3S module/BK7231T
    [BK7231T] My HTTP server, configurator, MQTT support from Home Assistant
    https://www.bunnings.com.au/deta-grid-connect-smart-triple-gang-touch-light-switch_p0161014

    Here's are the pinout details:
    Relay 1: GPIO8
    Relay 2: GPIO26
    Relay 3: GPIO24
    Button 1: GPIO14
    Button 2: GPIO9
    Button 3: GPIO10
    
    WifiLED_n: GPIO1
    


    [BK7231T] My HTTP server, configurator, MQTT support from Home Assistant
  • #815 20118542
    p.kaczmarek2
    Moderator Smart Home
    I'm happy to help. If you feel like it, you can post more details in our Teardowns section.

    Also remember, I'm open to all feature suggestions and I am doing daily small fixes and updates.


    daniel114 wrote:
    There's not much non-Tuya equipment readily available in Australia, and of that, I think everything is based on the new modules nowadays.

    Can you elaborate, what are your experiences with Tuya device internals and which modules are "new" and which are "old"?
    Helpful post? Buy me a coffee.
  • #816 20118572
    daniel114
    Level 2  
    p.kaczmarek2 wrote:
    Can you elaborate, what are your experiences with Tuya device internals and which modules are "new" and which are "old"?

    What I mean by "old" is the ESP chips that were easily flashed OTA. I'm only new to the home automation game in the past month, so I missed out on those glory days :D

    I've got a PIR sensor open on my desk at the moment, https://www.brilliantlighting.com.au/product/smart-wifi-outdoor-sensor-2b562b

    It uses the WR3 module. I haven't managed to get it to even power up using the USB to TTL. Maybe it can't provide enough juice?
  • ADVERTISEMENT
  • #817 20118668
    p.kaczmarek2
    Moderator Smart Home
    WR3 module is based on RTL8710BN. I have already started working on SDK for that 3 months ago:
    https://github.com/openshwprojects/OpenRTL8710BN
    I will continue it soon. I might switch to a newer version, but don't worry, release for WR3 is near.

    I also have some PIR sensors, but they are based on XR809 which I already support.
    Helpful post? Buy me a coffee.
  • #818 20118772
    marioalmeida
    Level 10  
    @p.kaczmarek2
    under webapp (/app) when "Save Pins" button is pressed it get below message
    Error: {"success":200,"msg":"OK"}

    Is it error or success? bit confusing version 1.12.0

    Added after 57 [minutes]:

    @p.kaczmarek2

    What is the command to set the correct voltage? This is what shown for me
    BL0937 Voltage=205.951813, Current=0.011858, Power=0.000000 (changes sent 17, skipped 508)

    I tried with the below startup command and restarted but its not working
    startDriver BL0937; VoltageSet 220
  • #819 20119492
    p.kaczmarek2
    Moderator Smart Home
    marioalmeida wrote:

    Error: {"success":200,"msg":"OK"}


    I double-checked and it saves pins correctly. It's just a debug display of JSON reply message.
    The JS panel is still WIP and is developed by @btsimonh , I can't really tell much more about it. It's source code is also on github, but remember that this panel fetches javascript source from web, and it's not present in the .bin build of firmwares.

    It's a very new approach, totally different from Tasmota. Also, the panel source does not eat up the flash memory on the chips.

    Of course, the "classic" http panel is also present on OpenBeken, it's the WWW page you all know.

    marioalmeida wrote:

    What is the command to set the correct voltage? This is what shown for me
    BL0937 Voltage=205.951813, Current=0.011858, Power=0.000000 (changes sent 17, skipped 508)

    I tried with the below startup command and restarted but its not working
    startDriver BL0937; VoltageSet 220

    [/quote]
    Why would you want to set a Voltage on a start? Is this intentional or did you confuse the configuration steps?
    https://www.elektroda.com/rtvforum/topic3887748.html
    For me, it makes no sense, as i would never expect the voltage to be the exact 220V at the very moment of device boot...

    Btw, the camera requested by some user about a month ago just arrived. It's time to hack some things!
    A9 Mini camera, bought on ebay for 9$ (+4$ VAT).
    The postman just put the package into the mailbox, no receive confirmation. Cheapest shipping, took a long time.
    [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
    [BK7231T] My HTTP server, configurator, MQTT support from Home Assistant [BK7231T] My HTTP server, configurator, MQTT support from Home Assistant
    It's using BK7252.
    And I have a question to community... do anyone here have this camera??
    Helpful post? Buy me a coffee.
  • #820 20120502
    Tych0
    Level 6  
    p.kaczmarek2 wrote:

    I have a question to community... do anyone here have this camera??

    Not yet... ordered two, ETA end of august.

    Meanwhile I encountered another LED driver challenge... I've bought a couple of LSC RGBCW ceiling LED lights from the Action store. The article nr is 3007231. And the packaging looks like:
    [BK7231T] My HTTP server, configurator, MQTT support from Home Assistant
    Teardown is a breeze. There is a CB2S on there. While I expected a SM2135 LED driver, this is what I found:
    [BK7231T] My HTTP server, configurator, MQTT support from Home Assistant
    On this:
    [BK7231T] My HTTP server, configurator, MQTT support from Home Assistant
    I don't want to desolder the CB2S and use a ESP02S if there is a chance there will be a driver available for the OpenBK firmware any time soon... I tried the SM2135 driver but this 'obviously' didn't work. I googled SM15133 but could not find much (other than some Chinese) information.

    BTW: I struggled flashing the BK7231N (CB2S) using my MacBook using python (hid_download_py), couldn't 'get bus' or 'set baud rate failed'... it never worked. While the python script worked like a charm on any BK7231T thus far. Sadly enough :) , a Windows machine flashed the CB2S perfectly.
  • #821 20120519
    p.kaczmarek2
    Moderator Smart Home
    Tych0 wrote:
    p.kaczmarek2 wrote:

    I have a question to community... do anyone here have this camera??

    Not yet... ordered two, ETA end of august.

    Wow, that's a great news!
    Please do a FULL flash dump if it arrives and send it to me.

    Try doing both FULL flash dump at default offset, and at the 0 offset.
    https://github.com/OpenBekenIOT/hid_download_py

    Command to read default flash size:
    
    W:\GIT\hid_download_py>python uartprogram camera1.bin -d com9 -r
    


    Command to read given flash size:
    
    W:\GIT\hid_download_py>python uartprogram camera2.bin -d com9 -r -l 0x200000
    


    Command to read given flash size starting from 0 ofs (including bootloader):
    
    W:\GIT\hid_download_py>python uartprogram camera3.bin -d com9 -r -l 0x200000 -s 0x0
    


    I would like to get all the outputs for the given commands. Or maybe try 4MB instead of 2MB, not sure now how much memory that BK has.


    Ok, regarding SM15133....
    [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
    I'd rather say it's a simple PWM-based driver. Have you tried controlling it by PWMs?

    Still, it's a rather interesting finding! Feel free to post the config, photos, and datasheet in our teardowns section when you get it working.
    Helpful post? Buy me a coffee.
  • #822 20120910
    Tych0
    Level 6  
    p.kaczmarek2 wrote:
    I'd rather say it's a simple PWM-based driver. Have you tried controlling it by PWMs?

    Oops you're right. I didn't even tried to control it with PWM's. So yes, works just fine by settings 6,7,8,24,26 to PWM. I'll post a teardown, even though is very easy/basic.
  • #823 20121935
    xostia
    Level 7  
    Hi p.kaczmarek2 ... new weekend, new fight :-)

    Did you take a decision about the modification of the commands to make them tasmota compatible? these are enough to start...

    http://ipaddress/cm?cmnd=Status%208 (power consumption)
    http://ipaddress/cm?cmnd=Power (status of the relay)
    http://ipaddress/cm?cmnd=Power%20On (on)
    http://ipaddress/cm?cmnd=Power%20off (off)
    http://ipaddress/cm?cmnd=Power%20TOGGLE
  • #824 20122187
    p.kaczmarek2
    Moderator Smart Home
    To be honest, those commands were already support for months:
    xostia wrote:

    It's just they always returned invalid JSON string.

    Still, I have updated them to return a bit more correct json now.
    [BK7231T] My HTTP server, configurator, MQTT support from Home Assistant
    [BK7231T] My HTTP server, configurator, MQTT support from Home Assistant

    xostia wrote:

    As for that, ok, but power factor now always returns 0:
    [BK7231T] My HTTP server, configurator, MQTT support from Home Assistant


    Please check all new features, and tell me if there is anything to improve or any more commands to add. Futhermore, please specify the expected command return value as well.
    Helpful post? Buy me a coffee.
  • #825 20122816
    xostia
    Level 7  
    Thank you @p.kaczmarek2... faster impossible :-)

    ON, OFF and Toggle works! ... great! but the answer is different in TASMOTA. For example, with the "Power on" command:

    Tasmota answers:
    Code: JSON
    Log in, to see the code

    OpenBK answers:
    Code: JSON
    Log in, to see the code

    Probably Tasmota check if there is only one relay and, in this case does not answer with a number after "POWER" string. It is interestint to note that, in your case, the answer was POWER0 and in my LSPA9 the answer is POWER1. They are details but for compatibility can be important.

    In the case of the "Status 8" command, there are less information (no date and time... for example, normal in this stage) but both behave practically the same in JSON... with one small difference, you added one space after Power and ApparentPower, I understand that JSON is also valid:

    Code: JSON
    Log in, to see the code

    I think that is a good practice to provide the same fields and the same name... and if there is some missing info, that field will not appear, that is good.

    Resuming: except the detail with POWER, POWER0, POWER1, the rest behaves the same.

    It is funny, because now "Tasmotrol", an app for Android, detects both OpenBK devices but it asks for user and password and it does not want to add their profiles (it does detect the tasmota devices... they are also without password but in this case it adds the profiles and the devices can me controlled). I do not know what kind of connection Tasmotrol tryes or the commands used to behave like this.

    If you have time to add the NTP client and create a Timer menu similar to the Tasmota one... these devices are very very very usable right now.

    Thank you again, your work is great!

    P.S. I wrote an email to the Tasmotrol developper... to know the basic commands to make your OpenBK devices compatibles, It can be a good advance. We will se if he answers to my message.

    ...
  • #826 20123006
    p.kaczmarek2
    Moderator Smart Home
    Hey @xostia , regarding Tasmota Control app, I used to make a PIC18F67J60 compatible smart home driver for that once in the past, have you seen my article?
    https://www.elektroda.com/rtvforum/topic3789324.html
    We can both refer to my old work to see what's required by that app.

    altough I must admit, I had a bit more free time back then!

    Thanks for the great analysis. I will try to implement the fixes you mentioned, but keep in mind that you could also do that by submitting a pull request.

    The Power0/Power1 with digit will be stripped now if there is a single relay.

    The Power0/Power1 difference comes from the relay indexing in pins configuration, some people set index 1 for the first relay and some people start with 1.

    EDIT: some fixes added to repo

    EDIT: wait, my Tasmota device returns the string with spaces as well:
    [BK7231T] My HTTP server, configurator, MQTT support from Home Assistant
    [BK7231T] My HTTP server, configurator, MQTT support from Home Assistant
    I'd rather say that I didn't add any spaces, I just copy-pasted Tasmota JSON as above and it already had spaces, hmm
    Helpful post? Buy me a coffee.
  • #827 20123009
    xostia
    Level 7  
    Thank you @p.kaczmarek2 ... I will check your post...

    I made I mistake in my tests (in fact, it is the biggest bug):

    Your implementation of http://ipaddress/cm?cmnd=Power should ONLY CHECK the status of the relay but it performs a SWITCH OFF and status is always OFF.

    Thanks!
  • ADVERTISEMENT
  • #828 20123012
    p.kaczmarek2
    Moderator Smart Home
    Yes, exactly, I just found the same bug as I am now testing it with my power metering plugs.
    It should be fixed already.
    I will look into full status string next.

    For reference, this is what worked for my PIC18F67J60 compatible with Tasmota Control as a return value for generic STATUS command:
    
    {"Status":{"Module":0,"DeviceName":"Tasmota","FriendlyName":["Tasmota","Tasmota2","Tasmota3","Tasmota4"],"Topic":"tasmota_EC3F8F","ButtonTopic":"0","Power":0,"PowerOnState":3,"LedState":1,"LedMask":"FFFF","SaveData":1,"SaveState":1,"SwitchTopic":"0","SwitchMode":[0,0,0,0,0,0,0,0],"ButtonRetain":0,"SwitchRetain":0,"SensorRetain":0,"PowerRetain":0},"StatusFWR":{"Version":"0.1(pic18f)","BuildDateTime":"2020-11-07T11:57:45","Boot":6,"Core":"0","SDK":"0","CpuFrequency":80,"Hardware":"ESP8266EX","CR":"367/699"},"StatusNET":{"Hostname":"tasmota_EC3F8F-8079","IPAddress":"192.168.0.50","Gateway":"192.168.0.1","Subnetmask":"255.255.255.0","DNSServer":"192.168.0.1","Mac":"5C:CF:7F:EC:3F:8F","Webserver":2,"WifiConfig":4,"WifiPower":17.0},"StatusSNS":{"Time":"2021-01-10T19:27:53","DS18B20":{ "Temperature":16},"TempUnit":"C"},"StatusSTS":{"Time":"2021-01-10T19:27:54","Uptime":"0T00:41:19","UptimeSec":2479,"Heap":24,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":37,"MqttCount":0,"POWER1":"OFF","POWER2":"OFF","POWER3":"OFF","POWER4":"OFF","Wifi":{"AP":1,"SSId":"5G_FULL_POWER","BSSId":"30:B5:C2:5D:70:72","Channel":9,"RSSI":98,"Signal":-51,"LinkCount":1,"Downtime":"0T00:00:03"}}}
    

    (4 relays and temperature sensor)

    And this is what my Tasmota BW-SHP6 returns:
    
    {"Status":{"Module":0,"DeviceName":"Tasmota","FriendlyName":["Tasmota"],"Topic":"tasmota_48E7F3","ButtonTopic":"0","Power":1,"PowerOnState":3,"LedState":1,"LedMask":"FFFF","SaveData":1,"SaveState":1,"SwitchTopic":"0","SwitchMode":[0,0,0,0,0,0,0,0],"ButtonRetain":0,"SwitchRetain":0,"SensorRetain":0,"PowerRetain":0,"InfoRetain":0,"StateRetain":0}}
    

    (single switch only)
    Helpful post? Buy me a coffee.
  • #829 20123022
    xostia
    Level 7  
    OK, Perfect

    Right now, there is no difference in your implementation between "Status 8" and "Status". The first one should show the Power/Current/etc... the generic Status shows different information (name, friendly name, power status 1/9, etc).

    Probably it is how you explain... status is the command used by the Android App to identify the device. The extrange thing is that right now it detects it in the network... but as protected with user and password.
  • #830 20123025
    p.kaczmarek2
    Moderator Smart Home
    I will extend this futher tomorrow, keep an eye for the updates.
    [BK7231T] My HTTP server, configurator, MQTT support from Home Assistant
    I already did Tasmota Control support in the past.

    BTW: it seems we are referring to different mobile apps.
    I am using that one:
    https://play.google.com/store/apps/details?id=de.grings_software.TasmotaControl&hl=pl&gl=US
    but I see the one you mentioned is also on Google Play.
    Helpful post? Buy me a coffee.
  • #831 20123028
    xostia
    Level 7  
    Great! ... we will see if both apps work.

    I will try to finish my v3 console bash script to control with URL commands Tasmota/OpenBK devices (now cleaner code because the commands are the same).

    [EDIT] I saw the 1.12.4 version. Nos Status and Status 8 are different (great) but there is a mistake. Using "Status", Power field should be "0" if the relay is OFF and I detected that is always "1"... I checked with a tasmota device.

    Have a good night!
  • #832 20123466
    ilengyel
    Level 11  
    Hello, Thanks for the great project. I have successfully flashed a WB2L based downlight

    CasaLife Smart LED Downlight

    These LED downlights were sold by ALDI Australia in 2 flavours: RGBCW and CW/WW. This one is the Cool/Warm white downlight. Some pictures:
    [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 [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

    I de-soldered the WB2L module and flashed it with a single CP2104 USB to UART module, as per instructions in the previous thread.
    [BK7231T] My HTTP server, configurator, MQTT support from Home Assistant [BK7231T] My HTTP server, configurator, MQTT support from Home Assistant

    After setting up the config as such:
    [BK7231T] My HTTP server, configurator, MQTT support from Home Assistant

    P7/Channel 0/PWM1 Controls the colour temperature with values 0(warm) - 100(cool)
    P8/Channel 1/PWM2 Controls the brightness with values 0 - 100 as a percentage

    Because of this, it is recommended to enable "Flag 3 -[LED][Debug] Show raw PWM controller on WWW index instead of new LED RGB/CW/etc picker" in the Configure General section.
    [BK7231T] My HTTP server, configurator, MQTT support from Home Assistant

    Let me know if you would like any other info on this downlight.
  • #833 20124638
    GoofySpeed
    Level 6  
    @p.kaczmarek2 I had flashed a Feit Smart Dimmer using serial, everything was going well, but the “Generate Home Assistant cfg” never worked for me, it was always a blank box, and so I couldn’t get MQTT to work with my Home Assistant. In the process of trying to get it to work I had made so many changes to OpenBeken that I needed to factory reset the device, but none of the commands for Tasmota or keypresses to reset the device worked. I was able to successfully flash back to the factory firmware, but when I flashed OpenBeken back onto the device, it just kept loading the old config file and autoexec.bat file. The autoexec.bat file is no longer listed under the “Filesystem” tab, but it’s still loading the file. How can I perform an actual factory reset that will erase the old config files and take me back to the initial OpenBK7231T SSID to start over?
  • #834 20124684
    p.kaczmarek2
    Moderator Smart Home
    @xostia the relay states from main config string are a placeholders, I will update it with a correct values soon

    @ilengyel good job, and I must admit this is something new for me! I have never found a device which had a "manual" brightness/temperature control (direct PWMs). I'd rather expect that PWM1 is a cool channel and PWM2 is a warm channel, etc

    @GoofySpeed
    GoofySpeed wrote:
    OpenBeken back onto the device, it just kept loading the old config file and autoexec.bat file. The autoexec.bat file is no longer listed under the “Filesystem” tab, but it’s still loading the file.

    This sounds impossible. How did you determine that autoexec is still being loaded? Maybe it's not a autoexec, maybe it's a short startup command?

    GoofySpeed wrote:
    I had flashed a Feit Smart Dimmer using serial, everything was going well, but the “Generate Home Assistant cfg” never worked for me, it was always a blank box,

    Is this a TuyaMCU device? Configs are not yet generated for TuyaMCU, but we have tutorials for the Dimmers here on Elektroda that includes YAML code

    GoofySpeed wrote:
    How can I perform an actual factory reset that will erase the old config files and take me back to the initial OpenBK7231T SSID to start over?

    Run device in safe mode and manually clear the config. If that's not enough, then please wait few hours at most and I will add a reset config command

    Dodano po 53 [minuty]:

    UPDATE: clearConfig command added. This command will clear whole config of device (including short name, wifi config, etc).
    Helpful post? Buy me a coffee.
  • #835 20125983
    GoofySpeed
    Level 6  
    Thanks for the response,

    I had used the configuration commands presented under “OpenBeken configuration,” HERE , it didn’t work when I added it with a file named autorun.bat, so I changed it to autoexec.bat, and it worked by presenting me with the on/off toggle and dimmer slider in the panel. The light bulb attached to the switch would then turn on/off and dim through the panel.

    The output of serial on boot said that it was running an autoexec.bat file, and it presented me with the on/off toggle and dimmer slider in the panel:
    Debug:CMD:cmd [exec autoexec.bat]
    Debug:CMD:exec autoexec.bat
    Debug:CMD:openned file autoexec.bat
    Debug:CMD:line is startDriver TuyaMCU
    Debug:CMD:cmd [startDriver TuyaMCU]
    Debug:CMD:Adding command tuyaMcu_testSendTime
    Debug:CMD:Adding command tuyaMcu_sendCurTime
    Debug:CMD:Adding command uartSendHex
    Debug:CMD:Adding command linkTuyaMCUOutputToChannel
    Debug:CMD:Adding command tuyaMcu_setDimmerRange
    Debug:CMD:Adding command tuyaMcu_sendHeartbeat
    Debug:CMD:Adding command tuyaMcu_sendQueryState
    Debug:CMD:Adding command tuyaMcu_sendProductInformation
    Debug:CMD:Adding command tuyaMcu_sendState
    Debug:CMD:Adding command tuyaMcu_sendMCUConf
    Debug:CMD:Adding command fakeTuyaPacket
    Debug:CMD:Adding command tuyaMcu_setBaudRate
    Info:NTP:Started TuyaMCU.
    Debug:CMD:line is
    Debug:CMD:line is setChannelType 1 toggle
    Debug:CMD:cmd [setChannelType 1 toggle]
    Info:GEN:Channel 1 type changed to toggle
    Debug:CMD:line is
    Debug:CMD:line is setChannelType 2 dimmer
    Debug:CMD:cmd [setChannelType 2 dimmer]
    Info:GEN:Channel 2 type changed to dimmer
    Debug:CMD:line is
    Debug:CMD:line is tuyaMcu_setDimmerRange 10 1000
    Debug:CMD:cmd [tuyaMcu_setDimmerRange 10 1000]
    Debug:CMD:line is
    Debug:CMD:line is linkTuyaMCUOutputToChannel 1 1 1
    Debug:CMD:cmd [linkTuyaMCUOutputToChannel 1 1 1]
    Debug:CMD:line is
    Debug:CMD:line is linkTuyaMCUOutputToChannel 2 2 2
    Debug:CMD:cmd [linkTuyaMCUOutputToChannel 2 2 2]
    Debug:CMD:line is
    Debug:CMD:line is
    Debug:CMD:closed file autoexec.bat


    Yes, this is a TuyaMCU device. I had modified the yaml code shown under “Home Assistant support,” HERE , it just wasn’t working for me, that is when I decided to start over with a new Home Assistant install and a fresh OpenBeken install, but I had ran into this problem trying to reset the device.

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

    I flashed back to the factory Feit firmware, flashed 1.12.7, then I ran the command “clearConfig,” then rebooted the device, and it finally cleared everything back to a factory fresh install.

    Thank you so much for the work.
  • #836 20129011
    ernestovillarreal
    Level 1  
    Thanks for this! I bought an IR transmitter with this, I flashed and works fine, but, is there a plan to support IR codes? I just want to copy an IR code (it has IR in and IR out), and to clone and replay 4 codex max (maybe cold ON, cold ON, heat ON, heat OFF).

    Thank you!
  • #837 20129209
    ferbulous
    Level 18  
    GoofySpeed wrote:
    I flashed back to the factory Feit firmware, flashed 1.12.7, then I ran the command “clearConfig,” then rebooted the device, and it finally cleared everything back to a factory fresh install.


    Do you mind sharing how you reflashed the stock factory firmware after flashing openbkt?
    Was it still working as it should with Feit?
  • #838 20129686
    marioalmeida
    Level 10  
    @p.kaczmarek2

    1) How can I set relay status and countdown without TuyaMCU from home assistant?
    2) What is the option to enable switch_inching?
    I have this Tuya wifi switch module (BK7231N)
    [BK7231T] My HTTP server, configurator, MQTT support from Home Assistant
    When S1 is connect to L, the relay is not toggled, I need to connect and disconnect S1 immediately to toggle the relay, Is there a way to add button type options what you get in Shelly devices?
    [BK7231T] My HTTP server, configurator, MQTT support from Home Assistant

    Current firmware:
    Build on Aug 4 2022 13:01:05 version 1.12.10

    Added after 14 [minutes]:

    In the logs I get "key_long_press_hold" when S1 is always connected to L
  • #839 20129840
    p.kaczmarek2
    Moderator Smart Home
    @marioalmeida once a channel is mapped to TuyaMCU dpID, then you can just toggle a channel on gui and it will toggle on tuyaMCU
    If you don't have a channel displayed on WWW panel, then you can do:
    
    setChannelType 2 Toggle
    

    etc, etc

    @marioalmeida I think the switch kind you are looking for is called "ToggleChannelOnToggle",, it's already supported, set it in pins config. Can you check if that's what you need?


    @ernestovillarreal @btsimonh was planning to do a IRLibrary port

    @ferbulous have you tested Tasmota Device Groups support more? I have finally RGBCW ESP8266 bulb so I can finalize DGR
    Helpful post? Buy me a coffee.
  • #840 20130299
    marioalmeida
    Level 10  
    @p.kaczmarek2, yes ToggleChannelOnToggle worked
    setPinRole 8 TglChanOnTgl

    What is the cmd to set new start value for a channel? I need change "For 'remember last power state', use -1 as a special value" via MQTT
    Something like below or is there a different way?
    
    setChannelType 2 TextField
    
    addChangeHandler Channel2 == -1 setChannel 1 -1
    addChangeHandler Channel2 == 1 setChannel 1 1
    addChangeHandler Channel2 == 0 setChannel 1 0
    

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