Closed Avamander closed 1 year ago
Hi, the temperature sensor needs to return always a value or it will cause errors, but when the device is not connected to the plugin the sensor is marked as inactive so so not sure why homekit still picks it up...
This would indicate there are cases where the temperature is zero but the device hasn't been marked inactive?
Would it be possible to always mark most devices inactive when temperature (and other readings) is zero?
0 is a valid value for the temperature sensor and certainly be possible so marking device with value 0 as inactive would be bad.
The question here is just why HomeKit ignores the inactivity mark.
0 is a valid value for the temperature sensor and certainly be possible so marking device with value 0 as inactive would be bad.
Possibly, when looking at just the temperature. But there are other values that could all be zero, allowing quite trustworthy inactivity detection.
The question here is just why HomeKit ignores the inactivity mark.
This doesn't seem to be the case with other bridges, so I'd honestly consider it as the last possible case.
In order to fix the issue correctly, the reason needs to be found why the home app still picks up inactive sensors, maybe that will give me an idea how to properly mark sensors for devices which are not connected.
[1/14/2023, 4:22:25 PM] [homebridge-miot] [Xiaomi Air Purifier 4 Pro] Error: Could not connect to device, handshake timeout [1/14/2023, 4:22:25 PM] [homebridge-miot] [Xiaomi Air Purifier 4 Pro] Error during connection! Retrying in 60 seconds!
And HomeKit shows: Active: No
and Tampered: No
. Yet it's indeed still included in the summaries.
Yes, so when homekit picks it up as not active, it does not make sense that it shows the temperature.
Maybe it's an issue about the sequence of changes sent to HomeKit. E.g. updating the temperature of an inactive device to zero or vice versa, updating a temperature to zero when it should remain the last value.
That should not certainly cause it.
Should but this seems to unfortunately be the only integration that exhibits this behaviour.
Then differences has to be located so that we can find out why it is happening and how to fix it. I currently am not aware what might be wrong...
I'm still seeing this issue on v1.7.0
.
I also noticed that sensors with 0 readings are not displayed as "Not Available" in HomeKit. Maybe marking those sensors as unavailable (not just inactive) would fix this issue?
I think making a sensor unavailable could potentially lead to other issues like announcements by Siri with something like "some of the devices are not responding"
Yeah, but that would probably be better than these zero readings, these are also used in Siri announcements.
Yeah well it is kind of a tricky issue. We would need to have a look how manufacturers of native HomeKit sensors handle that...
Describe the bug When a device is unavailable (in my case an Air Purifier 4 Pro) due to being disconnected from WiFi, it reports a zero (
0
) temperature when it should be reporting nothing (None
). This causes temperature ranges in rooms to be shown like to0.0C - 21.2C
, which is wrong.Expected behavior An unavailable device reports nothing instead of a zero.
Your config.json N/A
Debug log If this is really necessary I can provide it.
Screenshots N/A