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.
flash_stop
{
data = {
intermittent_duration_off = 1,
intermittent_duration_on = 1
},
duration = 60,
end_at = undef,
sent_start_at = '2026-06-01T09:47:26.822271' (dualvar: 2026),
sent_stop_at = undef,
started_at = undef
}
ring
Initiates the ringer of the tracker.
ring_stop
Stops the ringer.
vibrate
Initiates the buzzer of the tracker.
vibrate_stop
Stops the buzzer.
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.
get_super_live
Gets the current super_live status.
{
active = 0,
duration = undef,
freq_mode = undef,
interval = undef,
ttl = -2
}
stop_super_live {
Stops super_live tracking.
{
data = undef,
duration = undef,
end_at = undef,
sent_start_at = undef,
sent_stop_at = undef,
started_at = undef
}
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.
detect_hotspots
Initiate WiFi hotspot detecting.
list_hotspots
List detected hotspots.
{
completed = 0 (JSON::PP::Boolean),
items = [],
total = 0
}
deep-sleep-wifi
wifizones_suggest
{
size = 0,
zone_status = 'new',
zone_wifi = []
}
remove_picture
Removes the tracker picture, if any.