Bosch Sensortec Community

    cancel
    Showing results for 
    Search instead for 
    Did you mean: 
    SOLVED

    BME680 state_save / state_load problem

    Established Member

    Re: BME680 state_save / state_load problem

    Hi Bosch,

    it also makes sense from a technical point of view to save the state after any long time if accuracy ❤️ , so modify the code for this?

    I have still the problem that an indoor sensor have after 29 days (without interrupt) still the accuracy=1 - so state will be never saved.

    Can these saved values valid for any "reached calibration" (in case of rebooting device) or will it be ignored because accuracy=1 ?

    Thanks,

    Michael

    Community Moderator

    Re: BME680 state_save / state_load problem

    I believe the idea behind this condition was linked to the IAQ accuracy definition. If the accuracy=1, the library already considers that its current state is uncertain, therefore similar performance could be expected whether this state is reused or not. If the accuracy=2, the library is still calibrating to its sourrounding environment.

    Both can be argued, and our sample code is provided as reference. In this case the library will let your save/reload its state regardless of the accuracy, therefore you could use your favorite configuration based on the expected end-user experience.

    Member

    Re: BME680 state_save / state_load problem

    Hi,

    After restart, state_load is called and state is restored, great
    But IAQ_accuracy is at 0 so we shouldn't take into account the value until it is at least 1, isn't it?

    So with ULP mode, after restart, I'll wait around 20 minutes before using the values?

    Thanks,

    Community Moderator

    Re: BME680 state_save / state_load problem

    Correct, the IAQ_accuracy=0 indicates that the gas sensor is still stabilizing, typically right after powering-up your device. Therefore it is up to you to decide how you will process the output data during this period, but the library indicates that the performance of this data cannot be guaranteed.

    Established Member

    Re: BME680 state_save / state_load problem

    save/load state is working now.

    After 5 minutes about the accuracy will be changed from "0" to last saved state, the values (IAQ, voc) will be near the latest measured values, so all seems to be ok.
    -----------------------------------------------

    I have expected an issue if saving the state with accuracy=1 - possibly saved too early :
    iaqEstimate will be all the time "0", co2Equivalent will be "400", iaqAccuracy can be "1" - but these values will not be changed over a long time (hours) more, even it temperature, resistance are changing.

    To correct this a reboot will not help, because same values will be loaded from EEPROM - the only way is to erase EEPROM in such a case.

    I think this happen is save invalid (not ready) state values to EEPROM - so maybe a good idea is to wait a long time before saving, if not possible to wait for iaqAccuracy=3.

    This can be discussed in other topic, if any needs.

    Icon--AD-black-48x48Icon--address-consumer-data-black-48x48Icon--appointment-black-48x48Icon--back-left-black-48x48Icon--calendar-black-48x48Icon--center-alignedIcon--Checkbox-checkIcon--clock-black-48x48Icon--close-black-48x48Icon--compare-black-48x48Icon--confirmation-black-48x48Icon--dealer-details-black-48x48Icon--delete-black-48x48Icon--delivery-black-48x48Icon--down-black-48x48Icon--download-black-48x48Ic-OverlayAlertIcon--externallink-black-48x48Icon-Filledforward-right_adjustedIcon--grid-view-black-48x48IC_gd_Check-Circle170821_Icons_Community170823_Bosch_Icons170823_Bosch_Icons170821_Icons_CommunityIC-logout170821_Icons_Community170825_Bosch_Icons170821_Icons_CommunityIC-shopping-cart2170821_Icons_CommunityIC-upIC_UserIcon--imageIcon--info-i-black-48x48Icon--left-alignedIcon--Less-minimize-black-48x48Icon-FilledIcon--List-Check-grennIcon--List-Check-blackIcon--List-Cross-blackIcon--list-view-mobile-black-48x48Icon--list-view-black-48x48Icon--More-Maximize-black-48x48Icon--my-product-black-48x48Icon--newsletter-black-48x48Icon--payment-black-48x48Icon--print-black-48x48Icon--promotion-black-48x48Icon--registration-black-48x48Icon--Reset-black-48x48Icon--right-alignedshare-circle1Icon--share-black-48x48Icon--shopping-bag-black-48x48Icon-shopping-cartIcon--start-play-black-48x48Icon--store-locator-black-48x48Ic-OverlayAlertIcon--summary-black-48x48tumblrIcon-FilledvineIc-OverlayAlertwhishlist