It is interesting. Are you able to turn the car on and off and see the power source change, right now?
For the next few days. Is it possible to remove the cable and plug the sensor to usb port directly? Lets run it for a few days. Lets see if we are observing this issue without a cable.
OK, yes, I will go test now to confirm powerSource is changing as it was the last time I checked - then it was instant.
I will also plug it directly into the USB port. At least I think I will...there is a sort of drawer thingy that sits above the area where the sensor is in the compartment. I think it will still fit - I'll work something out.
I removed the extension cable and have the sensor plugged directly into the USB port. I just tested in the car and the power change reporting is virtually instantaneous...the moment I press the button to start or turn off the car the powerSource changes from dc to battery, and back. Really impressive how quickly it updates. Frankly it was just like this a week ago when I switched to the second USB extension cable, but definitely possible these cables I ordered are just not 100% up to snuff.
I'll leave it this way for a while. I'm also thinking the issue could be the USB car charger adapter...I think I have another I can try in the car if removing the cable doesn't resolve things.
@iharyadi - Looks like this is an issue on my end...both devices are having repeating lost parent issues since around 4 or 5 pm today. Really odd..something seems to be messed up w/my Zigbee mesh. I have a SonOff USB Dongle inside the garage, as well as a Tuya repeater, so the sensors should have enough options to connect properly. I'm going to shut down the hub they are on and leave it off long enough to kick off Zigbee panic mode, and see if that helps settle things down.
Update: @iharyadi - I've moved both sensors to my other hub which is on a different Zigbee channel (20). The sensors have been stable since this afternoon when I moved them to the other hub.
My other hub is on Zigbee channel 15 (moved to that channel recently when I had problems pairing a SonOff USB Dongle to the hub). Seems like there is some interference/problems on that channel - today I found another Zigbee device (E Wand) had became unresponsive and had to be reset and re-paired to that hub. I'm going to change the second hub back to its original channel where I never had any problems.
Thanks for your patience, looks like this was a combination of a hub and PEBKAC issue, nothing to do w/your sensors.
@iharyadi has made a really nice zigbee arrival sensor with a battery backup. It is suited for use in a vehicle. The opening post of this thread has all the necessary details.
While the sensor hasn't paired completely (incomplete attributes), it will not show "not present" immediately. Rather, it will only happen at the end of the "presence timeout".
Is there a way to reduce the ZigBee radio sensitivity? I want to use this sensor as an 'EV in-garage' boolean but it's being detected as present as soon as I pull into the driveway.
Also, I installed the sensor into the OTS aluminum case but the included end caps don't have cutouts for the antenna or USB connector so...thoughts?
You could try a smaller antenna, and even I guess, experiment with putting a little tin foil around the sensor so it has a harder time rejoining your mesh when you get home.
You could also add a requirement for x number of minutes showing present to maybe confirm it's actually in the garage and not just in the driveway pulling up.
The other angle I can think of is somehow integrating the fact that your garage door has both opened and closed after presence has been detected. I'm assuming you have an open garage door command linked to your sensor becoming present.
Just FYI, on my 3D printed model, there is a pair endcaps that you can print to replace the aluminum caps. Otherwise, you have to cut the aluminimum.
You can play around with the antenna per @danabw. There are smaller antenna with smaller gain in Amazon that you can get. Just make sure that they are a 2.4GHZ RP-SMA antenna. They are typically an 50 ohm antenna (just double check the spec page). In Amazon, I saw small antenna as low as 3dbi.
Another idea is if you use automation for the presence detection is to use a delay. This is not necessarily what you are looking for. However, just as an example, I use the presence to open my garage door. I also can control when my garage door open based on a delay after the sensor is present.