mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-20 07:16:03 +00:00
98_livetracking: fixed initial Life360 data availability
git-svn-id: https://svn.fhem.de/fhem/trunk@18315 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
04455e653d
commit
ea9c409726
@ -1,5 +1,6 @@
|
|||||||
# Add changes at the top of the list. Keep it in ASCII, and 80-char wide.
|
# Add changes at the top of the list. Keep it in ASCII, and 80-char wide.
|
||||||
# Do not insert empty lines here, update check depends on it.
|
# Do not insert empty lines here, update check depends on it.
|
||||||
|
- bugfix: 98_livetracking: fixed initial Life360 data availability
|
||||||
- feature: 73_PRESENCE: new set command active/inactive to temporarily
|
- feature: 73_PRESENCE: new set command active/inactive to temporarily
|
||||||
disable presence checks
|
disable presence checks
|
||||||
- bugfix: DarkSkyAPI: fix reading values, add API Version
|
- bugfix: DarkSkyAPI: fix reading values, add API Version
|
||||||
|
@ -605,7 +605,7 @@ sub livetracking_ParseLife360($$) {
|
|||||||
|
|
||||||
my $updated = 0;
|
my $updated = 0;
|
||||||
|
|
||||||
my $lastreading = ReadingsVal($name,".lastLife360",time()-300);
|
my $lastreading = ReadingsVal($name,".lastLife360",time()-24*60*60);
|
||||||
|
|
||||||
Log3 ($name, 5, "$name Life360 data: /n".Dumper($json));
|
Log3 ($name, 5, "$name Life360 data: /n".Dumper($json));
|
||||||
|
|
||||||
@ -651,11 +651,11 @@ sub livetracking_ParseLife360($$) {
|
|||||||
|
|
||||||
if(defined($dataset->{speed}) and $dataset->{speed} >= 0 and $accurate)
|
if(defined($dataset->{speed}) and $dataset->{speed} >= 0 and $accurate)
|
||||||
{
|
{
|
||||||
readingsBulkUpdate($hash, "velocity", $dataset->{speed});
|
readingsBulkUpdate($hash, "velocity", int($dataset->{speed}));
|
||||||
$hash->{CHANGETIME}[$changeindex++] = FmtDateTime($dataset->{endTimestamp});
|
$hash->{CHANGETIME}[$changeindex++] = FmtDateTime($dataset->{endTimestamp});
|
||||||
}
|
}
|
||||||
|
|
||||||
readingsBulkUpdate($hash, "accuracy", $dataset->{accuracy});
|
readingsBulkUpdate($hash, "accuracy", int($dataset->{accuracy}));
|
||||||
$hash->{CHANGETIME}[$changeindex++] = FmtDateTime($dataset->{endTimestamp});
|
$hash->{CHANGETIME}[$changeindex++] = FmtDateTime($dataset->{endTimestamp});
|
||||||
|
|
||||||
|
|
||||||
@ -993,12 +993,12 @@ sub livetracking_ParseOwnTracks
|
|||||||
}
|
}
|
||||||
if(defined($dataset->{acc}) and $dataset->{acc} > 0)# and $accurate)
|
if(defined($dataset->{acc}) and $dataset->{acc} > 0)# and $accurate)
|
||||||
{
|
{
|
||||||
readingsBulkUpdate($hash, "accuracy", $dataset->{acc});
|
readingsBulkUpdate($hash, "accuracy", int($dataset->{acc}));
|
||||||
$hash->{CHANGETIME}[$changeindex++] = FmtDateTime($dataset->{tst});
|
$hash->{CHANGETIME}[$changeindex++] = FmtDateTime($dataset->{tst});
|
||||||
}
|
}
|
||||||
if(defined($dataset->{vel}) and $dataset->{vel} >= 0 and $accurate)
|
if(defined($dataset->{vel}) and $dataset->{vel} >= 0 and $accurate)
|
||||||
{
|
{
|
||||||
readingsBulkUpdate($hash, "velocity", $dataset->{vel});
|
readingsBulkUpdate($hash, "velocity", int($dataset->{vel}));
|
||||||
$hash->{CHANGETIME}[$changeindex++] = FmtDateTime($dataset->{tst});
|
$hash->{CHANGETIME}[$changeindex++] = FmtDateTime($dataset->{tst});
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
@ -1009,7 +1009,7 @@ sub livetracking_ParseOwnTracks
|
|||||||
#}
|
#}
|
||||||
if(defined($dataset->{cog}) and $dataset->{cog} >= 0 and $accurate)
|
if(defined($dataset->{cog}) and $dataset->{cog} >= 0 and $accurate)
|
||||||
{
|
{
|
||||||
readingsBulkUpdate($hash, "heading", $dataset->{cog});
|
readingsBulkUpdate($hash, "heading", int($dataset->{cog}));
|
||||||
$hash->{CHANGETIME}[$changeindex++] = FmtDateTime($dataset->{tst});
|
$hash->{CHANGETIME}[$changeindex++] = FmtDateTime($dataset->{tst});
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
@ -1588,12 +1588,12 @@ sub livetracking_Webcall() {
|
|||||||
|
|
||||||
if($accurate && defined($speed) && $speed >= 0)
|
if($accurate && defined($speed) && $speed >= 0)
|
||||||
{
|
{
|
||||||
readingsBulkUpdate($hash, "velocity", $speed);
|
readingsBulkUpdate($hash, "velocity", int($speed));
|
||||||
$hash->{CHANGETIME}[$changeindex++] = FmtDateTime($tst);
|
$hash->{CHANGETIME}[$changeindex++] = FmtDateTime($tst);
|
||||||
}
|
}
|
||||||
if($accurate && defined($bearing) && $bearing >= 0)
|
if($accurate && defined($bearing) && $bearing >= 0)
|
||||||
{
|
{
|
||||||
readingsBulkUpdate($hash, "heading", $bearing);
|
readingsBulkUpdate($hash, "heading", int($bearing));
|
||||||
$hash->{CHANGETIME}[$changeindex++] = FmtDateTime($tst);
|
$hash->{CHANGETIME}[$changeindex++] = FmtDateTime($tst);
|
||||||
}
|
}
|
||||||
if($accurate && defined($altitude) and $altitude != 0)
|
if($accurate && defined($altitude) and $altitude != 0)
|
||||||
@ -1605,7 +1605,7 @@ sub livetracking_Webcall() {
|
|||||||
}
|
}
|
||||||
if(defined($hdop) && $hdop > 0)
|
if(defined($hdop) && $hdop > 0)
|
||||||
{
|
{
|
||||||
readingsBulkUpdate($hash, "accuracy", $hdop);
|
readingsBulkUpdate($hash, "accuracy", int($hdop));
|
||||||
$hash->{CHANGETIME}[$changeindex++] = FmtDateTime($tst);
|
$hash->{CHANGETIME}[$changeindex++] = FmtDateTime($tst);
|
||||||
}
|
}
|
||||||
if(defined($battery))
|
if(defined($battery))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user