This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

LAUNCHXL-CC26X2R1: zed_temperature: what sensor is used in the example?

Part Number: LAUNCHXL-CC26X2R1
Other Parts Discussed in Thread: SYSCONFIG, Z-STACK, HDC2080

Good evening...again ;-)

As with Ryan's help I got first contact with ZStack successfully...I wanted to try the temperature sensor example...

It is running fine and I can see it on my home assistant dashboard..though reports 17 degrees Celsius only as no sensor is attached.

When walking through the sources I couldn't find any reference to what sensor is used...from sysconfig it must be an SPI device...

Or maybe I was just too blind finding it ;-)

thanks in advance

richard

  • Hey Richard,

    The Z-Stack temperature sensor examples don't actually measure temperature, they just report the SAMPLETEMPERATURESENSOR_MIN_MEASURED_VALUE unless the user interacts with the UART CUI to change it.  Please review the value of zclSampleTemperatureSensor_MeasuredValue as modified in zclSampleTemperatureSensor_UiActionChangeTemp from zcl_sampletemperaturesensor.c to understand what I am referring to.  It is possible however to integrate code from i2ctmp, which uses the BP-BASSENSORSMKII, or multi_sensor, designed to work on a LPSTK-CC1352R,  to communicate with a HDC2080 temperature and humidity sensor.  More simply, you could use the Temperature.h TI Driver to measure the current temperature of the chip using the BATMON module.

    Regards,
    Ryan

  • Hello Ryan

    TI Driver works fine..thanks ;-)

    But it seems that reporting of a new temperature value is blocked for 30 seconds from the last report...also with the CUI....a new temperature is only accepted when the last change was over 30 seconds ago...

    Is there a way to force the notification to be immediately if only a change was detected or where does the 30 seconds blocking come from?

    Seems Zstackapi_bdbRepChangedAttrValueReq(appServiceTaskId,&Req) doesn't schedule the notification.

    cheers

    richard

  • Maximum and minimum reporting intervals should be set through Req.maxReportInt (default 10) and Req.minReportInt (default 3) as used in the zcl_temperaturesensor.c file.  These mean that two reports cannot be sent out within a three-second window and that a report must be sent out after ten seconds.  Zstackapi_bdbRepChangedAttrValueReq will not immediately cause an attribute report to be send out if the value of Req.reportableChange has not yet been surpassed.  You can further debug bdb_RepChangedAttrValue to determine whether the request is rejected or if bdb_RepReport is executed.

    Regards,
    Ryan  

  • Hello Ryan

    Hmm...when changing the temperature through CLI  I had to wait for at least 30 seconds for the next change to be reported, and not 3 or 10....

    Also when for example 25° was reported and then changed through CLI to 30° within 30 seconds after last report, no new value was pushed out. Home Assistant still showed the old value of 25° until a new change was seen only when waiting at least 30 seconds after the last push.

    Req.reportableChange was set to 100, meaning at least 1° change.....

  • Does this behavior occur using only TI examples or specifically with the Home Assistant?  Based on its own preferences, it is possible that the platform is writing new attribute reporting values to the temperature sensor which changes its default settings.  You could confirm this with a sniffer log or by debugging zclProcessInWriteCmd.

    Regards,
    Ryan