logo elektroda
logo elektroda
X
logo elektroda

How to create a custom driver for OpenBeken with online builds (no toolchain required)

p.kaczmarek2 11787 142
ADVERTISEMENT
📢 Listen (AI):
  • #121 21281089
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14434
    Help: 650
    Rate: 12399
    But one thing still confuses me - if the problem was caused by "build2" finishing too late, then why sometimes also other assets were not present? "build2" does only Simulator (Windows) build...
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #122 21281207
    max4elektroda
    Level 24  
    Posts: 745
    Help: 47
    Rate: 183
    While at it, I tried to get rid of the warnings about deprecated workflow elements.
    https://github.com/openshwprojects/OpenBK7231T_App/pull/1406

    Changing the upload/download to v4 needs to change the upload a bit:

    The artifacts name need to be unique (even if it's only a folder containing different files during upload as in this case).

    This has the (nice?) side effect, that all artifacts are build per platform:

    View of build results on GitHub Actions with warnings about deprecated elements.
    If we need one single file again, we would probably need first to do the builds and later do the upload in one step for all files.

    It seems to work for a release, too (see my tests here https://github.com/Max4OBK/OpenBK7231T_App/releases) but is not heavily tested...

    Added after 17 [minutes]:

    p.kaczmarek2 wrote:
    But one thing still confuses me - if the problem was caused by "build2" finishing too late, then why sometimes also other assets were not present?

    I'm not sure, if my "fix" really is a fix, it was just an educated guess ;-)

    At least for e.g. 1.17.755 this is quite understandable, the firmware images were simply not build for W800 and XR809

    https://github.com/openshwprojects/OpenBK7231T_App/actions/runs/11435374204

    Screenshot of the GitHub Actions workflow for the OpenBK7231T_App project.

    Added after 7 [minutes]:
    max4elektroda wrote:
    I'm not sure, if my "fix" really is a fix

    ... but if you simply compare the workflow "pictures" before and after this commit, it looks better now:

    A workflow diagram showing the build process with tasks: prepare CI environment, build simulator, and semantic release.

    Now "semantic release" also is a "successor" to the simulator build, in the picture above, this build was a leaf
  • #123 21282255
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14434
    Help: 650
    Rate: 12399
    I see a second version of fix evolved here:
    https://github.com/openshwprojects/OpenBK7231T_App/pull/1407
    With an extra merge step:
    
      merge:
          runs-on: ubuntu-20.04
          needs: [refs, build, build2]
          steps:
              - name: Merge Artifacts
                uses: actions/upload-artifact/merge@v4
                with:
                  name: ${{ env.APP_NAME }}_${{ needs.refs.outputs.version }}
                  delete-merged: true
    

    I think I will merge that one, but can you first double-check it?
    Helpful post? Buy me a coffee.
  • #124 21282365
    max4elektroda
    Level 24  
    Posts: 745
    Help: 47
    Rate: 183
    I saw that one and it fixes all warnings as far as I can see. I just try to run it in my repository, but there is something strange with gh atm:
    workflow is running since more than 30 minutes now, can't be cancelled ...
    Will report back later if it's working again.

    The actual state is, that even after I tried to cancel, it runs further???
    And this is strange, too: it claims "merge" was run, even though the steps before are not complete ?!?
    Window displaying the progress of a CI workflow on the GitHub platform.

    But I'm quite sure, there is something strange on GH. "Update": Just now, the workflow finished - after 46 minutes!

    Back to the other PR: My only "concern" about the new solution is, that I started to like the way artifacts were build with "my" approach (one zip per platform) and this enhanced version will build one zip for all as before (that's the merge step you mentioned).
  • #125 21282418
    DeDaMrAz
    Level 22  
    Posts: 600
    Help: 34
    Rate: 127
    @max4elektroda

    When I looked into that V4 transition some time ago I had the exact same idea!! And I also thought it would be much better as we can maybe implement per device and per driver build and I even discussed with @p.kaczmarek2 about it 🙂

    To be hones I am not sure why I gave up on that idea :)

    On the GH issue, I run across it yesterday as well, where build will say it is still going but if I refresh the page it will say done 15 minutes before... no idea.
  • #126 21282445
    max4elektroda
    Level 24  
    Posts: 745
    Help: 47
    Rate: 183
    Thanks again, it works as expected!
    "My request" would be a simple "keep merged files" - see my comment in GH, too.
    This way we keep the possibility to download all artifacts as before and have the "plus" of selective download.
  • ADVERTISEMENT
  • #127 21282460
    DeDaMrAz
    Level 22  
    Posts: 600
    Help: 34
    Rate: 127
    I agree to that request, up to @p.kaczmarek2 to decide and implement though. Worth mentioning that artifacts are by default kept for 90 days "only". Basic idea was to preserve the publishing process but update the actions, maybe that is why I gave up on the idea, it would take too much time to implement per platform/driver publish.

    Again, thank you for the hint and inspiration!
  • #128 21282468
    max4elektroda
    Level 24  
    Posts: 745
    Help: 47
    Rate: 183
    If I may express my next wish: Can you give me a hint, how the single builds could be "tweaked"?
    My goal/idea was keep the build runs per platform "smaller".
    Now every build downloads and updates e.g. all sdks, but if I'm not mistaken it needs only the "own" sdk. So there is a lot of overhead in terms of time (and memory).
    I would need some input, where I can start if I want to change this behavior. Not sure, if I can achieve anything, but I think it's worth trying ..
  • #129 21282491
    DeDaMrAz
    Level 22  
    Posts: 600
    Help: 34
    Rate: 127
    What I have learned (never before touched GH building processes) based on other people's work is that we can speed it up and possibly make it smaller by maybe caching of system dependencies and python packages.

    Examples given for python:

    - name: Cache Python packages
      uses: actions/cache@v3
      with:
        path: ~/.cache/pip
        key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
        restore-keys: |
          ${{ runner.os }}-pip-
    - name: Install Python dependencies
      run: pip3 install -r requirements.txt


    and system:

    - name: Cache APT packages
      uses: actions/cache@v3
      with:
        path: /var/cache/apt
        key: ${{ runner.os }}-apt-cache
        restore-keys: |
          ${{ runner.os }}-apt-cache


    The rest of optimization can probably be found in the build logs but I never had time to look into that.
  • ADVERTISEMENT
  • #130 21282618
    max4elektroda
    Level 24  
    Posts: 745
    Help: 47
    Rate: 183
    Thanks, I think the basic "cause" is the structure of OBK: since it grew to support more and platforms, we had the need for additional SDKs and all are present in the APP directory and updated before a build starts. So I would think it's almost impossible to change this without a complete redesign and this is out of question.
    We might save resources (but increasing time) by doing all builds after each other, like a local docker build.
    This way we would still download all SDKs for this run, but we would also need all SDKs.
    But since then all builds would be done build by build, we would need much more time.

    So my conclusion, if I didn't miss something: Nice idea, but not reachable with a reasonable effort.
  • #131 21282627
    DeDaMrAz
    Level 22  
    Posts: 600
    Help: 34
    Rate: 127
    max4elektroda wrote:
    So my conclusion, if I didn't miss something: Nice idea, but not reachable with a reasonable afford.


    I agree, especially on the reasonable effort part :)

    BTW - source of my "knowledge" as I forgot to include it in the previous post - https://docs.github.com/en/actions/writing-workflows
  • #132 21282650
    max4elektroda
    Level 24  
    Posts: 745
    Help: 47
    Rate: 183
    max4elektroda wrote:
    but not reachable with a reasonable afford.
    Kind of funny wrong wording, seems I couldn't afford the effort ;-)
  • #133 21293409
    max4elektroda
    Level 24  
    Posts: 745
    Help: 47
    Rate: 183
    @divadiow and @p.kaczmarek2: I would like to discuss another possible issue and solutions with DS1820 driver.

    When writing the driver the sensor readings from DS1820 were merely made for displaying the temperature on the main screen.
    There you will also see, when the shown temperature actually was read.
    I did point this out, because the last temperature read is "kept forever", even if connection to the sensor is lost or other problems arise.

    Since the latest changes, the temperature is also set as a channel value which probably will need a change in this behavior:
    If the temperature is sent via MQTT, the last seen temperature will also be "sent forever", which is not so good.

    So I wonder how to handle this to make it clearer: My first idea is we should "invalidate" the temperature after a defined time, e.g. after 5 minutes without a proper reading.

    What do you think about this "timeout"?
    Since I use neither HA nor MQTT I don't know, if/how this can be transferred to publishing the values.
    If searched a bit and would think we need to somehow send "UNDEF" in case the tenmerature is in an undefined state.

    How could this be realized? Is there maybe already an implementation for this?
    I know I can e.g. set a "channelType Temperature_div100", but I don't know, if this has impact on what is published on the channel and how I can set the channel to publish "UNDEF" or whatever is needed...
  • #134 21293576
    divadiow
    Level 38  
    Posts: 4870
    Help: 424
    Rate: 863
    max4elektroda wrote:
    What do you think about this "timeout"?

    Behaviourally, yes, I'd much rather know it had stopped working. I'm not big on MQTT/HA but do have an HA server running for testing. I wonder what happens when you unplug other sensors when the device is still communicating to HA. I'll try something.

    What would be the advantage of waiting any longer than 1, 2, 5 etc mins until the device set the sensor to null/failed/off?
  • #135 21293579
    DeDaMrAz
    Level 22  
    Posts: 600
    Help: 34
    Rate: 127
    The default behavior (unless a retain flag is active) is MQTT will report result every 60 seconds (or MQTT connect), otherwise it will report as unavailable in HA.
    MQTT reporting time can be tweaked of course and if retain flag is active last received value will be kept "forever".

    Unfortunately I only have DS18B20 sensors to play with right now so no use of me for this part at the moment.
  • #136 21295662
    max4elektroda
    Level 24  
    Posts: 745
    Help: 47
    Rate: 183
    I included (for testing) a 30 seconds invalidation of the temperature in PR #1416.
    Will be set to "-127.00 °C" as invalid/undef temperature. Mainpage will show "-" then (but the channel will show -12700.00).

    Screenshot of the OpenW800 interface displaying a temperature of 16.37°C and details about DS1820 status, channels, and MQTT connection.


    And how can we change the MQTT behaviour? It will now report the "invalid" temperature -127° in case there was no valid temperature read, but it should report "nothing" or "invalid" or whatever is a "standard" in this case. Maybe @p.kaczmarek2 has an idea? How are the other temperature sensors handling this case?

    Added after 4 [minutes]:

    DeDaMrAz wrote:
    Unfortunately I only have DS18B20 sensors to play with right now

    If you refer to my posting about DS1820: This is just laziness in my writing- I don't have any DS1820, only DS18B20, too but simply just "ignore" the "B" in my posts...
  • ADVERTISEMENT
  • #137 21296761
    DeDaMrAz
    Level 22  
    Posts: 600
    Help: 34
    Rate: 127
    max4elektroda wrote:
    If you refer to my posting about DS1820: This is just laziness in my writing- I don't have any DS1820, only DS18B20, too but simply just "ignore" the "B" in my posts...


    I really assumed B variant is not supported and only tried it for a bit, but will get on it as I have a bunch of them just lack time to do so.
  • #138 21297601
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14434
    Help: 650
    Rate: 12399
    Does the measurement error happens periodically? Reporting -127C may polute the graphs in HA, so I am not sure if it's a good idea. Maybe it would be to just skip channel setting if measurement is not valid, or at least, try to filter errors during normal usage.
    Helpful post? Buy me a coffee.
  • #139 21297675
    max4elektroda
    Level 24  
    Posts: 745
    Help: 47
    Rate: 183
    It might be an error reading the sensor, sensor might be not connected...
    After the driver was started, the channel has a value, which is published (if I'm not mistaken).
    So we would need an approach to publish "no value at the moment".
    Repeating an old value for a long time (or pretending the value didn't change) is also"polluting" the measurements, even if it might look better....
  • #140 21297742
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14434
    Help: 650
    Rate: 12399
    If you want to publish "-127" when there is no sensor at all, then ok, I think it's a good idea. I was only worried about those strange measurement errors that show up somewhat randomly during normal device operation due to the timing issues. I saw them with DHT sensors in the past.
    Helpful post? Buy me a coffee.
  • #141 21297877
    max4elektroda
    Level 24  
    Posts: 745
    Help: 47
    Rate: 183
    The "-127°C" is just an idea, it's a "well known" error value with DS18(B)20 (0xff as int8_t and well below the minimum value of -55°C)

    Sorry if I try to ask for a "solution" for a problem I don't totally understand (lack of MQTT knowledge) ;-)

    Using a temperature sensor and "publishing" its value from my perspective needs to address at least the following points:
    - what to do, if a sensor is not present at all
    - what to do, if a reading fails
    * once/few times (e.g. the CRC is wrong, so there was a misreading)
    * for a long time (sensor or connection is broken, sensor has no power ...)
    - what to do, if a sensor (correctly) reads the same value

    Last point is clear - if a new reading is the same as the reading before, I would expect it to be published - it's a new value in this case.
    To keep it as simple as possible, all other cases could be handled the same/equally:
    If a sensor is not present: Don't publish a value at all - or publish a "undefined"/"no sensor found" - whatever is possible in MQTT.
    If reading fails, I would not publish a value at all - or publish a "undefined"/"reading failed"/"no new value" - whatever is possible in MQTT (but "keep" the last value internally for some time - e.g. to display on main page).
    This way it could be the same handling of short or long periods of no new readings or no communication with the sensor at all.

    So my minimum "expectation" to a publishing function would be:
    If there is a reading, publish the value - even if it's the same as before
    If there is no reading, don't publish anything (and let the client handle "no values" e.g. with a timeout)

    So how this could be done?
  • #142 21305277
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14434
    Help: 650
    Rate: 12399
    Just dont' call SetChannel if there is no new value read.

    Futhermore, if you want to report errors, then maybe we could introduce some kind of string topic to publish errors? Add it to Home Assistant Discovery as well. And if there is, for example, DS18B20 problem (sensor is missing), we could just publish "DS18B20 missing" error on this error topic.

    Of course, error topic would be shared by all drivers, it would be a somewhat universal mechanism, but nothing special, just a single place to publish enum (as a string?) so HA can tell what's wrong.

    The OBK web panel would also show last error event along with timestamp.
    Helpful post? Buy me a coffee.
  • #143 21305488
    max4elektroda
    Level 24  
    Posts: 745
    Help: 47
    Rate: 183
    p.kaczmarek2 wrote:
    Just don't' call SetChannel if there is no new value read.

    Oh, yes, it can be so simple ...

    Changed PR not to publish the value -127°C.

    Maybe someone using it with HA can check, if value now times out (depending on HA settings, I suppose)?
📢 Listen (AI):

Topic summary

✨ The discussion focuses on creating custom drivers for OpenBeken (OBK) devices without requiring a local toolchain by utilizing online builds. Key challenges include integrating external libraries such as OneWire and DS18B20 sensor drivers, adapting timing functions (usleep) for precise 1-Wire protocol communication, and handling platform-specific differences across Beken-based devices (BK7231T, BK7231N, W800, LN882H, BL602). Contributors share code improvements, including porting OneWire implementations, refining delay loops with nop instructions, and introducing CRC checks to filter erroneous sensor readings. The DS1820 and DS18B20 temperature sensors are discussed in detail, highlighting their protocol similarities and differences, and issues with timing accuracy and sensor pin selection are addressed. The conversation also covers build system enhancements: restructuring Makefiles into platform-specific folders, enabling charts drivers, resolving conflicts with OBK_DISABLE_ALL_DRIVERS, and proposing a flexible pre-build script mechanism to override SDK files during online builds. This approach facilitates easier customization and patching without modifying SDK submodules directly. The group tests various hardware setups, sensor wiring, and power-saving modes, emphasizing the importance of accurate timing and CRC validation for reliable sensor data. Finally, improvements to the build and release process are discussed, including caching SDKs, selective SDK installation per platform, and troubleshooting simulator packaging in release artifacts.
Generated by the language model.

FAQ

TL;DR: With 3 core code edits and "builds can be done online", OpenBeken users can create, compile, flash, and test a custom driver without installing a local toolchain. This FAQ helps developers add drivers, debug them in Windows, and avoid common DS18B20 and CI build pitfalls in OpenBeken workflows. [#21095505]

Why it matters: This thread turns scattered forum troubleshooting into a repeatable path for writing, building, debugging, and maintaining custom OpenBeken drivers across multiple platforms.

Topic Recommended path Main limitation
New custom driver Fork repo, open PR, use online builds Must register driver in config and tables
Windows debugging Use Visual Studio 2022 + obkSimulator Missing VS components and simulator libs break builds
DS18B20 on Beken Use updated timing code, CRC checks, correct pin and pull-up PowerSave and bad timing can corrupt reads
SDK customization Use platforms/<platform>/pre_build.sh Still needs careful file overrides

Key insight: Online builds solve compilation, not integration. In OpenBeken, the hard part is usually correct registration, platform-specific timing, or SDK/build-system behavior, not writing the first C file. [#21252988]

Quick Facts

  • The basic custom-driver flow uses 3 required integration points: obk_config.h, drv_main.c, and driver declarations in drv_local.h. Without all three, the driver will not register cleanly. [#21095505]
  • The sample DS18B20 reliability test showed a strong PowerSave effect: with powersave 0, one user counted 54 CRC matches vs 29 mismatches; with powersave 1, the same setup had 0 matches vs 95 mismatches. [#21165621]
  • A practical DS18B20 hardware setup that repeatedly worked used a 4.7 kΩ pull-up and P10 on BK7231-based hardware, while P26/PWM5/ADC1 produced unstable readings in one test series. [#21163350]
  • Logic-analyzer work showed why naive delay loops failed: one test firmware produced a reset pulse of 248 µs instead of 480 µs, plus 9 µs and 12 µs delays where 6 µs and 9 µs were expected. [#21189891]
  • A release-pipeline fix restored missing assets by making semantic release wait for both build jobs; after that, release 1.17.759 again showed 22 assets. [#21280999]

How do I create a custom OpenBeken driver with online builds on GitHub without installing a local toolchain?

You create a fork, open a pull request, add your driver to the app repository, and use PR artifacts for online builds. The minimal flow is: 1. Fork OpenBK7231T_App on GitHub. 2. Add your driver code and registration changes. 3. Open a PR so GitHub Actions builds firmware online. The guide states, "builds can be done online," so no local toolchain is required for that path. After merge, binaries for supported platforms become available through the online build system. [#21095505]

What needs to be added in obk_config.h, drv_main.c, and drv_local.h to register a new OpenBeken driver correctly?

You must add a preprocessor define, a driver-table entry, and function declarations. In obk_config.h, add a new #define in the target platform section, such as WINDOWS, so the driver can be enabled per platform. In drv_main.c, add the driver to the main drivers array inside a matching preprocessor block, including its name and callbacks. In drv_local.h, declare the init, second-tick, quick-tick, HTTP, and optional stop functions. The sample driver exposed Init, OnEverySecond, QuickTick, AppendInformationToHTTPIndexPage, and StopDriver. [#21095505]

How can I debug an OpenBeken driver on Windows with Visual Studio 2022 and the obkSimulator project?

Use the Windows simulator build, then debug it like a normal Visual Studio app. Open the OpenBeken Windows project in Visual Studio 2022, compile the simulator target, run it, and place breakpoints in your driver functions. The guide says Windows debugging lets you see variable values, inspect the call stack, and step in or out of calls. Later replies confirmed Visual Studio 2022 works once the required components and simulator libraries are installed. This is the fastest way to debug driver logic before flashing real hardware. [#21095505]

Why does my OpenBeken Windows simulator build fail with missing files like Microsoft.Cpp.Default.props, OpenGL libraries, or glut32.lib/freeglut.lib?

These failures usually mean Visual Studio components or simulator libraries are missing, not that your driver code is wrong. One user hit Microsoft.Cpp.Default.props because required VS components were not installed. Another hit missing graphics libraries and was told to copy the simulator support files from the separate obkSimulator repository, specifically the libs_for_simulator directory. The maintainer also clarified that the project should use freeglut.lib, not glut32.lib, so a stale local setting can cause the wrong dependency error. [#21265130]

What is OBK_DISABLE_ALL_DRIVERS in OpenBeken, and how does it affect custom drivers, BL0937 support, and charts on W800 or LN882H?

OBK_DISABLE_ALL_DRIVERS is a build-time switch that disables driver support on some platforms, and it can block custom drivers or charts even when code compiles. On W800, it prevented charts and DS1820 from being usable until related code paths were fixed and the define was reconsidered. A contributor eventually reported W800 running both DS1820 and charts after removing that limitation and correcting checks that wrongly keyed off OBK_DISABLE_ALL_DRIVERS instead of energy-driver defines like BL0937. LN882H also benefited from the same cleanup. [#21244589]

How do pre_build.sh scripts work in OpenBeken platform folders, and when should I use them instead of modifying SDK submodules directly?

A pre_build.sh script runs before the platform build and lets you patch or replace SDK files from the app repository. The new mechanism executes platforms/<platform>/pre_build.sh if present, so you can copy override files, patch SDK sources, or prepare special builds without editing SDK submodules directly. This is best when you need a quick browser-based PR or per-platform override, such as custom partition addresses or encryption-key handling. It keeps the change in OpenBK7231T_App and avoids repeated SDK-submodule edits. [#21252988]

DS1820 vs DS18B20: what are the protocol and feature differences, and which one is actually supported by the OpenBeken DS1820 driver?

They are similar 1-Wire temperature sensors, but they are not the same part. The thread notes DS1820 and DS18B20 differ in resolution, family code, and command details, even though both use 1-Wire. In practice, the OpenBeken driver named DS1820 was developed and tested mostly with DS18B20 sensors; several participants explicitly said they only had DS18B20 hardware. Later discussion also treated the missing “B” as naming shorthand, not a strict exclusion. So the current driver name is historical, but real-world testing focused on DS18B20. [#21154798]

Why does the OpenBeken DS1820/DS18B20 driver show CRC errors, reset failures, or random temperatures like 53°C, 86°C, or -3817°C on BK7231 devices?

The direct cause is bad 1-Wire timing, often combined with unstable pins or power-saving effects. Users reported jumps to 53°C, 86°C, and even -3817.93°C, plus Reset failed and all-ff scratchpad reads. The main diagnosis was that delay timing on BK7231-class devices was inaccurate, so reads happened too late or reset pulses were out of spec. One maintainer summarized it plainly: "The less loops you use, the more precision you get." CRC checks later stopped many bad values from appearing, but they did not fix the underlying timing problem. [#21158429]

Which pull-up resistor and pin choices work best for DS18B20 on BK7231, BL602, W800, and LN882H, and how much do timing differences matter?

A 4.7 kΩ pull-up and a simple GPIO such as P10 worked better than overloaded pins in the thread tests. One BK7231 user saw unstable reads on P26/ADC1/IRDA/PWM5, then improved behavior on P10/RX1. Another user said 5.1 kΩ should not be a major problem, but later switched to 4.7 kΩ anyway. On other platforms, BL602, W800, and LN882H all needed platform-specific timing behavior, and W800 was described as especially solid once timing matched. Timing mattered more than brand authenticity of the sensor. [#21163350]

How does PowerSave affect DS18B20 reliability in OpenBeken, and why can the same sensor work with powersave 0 but fail with powersave 1?

PowerSave changes timing enough to make marginal 1-Wire code fail. In the clearest test, the same BK7231 setup with startDriver DS1820 18 produced 54 CRC matches and 29 mismatches at powersave 0, but 0 matches and 95 mismatches at powersave 1. Later timing changes improved this substantially, and a newer test with revised code showed valid DS18B20 readings even under PowerSave 1. The lesson is simple: if DS18B20 is unreliable, test with powersave 0 first, then verify whether newer timing code fixes low-power mode. [#21165621]

What is the best way to tune or redesign usleep timing for 1-Wire sensors in OpenBeken instead of relying on nop loops and BKfact values?

Use separate short, medium, and long delay paths plus critical sections, not one generic nop loop. Early work tried BKfact tuning and auto-scaling, but logic-analyzer tests showed that approach could not satisfy both short and long 1-Wire timings. One contributor measured a reset pulse at 248 µs when it should have been 480 µs, proving the loop design was fundamentally wrong. The later redesign split delays by time range and borrowed critical-section ideas, which made PowerSave and multiple platforms behave much better. [#21189891]

How can I get DS18B20 readings into OpenBeken scripts and MQTT instead of getting 0 when using setChannel and publish commands?

You must let the driver update a channel, then publish that channel after a valid reading exists. A user tried setChannel 7 DS1820 and publish sensor_temper $CH7 but got 0, which triggered follow-up work so the driver could expose temperature as a channel value. Later discussion shows the fix direction was to set the channel only when a fresh valid reading exists, not on failure. That prevents stale or zero data from being republished forever and makes scripting and MQTT reflect actual sensor state. [#21305277]

What should OpenBeken publish to MQTT or Home Assistant when a DS18B20 reading fails or the sensor is disconnected: keep the last value, send -127°C, or publish an error state?

The best current direction is: do not keep publishing stale values, and do not force -127°C unless you want an explicit error marker. The thread rejected endless reuse of the last good temperature because it hides faults. It also questioned publishing -127°C, since that can pollute Home Assistant graphs. The preferred proposal was to skip SetChannel when no new value exists and eventually add a shared error topic for states like sensor missing. That gives HA and MQTT clients a real failure signal without falsifying temperature history. [#21305277]

Why do some OpenBeken release assets like obkSimulator zip or XR809 builds randomly disappear from GitHub releases even when they exist in artifacts?

The root cause was a GitHub Actions workflow dependency problem. Semantic release sometimes started before all build jobs had finished, so assets existed in artifacts but were not ready when .releaserc tried to publish them. The telltale log line was that obkSimulator* "cannot be read, and will be ignored." A fix made semantic release depend on both build jobs, and release 1.17.759 returned to 22 assets. Missing XR809 assets in some releases were separate cases where that platform simply failed to build. [#21280908]

What's the purpose of moving platform Makefiles into the OpenBK7231T_App platforms folder, and how does that improve online builds for W600, W800, LN882H, and XR809?

It moves platform-specific build logic into the main app repository so online-build changes no longer require direct SDK edits. The contributor proposed placing per-platform Makefiles under platforms/<platform>/Makefile and making SDK Makefiles include them. That lets developers adjust app-side build behavior for W600, W800, LN882H, and XR809 through normal PRs in OpenBK7231T_App. The immediate benefit was simpler online-build maintenance and easier future feature enablement, such as charts, without constantly modifying each SDK submodule first. [#21242608]
Generated by the language model.
ADVERTISEMENT