HUE: added Meta support

git-svn-id: https://svn.fhem.de/fhem/trunk@19091 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
justme-1968 2019-04-02 07:33:20 +00:00
parent 66936e2cb0
commit c36da0646d
2 changed files with 116 additions and 10 deletions

View File

@ -9,6 +9,9 @@ package main;
use strict;
use warnings;
use FHEM::Meta;
use POSIX;
use JSON;
use Data::Dumper;
@ -36,6 +39,8 @@ sub HUEBridge_Initialize($)
$hash->{AttrList} = "key disable:1 disabledForIntervals createGroupReadings:1,0 httpUtils:1,0 noshutdown:1,0 pollDevices:1,2,0 queryAfterSet:1,0 $readingFnAttributes";
#$hash->{isDiscoverable} = { ssdp => {'hue-bridgeid' => '/.*/'}, upnp => {} };
return FHEM::Meta::InitMod( __FILE__, $hash );
}
sub
@ -212,6 +217,8 @@ HUEBridge_Define($$)
my @args = split("[ \t]+", $def);
return $@ unless ( FHEM::Meta::SetInternals($hash) );
return "Usage: define <name> HUEBridge [<host>] [interval]" if(@args < 2);
my ($name, $type, $host, $interval) = @args;
@ -2036,4 +2043,49 @@ HUEBridge_Attr($$$)
</ul><br>
=end html
=for :application/json;q=META.json 30_HUEBridge.pm
{
"abstract": "module for the phillips hue bridge",
"x_lang": {
"de": {
"abstract": "Modul für die Philips HUE Bridge"
}
},
"resources": {
"x_wiki": {
"web": "https://wiki.fhem.de/wiki/Hue"
}
},
"keywords": [
"fhem-mod",
"fhem-mod-device",
"HUE"
],
"release_status": "stable",
"x_fhem_maintainer": [
"justme1968"
],
"x_fhem_maintainer_github": [
"justme-1968"
],
"prereqs": {
"runtime": {
"requires": {
"FHEM": 5.00918799,
"perl": 5.014,
"Meta": 0,
"JSON": 0,
"Data::Dumper": 0,
"IO::Socket::INET": 0
},
"recommends": {
},
"suggests": {
"HUEDevice": 0
}
}
}
}
=end :application/json;q=META.json
=cut

View File

@ -10,6 +10,8 @@ package main;
use strict;
use warnings;
use FHEM::Meta;
use Color;
use POSIX;
@ -185,6 +187,8 @@ sub HUEDevice_Initialize($)
eval "use Data::Dumper";
$HUEDevice_hasDataDumper = 0 if($@);
return FHEM::Meta::InitMod( __FILE__, $hash );
}
sub
@ -262,6 +266,8 @@ sub HUEDevice_Define($$)
my @args = split("[ \t]+", $def);
return $@ unless ( FHEM::Meta::SetInternals($hash) );
$hash->{helper}->{devtype} = "";
if( $args[2] eq "group" ) {
$hash->{helper}->{devtype} = "G";
@ -1552,8 +1558,8 @@ HUEDevice_Attr($$$;$)
=pod
=item cloudfree
=item openapi
=item summary devices connected to a phillips hue bridge or a osram lightify gateway
=item summary_DE Geräte an einer Philips HUE Bridge oder einem Osram LIGHTIFY Gateway
=item summary Devices connected to a Phillips HUE bridge, an LIGHTIFY or TRADFRI gateway
=item summary_DE Ger&auml;te an einer Philips HUE Bridge, einem LIGHTIFY oder Tradfri Gateway
=begin html
<a name="HUEDevice"></a>
@ -1725,4 +1731,52 @@ absent:{&lt;json&gt;}</code></li>
</ul><br>
=end html
=for :application/json;q=META.json 31_HUEDevice.pm
{
"abstract": "devices connected to a Phillips HUE bridge, an Osram LIGHTIFY gateway or a IKEA TRADFRI gateway",
"x_lang": {
"de": {
"abstract": "Geräte an einer Philips HUE Bridge, einem Osram LIGHTIFY Gateway oder einem IKEA Tradfri Gateway"
}
},
"resources": {
"x_wiki": {
"web": "https://wiki.fhem.de/wiki/Hue"
}
},
"keywords": [
"fhem-mod",
"fhem-mod-device",
"HUE"
],
"release_status": "stable",
"x_fhem_maintainer": [
"justme1968"
],
"x_fhem_maintainer_github": [
"justme-1968"
],
"prereqs": {
"runtime": {
"requires": {
"FHEM": 5.00918799,
"perl": 5.014,
"Meta": 0,
"Color": 0,
"SetExtensions": 0,
"JSON": 0,
"Time::Local": 0
},
"recommends": {
},
"suggests": {
"HUEBridge": 0,
"tradfri": 0,
"LIGHTIFY": 0
}
}
}
}
=end :application/json;q=META.json
=cut