Does another packet include beacon info? If not, then it seems like expected behavior.
The Teltonika device sends different packets for I/O stuff and Beacon info. I have also enabled copy attributes to save the driverId between the different packets, but when I get a Beacon info packet, the copy attributes configuration will overwrite the driverId from the last state, even if there are no current Beacons being detected. Thanks!
That still sounds like it's working as expected.
But is there any way of removing the driverUniqueId value, if I detect that there aren't any Beacons around? Because I wanted that key from packet to packet until the packet doesn't detect a Beacon.
I don't think it's possible currently.
Sorry for insisting, but would there be any other way to keep the driverId without using the copy attributes configuration, or otherwise remove the driverId even with copy attributes? Thanks!
My current solution is to remove the attribute of driverUniqueId when I can't detect the Beacons, but I would need the copy attributes configuration to see that driverUniqueId is null and remove not set any driver.
This is the code I added for that:
public void unset(String key) {
attributes.remove(key);
}
Then I will do the following when I dont detect the beacon:
position.unset(Position.KEY_DRIVER_UNIQUE_ID);
A while ago I created a topic while trying to find a way to associate an EYE Beacon with different drivers of a device. I was successful in that, but now I have the following problem: When I receive the the data packet with beacon info, I parse it and associate the closest beacon to the driver id with:
And it will work and make my device associate the correct driver in the driverUniqueId field , until I get another data packet with the I/O info, and then the driverUniqueId will not appear anymore.
Does anyone know what might be the cause? Thanks!