Lightify und Hue parallel nutzen - nerviges Hue Autodetect abstellen

Begonnen von Yil, 11 Mai 2016, 19:49:41

Vorheriges Thema - Nächstes Thema

Yil

Hi zusammen,

ich habe zunächst mit Philipps Hue angefangen (2 Lampen aus dem Starterset) und mir nun das Osram Gateway dazu gekauft, um die Osram Lampen mit aktueller Software zu versorgen. Interessant z.B. für das Feature "Soft Licht an/aus".

Nun meine Frage: ich möchte gerne beide Gateways parallel in fhem nutzen, ohne dass sie sich in die Quere kommen. Prinzipiell klappt das recht gut. Leider aber "entdeckt" dabei Hue ständig "neue" Lampen (eben die aus dem Starterset), die aber schon längst (bei mir funktional ausgelagert in die Datei fhem_01_device.cfg) eingetragen sind. Kann ich Hue irgendwie dazu bringen, "autodetect" abzustellen?

Dieses neue Autodetect ist übrigens erst seit dem letzten Hue Softwareupdate 1.13.0

VG Yil
HM CCU2 mit ca. 35 HM-Komponenten inkl. Bausätzen
fhem auf RPi mit Sonos, EnOcean-CUL, ZWAVE-CUL und Bluetooth
Osram Lightify

justme1968

wenn du autocreate ausschaltest legt das bridge modul neue devices nicht automatisch an.

das bridge modul legt aber auch schon bekannte lanpen nicht neu an.

d.h. aus irgendeinem grund wird nicht bemerkt das die lampen eigentlich schon da sind. warum das passiert kann ich dir nicht sagen. das ist nicht normal, liegt aber eventuell daran das du include verwendest. ich kann mir zwar gerade nicht vorstellen was da schief geht, das wird vom modul aber auch nicht explizit unterstützt.

bitte lösch die lampen mal, definiere die bridge im haupt configfile file und speichere nach dem autocreate mal ganz normal so das die lampen im haupt configfile file landen. gibt es das problem beim neustart dann immer noch?

wenn das nicht hilft zeig mal ein get <bridge> devices. 

gruss
  andre
hue, tradfri, alexa-fhem, homebridge-fhem, LightScene, readingsGroup, ...

https://github.com/sponsors/justme-1968

Yil

Ok, ich probiere mal, ob ein deaktiviertes "autocreate" Abhilfe schafft.

Wäre es aber nicht eine Idee, die Auslagerungen von Devices explizit in eine include-Datei zu unterstützen? Ich finde den Gedanken der Modularisierung der fhem.cfg nicht schlecht, zumal sie nach einer Weile sonst sehr lang und unübersichtlich wird.

Tatsächlich funktioniert das mit der Auslagerung von physikalischen Devices in eine separate cfg-Datei sehr gut - nur Hue und Lightify machen hier Probleme.
HM CCU2 mit ca. 35 HM-Komponenten inkl. Bausätzen
fhem auf RPi mit Sonos, EnOcean-CUL, ZWAVE-CUL und Bluetooth
Osram Lightify

justme1968

nein. das auslagern ist keine gute idee. und auch die übersichtlichkeit ist völlig unwichtig. es reicht völlig das FHEM das configfile file versteht. es 'übersichtlich' zu machen und auch sonstige änderungen von hand sorgen immer wieder für probleme. es ist ganz wirklich der falsche ansatz.

uns hängig davon verstehe ich dein problem noch nicht. es sollte nicht passieren. erst recht nicht wie hier hue und lightify zusammen hängen sollen. du hast gesagt es geht um zwei hue lampen.

poste mal das angesprochene list und die komplette config.

hue, tradfri, alexa-fhem, homebridge-fhem, LightScene, readingsGroup, ...

https://github.com/sponsors/justme-1968

dev0

Zitat von: Yil am 12 Mai 2016, 09:18:07
Ich finde den Gedanken der Modularisierung der fhem.cfg nicht schlecht, zumal sie nach einer Weile sonst sehr lang und unübersichtlich wird.
Als ich mit FHEM angefangen hatte, fande ich das auch praktisch. Du wirst aber irgendwann feststellen, dass es effizientere Mechanismen gibt die Konfiguration zu bearbeiten, zumal es auch modulspezifische Abhängigkeiten gibt, die Du vielleicht nicht kennst (z.B. Werte, die in uniqueID gespeichert sind).
Ich habe keine Ahnung mehr wie meine .cfg aussieht, wozu auch. Übertrieben gesagt, könnte die .cfg von mir aus auch in einem Binärformat gespeichert werden.

Yil

Echt, auslagern ist keine gute Idee? Sehr schade. Ich habe früher viel modular programmiert, und daher liegt mir das wohl noch im Blut.

Also, das Problem ist folgendes: ich betreibe Hue und Lightify parallel, nutze also beide Gateways. Solange "attr autocreate disable 0" gilt, legt NUR Lightify neue Devices an, obwoghl sie in einer include-Datei bereits definiert sind. Wenn "attr autocreate disable 0" gilt, schaltet autocreate auf "active", und dann legt auch HUE "neue" Devices an, die längst in der include-Datei definiert sind.

Auch ich verstehe das nicht - alle in der include-datei definierten Devices lassen sich sauber ansprechen, egal ob Homematic, ZWAVE, Hue oder Lightify. Warum dann HUE und Lightify-Devices laufend neu erkannt werden ist mir ein Rätsel.

Hier die obersten Zeilen der fhem.cfg:

attr global userattr cmdIcon devStateIcon devStateStyle icon sortby webCmd widgetOverride
attr global autoload_undefined_devices 1
attr global backup_before_update 1
attr global language DE
attr global latitude 48.506480
attr global logfile ./log/fhem-%Y-%m-%d.log
attr global longitude 9.199194
attr global modpath .
attr global motd none
attr global sendStatistics onUpdate
attr global statefile ./log/fhem.save
attr global updateInBackground 1
attr global verbose 3

#########################################################################
## Datei            : Include-Dateien
## Hinweise         :
#########################################################################
include ./FHEM/fhem_1_device.cfg
include ./FHEM/fhem_2_sonos.cfg
#include ./FHEM/fhem_3_residents.cfg
include ./FHEM/fhem_8_wecker.cfg
include ./FHEM/fhem_9_sonstiges.cfg
#########################################################################


sowie ein Auszug aus der fhem_1_device.cfg

#########################################################################
## Abschnitt        : Zentrale Geräte
## Hinweise         : Funkempfänger
#########################################################################
#Homematik
define HMLAN1 HMLAN 192.168.XX.XX:1000
attr HMLAN1 alias Homematik
attr HMLAN1 devStateIcon opened:hm_lan disconnected:hm_lan@red
attr HMLAN1 devStateStyle style="text-align:right;;"
attr HMLAN1 group Funkempfänger
attr HMLAN1 hmId 8D0C2D
attr HMLAN1 hmLanQlen 1_min
attr HMLAN1 loadLevel 0:low,40:batchLevel,90:high,99:suspended
attr HMLAN1 room Device

#Virtuelle CCU
define vccu CUL_HM 8D0C2D
attr vccu IODev HMLAN1
attr vccu IOList HMLAN1
attr vccu model CCU-FHEM
attr vccu subType virtual
attr vccu webCmd virtual:update

#HMinfo ermöglicht einen Überblick über eQ-3 HomeMatic Geräte, die mittels CUL_HM definiert sind
define hm HMinfo
attr hm alias Systemfehler
attr hm autoUpdate 0:30
attr hm event-on-change-reading .*
attr hm group Homematic System
attr hm room Zentral
attr hm sumERROR battery:ok,sabotageError:off,overheat:off,Activity:alive:unknown
attr hm sumStatus battery,sabotageError,powerError,motor
attr hm webCmd update:protoEvents short:rssi:peerXref:configCheck:models


#Z-Wave
define ZWAVE1 ZWDongle /dev/ttyACM0@115200
attr ZWAVE1 alias Z-Wave
attr ZWAVE1 devStateIcon Initialized:cul_cul .*:cul_cul@red
attr ZWAVE1 devStateStyle style="text-align:right;;"
attr ZWAVE1 group Funkempfänger
attr ZWAVE1 room Device


#EnOcean Dongle auf USB0
define USB300 TCM ESP3 /dev/ttyUSB0@57600
attr USB300 alias EnOcean USB
attr USB300 devStateIcon initialized:cul_cul .*:cul_cul@red
attr USB300 devStateStyle style="text-align:right;;"
attr USB300 group Funkempfänger
attr USB300 room Device
attr USB300 sendInterval 0
attr USB300 smartAckMailboxMax 0


#Philips Hue via ZigBee Protokoll
define hueBridge1 HUEBridge 192.168.X.X
attr hueBridge1 alias Philips Hue Bridge
attr hueBridge1 devStateIcon Connected:hue_filled_bridge_v2 .*:hue_filled_bridge_v2@red
attr hueBridge1 devStateStyle style="text-align:right;;"
attr hueBridge1 group Funkempfänger
attr hueBridge1 icon hue_filled_bridge_v2
attr hueBridge1 key yWU7wZpU45WyDX6XCPbweeaf66LnreqREcPN2Alq
attr hueBridge1 room Device

#Osram LIGHTIFY Gateway via ZigBee Protokoll
define OsramGateway LIGHTIFY 192.168.X.X
attr OsramGateway group Funkempfänger
attr OsramGateway pollDevices 1
attr OsramGateway room Device

#########################################################################

...

#########################################################################
## Abschnitt        : Physikalische Geräte
## Hinweise         : ZigBee - Protokoll
#########################################################################

#Automatisch ersteller Device (Lampe 1) an der Hue Bridge
define HUEDevice1 HUEDevice 1
attr HUEDevice1 IODev hueBridge1
attr HUEDevice1 alias Wohnzimmer Stehlampe
attr HUEDevice1 color-icons 2
attr HUEDevice1 devStateIcon {(HUEDevice_devStateIcon($name),"toggle")}
attr HUEDevice1 group Licht
attr HUEDevice1 icon hue_filled_white_and_color_e27_b22
attr HUEDevice1 model LWB006
attr HUEDevice1 room Device,Wohnzimmer
attr HUEDevice1 subType dimmer
attr HUEDevice1 webCmd pct:toggle:on:off
define FileLog_HUEDevice1 FileLog ./log/HUEDevice1-%Y.log HUEDevice1
attr FileLog_HUEDevice1 logtype text
attr FileLog_HUEDevice1 room Log

#Automatisch ersteller Device (Lampe 2) an der Hue Bridge
define HUEDevice2 HUEDevice 2
attr HUEDevice2 IODev hueBridge1
attr HUEDevice2 alias Esszimmer Stehlampe
attr HUEDevice2 color-icons 2
attr HUEDevice2 devStateIcon {(HUEDevice_devStateIcon($name),"toggle")}
attr HUEDevice2 group Licht
attr HUEDevice2 icon hue_filled_white_and_color_e27_b22
attr HUEDevice2 model LWB006
attr HUEDevice2 room Device,Esszimmer
attr HUEDevice2 subType dimmer
attr HUEDevice2 webCmd pct:toggle:on:off
define FileLog_HUEDevice2 FileLog ./log/HUEDevice2-%Y.log HUEDevice2
attr FileLog_HUEDevice2 logtype text
attr FileLog_HUEDevice2 room Log


#Osram Lighitfy Nachttischlampe Schlafzimmer
define Osram01 HUEDevice DF0A070000261884
attr Osram01 IODev OsramGateway
attr Osram01 alias Nachttischlampe Schlafzimmer
attr Osram01 color-icons 2
attr Osram01 devStateIcon {(HUEDevice_devStateIcon($name),"toggle")}
attr Osram01 group Licht
attr Osram01 icon light_wall_2
attr Osram01 room Device,Schlafzimmer
attr Osram01 webCmd ct:pct:on:off
define FileLog_Osram01 FileLog ./log/Osram01-%Y.log Osram01
attr FileLog_Osram01 logtype text
attr FileLog_Osram01 room Log

#Osram Lightify Bett Leselicht XXX
define Osram02 HUEDevice 5E88010000261884
attr Osram02 IODev OsramGateway
attr Osram02 alias Leselicht XXX
attr Osram02 color-icons 2
attr Osram02 devStateIcon {(HUEDevice_devStateIcon($name),"toggle")}
attr Osram02 group Licht
attr Osram02 icon hue_filled_gu10_par16
attr Osram02 room Device,Schlafzimmer
attr Osram02 webCmd ct:pct:on:off
define FileLog_Osram02 FileLog ./log/Osram02-%Y.log Osram02
attr FileLog_Osram02 logtype text
attr FileLog_Osram02 room Log

#Osram Lightify Bett Leselicht XXX
define Osram03 HUEDevice 9B62010000261884
attr Osram03 IODev OsramGateway
attr Osram03 alias Leselicht XXX
attr Osram03 color-icons 2
attr Osram03 devStateIcon {(HUEDevice_devStateIcon($name),"toggle")}
attr Osram03 group Licht
attr Osram03 icon hue_filled_gu10_par16
attr Osram03 room Device,Schlafzimmer
attr Osram03 webCmd ct:pct:on:off
define FileLog_Osram03 FileLog ./log/Osram03-%Y.log Osram03
attr FileLog_Osram03 logtype text
attr FileLog_Osram03 room Log

#Osram Lightify Fernseher Backlicht
define Osram04 HUEDevice D4ABC90000261884
attr Osram04 IODev OsramGateway
attr Osram04 alias Backlight Fernseher
attr Osram04 color-icons 2
attr Osram04 devStateIcon {(HUEDevice_devStateIcon($name),"toggle")}
attr Osram04 group Licht
attr Osram04 icon light_led_stripe_rgb
attr Osram04 room Device,Wohnzimmer
attr Osram04 subType extcolordimmer
attr Osram04 webCmd ct:pct:rgb:rgb ff0000:rgb DEFF26:rgb 0000ff:ct 490:ct 380:ct 270:ct 160:toggle:on:off
define FileLog_Osram04 FileLog ./log/Osram04-%Y.log Osram04
attr FileLog_Osram04 logtype text
attr FileLog_Osram04 room Log

#Osram Lightify Gardenspot Schilf
define Osram05 HUEDevice F4D9D90000261884
attr Osram05 IODev OsramGateway
attr Osram05 alias Gartenspots Schilf
attr Osram05 color-icons 2
attr Osram05 devStateIcon {(HUEDevice_devStateIcon($name),"toggle")}
attr Osram05 group Licht
attr Osram05 icon light_outdoor
attr Osram05 room Device,Garten
attr Osram05 webCmd pct:on:off
define FileLog_Osram05 FileLog ./log/Osram05-%Y.log Osram05
attr FileLog_Osram05 logtype text
attr FileLog_Osram05 room Log

#########################################################################


Unabhängig von diesen Definitionen nimmt Lightify folgende Definitionen automatisch vor. Die "autocreate"-Einstellungen werden dabei NICHT berücksichtigt.

Internals:
   CFGFN      ./FHEM/fhem_9_sonstiges.cfg
   NAME       autocreate
   NOTIFYDEV  global
   NR         624
   NTFY_ORDER 50-autocreate
   STATE      disabled
   TYPE       autocreate
Attributes:
   autosave   1
   disable    1
   filelog    ./log/%NAME-%Y.log
   group      Funkempfänger
   room       Device


define HUEDevice0026188402010204 HUEDevice 0026188402010204
attr HUEDevice0026188402010204 IODev OsramGateway
attr HUEDevice0026188402010204 alias W 02
attr HUEDevice0026188402010204 color-icons 2
attr HUEDevice0026188402010204 devStateIcon {(HUEDevice_devStateIcon($name),"toggle")}
attr HUEDevice0026188402010204 room LIGHTIFY
define HUEDevice0401020400020000 HUEDevice 0401020400020000
attr HUEDevice0401020400020000 IODev OsramGateway
attr HUEDevice0401020400020000 alias 01
attr HUEDevice0401020400020000 color-icons 2
attr HUEDevice0401020400020000 devStateIcon {(HUEDevice_devStateIcon($name),"toggle")}
attr HUEDevice0401020400020000 room LIGHTIFY
define HUEDevice0002000000018E0A HUEDevice 0002000000018E0A
attr HUEDevice0002000000018E0A IODev OsramGateway
attr HUEDevice0002000000018E0A alias XXX
attr HUEDevice0002000000018E0A color-icons 2
attr HUEDevice0002000000018E0A devStateIcon {(HUEDevice_devStateIcon($name),"toggle")}
attr HUEDevice0002000000018E0A room LIGHTIFY
attr HUEDevice0002000000018E0A subType extcolordimmer
attr HUEDevice0002000000018E0A webCmd rgb:rgb ff0000:rgb DEFF26:rgb 0000ff:ct 490:ct 380:ct 270:ct 160:toggle:on:off
define HUEDevice001DD20AFFD902FF HUEDevice 001DD20AFFD902FF
attr HUEDevice001DD20AFFD902FF IODev OsramGateway
attr HUEDevice001DD20AFFD902FF alias XXX
attr HUEDevice001DD20AFFD902FF color-icons 2
attr HUEDevice001DD20AFFD902FF devStateIcon {(HUEDevice_devStateIcon($name),"toggle")}
attr HUEDevice001DD20AFFD902FF room LIGHTIFY


Dabei werden teilweise merkwürdige Alias vergeben, die ich hier gar nicht kopieren kann (sonst funktioniert nämlich keine Vorschau mehr). Daher der Screenshot.

Bin gespannt, ob wir den Fehler finden ...

VG Yil
HM CCU2 mit ca. 35 HM-Komponenten inkl. Bausätzen
fhem auf RPi mit Sonos, EnOcean-CUL, ZWAVE-CUL und Bluetooth
Osram Lightify

justme1968

welche version hat das LIGHTIFY modul in fhem ?

kannst du mal mit verbose 5 loggen was das lightify modul beim start macht.

gruss
  andre
hue, tradfri, alexa-fhem, homebridge-fhem, LightScene, readingsGroup, ...

https://github.com/sponsors/justme-1968