mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-10 09:16:53 +00:00
Revert "ENIGMA2: set noshutdown=0 on Fritzbox devices and add attribut http-noshutdown"
This reverts commit f98a0022c7fb9385d7eef5551011450dafb47166. git-svn-id: https://svn.fhem.de/fhem/trunk@5132 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
058e14f2b1
commit
1c1ce28956
@ -1,8 +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.
|
||||||
- SVN
|
- SVN
|
||||||
- bugfix: ENIGMA2: set noshutdown=0 on Fritzbox devices and add attribut
|
|
||||||
http-noshutdown for control
|
|
||||||
- feature: JSONMETER: added statistic functions
|
- feature: JSONMETER: added statistic functions
|
||||||
- feature: LightScene: added scene editor from UliM
|
- feature: LightScene: added scene editor from UliM
|
||||||
- feature: SYSMON: New method: SYSMON_ShowValuesText
|
- feature: SYSMON: New method: SYSMON_ShowValuesText
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
# along with fhem. If not, see <http://www.gnu.org/licenses/>.
|
# along with fhem. If not, see <http://www.gnu.org/licenses/>.
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
# Version: 1.3.3
|
# Version: 1.3.2
|
||||||
#
|
#
|
||||||
# Major Version History:
|
# Major Version History:
|
||||||
# - 1.3.0 - 2013-12-21
|
# - 1.3.0 - 2013-12-21
|
||||||
@ -78,7 +78,7 @@ sub ENIGMA2_Initialize($) {
|
|||||||
$hash->{UndefFn} = "ENIGMA2_Undefine";
|
$hash->{UndefFn} = "ENIGMA2_Undefine";
|
||||||
|
|
||||||
$hash->{AttrList} =
|
$hash->{AttrList} =
|
||||||
"https:0,1 http-method:GET,POST http-noshutdown:1,0 disable:0,1 bouquet-tv bouquet-radio timeout "
|
"https:0,1 http-method:GET,POST disable:0,1 bouquet-tv bouquet-radio timeout "
|
||||||
. $readingFnAttributes;
|
. $readingFnAttributes;
|
||||||
|
|
||||||
$data{RC_layout}{ENIGMA2_DreamMultimedia_DM500_DM800_SVG} =
|
$data{RC_layout}{ENIGMA2_DreamMultimedia_DM500_DM800_SVG} =
|
||||||
@ -769,14 +769,11 @@ sub ENIGMA2_Define($$) {
|
|||||||
{
|
{
|
||||||
$attr{$name}{"http-method"} = 'POST';
|
$attr{$name}{"http-method"} = 'POST';
|
||||||
}
|
}
|
||||||
}
|
|
||||||
unless ( defined( AttrVal( $name, "http-noshutdown", undef ) ) ) {
|
|
||||||
|
|
||||||
# do shutdown in case this is a FritzBox
|
# default method is GET and should be compatible to most
|
||||||
if ( exists $ENV{CONFIG_PRODUKT_NAME}
|
# ENIGMA2 Webif versions
|
||||||
&& defined $ENV{CONFIG_PRODUKT_NAME} )
|
else {
|
||||||
{
|
$attr{$name}{"http-method"} = 'GET';
|
||||||
$attr{$name}{"http-noshutdown"} = '0';
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
unless ( defined( AttrVal( $name, "webCmd", undef ) ) ) {
|
unless ( defined( AttrVal( $name, "webCmd", undef ) ) ) {
|
||||||
@ -809,8 +806,7 @@ sub ENIGMA2_SendCommand($$;$$) {
|
|||||||
my $name = $hash->{NAME};
|
my $name = $hash->{NAME};
|
||||||
my $address = $hash->{helper}{ADDRESS};
|
my $address = $hash->{helper}{ADDRESS};
|
||||||
my $port = $hash->{helper}{PORT};
|
my $port = $hash->{helper}{PORT};
|
||||||
my $http_method =
|
my $http_method = $attr{$name}{"http-method"};
|
||||||
( $attr{$name}{"http-method"} ) ? $attr{$name}{"http-method"} : "GET";
|
|
||||||
my $timeout;
|
my $timeout;
|
||||||
$cmd = ( defined($cmd) ) ? $cmd : "";
|
$cmd = ( defined($cmd) ) ? $cmd : "";
|
||||||
|
|
||||||
@ -875,23 +871,20 @@ sub ENIGMA2_SendCommand($$;$$) {
|
|||||||
$timeout = $attr{$name}{timeout};
|
$timeout = $attr{$name}{timeout};
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$timeout = 3;
|
$timeout = 6;
|
||||||
}
|
}
|
||||||
|
|
||||||
my $noshutdown =
|
|
||||||
( $attr{$name}{"http-noshutdown"} )
|
|
||||||
? $attr{$name}{"http-noshutdown"}
|
|
||||||
: 1;
|
|
||||||
|
|
||||||
# send request via HTTP-GET method
|
# send request via HTTP-GET method
|
||||||
if ( $http_method eq "GET" || $http_method eq "" || $cmd eq "" ) {
|
if ( $http_method eq "GET" || $http_method eq "" || $cmd eq "" ) {
|
||||||
Log3 $name, 5, "ENIGMA2 $name: GET " . urlDecode($URL);
|
Log3 $name, 5, "ENIGMA2 $name: GET " . urlDecode($URL);
|
||||||
|
|
||||||
|
# $response = GetFileFromURL( $URL, $timeout, undef, 0, 5 );
|
||||||
|
|
||||||
HttpUtils_NonblockingGet(
|
HttpUtils_NonblockingGet(
|
||||||
{
|
{
|
||||||
url => $URL,
|
url => $URL,
|
||||||
timeout => $timeout,
|
timeout => $timeout,
|
||||||
noshutdown => $noshutdown,
|
noshutdown => 1,
|
||||||
data => undef,
|
data => undef,
|
||||||
hash => $hash,
|
hash => $hash,
|
||||||
service => $service,
|
service => $service,
|
||||||
@ -911,11 +904,13 @@ sub ENIGMA2_SendCommand($$;$$) {
|
|||||||
. " (POST DATA: "
|
. " (POST DATA: "
|
||||||
. urlDecode($cmd) . ")";
|
. urlDecode($cmd) . ")";
|
||||||
|
|
||||||
|
# $response = GetFileFromURL( $URL, $timeout, $cmd, 0, 5 );
|
||||||
|
|
||||||
HttpUtils_NonblockingGet(
|
HttpUtils_NonblockingGet(
|
||||||
{
|
{
|
||||||
url => $URL,
|
url => $URL,
|
||||||
timeout => $timeout,
|
timeout => $timeout,
|
||||||
noshutdown => $noshutdown,
|
noshutdown => 1,
|
||||||
data => $cmd,
|
data => $cmd,
|
||||||
hash => $hash,
|
hash => $hash,
|
||||||
service => $service,
|
service => $service,
|
||||||
@ -2758,9 +2753,6 @@ sub ENIGMA2_GetRemotecontrolCommand($) {
|
|||||||
<li>
|
<li>
|
||||||
<b>http-method</b> - HTTP access method to be used; e.g. a FritzBox might need to use POST instead of GET (GET/POST)
|
<b>http-method</b> - HTTP access method to be used; e.g. a FritzBox might need to use POST instead of GET (GET/POST)
|
||||||
</li>
|
</li>
|
||||||
<li>
|
|
||||||
<b>http-noshutdown</b> - Explicitly shutdown HTTP connections or not; e.g. a FritzBox might this to be 0 (default=1)
|
|
||||||
</li>
|
|
||||||
<li>
|
<li>
|
||||||
<b>https</b> - Access box via secure HTTP (true/false)
|
<b>https</b> - Access box via secure HTTP (true/false)
|
||||||
</li>
|
</li>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user