philips hue modul

Begonnen von justme1968, 11 Februar 2013, 13:55:14

Vorheriges Thema - Nächstes Thema

isy

Hallo,
ich habe seit meinem Umzug auf PI4 mit Buster zwei FM im Log, alle Lampen etc. arbeiten wie gewohnt:

2019.12.25 22:02:24 2: HUE: http request failed: http://192.168.178.56/api/+++Key+++/groups/3: empty answer received
2019.12.25 22:02:24 2: HUE: http request failed: http://192.168.178.56/api/+++Key+++/groups/1: empty answer received


Mit
attr <HUE> noshutdown 1
ist die FM weg.

Was kann die Ursache sein, da diese FM beim PI2 mit Jessie nicht aufgetreten ist?

Viele Grüße,
Helmut
Ein Weg wird erst zu einem Weg, wenn man ihn geht

justme1968

vermutlich ist dein fhem nicht aktuell. noshutdown ist seit einiger zeit der default. ansonsten liegt es vermutlich einfach daran das der pi4 schneller ist.
hue, tradfri, alexa-fhem, homebridge-fhem, LightScene, readingsGroup, ...

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

isy

Danke für die Info.
Fhem habe ich gerade erst aufgesetzt und das letzte Update ist von gestern. Daran kann es also nicht liegen.

Die fhem.cfg ist natürlich alt, d.h. die HUE Definition liegt bestimmt drei Jahre oder länger zurück.
Wenn der Default-Wert des Attributes noshutdown im Modul zwischenzeitlich auf 1 geändert wurde, ist das bei meiner Installation nicht berücksichtigt, das Attribut war definitiv nicht gesetzt. Das würde aber möglicherweise bedeuten, dass das Attribut beim Update des Moduls bei alten Installationen nicht gesetzt wird.
Ein Weg wird erst zu einem Weg, wenn man ihn geht

isy

Hallo,
das Attribut
attr <HUE> noshutdown 1
hat nur kurz geholfen. Ich habe am neuen System noch fortwährend Änderungen vorgenommen, siehe Thread mit dem SCC und Buster.

Nach jedem shutdown/restart werden sämtliche HUE Groups und Lights mit FM ins Log geschrieben. Hier nur eine Zeile exemplarisch.
HUE: http request failed: http://192.168.178.56/api/***xxx***/lights/1: empty answer received

Die Fehlermeldungen scheinen nicht zu stören, alle HUE Devices arbeiten normal.

Gruß Helmut
Ein Weg wird erst zu einem Weg, wenn man ihn geht

hoppel118

Zitat von: hoppel118 am 30 November 2019, 21:08:50
Folgende Batteriestände kann ich über die API ermitteln:

- Wohnbereich switch liefert battery 100
- Essbereich switch liefert battery 87

Laut Hue App soll ich beim "Wohnbereich switch" die Batterie auswechseln. Das macht keinen Sinn. Damit muss ich mich wohl an Philips Hue wenden...

EDIT: iConnectHue bestätigt übrigens die API-Werte. Da stimmt also tatsächlich irgendwas in der Hue App nicht.

Danke dir und Gruß Hoppel

Es ist zwar schon ein Bisschen her, aber die Lösung war einfacher als erwartet. Ich habe am Hue Dimmer einen Softreset durchgeführt, alle 4 Tasten 5 Sekunden gedrückt halten.

Danach war die Batterie-leer-Meldung in der Hue App weg und ich konnte den Dimmer updaten.

Gruß Hoppel
Server: Openmediavault, XEON E3-1240L-v5, Supermicro X11SSH-CTF, 64GB ECC RAM, SSD, RAID-Z2
Homebridge | Alexa | Yowsup
Homematic | HomeConnect | MQTT | Philips Hue | Sonos | Unifi Network & Protect | vbus | Xiaomi

Phiolin

Für Hue Entertainment steht in den Entertainment Hue Gruppen über die API das Attribut stream->active (true|false) zur Verfügung.
Besteht die Möglichkeit, dieses über das HueDevice Modul bei den Gruppen als Reading zur Verfügung zu stellen?
Dann könnte man feststellen, ob aktuell ein Entertainment-Stream im Zimmer aktiv ist.

List HueDevice für Entertainment Gruppe:
Internals:
   CHANGED   
   DEF        group 15  IODev=DG.az.NE.HueBridge
   FUUID      5c45a0bf-f33f-8c0c-fafc-899d8dbe3386daea
   FVERSION   31_HUEDevice.pm:0.208560/2019-12-30
   ID         G15
   INTERVAL   
   IODev      DG.az.NE.HueBridge
   NAME       HUEGroup15
   NR         299
   STATE      off
   TYPE       HUEDevice
   class      TV
   lights     10,11,17,18,32
   name       Wohnzimmer
   type       Entertainment
   READINGS:
     2020-01-06 09:34:25   alert           none
     2020-01-06 07:49:35   all_on          0
     2020-01-06 08:45:46   any_on          0
     2020-01-06 09:34:27   bri             101
     2020-01-06 09:34:27   colormode       nonuniform
     2020-01-06 09:34:27   ct              221
     2020-01-06 09:34:25   effect          none
     2020-01-06 09:34:25   hue             7281
     2020-01-06 09:34:27   onoff           0
     2020-01-06 09:34:27   pct             0
     2020-01-06 09:34:25   reachable       1
     2020-01-06 09:34:25   rgb             1e1d1a
     2020-01-06 09:34:27   sat             148
     2020-01-06 09:34:27   state           off
   helper:
     alert      none
     bri        101
     colormode  nonuniform
     ct         221
     devtype    G
     effect     none
     hue        7281
     onoff      0
     pct        0
     reachable  1
     rgb        1e1d1a
     sat        148
     state      off
     update_timeout 1
     json:
       class      TV
       name       Wohnzimmer
       type       Entertainment
       action:
         alert      none
         bri        1
         colormode  xy
         ct         369
         effect     none
         hue        53380
         sat        213
         xy:
           0.3391
           0.1873
       lights:
         32
         18
         10
         17
         11
       locations:
         10:
           -0.66
           -0.61
           -1
         11:
           -0.01
           1
           0
         17:
           1
           0.11
           1
         18:
           -0.95
           0.4
           -1
         32:
           0
           0.68
           -1
       sensors:
       state:
       stream:
         owner     
         proxymode  auto
         proxynode  /lights/32
     lights:
       10         1
       11         1
       17         1
       18         1
       32         1
Attributes:
   IODev      DG.az.NE.HueBridge
   alias      Wohnzimmer
   color-icons 2
   delayedUpdate 1
   devStateIcon {(HUEDevice_devStateIcon($name),"toggle")}
   group      HUEGroup
   icon       hue_room_tv
   room       HUEDevice
   userattr   createActionReadings:1,0 createGroupReadings:1,0


API Query:
/api/<key>/groups/15

{
"name": "Wohnzimmer",
"lights": [
"32",
"18",
"10",
"17",
"11"
],
"sensors": [],
"type": "Entertainment",
"state": {
"all_on": false,
"any_on": false
},
"recycle": false,
"class": "TV",
"stream": {
"proxymode": "auto",
"proxynode": "/lights/32",
"active": false,
"owner": null
},
"locations": {
"10": [
-0.66,
-0.61,
-1
],
"11": [
-0.01,
1,
0
],
"17": [
1,
0.11,
1
],
"18": [
-0.95,
0.4,
-1
],
"32": [
0,
0.68,
-1
]
},
"action": {
"on": false,
"bri": 1,
"hue": 53380,
"sat": 213,
"effect": "none",
"xy": [
0.3391,
0.1873
],
"ct": 369,
"alert": "none",
"colormode": "xy"
}
}



justme1968

schau mal bitte in die internals der devices. da sollte es mode geben. reicht dir das nicht ?

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

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

Phiolin

Leider ist es nur über das Internal schwierig festzustellen, wann ein Entertainment-Stream startet und stopped, da sich die Readings der Lampen nicht ändern und laut API die Lampen wohl nicht mal "on" sind obwohl das Streaming läuft.
Das Gruppen-Reading stream->active aus der Entertainment-Gruppe wäre daher trotzdem praktisch, damit man ein Event hat an dem man sich für weitere Schaltungen orientieren kann.

justme1968

aus dem internal ein reading zu machen ist kein problem. erst mal müssen wir feststellen ob die daten da sind uns stimmen.
hue, tradfri, alexa-fhem, homebridge-fhem, LightScene, readingsGroup, ...

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

Phiolin

#1719
Die Werte bei den Lampen passen soweit. Wenn das Streaming startet, zeigt das "mode" Internal der Lampen den Wert "streaming". Wenn das Streaming endet, wechselt das Internal erst auf den Wert "homeautomation" und (manchmal) einige Zeit später auf einen leeren Wert.

List mit aktivem Stream:

Internals:
   CHANGED   
   DEF        11  IODev=DG.az.NE.HueBridge
   FUUID      5c45a0b8-f33f-8c0c-e033-0a60097d229324ba
   FVERSION   31_HUEDevice.pm:0.208560/2019-12-30
   ID         11
   INTERVAL   
   IODev      DG.az.NE.HueBridge
   NAME       EG.wz.LA.AtmoTV
   NR         24
   STATE      off
   TYPE       HUEDevice
   desired    1
   manufacturername Philips
   mode       streaming
   modelid    LST001
   name       TV Licht
   swversion  5.127.1.26581
   type       Color light
   uniqueid   00:17:88:01:00:cd:fc:c9-0b
   READINGS:
     2020-01-06 07:40:15   alert           none
     2020-01-06 18:10:12   bri             73
     2020-01-06 07:49:05   colormode       xy
     2019-07-28 20:42:05   ct              370 (2702K)
     2020-01-02 17:19:06   effect          none
     2020-01-06 18:10:12   hue             41346
     2020-01-06 18:08:52   onoff           0
     2020-01-06 18:08:52   pct             0
     2020-01-06 15:04:13   reachable       1
     2020-01-06 18:10:12   rgb             4b4848
     2020-01-06 18:10:12   sat             84
     2020-01-06 18:08:52   state           off
     2020-01-06 18:10:12   xy              0.3401,0.3329
   helper:
     alert      none
     battery    -1
     bri        73
     colormode  xy
     ct         -1
     devtype   
     effect     none
     hue        41346
     on         0
     pct        0
     reachable  1
     rgb        4b4848
     sat        84
     update_timeout -1
     xy         0.3401,0.3329
     helper:
     json:
       manufacturername Philips
       modelid    LST001
       name       TV Licht
       productname Hue lightstrip
       swversion  5.127.1.26581
       type       Color light
       uniqueid   00:17:88:01:00:cd:fc:c9-0b
       capabilities:
         control:
           colorgamuttype A
           maxlumen   120
           mindimlevel 10000
           colorgamut:
             ARRAY(0x5563c46d78c8)
             ARRAY(0x5563c43c7ef0)
             ARRAY(0x5563c4cef930)
         streaming:
       config:
         archetype  huelightstrip
         direction  omnidirectional
         function   mixed
         startup:
           mode       powerfail
       state:
         alert      none
         bri        73
         colormode  xy
         effect     none
         hue        41346
         mode       streaming
         sat        84
         xy:
           0.3401
           0.3329
       swupdate:
         lastinstall 2018-12-17T16:38:36
         state      noupdates
Attributes:
   IODev      DG.az.NE.HueBridge
   alias      TV Licht
   color-icons 2
   devStateIcon {(HUEDevice_devStateIcon($name),"toggle")}
   group      Lampen
   icon       hue_filled_lightstrip
   model      LST001
   room       Wohnzimmer
   subType    colordimmer
   userattr   lightSceneParamsToSave lightSceneRestoreOnlyIfChanged:1,0
   webCmd     hue:rgb:rgb ff0000:rgb 98FF23:rgb 0000ff:toggle:on:off


List mit gestopptem Stream (hier hat das mode Internal den Wert "homeautomation", manchmal ist es aber auch einfach leer - warum auch immer):

Internals:
   DEF        11  IODev=DG.az.NE.HueBridge
   FUUID      5c45a0b8-f33f-8c0c-e033-0a60097d229324ba
   FVERSION   31_HUEDevice.pm:0.208560/2019-12-30
   ID         11
   INTERVAL   
   IODev      DG.az.NE.HueBridge
   NAME       EG.wz.LA.AtmoTV
   NR         24
   STATE      off
   TYPE       HUEDevice
   desired    1
   manufacturername Philips
   mode       homeautomation
   modelid    LST001
   name       TV Licht
   swversion  5.127.1.26581
   type       Color light
   uniqueid   00:17:88:01:00:cd:fc:c9-0b
   READINGS:
     2020-01-06 07:40:15   alert           none
     2020-01-06 18:06:22   bri             57
     2020-01-06 07:49:05   colormode       xy
     2019-07-28 20:42:05   ct              370 (2702K)
     2020-01-02 17:19:06   effect          none
     2020-01-06 18:06:22   hue             51330
     2020-01-06 18:08:52   onoff           0
     2020-01-06 18:08:52   pct             0
     2020-01-06 15:04:13   reachable       1
     2020-01-06 18:06:22   rgb             43305c
     2020-01-06 18:06:22   sat             134
     2020-01-06 18:08:52   state           off
     2020-01-06 18:06:22   xy              0.3353,0.2539
   helper:
     alert      none
     battery    -1
     bri        57
     colormode  xy
     ct         -1
     devtype   
     effect     none
     hue        51330
     on         0
     pct        0
     reachable  1
     rgb        43305c
     sat        134
     update_timeout 1
     xy         0.3353,0.2539
     helper:
     json:
       manufacturername Philips
       modelid    LST001
       name       TV Licht
       productname Hue lightstrip
       swversion  5.127.1.26581
       type       Color light
       uniqueid   00:17:88:01:00:cd:fc:c9-0b
       capabilities:
         control:
           colorgamuttype A
           maxlumen   120
           mindimlevel 10000
           colorgamut:
             ARRAY(0x5563c5082da0)
             ARRAY(0x5563c38f2b88)
             ARRAY(0x5563c4df4548)
         streaming:
       config:
         archetype  huelightstrip
         direction  omnidirectional
         function   mixed
         startup:
           mode       powerfail
       state:
         alert      none
         bri        57
         colormode  xy
         effect     none
         hue        51330
         mode       homeautomation
         sat        134
         xy:
           0.3353
           0.2539
       swupdate:
         lastinstall 2018-12-17T16:38:36
         state      noupdates
Attributes:
   IODev      DG.az.NE.HueBridge
   alias      TV Licht
   color-icons 2
   devStateIcon {(HUEDevice_devStateIcon($name),"toggle")}
   group      Lampen
   icon       hue_filled_lightstrip
   model      LST001
   room       Wohnzimmer
   subType    colordimmer
   userattr   lightSceneParamsToSave lightSceneRestoreOnlyIfChanged:1,0
   webCmd     hue:rgb:rgb ff0000:rgb 98FF23:rgb 0000ff:toggle:on:off


Man sieht hier auch, dass die übrigen Readings im "streaming" mode nicht verlässlich sind. Die Lampe wird hier als "onoff" = 0 angezeigt, obwohl sie aber im streaming mode leuchtet.

Das Gruppen-Device für die Entertainment-Area ändert sich übrigens im Streaming mode nicht. Hier gibt es auch kein "mode" Internal.
Für das Device würde man dann also doch das Stream-Attribut aus der API nehmen müssen. Wobei mir theoretisch aber das "mode" als Reading bei den Lampen als Indikator ausreichen würde, wenn das leichter zu implementieren ist.

justme1968

kannst du mal bitte unter http://<bridge>/api/<key>/lights/11 schauen was im json steht wenn mode in fhem leer ist?
hue, tradfri, alexa-fhem, homebridge-fhem, LightScene, readingsGroup, ...

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

Phiolin

#1721
Es steht ,,homeautomation" drin, wird aber wohl aus irgendeinem Grund nicht ins Internal übernommen.

Internals:
   CHANGED   
   DEF        11  IODev=DG.az.NE.HueBridge
   FUUID      5c45a0b8-f33f-8c0c-e033-0a60097d229324ba
   FVERSION   31_HUEDevice.pm:0.208560/2019-12-30
   ID         11
   INTERVAL   
   IODev      DG.az.NE.HueBridge
   NAME       EG.wz.LA.AtmoTV
   NR         24
   STATE      off
   TYPE       HUEDevice
   desired    1
   manufacturername Philips
   mode       
   modelid    LST001
   name       TV Licht
   swversion  5.127.1.26581
   type       Color light
   uniqueid   00:17:88:01:00:cd:fc:c9-0b
   READINGS:
     2020-01-06 07:40:15   alert           none
     2020-01-06 18:47:09   bri             52
     2020-01-06 07:49:05   colormode       xy
     2019-07-28 20:42:05   ct              370 (2702K)
     2020-01-02 17:19:06   effect          none
     2020-01-06 18:47:09   hue             46314
     2020-01-06 18:08:52   onoff           0
     2020-01-06 18:08:52   pct             0
     2020-01-06 15:04:13   reachable       1
     2020-01-06 18:47:09   rgb             393131
     2020-01-06 18:47:09   sat             61
     2020-01-06 18:08:52   state           off
     2020-01-06 18:47:09   xy              0.3639,0.3296
   helper:
     alert      none
     battery    -1
     bri        52
     colormode  xy
     ct         -1
     devtype   
     effect     none
     hue        46314
     on         0
     pct        0
     reachable  1
     rgb        393131
     sat        61
     update_timeout -1
     xy         0.3639,0.3296
     helper:
     json:
       manufacturername Philips
       modelid    LST001
       name       TV Licht
       productname Hue lightstrip
       swversion  5.127.1.26581
       type       Color light
       uniqueid   00:17:88:01:00:cd:fc:c9-0b
       capabilities:
         control:
           colorgamuttype A
           maxlumen   120
           mindimlevel 10000
           colorgamut:
             ARRAY(0x5563c48d9d08)
             ARRAY(0x5563c40df5a8)
             ARRAY(0x5563c4e15260)
         streaming:
       config:
         archetype  huelightstrip
         direction  omnidirectional
         function   mixed
         startup:
           mode       powerfail
       state:
         alert      none
         bri        52
         colormode  xy
         effect     none
         hue        46314
         mode       homeautomation
         sat        61
         xy:
           0.3639
           0.3296
       swupdate:
         lastinstall 2018-12-17T16:38:36
         state      noupdates
Attributes:
   IODev      DG.az.NE.HueBridge
   alias      TV Licht
   color-icons 2
   devStateIcon {(HUEDevice_devStateIcon($name),"toggle")}
   group      Lampen
   icon       hue_filled_lightstrip
   model      LST001
   room       Wohnzimmer
   subType    colordimmer
   userattr   lightSceneParamsToSave lightSceneRestoreOnlyIfChanged:1,0
   webCmd     hue:rgb:rgb ff0000:rgb 98FF23:rgb 0000ff:toggle:on:off



{
   "uniqueid" : "00:17:88:01:00:cd:fc:c9-0b",
   "productname" : "Hue lightstrip",
   "name" : "TV Licht",
   "manufacturername" : "Philips",
   "state" : {
      "xy" : [
         0.3639,
         0.3296
      ],
      "mode" : "homeautomation",
      "alert" : "none",
      "hue" : 46314,
      "effect" : "none",
      "colormode" : "xy",
      "bri" : 52,
      "on" : false,
      "reachable" : true,
      "sat" : 61
   },
   "modelid" : "LST001",
   "config" : {
      "startup" : {
         "mode" : "powerfail",
         "configured" : true
      },
      "archetype" : "huelightstrip",
      "function" : "mixed",
       "direction" : "omnidirectional"
   },
   "type" : "Color light",
   "swversion" : "5.127.1.26581",
   "swupdate" : {
      "lastinstall" : "2018-12-17T16:38:36",
      "state" : "noupdates"
   },
   "capabilities" : {
      "streaming" : {
         "renderer" : true,
         "proxy" : false
      },
      "certified" : true,
      "control" : {
         "colorgamut" : [
            [
               0.704,
               0.296
            ],
            [
               0.2151,
               0.7106
            ],
            [
               0.138,
               0.08
            ]
         ],
         "mindimlevel" : 10000,
         "colorgamuttype" : "A",
         "maxlumen" : 120
      }
   }
}

justme1968

die devices haben ab morgen ein reading mode statt des internals.

das mit den gruppen muss ich mir noch genauer anschauen.
hue, tradfri, alexa-fhem, homebridge-fhem, LightScene, readingsGroup, ...

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

Phiolin


justme1968

ab morgen gibt es auch ein stream_active reading für die gruppen.

ich habe aber keine ahnung wie gut das funktioniert. ich habe keine api beschreibung dafür gefunden.

ps: hast du eine hdmi sync box?
hue, tradfri, alexa-fhem, homebridge-fhem, LightScene, readingsGroup, ...

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