Matter Temperature Sensor Output

I created a new Matter project based on the light bulb example.

I want to add several more endpoints with different commands and values.

As a way to learn how things work, I followed the example tutorial to add the temperature sensor with an on_off command to start it going and stop it.

When I commission my device to my SmartThings hub, it shows up with 2 switched as expected.

I figured out how to get the endpoint id during in the MatterPostAttributeChangeCallback.

If the endpoint is 1, then I turn the light bulb on and off. if the endpoint is 2, then i send the app event to turn the temperature sensor on and off.

My question is where am I supposed to see the random temperature reading in the UI on my Android phone that is connected to the SmartThings hub?

When I turn the light bulb on and off that on/off switch turns on and off and the LED on the dev kit turns on and off.

When I hit the switch for the temperature sensor that is simply called "switch 2", nothing happens in the UI on my phone.

When the temperature sensor is enabled, I do get a call to MatterPostAttributeChangeCallback every second, but nothing else happens.

Shouldn't the phone UI have some place for the sensor value to show up? What controls that?

Parents Reply
  • Yes, I have tried those.

    In fact, my code was started as the light bulb example and then I added the temperature code from that tutorial.

    Can you please point me to some information that explains how an app like the Smartthings App is supposed to determine what UI to use? How is it supposed to know that this is a temperature sensor with a value to display?

    In the log output I can see the temperature value being generated every 300ms when it is on and nothing when it is off, so I know it is doing its thing.

    It just isn't informing the UI of the Smartthings app that it is a temperature sensor because it the app is showing the same UI for the bulb / switch and temperature sensor as if it thinks the sensor is a switch.

Children
No Data
Related