mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-10 09:16:53 +00:00
74_Unifi: fixed locate/restartAP and disconnectClient for UC-V5.10
git-svn-id: https://svn.fhem.de/fhem/trunk@19057 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
6e011976b6
commit
f155b5682a
@ -54,9 +54,11 @@
|
|||||||
# - feature: 74_Unifi: new cattribute customClientNames
|
# - feature: 74_Unifi: new cattribute customClientNames
|
||||||
# V 3.2.5
|
# V 3.2.5
|
||||||
# - fixed: 74_Unifi: fixed createVoucher and (un-)blockClient for UC-V5.10
|
# - fixed: 74_Unifi: fixed createVoucher and (un-)blockClient for UC-V5.10
|
||||||
|
# V 3.2.6
|
||||||
|
# - fixed: 74_Unifi: fixed locate/restartAP and disconnectClient for UC-V5.10
|
||||||
|
|
||||||
package main;
|
package main;
|
||||||
my $version="3.2.5";
|
my $version="3.2.6";
|
||||||
# Default für clientRedings setzen. Die Readings waren der Standard vor Einführung des Attributes customClientReadings.
|
# Default für clientRedings setzen. Die Readings waren der Standard vor Einführung des Attributes customClientReadings.
|
||||||
# Eine Änderung hat Auswirkungen auf (alte) Moduldefinitionen ohne dieses Attribut.
|
# Eine Änderung hat Auswirkungen auf (alte) Moduldefinitionen ohne dieses Attribut.
|
||||||
my $defaultClientReadings=".:^accesspoint|^essid|^hostname|^last_seen|^snr|^uptime"; #ist wegen snr vs rssi nur halb korrekt, wird aber auch nicht wirklich verwendet ;-)
|
my $defaultClientReadings=".:^accesspoint|^essid|^hostname|^last_seen|^snr|^uptime"; #ist wegen snr vs rssi nur halb korrekt, wird aber auch nicht wirklich verwendet ;-)
|
||||||
@ -1091,7 +1093,7 @@ sub Unifi_GetUnarchivedAlerts_Send($) {
|
|||||||
%{$hash->{httpParams}},
|
%{$hash->{httpParams}},
|
||||||
url => $hash->{unifi}->{url}."list/alarm",
|
url => $hash->{unifi}->{url}."list/alarm",
|
||||||
callback => $hash->{updateDispatch}->{$self}[2],
|
callback => $hash->{updateDispatch}->{$self}[2],
|
||||||
data => "{'_sort': '-time', 'archived': false}",
|
data => "{\"_sort\":\"-time\", \"archived\":false}",
|
||||||
} );
|
} );
|
||||||
return undef;
|
return undef;
|
||||||
}
|
}
|
||||||
@ -1131,7 +1133,7 @@ sub Unifi_GetEvents_Send($) {
|
|||||||
%{$hash->{httpParams}},
|
%{$hash->{httpParams}},
|
||||||
url => $hash->{unifi}->{url}."stat/event",
|
url => $hash->{unifi}->{url}."stat/event",
|
||||||
callback => $hash->{updateDispatch}->{$self}[2],
|
callback => $hash->{updateDispatch}->{$self}[2],
|
||||||
data => "{'_sort': '-time', 'within': ".$hash->{unifi}->{eventPeriod}."}", # last 24 hours
|
data => "{\"_sort\":\"-time\", \"within\":".$hash->{unifi}->{eventPeriod}."}", # last 24 hours
|
||||||
} );
|
} );
|
||||||
return undef;
|
return undef;
|
||||||
}
|
}
|
||||||
@ -1171,7 +1173,7 @@ sub Unifi_GetAccesspoints_Send($) {
|
|||||||
%{$hash->{httpParams}},
|
%{$hash->{httpParams}},
|
||||||
url => $hash->{unifi}->{url}."stat/device",
|
url => $hash->{unifi}->{url}."stat/device",
|
||||||
callback => $hash->{updateDispatch}->{$self}[2],
|
callback => $hash->{updateDispatch}->{$self}[2],
|
||||||
data => "{'_depth': 2, 'test': 0}",
|
data => "{\"_depth\":2, \"test\":0}",
|
||||||
} );
|
} );
|
||||||
return undef;
|
return undef;
|
||||||
}
|
}
|
||||||
@ -1501,7 +1503,7 @@ sub Unifi_DisconnectClient_Send($@) {
|
|||||||
url => $hash->{unifi}->{url}."cmd/stamgr",
|
url => $hash->{unifi}->{url}."cmd/stamgr",
|
||||||
callback => \&Unifi_DisconnectClient_Receive,
|
callback => \&Unifi_DisconnectClient_Receive,
|
||||||
clients => [@clients],
|
clients => [@clients],
|
||||||
data => "{'mac': '".$hash->{clients}->{$id}->{mac}."', 'cmd': 'kick-sta'}",
|
data => "{\"mac\":\"".$hash->{clients}->{$id}->{mac}."\", \"cmd\":\"kick-sta\"}",
|
||||||
} );
|
} );
|
||||||
|
|
||||||
return undef;
|
return undef;
|
||||||
@ -1807,7 +1809,7 @@ sub Unifi_ApCmd_Send($$@) { #cmd: 'set-locate', 'unset-locate', 'restart'
|
|||||||
callback => \&Unifi_ApCmd_Receive,
|
callback => \&Unifi_ApCmd_Receive,
|
||||||
aps => [@aps],
|
aps => [@aps],
|
||||||
cmd => $cmd,
|
cmd => $cmd,
|
||||||
data => "{'mac': '".$hash->{accespoints}->{$id}->{mac}."', 'cmd': '".$cmd."'}",
|
data => "{\"mac\":\"".$hash->{accespoints}->{$id}->{mac}."\", \"cmd\":\"".$cmd."\"}",
|
||||||
} );
|
} );
|
||||||
return undef;
|
return undef;
|
||||||
}
|
}
|
||||||
@ -1879,7 +1881,7 @@ sub Unifi_ArchiveAlerts_Send($) {
|
|||||||
%{$hash->{httpParams}},
|
%{$hash->{httpParams}},
|
||||||
url => $hash->{unifi}->{url}."cmd/evtmgr",
|
url => $hash->{unifi}->{url}."cmd/evtmgr",
|
||||||
callback => \&Unifi_Cmd_Receive,
|
callback => \&Unifi_Cmd_Receive,
|
||||||
data => "{'cmd': 'archive-all-alarms'}",
|
data => "{\"cmd\":\"archive-all-alarms\"}",
|
||||||
} );
|
} );
|
||||||
return undef;
|
return undef;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user