Elektroda.com
Elektroda.com
X

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

p.kaczmarek2 114915 1234
This content has been translated flag-pl » flag-en View the original version here.
  • #1171
    ferbulous
    Level 16  
    @p.kaczmarek2
    Yes, never had issue with that script until the latest update
    Will try your recommendation using the new ping event

    As for device group, i still have that issue with the lights not really turning on when toggling it (need to slightly change color temp/colors/brightness to have it light up)



  • #1172
    omelchuk890
    Level 11  
    @p.kaczmarek2
    Dear p.kaczmarek 2.
    Could you, in your utility, BK7231Flasher, add the parameters 230400 and 460800 to the list of uart speeds. I often have errors on 921600.
    If it's not difficult for you. 460800 -works, but you have to enter the handles...
    Once again, MANY thanks for your work!!!
  • #1173
    ferbulous
    Level 16  
    @p.kaczmarek2 hi, how do I configure openbk to retain the scripts after new ota updates?
    Seems to get wiped with each ota, there used to be an option for that but it's not there anymore?
    [BK7231T] My HTTP server, configurator, MQTT support from Home Assistant
  • #1174
    p.kaczmarek2
    Moderator Smart Home
    Thanks @omelchuk890 , I will add those speeds, but I think it should be possible to add also new speeds in the config file of the flaher?

    @ferbulous , are you sure? I just checked...
    [BK7231T] My HTTP server, configurator, MQTT support from Home Assistant
    I did OTA to OpenBK7231T_1.15.347.rbl and now the scripts still stay. They are not cleared.

    This is because at first @btsimonh set very large LFS partition size and now the partition size is smaller so it can survive OTA.

    Are you sure that your scripts are still removed by OTA?
  • #1175
    p.kaczmarek2
    Moderator Smart Home
    Alexa (WEMO) integration is almost ready! I am just waiting for feedback from tester (or can someone else help with testing?)

    In a meantime, I fixed some Tasmota emulation stuff and now ioBroker sonoff plugin works as well!
    Please see video below (it's taken from OBK Windows Simulator):



    ioBroker will of course work with all our platforms, BK7231N, BK7231T, BL602, W800/W801, W600/W601, T34, XR809 (XR3), etc...

    BTW: @ferbulous can you check if your OTA still deletes LFS?
  • #1176
    ferbulous
    Level 16  
    p.kaczmarek2 wrote:
    Alexa (WEMO) integration is almost ready! I am just waiting for feedback from tester (or can someone else help with testing?)

    I do have an alexa speaker to test it out

    p.kaczmarek2 wrote:
    In a meantime, I fixed some Tasmota emulation stuff and now ioBroker sonoff plugin works as well!

    Meaning OBK devices would also get picked by the tasmota integration in homeassistant?

    p.kaczmarek2 wrote:
    can you check if your OTA still deletes LFS?

    Just did a quick ota update from .340 something to .377 and the script was gone (autoexec.bat), at least for this N device (switch).
    I'll try adding some random scripts in other N device and see if it still happens

    Also, what's the RGB code if I need to have start up with cold white?
    backlog led_dimmer 100; led_basecolor_rgb #FF00FF; led_enableAll 1
  • #1177
    p.kaczmarek2
    Moderator Smart Home
    ferbulous wrote:
    p.kaczmarek2 wrote:
    Alexa (WEMO) integration is almost ready! I am just waiting for feedback from tester (or can someone else help with testing?)

    I do have an alexa speaker to test it out

    Our WEMO integration is just like in Tasmota. Just backend is different because we have a SSDP driver by @btsimonh so we had to handle MSEARCH there. Let me quote TAS docs:
    [BK7231T] My HTTP server, configurator, MQTT support from Home Assistant

    On OpenBeken device, run:
    
    backlog startDriver WEMO; startDriver SSDP
    


    WEMO works in the following way
    1. first there is UDP MSEARCH just like in SSDP
    2. then wemo devices responds with its page link
    3. then there is a HTTP get call to XML
    4. and finally, to set state, the HTTP post is called

    I don't have alexa and i am unable to check if my code works. I need to know how much works and when it fails.

    This should show WEMO stats:
    [BK7231T] My HTTP server, configurator, MQTT support from Home Assistant
    What do you get here?

    Do you get any POST EVENTs in log?
    [BK7231T] My HTTP server, configurator, MQTT support from Home Assistant
    The event processing is not implemented yet, I need to know at the moment if it even is able to reach to that point.[/quote]


    ferbulous wrote:

    p.kaczmarek2 wrote:
    In a meantime, I fixed some Tasmota emulation stuff and now ioBroker sonoff plugin works as well!

    Meaning OBK devices would also get picked by the tasmota integration in homeassistant?

    Yes, would you be able to help with testing?

    ferbulous wrote:

    p.kaczmarek2 wrote:
    can you check if your OTA still deletes LFS?

    Just did a quick ota update from .340 something to .377 and the script was gone (autoexec.bat), at least for this N device (switch).
    I'll try adding some random scripts in other N device and see if it still happens

    Please check if you can. I will look into that as well, but a bit later, I will be making another OBK tutorial video today, but the video will be released in about 2 weeks because we already seem to have a backlog of videos to release (thanks to help from my assistant with recording, video editing, voicing).

    ferbulous wrote:

    Also, what's the RGB code if I need to have start up with cold white?
    backlog led_dimmer 100; led_basecolor_rgb #FF00FF; led_enableAll 1

    https://github.com/openshwprojects/OpenBK7231T_App/blob/main/docs/commands.md
    led_temperature 154 or smth, but since yesterdays update (or today's, not sure) we also support CT command like in Tasmota.
    We're migrating to Tasmota syntax, but old syntax will be also supported.
    It's very easy to do, our arguments are already compatible.
  • #1178
    ferbulous
    Level 16  
    p.kaczmarek2 wrote:
    Do you get any POST EVENTs in log?

    Will update on those once I bring out the alexa speaker, mostly using google speakers at home

    p.kaczmarek2 wrote:
    Yes, would you be able to help with testing?

    Sure, is that enabled by default in the settings?

    p.kaczmarek2 wrote:
    Please check if you can

    yes, once there's newer updates coming up

    p.kaczmarek2 wrote:
    led_temperature 154 or smth, but since yesterdays update (or today's, not sure) we also support CT command like in Tasmota.

    Thanks, got that working now
  • #1179
    p.kaczmarek2
    Moderator Smart Home
    The ioBroker/Tasmota TELE update is not released yet.

    You will need to enable a flag for that.

    In future this flag will be ON by default, but I do not want to accidentally break things, you know, mistakes happen...

    We need to test it well with multiple users.
  • #1180
    Nico1320
    Level 2  
    Thanks to all the devs! I've been using it for a couple of weeks and it seems to be pretty stable.
    I wanted to use WLED to control the light but it seems after starting the driver, it crashes immediately. WLED works! just had the wrong settings in WLED causing openBK to crash. Everything seems to be working except white channel control for RGB+CCT.
  • #1181
    p.kaczmarek2
    Moderator Smart Home
    @Nico1320 how to reproduce the crash? I would like to add a security check to avoid any crashes in the future...
    What do you mean by white channel, what kind of device?
  • #1182
    Nico1320
    Level 2  
    p.kaczmarek2 wrote:
    @Nico1320 how to reproduce the crash? I would like to add a security check to avoid any crashes in the future...
    What do you mean by white channel, what kind of device?


    You can reproduce the crash by specifying a incorrect amount of leds in wled.

    This is the first time I've used wled so i might be wrong about the white channel control, but it uses the rgb diodes for white.

    I'm testing this on a LSC smart ceiling light.
  • #1183
    p.kaczmarek2
    Moderator Smart Home
    Sorry @Nico1320 but I don't have WLED experience, do you mean that WLED is sending DDP packets and it crashes somehow? How to run WLED? Please give me specifics and I will fix that bug in few hours....
  • #1184
    hans109h
    Level 2  
    I have a Feit smart plug and was successful getting open BK7231T on it. My desire is to control it via MQTT. The power to the plug is controlled on channel 1. I was surprised to find that publishing "plug/1/set 1" it fails to toggle the relay, however "plug/1/set 1.00" works as expected. Is there a reason for the 2 decimal places or a way to change the sensitivity of significant digits?

    I also thought there would be a simple way to issue a native command such as toggleChannel through MQTT, such as publishing "cmnd/plug/toggleChannel 1". While the documentation states this is possible, it isn't well documented on how to actually do it.

    Thanks for any suggestions.

    Hans
  • #1185
    p.kaczmarek2
    Moderator Smart Home
    Can you post whole configuration?

    set should work, the same as Tasmota commands should be working as well, including cmnd/plug/POWER Toggle and cmnd/plug/Power1 ON, etc etc.

    Just like in Tasmota - cmnd/plug/POWER is a topic and payload is OFF or ON or TOGGLE

    We have even ioBroker compatibility now.
  • #1186
    hans109h
    Level 2  
    p.kaczmarek2 wrote:
    Can you post whole configuration?

    set should work, the same as Tasmota commands should be working as well, including cmnd/plug/POWER Toggle and cmnd/plug/Power1 ON, etc etc.

    Just like in Tasmota - cmnd/plug/POWER is a topic and payload is OFF or ON or TOGGLE

    We have even ioBroker compatibility now.


    I guess I just needed some positive reinforcement, as everything is working as expected now....I believe I may have had a trailing / in the topic that was causing some problems.

    Thank you!
  • #1187
    p.kaczmarek2
    Moderator Smart Home
    Hmmm okay, don't worry, I am here every day, ready to help and solves issues.
    If your device is not listed here, consider posting a teardown and config to help other users:
    https://openbekeniot.github.io/webapp/devicesList.html
  • #1188
    boozeman
    Level 11  
    Hi,

    Some quick quick config update for Device WIFIPO120FWT SmartPlug 16A (Nedis)

    6 -> LED_n
    7 -> BL0937CF
    8 -> BL0937CF1
    10 -> Btn
    24 -> BL0937SEL
    26 -> Rel

    I have annoying problem with this plug. The device toggled itself always on when plugged or reset. No matter what command set on startup cmd. This one has button connected to RX line P10.
  • #1190
    boozeman
    Level 11  
    p.kaczmarek2 wrote:
    Does it toggle itself on if you remove Btn role from RX line P10?


    Hi,

    it doesn't matter if p10 is defined or not. This behavior started somewhere around newer firmwares. More specifically, after the graphical user interface came.

    Cheers

    Timo
  • #1191
    p.kaczmarek2
    Moderator Smart Home
    Do you have set a startup value for relay on GUI? In Configure Startup? Maybe you've set there something and forget... otherwise, I will check this one in a hour or two.

    Does it happen on all of your devices?
  • #1192
    boozeman
    Level 11  
    p.kaczmarek2 wrote:
    Do you have set a startup value for relay on GUI? In Configure Startup? Maybe you've set there something and forget... otherwise, I will check this one in a hour or two.

    Does it happen on all of your devices?


    I have only tested with this one model. I have tried different startup commands, but it seems that none of them work.

    I have to test the other smartplugs with the latest firmware in the evening as well.

    Now that I remember, I added voltage and current metrin pins for the smartplug. I'll have to try without it too.

    Timo
  • #1193
    p.kaczmarek2
    Moderator Smart Home
    Ok, I am checking now - Build on Feb 7 2023 10:44:25 version 1.15.417.
    LSPA9.
    [BK7231T] My HTTP server, configurator, MQTT support from Home Assistant
    This config:
    [BK7231T] My HTTP server, configurator, MQTT support from Home Assistant
    [BK7231T] My HTTP server, configurator, MQTT support from Home Assistant
    the plug is off after reboot, button works, everything works.
    If I turn it on, and reboot, then it goes off (obviously).

    If I set start value 1 in Configure Startup:
    [BK7231T] My HTTP server, configurator, MQTT support from Home Assistant
    then plug goes on at reboot, always, before getting even wifi.
    So that's correct.


    If I do -1 here:
    [BK7231T] My HTTP server, configurator, MQTT support from Home Assistant
    device remembers last relay state correctly.
    (NOTE: when relay is on and I reboot, there about a 0.25s time with relay off, but there is not much we can do about it)


    I am unable to reproduce your problem, @boozeman . Can you please provide more information about your device configuration and flags? Maybe you have something in autoexec.bat and you're forgetting about it?
  • #1194
    boozeman
    Level 11  
    p.kaczmarek2 wrote:
    I am unable to reproduce your problem, @boozeman . Can you please provide more information about your device configuration and flags? Maybe you have something in autoexec.bat and you're forgetting about it?


    Hahaha, my bad!

    There was some retained value on my mqtt-server topic for my last spring testing sessions. I Cleared the topic and have no problems anymore :-)

    MQTT-explorer saves the day <3
  • #1195
    p.kaczmarek2
    Moderator Smart Home
    I have identified one issue that appears when using I2C LED driver along with non-default colours remap (Like SM2135_Map) and a "Remember last LED state flag"
    There was a logical error which caused remap to be applied after the color is restored, so first color was wrong (it was created without remap).
    I have fixed it and now all remaps for LED drivers are saved in flash automatically, so from now on, you can just execute SM2135_Map once and the device will remember it, you don't have to put it in short startup command anymore.

    NOTE: if you already have that command in short startup command, you don't have to do anything, it won't hurt.
  • #1196
    marciu11
    Level 15  
    Mam problem. Wgrałem poprawnie oprogramowanie do gniazdka RTX (Wersja chipu T). Ustawiłem Odpowiednie piny w konfiguracji dla przycisku, diody i przekaźnika. Ustawiłem też piny dla układu pomiaru prądu (BL0937).
    Na stronie www gniazdka, jak i w HA widzę i mogę sterować poprawnie gniazdkiem. Widzę też napięcie i prąd pobierane z gniazdka. Ale cały czas "Power" jak i "Total Consumption" mam na zero.
    Dziś drukarka 3D drukowała ponad 10h i cały czas jest 0. Voltage oscyluje w granicach 231V a Current = 0.3 - 1.1 mA. W zależności jaki jest pobór, więc sam układ odczytuje poprawienie prąd i napięcie, tylko nie wylicza z tego zużycia.
    Coś jeszcze należy ustawić w opcjach?
    [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
  • #1197
    p.kaczmarek2
    Moderator Smart Home
    Hello, this is a "com" side of Elektroda, so we are using english here. Anyway, you don't seem to have power calibrated. "PowerSet" command can be used to do it if you have a reliable meter to compare results. Process was described here: https://www.elektroda.com/rtvforum/topic3887748.html

    Edit: it is also possible that you have chosen wrong pin for CF, which is used to get power results from BL0937.
  • #1198
    marciu11
    Level 15  
    Thanks and sorry. The link redirected me here.
  • #1199
    p.kaczmarek2
    Moderator Smart Home
    Web App is being updated now, more features are on the way!
    You will be able to export config automatically soon.
    [BK7231T] My HTTP server, configurator, MQTT support from Home Assistant
    We need more teardowns - please submit all your devices here:
    https://openbekeniot.github.io/webapp/devicesList.html
  • #1200
    Dark Man
    Level 13  
    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