Temperature/Humidity sensor - Matter - Problem with HomeKit

Cheezus
Posts: 3
Joined: Tue Feb 13, 2024 9:25 pm

Temperature/Humidity sensor - Matter - Problem with HomeKit

Postby Cheezus » Tue Feb 13, 2024 9:35 pm

Hey,

Hope someone clever could help out here.
I have this DHT22 sensor which I have connected to a ESP32-C3 devkit. With this setup I have then created to be a Matter device (both a temperature and a humidity sensor). Code can be found at this GitHub repo (https://github.com/osterhult/Temperature-Matter/).

In this environment I have a Raspberry Pi that acts as a Matter controller and with that my own Matter Fabric. On this Raspberry Pi I can use the following commands using CHIP-TOOL to get some values from the sensors.

Code: Select all

$ ./chip-tool temperaturemeasurement read measured-value [NODE-ID] 1

Gives ….
[1706704628.735109][30763:30765] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0402 Attribute 0x0000_0000 DataVersion: 2542485144
[1706704628.735395][30763:30765] CHIP:TOO:   MeasuredValue: 23

$ ./chip-tool relativehumiditymeasurement read measured-value [NODE-ID] 2
 
Gives …
[1706704766.636335][30776:30778] CHIP:TOO: Endpoint: 2 Cluster: 0x0000_0405 Attribute 0x0000_0000 DataVersion: 3911489774
[1706704766.636567][30776:30778] CHIP:TOO:   MeasuredValue: 24
So far, so good.

But then I have also commisioned the device/node to my Apple HomeKit Matter Fabric. In which I get values of 0 on both Temperature and Humidity.
Why is that?? Since Matter is multiadmin I should get the same values on both cases.

Any ideas from any one?

Cheezus
Posts: 3
Joined: Tue Feb 13, 2024 9:25 pm

Re: Temperature/Humidity sensor - Matter - Problem with HomeKit

Postby Cheezus » Wed Feb 14, 2024 12:30 pm

Found at last the issue of my problem. I had to scale the answer by 100 when sending it to Matter to it be able to pick it up since they where expecting unsigned ints. Fixed in the repo now.

Cheezus
Posts: 3
Joined: Tue Feb 13, 2024 9:25 pm

Re: Temperature/Humidity sensor - Matter - Problem with HomeKit

Postby Cheezus » Thu Feb 15, 2024 9:53 pm

New issue connected to the first one.

As I mentioned the code is working fine for my ESP32-C3 board. But when I change the setting (not touching the setup) to another breadboard using ESP32-H2 instead I get error from fetching data from the DHT22 sensor. Why could this be?

Who is online

Users browsing this forum: No registered users and 94 guests