NAME
Weenect::Tracker - Tracker data
SYNOPSIS
use Weenect::API;
my $api = Weenect::API->new;
# Connect to the server
$api->login( "me@example.com", "password" );
# Get the trackers.
my $trackers = $api->get_trackers;
# Process tracker data.
foreach my $tracker ( $trackers->items->@* ) {
printf("Tracker %s [%d%s]\n", $tracker->name, $tracker->id,
$tracker->active ? "" : ",inactive" );
}
METHODS
The Weenect::Tracker class supports the following methods:
get_zones
Returns a Weenect::Zones object, that has a list of zones (geofence areas) in the form of Weenect::Zone objects.
Use the items method to get at the list.
get_zone( $zid )
Returns a Weenect::Zone object representing a zone (geofence area).
remove_zone( $zid )
Removes a zone (geofence areas).
get_wifizones
Returns a Weenect::WiFiZones object that has a list of WiFi zones (powersave areas) in the form of Weenect::WiFiZone objects.
Use its item method to get at the list.
get_wifizone( $zid )
Returns a Weenect::WiFiZone object representing a WiFi zone (powersave area).
get_history( $start, $end )
Returns a list of positions as tracked between $start and $end.
$start and $end are UTC timestamps in ISO8601 format, e.g. 2021-07-17T13:57:43.773Z
Positions are in the form of Weenect::Position objects.
has_feature( $feat )
Checks if the tracker has a certain feature.
Common features include:
activity_tracking
has_flash
has_wifi
limited_buttons
ringing
super_tracking
vibrate
flash
Initiates the flash light of the tracker.
Default is 100ms on, 100ms off, for 5 minutes.
ring
Initiates the ringer of the tracker.
vibrate
Initiates the buzzer of the tracker.
position_refresh
Force position update of the tracker.
super_live
Initiates super live tracking (1 second interval reporting) for 5 minutes.
Additional subscription fees are required for longer periods of super live tracking.
set_mode
Sets the mode (update interval).
Valid values are '30S', '1M', '2M', '3M', '5M' and 'OFF'.
Additional subscription fees are required for '10s' interval.