You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tested with a unit and have verified that these do work and read negative temps. According to their marketing materials, they only claim the device supports 0-50 degrees C, but the mobile app shows the range as -20C to 60C. I have personally verified that my unit reads sub-freezing temps (although I didn't have a way to test all the way down to -20C).
The decoding algorithm description could use updating to be less complicated and more accurate. Converting to a binary string isn't needed. The algorithm I used is (pseudocode):
Join the 3 data bytes together and convert to an integer, then:
if (val & 0x800000) {
is_negative = true;
val = val ^ 0x800000;
}
humidity = (val % 1000) / 10;
temp = int(val / 1000) / 10;
if (is_negative) {
temp = 0 - temp;
}
# If desire Farenheit
temp = temp * 9 / 5 + 32;
The text was updated successfully, but these errors were encountered:
The official operating temperature range, according to Govee, for the H5075 is 0°C - 50°C (32°F - 122°F). It may display and send negative temperatures but I would be suspicious of those values. Also standard LCDs do not do well in freezing temperatures.
I see that there has bee some discussion about negative temperature... the below seems to work for me and reports pretty accurately in tests with my fridge & freezer...
- lambda: |-
for (auto data : x.get_manufacturer_datas()) {
if(data.data.size()==6) {
const int basenum = (int16_t(data.data[1]) << 16) + (int16_t(data.data[2]) << 8) + int16_t(data.data[3]);
float temperature = (basenum / 10000.0f);
ESP_LOGD("custom", "Govee Two Reported Temp: %f", temperature);
if(temperature>=839.0) {
temperature = temperature-839;
temperature = -temperature * 9.0/5.0 + 32.0;
} else {
temperature = temperature * 9.0/5.0 + 32.0;
}
}
I tested with a unit and have verified that these do work and read negative temps. According to their marketing materials, they only claim the device supports 0-50 degrees C, but the mobile app shows the range as -20C to 60C. I have personally verified that my unit reads sub-freezing temps (although I didn't have a way to test all the way down to -20C).
The decoding algorithm description could use updating to be less complicated and more accurate. Converting to a binary string isn't needed. The algorithm I used is (pseudocode):
Join the 3 data bytes together and convert to an integer, then:
The text was updated successfully, but these errors were encountered: