I want to retrieve the humidity value from the notification of the MESH block notifications

Asked 1 years ago, Updated 1 years ago, 347 views

Based on the communication specification of the MESH block released on August 31, we are trying to implement the acquisition of temperature and humidity detected by the MESH block in Python.Using the official documentation as a reference, we were able to receive notifications from the MESH block (temperature and humidity) as follows:

b'\x01\x00\x00\x04\xe9\x00D\x002'

As for the temperature, since it is e9, it seems to have been converted to decimal and obtained correctly at 23.3 degrees on 233/10, but the humidity returned to D.

The MESH app measures around 50% humidity, so I think it is measured correctly. How can I convert the above values to decimal values correctly?

python

2022-12-01 18:05

1 Answers

I don't know about MESH blocks, but I think it's just \x44(68) showing D.
Below are the results of Python's interactive mode.

>>b'\x44'
b'D'


2022-12-01 18:26

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.