mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-01-31 12:49:34 +00:00
allow more than one bridge
git-svn-id: https://svn.fhem.de/fhem/trunk@3375 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
87229473f6
commit
a80388a4e3
@ -1,5 +1,6 @@
|
||||
# Add changes at the top of the list. Keep it in ASCII
|
||||
- SVN
|
||||
- feature: HUEDevice: support more than one bridge
|
||||
- feature: updateInBackground global attribute
|
||||
- feature: SYSSTAT: allow stateFormat
|
||||
- feature: Module 70_VIERA supports now module 95_remotecontrol with own
|
||||
|
@ -473,6 +473,7 @@ HUEBridge_HTTP_Request($$$@)
|
||||
<ul>
|
||||
<li>This module needs <code>JSON</code>.<br>
|
||||
Pleease install with '<code>cpan install JSON</code>' or your method of choice.</li>
|
||||
<li>autocreate only works for the first bridge. devices on other bridges have to be manualy defined.</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
@ -152,7 +152,9 @@ sub HUEDevice_Define($$)
|
||||
$hash->{STATE} = 'Initialized';
|
||||
$hash->{fhem}{interfaces}= "dimmer";
|
||||
|
||||
$hash->{ID} = $id;
|
||||
$hash->{fhem}{id} = $id;
|
||||
|
||||
$hash->{INTERVAL} = $interval;
|
||||
|
||||
$hash->{fhem}{on} = -1;
|
||||
@ -329,7 +331,7 @@ HUEDevice_Set($@)
|
||||
|
||||
|
||||
if( scalar keys %obj ) {
|
||||
my $result = HUEDevice_ReadFromServer($hash,$hash->{fhem}{id}."/state",\%obj);
|
||||
my $result = HUEDevice_ReadFromServer($hash,$hash->{ID}."/state",\%obj);
|
||||
if( $result->{'error'} ) {
|
||||
$hash->{STATE} = $result->{'error'}->{'description'};
|
||||
return undef;
|
||||
@ -528,7 +530,7 @@ HUEDevice_GetUpdate($)
|
||||
InternalTimer(gettimeofday()+$hash->{INTERVAL}, "HUEDevice_GetUpdate", $hash, 1);
|
||||
}
|
||||
|
||||
my $result = HUEDevice_ReadFromServer($hash,$hash->{fhem}{id});
|
||||
my $result = HUEDevice_ReadFromServer($hash,$hash->{ID});
|
||||
if( !defined($result) ) {
|
||||
$hash->{STATE} = "unknown";
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user