Yolink devices always show up as online with Matter integration

I have a number of battery-operated Yolink sensors, which I use with the Matter integration and the Yolink local hub.

One of them is a YS7704-C door sensor, which has been offline for 12 days in the Yolink app. It shows as having 20% battery, and “Closed” with the Matter integration.

The same sensor can also be used with the Yolink cloud-based integration. It correctly shows up as being offline in that integration.

So, this door sensor device is showing offline in 2 out of 3 places

  1. the Yolink Android app : offline.
  2. the Yolink HA integration : offline
  3. the Matter HA integration : online

I discovered this issue this morning when I installed a new motion Yolink YS1606-UC sensor for the garage light. I stuck it on the wall, and tested that the motion-activated light automation worked properly.

A few hours later, the motion sensor fell off the garage wall, because the sticker does not adhere well to the textured wall.

Immediately before falling, the sensor went to “Motion detected” state. Once it hit the floor, its case opened, and the batteries came out, and it thus went offline nearly immediately after detecting motion.

The Matter binary occupancy sensor entity then got stuck reporting “Detected”, even though the device was without power and offline (it’s still on the garage floor). The consequence is that my garage lights remained on, as the motion-activated light automation relied on the state of that sensor, which was stale.

Currently, this motion sensor is still showing up as online in all 3 places - Yolink Android app, HA Matter integration, and HA Yolink integration. I suspect that there is some sort of timeout that Yolink uses before it will be marked as offline. I don’t know what that value is. It has only been offline for about 3 hours, so it might take a little longer.

I see several issues here to resolve.

  1. obviously, I need a better mount for the motion sensor, so it doesn’t fall off again.

  2. HA should be able to detect that the sensor goes offline when its batteries run out. Currently, it detects the offline state with the Yolink integration after some time, but not with the Matter integration. There is an issue either with Yolink’s own local hub bridging with Matter, or HA’s Matter integration. I will reach out to Yolink about this as well.

  3. The state of the sensor in HA should be reset, rather than remain stuck to a stale value, once the device is detected as being offline. I believe this already happened correctly with the Yolink integration and the garage freezer door sensor, so there might not be anything to fix here if the second issue with offline device detection is resolved. It would only need to be tested again.

  4. I’m not sure how the motion-activated light automation will behave once the second issue is fixed, if the third issue is not resolved. It may still keep the light on. Even with the Yolink integration, there is still a very long delay offline device detection - more than 3 hours. This is too long for this garage light to remain on, which is a load of 38 LED tubes, consuming 1045W.

So, I would still need an additional automation to detect that the garage light has been on for too long, and turn it off at that point. It is difficult to choose that value. At PG&E’s rate of about 50 cents per kW, leaving this 1045W load on for 24 hours unnecessarily costs me over $12. One would not stay awake for that long in the garage, but even a more realistic 8 hour duration is $4.

I probably need to have some sort of timeout for all my smart lights for similar cases, but no single LED load even comes close to 1045W. The total sum of all 218 Wiz LED bulbs in the house is probably under 2000W. And I would never turn them all on at the same time in the first place, except in case of a security/alarm situation, where I could manually turn them off. Otherwise, no single area has more than 23 LED bulbs, which would likely be under 200W. Even if the motion sensor failed in that one room, a 24-hour timeout would means it would cost waste no more than about $2.50, and an 8 hour max would be less than $1.

The proper solution would be to be able to quickly detect that the motion sensor went offline quickly, in a matter of minutes, not hours or days.

Even with the cloud-based Yolink integration, there is a long delay that’s at least 3 hours. I am going to keep the batteries out, and see how long it actually takes to be marked as offline. I will disable the motion activated light for the garage light, so it doesn’t stay on again due to the stale state.

With the HA Matter integration, the door sensor is still reporting as online 12 days after it went offline in the Yolink app, and thus I believe its state is forever stuck.

So quite,a bit here. I know your battery was only 20% but expecting it to work is not realistic. I also have dropped these sensors and one forever was screwed. The only thing i can say is remove it from the yolink app, etc. Reload matter or delete the matter device. Certainly set a timer for lights no mayter whay the motion/state of trigger is in case this happens again.

On another note, i have 57 yolink devices and now having trouble with all of them reconnecting in a timely manner. Does the local hub work ok?

Sorry for the late reply - I was abroad for a while and just got to this. There were several sensors mentioned in my post, and it may have led to some confusion.

  1. The YS7704-C door sensor. This sensor was never dropped. It is however located in a freezer, which impacts battery performance. My observation is that in one HA integration, the Yolink integration, the device shows as offline, whereas in another integration, the Yolink one, it shows it as online. The state of the device should be consistent in both integrations - either it should be online in both, or it should be offline in both. The discrepancy is my main reason for posting this thread. In this case, the device should show as offline in the Matter integration, not online, as it still does even one month later.

  2. The YS1606-UC motion sensor.
    This one was indeed dropped. The batteries were expelled at the time of the drop, which should have caused the device to go offline in HA, regardless of whether the device was damaged during the drop.
    I reached out to Yolink about this, and they responded with the following

Your question about how long it takes for YoLink to mark a sensor as offline relates to YoLink’s use of LoRaWAN Class A technology:
Under normal conditions, YoLink sensors send a "check-in" signal to the YoLink Hub every 4 hours.
The Hub will only mark a sensor as offline if it fails to receive this check-in signal 3 consecutive times.
This means the earliest a sensor will show as offline in the YoLink App and cloud integration is at least 9 hours (4 hours × 3 missed check-ins, accounting for signal transmission intervals).
For your 7804 motion sensor (powered off around 3pm), it will take until around midnight (or later, depending on its last check-in time) to be marked as offline—this aligns with the LoRaWAN Class A check-in mechanism.

Indeed, I observed that this dropped door sensor was marked offline in the HA Yolink cloud integration around 1am, about 9 hours after it was dropped, and the batteries were ejected.

However, it remained online in the HA Matter integration. That is again a discrepancy between the HA Yolink cloud and HA Matter integrations.

The Yolink device never goes offline in the HA Matter integration, even with batteries removed.