Elektroda.com
Elektroda.com
X

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

p.kaczmarek2 115065 1236
This content has been translated flag-pl » flag-en View the original version here.
  • #1201
    Tilator
    Level 6  
    Dark Man wrote:
    I found a great deal on smart sockets with current measurement and 20A relay for $2.99 with free shipping in 11 days:
    US$2.99 82%OFF | Tuya 16A 20A EU Smart Socket WiFi Smart Plug With Power Monitoring Timing Function Voice Control Alexa Google Assistant
    https://a.aliexpress.com/_EuI37V5


    Nice, but:

    1,000+ orders
  • #1202
    Dark Man
    Level 13  
    I ordered 1 pc. and it turned out that this is also the limit for one account.
  • #1203
    p.kaczmarek2
    Moderator Smart Home
    It didn't work for me on any of the accounts (mine or family members), I had to try it on a clean browser. It's weird. After all, I recently ordered a smart socket from aliexpress 2 years ago.
    [BK7231T] My HTTP server, configurator, MQTT support from Home Assistant
    Bought for PLN 20, thank you for the link, it will be useful for making another video for the Elektrody channel:
    https://www.youtube.com/@elektrodacom
  • #1205
    Dark Man
    Level 13  
    Dark Man wrote:
    I found a great deal on smart sockets with current measurement and 20A relay for $2.99 with free shipping in 11 days:
    US$2.99 82%OFF | Tuya 16A 20A EU Smart Socket WiFi Smart Plug With Power Monitoring Timing Function Voice Control Alexa Google Assistant
    https://a.aliexpress.com/_EuI37V5

    The socket has arrived.
    I tried to upload the soft via Cloudcutter but it turned out that there is soft v1.1.12 in the socket for which there is no exploit :(
    I uploaded the series.

    I configured for HA through Discovery, but I have a question:
    How to change the precision of the sent sensor data?
    e.g. the electricity meter is sent in Wh with 6 decimal places and I would like it to send in kWh with 2 decimal places.
    It is possible?
  • #1206
    Tilator
    Level 6  
    Dark Man wrote:
    I tried to upload the soft via Cloudcutter but it turned out that there is soft v1.1.12 in the socket for which there is no exploit


    Any chance to downgrade it first?
  • #1207
    rishabmehta7
    Level 4  
    >>20541157
    Precision can be set on the HA level.
  • #1208
    DeDaMrAz
    Level 13  
    I found this project by accident and got hooked up fast :) Got to talk to the admin and we figured I can contribute the the community. We already did one project (GN6932 driver) almost from scratch, details in this post - https://www.elektroda.com/rtvforum/topic3971252.html

    I will continue to support this project by sharing as much information as possible here and on GitHub.

    Here are some of the upcoming devices that will be implemented and worked on so OBK will be more powerful and documented in the best way possible.

    TM1638 - 7 segmend display driver
    [BK7231T] My HTTP server, configurator, MQTT support from Home Assistant

    some of the devices for future support

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

    And some other toys to play with, like new modules, BMP280 pressure sensor, SSD1306 OLED LCD....

    [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 have plenty of other devices to play with as well so thank you @p.kaczmarek2 for you unselfish support and looking forward to new developments.
  • #1209
    p.kaczmarek2
    Moderator Smart Home
    Welcome onboard, @DeDaMrAz . Our cooperation so far has proven to be very fruitful. I hope we can improve OpenBeken much more together.
  • #1210
    p.kaczmarek2
    Moderator Smart Home
    Important update.
    BK7231GUIFlashTool, this project:
    https://github.com/openshwprojects/BK7231GUIFlashTool
    will soon get update that allows:
    - to extract Tuya config from tuya device binary (so it means you get ready gpio config)
    - to modify obk config via flash tool
    Here's a short preview:
    [BK7231T] My HTTP server, configurator, MQTT support from Home Assistant
    [BK7231T] My HTTP server, configurator, MQTT support from Home Assistant
  • #1211
    keeepcool
    Level 1  
    Good evening, this is my first post, so I hope I'm not asking in the wrong place (I searched around and this seems like the best place to ask this question).

    I recently bough a WSM16-4 Tuya device (its a 4 gang/switch with a CBU), flashed OpenBeken and it works perfectly with HomeAssistant.
    Amazing job on everything done so far.

    My question is if its possible to access the internal BK7231N temperature sensor and send that data over MQTT.
  • #1212
    ferbulous
    Level 16  
    Hi @p.kaczmarek2
    One of my wall switch (N device) stopped responding after latest ota
    I removed the pcb and use serial method to flash it but I keep getting crc error
    Anyway to fix this?

    [BK7231T] My HTTP server, configurator, MQTT support from Home Assistant
  • #1213
    p.kaczmarek2
    Moderator Smart Home
    Are you 100% sure it's N chip? Not a T with "CB2S" or something like that marking?

    Can you also check with hid_download_py?
  • #1214
    Dark Man
    Level 13  
    My bet is that the memory is corrupted in the chip.
    Try to read the entire memory and see if there are any errors.
  • #1215
    ferbulous
    Level 16  
    p.kaczmarek2 wrote:
    Are you 100% sure it's N chip? Not a T with "CB2S" or something like that marking?

    Can you also check with hid_download_py?


    Yes, it's a cbu (N chip)
    hid_downlaod_py also gave crc error

    Added after 2 [minutes]:

    Dark Man wrote:
    My bet is that the memory is corrupted in the chip.
    Try to read the entire memory and see if there are any errors.


    Could be, I've already replaced it with another spare cbu chip to get the switch working again.
    will post the firmware bin later
  • #1216
    p.kaczmarek2
    Moderator Smart Home
    CRC error in hid_download_py for N can be ignored currently, I think. It will be updated soon yet to do a correct CRC calculation.
  • #1217
    dead2112
    Level 5  
    Hello @p.kaczmarek2 I recently flashed an Aubess mini switch and I saw your comments recomending to add
    backlog startDriver SSDP; PowerSave 1


    to enable it, I should submit it into: Config -> Change stratup commnad text, correct?

    Also, what does the SSDP driver do? or why is it recommended to add it to start up?

    Thanks in advance.
  • #1218
    DeDaMrAz
    Level 13  
    dead2112 wrote:
    Hello @p.kaczmarek2 I recently flashed an Aubess mini switch and I saw your comments recomending to add
    backlog startDriver SSDP; PowerSave 1


    to enable it, I should submit it into: Config -> Change stratup commnad text, correct?

    Also, what does the SSDP driver do? or why is it recommended to add it to start up?

    Thanks in advance.


    https://github.com/openshwprojects/OpenBK7231T_App/blob/main/docs/drivers.md

    SSDP is a discovery protocol, so BK devices can show up in, for example, Windows network section
  • #1219
    dead2112
    Level 5  
    Thanks, I came across the documentation a few minutes after I posted it. I apologize.
  • #1220
    p.kaczmarek2
    Moderator Smart Home
    OpenBeken SSDP driver will make your devices appear on network places on your machines, so you can easily find them and access their web pages:
    [BK7231T] My HTTP server, configurator, MQTT support from Home Assistant
  • #1221
    panopa847
    Level 2  
    Hi all,
    I have device bk7231n plug 1.1.8. currently it runs the tuya firmware.
    during the day, the device stops responding for 3-5 minutes every few hours (seems random). there is no ping to the device.
    I thought it might be related to their servers so I used cloudcutter to cut it from their servers. still the problem persists.
    will switching to OpenBeken help with this problem?
  • #1222
    p.kaczmarek2
    Moderator Smart Home
    It's hard to tell what is the cause of the problem. Does the physical button on the device works when it's not responding to ping?

    Have you tried moving the device closer to your router?

    You can try to make 2MB firmware backup and flash OBK, in worst case you can always go back to Tuya firmware (restore the backup).
  • #1223
    panopa847
    Level 2  
    since it is random it's hard to catch it.
    the device in the smart plug is a TV, and sometimes it happens when I watch TV, so at least I can say the plug is not switched off (I just get a notification).
    the device is ~1m from the router in direct line of sight.
    from what you write it seems my situation is rare..?
    does OpenBeken usually provide better stability vs the tuya firmware for these bk7231n/cb2s/LSPA9 devices?

    Added after 2 [hours] 42 [minutes]:

    just checked, the physical button on the device does work when it's not responding to ping
  • #1224
    ferbulous
    Level 16  
    >>20717358

    I'd say yes, one of my switches no longer had disconnection issues after flashing to openbk
  • #1225
    p.kaczmarek2
    Moderator Smart Home
    Well, let's try, but if the issue in the hardware, there is not much we can do. Well, unless the issue is the Power Supply, then we can use PowerSave 1...
  • #1226
    sebastian48
    Level 9  
    Hey everyone. I've been happily using my three Nedis smart plugs with HomeAssistant for about a year. I then tried to do a OTA upgrade but it seems to have broken something. Either way the smart plugs will not boot up any more so I think I will need to reset and/or manually UART firmware again. Is there any way of not needing to solder and UARTing? As in resetting the firmware? The firmware write did seem to work, it then rebooted but never really came up again...
  • #1228
    sebastian48
    Level 9  
    That was my first guess but unfortunately not.
  • #1230
    sebastian48
    Level 9  
    It worked! What did I just do?

    Thank you!