mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-10 03:06:37 +00:00
32_withings: handle duplicate pwv values
git-svn-id: https://svn.fhem.de/fhem/trunk@19756 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
32f069cbfe
commit
19a40f21b5
@ -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: 32_withings: handle duplicate pwv values
|
||||||
- change: 49_SSCam: increase get SID timeout to at least 60 s to avoid
|
- change: 49_SSCam: increase get SID timeout to at least 60 s to avoid
|
||||||
potential auth.cgi problem, set compatibility to SVS
|
potential auth.cgi problem, set compatibility to SVS
|
||||||
version 8.2.4, improve disable/enable behavior
|
version 8.2.4, improve disable/enable behavior
|
||||||
|
@ -1220,7 +1220,7 @@ sub withings_getDeviceDetail($) {
|
|||||||
Log3 $name, 2, "$name: json evaluation error on getDeviceDetail ".$@;
|
Log3 $name, 2, "$name: json evaluation error on getDeviceDetail ".$@;
|
||||||
return undef;
|
return undef;
|
||||||
}
|
}
|
||||||
Log3 $name, 1, "withings: getDeviceDetail json error ".$json->{error} if(defined($json->{error}));
|
Log3 $name, 1, "$name: getDeviceDetail json error ".$json->{error} if(defined($json->{error}));
|
||||||
|
|
||||||
if($json)
|
if($json)
|
||||||
{
|
{
|
||||||
@ -1946,6 +1946,9 @@ sub withings_parseMeasureGroups($$) {
|
|||||||
next;
|
next;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#fix for duplicate pulseWave value
|
||||||
|
$reading = "pulseWaveRaw" if($measure->{type} == 91 && $measuregrp->{attrib} == 0);
|
||||||
|
|
||||||
my $value = $measure->{value} * 10 ** $measure->{unit};
|
my $value = $measure->{value} * 10 ** $measure->{unit};
|
||||||
|
|
||||||
readingsBeginUpdate($hash);
|
readingsBeginUpdate($hash);
|
||||||
@ -3675,7 +3678,7 @@ sub withings_AuthApp($;$) {
|
|||||||
$userhash->{helper}{OAuthValid} = (int(time)+$json->{expires_in}) if(defined($json->{expires_in}));
|
$userhash->{helper}{OAuthValid} = (int(time)+$json->{expires_in}) if(defined($json->{expires_in}));
|
||||||
readingsSingleUpdate( $userhash, ".refresh_token", $json->{refresh_token}, 1 ) if(defined($json->{refresh_token}));
|
readingsSingleUpdate( $userhash, ".refresh_token", $json->{refresh_token}, 1 ) if(defined($json->{refresh_token}));
|
||||||
|
|
||||||
InternalTimer(gettimeofday()+$json->{expires_in}, "withings_AuthRefresh", $userhash, 0);
|
InternalTimer(gettimeofday()+$json->{expires_in}-60, "withings_AuthRefresh", $userhash, 0);
|
||||||
|
|
||||||
|
|
||||||
#https://wbsapi.withings.net/notify?action=subscribe&access_token=a639e912dfc31a02cc01ea4f38de7fa4a1464c2e&callbackurl=http://fhem:remote@gu9mohkaxqdgpix5.myfritz.net/fhem/withings&appli=1&comment=fhem
|
#https://wbsapi.withings.net/notify?action=subscribe&access_token=a639e912dfc31a02cc01ea4f38de7fa4a1464c2e&callbackurl=http://fhem:remote@gu9mohkaxqdgpix5.myfritz.net/fhem/withings&appli=1&comment=fhem
|
||||||
@ -3728,7 +3731,7 @@ sub withings_AuthRefresh($) {
|
|||||||
$hash->{helper}{OAuthValid} = (int(time)+$json->{expires_in}) if(defined($json->{expires_in}));
|
$hash->{helper}{OAuthValid} = (int(time)+$json->{expires_in}) if(defined($json->{expires_in}));
|
||||||
readingsSingleUpdate( $hash, ".refresh_token", $json->{refresh_token}, 1 ) if(defined($json->{refresh_token}));
|
readingsSingleUpdate( $hash, ".refresh_token", $json->{refresh_token}, 1 ) if(defined($json->{refresh_token}));
|
||||||
|
|
||||||
InternalTimer(gettimeofday()+$json->{expires_in}, "withings_AuthRefresh", $hash, 0);
|
InternalTimer(gettimeofday()+$json->{expires_in}-60, "withings_AuthRefresh", $hash, 0);
|
||||||
|
|
||||||
#https://wbsapi.withings.net/notify?action=subscribe&access_token=a639e912dfc31a02cc01ea4f38de7fa4a1464c2e&callbackurl=http://fhem:remote@gu9mohkaxqdgpix5.myfritz.net/fhem/withings&appli=1&comment=fhem
|
#https://wbsapi.withings.net/notify?action=subscribe&access_token=a639e912dfc31a02cc01ea4f38de7fa4a1464c2e&callbackurl=http://fhem:remote@gu9mohkaxqdgpix5.myfritz.net/fhem/withings&appli=1&comment=fhem
|
||||||
|
|
||||||
@ -3909,6 +3912,11 @@ sub withings_DbLog_splitFn($) {
|
|||||||
$reading = 'heartPulse';
|
$reading = 'heartPulse';
|
||||||
$unit = 'bpm';
|
$unit = 'bpm';
|
||||||
}
|
}
|
||||||
|
elsif($event =~ m/pulseWaveRaw/)
|
||||||
|
{
|
||||||
|
$reading = 'pulseWaveRaw';
|
||||||
|
$unit = 'm/s';
|
||||||
|
}
|
||||||
elsif($event =~ m/pulseWave/)
|
elsif($event =~ m/pulseWave/)
|
||||||
{
|
{
|
||||||
$reading = 'pulseWave';
|
$reading = 'pulseWave';
|
||||||
|
@ -6599,7 +6599,7 @@ sub netatmo_weatherIcon()
|
|||||||
<li><a name="videoquality">videoquality</a><br>
|
<li><a name="videoquality">videoquality</a><br>
|
||||||
video quality for playlists (HOME - default: medium)</li>
|
video quality for playlists (HOME - default: medium)</li>
|
||||||
<li><a name="webhookURL">webhookURL</a><br>
|
<li><a name="webhookURL">webhookURL</a><br>
|
||||||
webhook URL - can include basic auth and ports: http://user:pass@your.url:8080/fhem/netatmo (WEBHOOK)</li>
|
webhook URL - can include basic auth and port (80 or 443 only!): http://user:pass@your.url:80/fhem/netatmo (WEBHOOK)</li>
|
||||||
<li><a name="webhookPoll">webhookPoll</a><br>
|
<li><a name="webhookPoll">webhookPoll</a><br>
|
||||||
poll home after event from webhook (WEBHOOK - default: 0)</li>
|
poll home after event from webhook (WEBHOOK - default: 0)</li>
|
||||||
<li><a name="ignored_device_ids">ignored_device_ids</a><br>
|
<li><a name="ignored_device_ids">ignored_device_ids</a><br>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user