logo elektroda
logo elektroda
X
logo elektroda

Looking for provisioning OpenBeken devices via URL or any other automated procedure

nielspiersma 3495 36
ADVERTISEMENT
  • #31 20362797
    p.kaczmarek2
    Moderator Smart Home
    @nielspiersma what do you think about a possibility to write OBK settings directly to binary file, but on Windows (or Linux), before flashing?

    Are you flashing by wire or by OTA hack?

    Btw new UART flashing tool is on the way to release:
    Spoiler:

    Looking for provisioning OpenBeken devices via URL or any other automated procedure
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #32 20362858
    nielspiersma
    Level 9  
    p.kaczmarek2 wrote:
    @nielspiersma what do you think about a possibility to write OBK settings directly to binary file, but on Windows (or Linux), before flashing?
    @p.kaczmarek2, we did that in the past with tasmota, but in the end, we concluded that we wanted to use a more standardized approach. I have over 100 ESP82xx in my home now, and every switch is Tasmotized (or BeKenized). And the simple nature of things is that stuff breaks. And it always breaks when you don't want or need it broken. That's why we now have the following approach. The switch is dumb and HomeAssistant controls, so I want to do as little as possible on it and have HomeAssistant control it.

    So we flash the chip and only provision the minimal configuration. Then we connect it to HomeAssistant and inject (via MQTT cmnds) all required configuration settings. So, in the beginning, all devices are equal. Once booted, they get their respective settings. If they break, I can quickly swap them without remembering any specific device-related settings.

    So the only values I would like to write to OBK initial flash would be wifi and MQTT login. That would save the step in AP mode. And have it report directly to HA, ready to receive the configuration. We provision via "script" or "automation' using MQTT publish from there.

    We put a lot of trust into HA; that's why I also was looking for detaching the buttons. We want HA (via MQTT) to toggle the switch.

    Are you flashing by wire or by OTA hack?
    @p.kaczmarek2, both, but I prefer using the OTA hack, as it doesn't require physically opening/damaging the devices. So my approach currently consists of the following; can I open the device without damage? If so, open the device, study it, remove labels, and track the electronics. Add it to Tuya Cloud and recover MCU version number. And finally do cloud-cutter. (post a tear down).

    I investigated, desoldered the tuya board, and downloaded the pristine firmware for cracking. Still, almost all firmware is uploaded now, so there is no real need now.

    But soldering is still on the board.

    Btw new UART flashing tool is on the way to release:
    Spoiler:

    Looking for provisioning OpenBeken devices via URL or any other automated procedure


    Maybe I'll need this for the next Smart device ;). I will give it a try if required.

    Niels
  • ADVERTISEMENT
  • #33 20368287
    p.kaczmarek2
    Moderator Smart Home
    The flash tool is released:
    https://github.com/openshwprojects/BK7231GUIFlashTool
    I will consider now adding a configuration of flash memory before the flashing - we could just put the Obk config in there already..
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #34 20368476
    nielspiersma
    Level 9  
    Thanks for the release. I'll give it a test on the two BK7231 boards I've lying around.
    Niels
  • #35 20369055
    p.kaczmarek2
    Moderator Smart Home
    The good thing it does automatic backup of firmware first and then does a write, so you always have a copy
    Helpful post? Buy me a coffee.
  • #36 20370720
    nielspiersma
    Level 9  
    I just wanted to follow up on the new flasher. It worked for the T and the N boards I've here for testing purposes.

    Looking for provisioning OpenBeken devices via URL or any other automated procedure

    Looking for provisioning OpenBeken devices via URL or any other automated procedure

    Only the Do firmware write (no) backup is not working, and the log output window is not resizing.

    I did have some issues starting, but it could have been an issue with my USB to Serial adapter. Once reconnected twice flashing went fine.

    Niels
  • ADVERTISEMENT
  • #37 20370814
    p.kaczmarek2
    Moderator Smart Home
    Huh... you are right in both cases!
    I simply forgot to set an anchor and simply forgot to link the button to an action.
    Thank you! I will fix it right away.
    Helpful post? Buy me a coffee.

Topic summary

The discussion revolves around provisioning Beken-based smart plugs using automated procedures via URL commands. The user, experienced with Tasmota and HomeAssistant, seeks efficient methods to configure multiple devices quickly. Key commands for setting up PIN roles and channels are shared, along with challenges related to command length limitations in the backlog feature. Solutions are proposed to enhance command handling, including the addition of commands for WiFi and MQTT configuration. The conversation highlights successful testing of commands that streamline the provisioning process, allowing for rapid setup of devices in AP mode. Suggestions for further enhancements, such as triggering HomeAssistant discovery and managing device flags, are also discussed.
Summary generated by the language model.
ADVERTISEMENT