libetrv icon indicating copy to clipboard operation
libetrv copied to clipboard

libetrv scan finds only 1 / 4 trvs - software tweaks?

Open neuronflow opened this issue 3 years ago • 2 comments

libetrv scan finds only 1 out of my 4 trvs with the scan method. I increased the scan timeout but it did not help. I run it on a raspi4 8gb. If I put my phone (pixel5) right where the pi is located it finds all four, while occasionally complaining about signal quality for the one that is furthest (around 8m with walls in between).

I am aware that this question has a gigantic hardware component, however are there any software tweaks, like increasing timeouts, I could or should try?

If not can you recommend a bluetooth module for the pi4 which harmonizes with this lib?

neuronflow avatar Jan 24 '21 01:01 neuronflow

Maybe this is connected to PR #25. Now it scans for 1 second for x times. Probably this time is not enough for eTRV to respond. Also when I was using the original application sometimes I also have problems with finding all eTRVs.

You can try installing the library in the edit mode and then change the timeout time. If this helps I will prepare a fix that will revert the old way of finding eTRVs. You should focus on this line: https://github.com/AdamStrojek/libetrv/blob/master/libetrv/device.py#L41

AdamStrojek avatar Jan 24 '21 14:01 AdamStrojek

I doubled timeout and it seems to detect all four devices now:

Detected eTRV devices:
00:04:2f:34:74:eb, RSSI=-71dB, key=-
00:04:2f:34:55:90, RSSI=-93dB, key=-
00:04:2f:cc:e8:87, RSSI=-94dB, key=-
00:04:2f:79:44:cf, RSSI=-67dB, key=-

so I created the PR.

Interestingly I had a 3.5" HDD connected to my PI. Now after disconnecting it it can also find the devices with timeout 1. But it seems more robust with 2.

neuronflow avatar Jan 24 '21 21:01 neuronflow