[Gelöst] Phillips Hue Motion als Device

Begonnen von oetti77, 17 Dezember 2016, 21:30:39

Vorheriges Thema - Nächstes Thema

oetti77

Hallo zusammen,

lässt sich der Motion-Sensor vom HUE auch als Device im FHEM anlegen, um diesen analog zum HM-Bewegungsmelder benutzen zu können (notify etc.)?
Ich würde gern den Bewegungsstatus im FHEM verwalten, da ich damit deutlicher flexibler bin, und auch auf andere Events reagieren kann.

Gruß
Chris
FHEM 5.8 (CentOS 7 auf ESXi 6.5), HM-CC-RT-DN, HM-Sec-Sc, HM-WDS40-TO, HM-LC-SW1-FM, HM-LC-Bl1PBU-FM, Sonos, Alexa, Nest Protect 2, Tradfri

Module: HUE, Lightify, ECOTOUCH, TelegramBot, Sonos, Alexa, Pushover, Enigma2

justme1968

ja. wie jeder andere sensor auch.

er wird aber api bedingt genau so gepollt wie alle anderen sensoren. d. h. du musst schauen ob du eine reaktionszeit hin bekommst dir dir reicht.

wenn du hue lampen schalten willst ist es besser das über regeln in der bridge zu machen.

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

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

oetti77

Ok, vielen Dank erst mal.
Ich habe mich mal am Wiki-Eintrag für den HUE Dimmer orientiert und einen Sensor hinzugefügt. 



ID  NAME            FHEM            TYPE
1: Daylight                        Daylight
2: Hue temperature sensor 1                 ZLLTemperature
3: Küche                          ZLLPresence
4: Hue ambient light sensor 1                 ZLLLightLevel
5: MotionSensor 3.Companion                 CLIPGenericStatus
6: Hue temperature sensor 2                 ZLLTemperature
7: Test Sensor                     ZLLPresence
8: Hue ambient light sensor 2                 ZLLLightLevel
9: MotionSensor 7.Companion                 CLIPGenericStatus


Ich habe den Test Sensor mit "define mySensor HUEDevice sensor 7 1" testweise hinzugefügt.
Ausser folgenden Internals taucht jedoch nichts weiter auf:


Internals
CFGFN
DEF sensor 7 1 IODev=Ligthify
ID  S7
INTERVAL 1
IODev Ligthify
NAME mySensor1
NR 450
STATE Initialized
TYPE HUEDevice


Vielleicht kannst du mir kurz erklären wo ich falsch abgebogen bin  :)

Danke
Chris
FHEM 5.8 (CentOS 7 auf ESXi 6.5), HM-CC-RT-DN, HM-Sec-Sc, HM-WDS40-TO, HM-LC-SW1-FM, HM-LC-Bl1PBU-FM, Sonos, Alexa, Nest Protect 2, Tradfri

Module: HUE, Lightify, ECOTOUCH, TelegramBot, Sonos, Alexa, Pushover, Enigma2

justme1968

was gibt ein get <bridge> sensors detail ?

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

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

oetti77

Anbei der Output.


ID  NAME            FHEM            TYPE                 STATE
1: Daylight                        Daylight             {"daylight":null,"lastupdated":"none"}
2: Hue temperature sensor 1                 ZLLTemperature       {"lastupdated":"2016-12-18T17:51:40","temperature":2023}
3: Küche                          ZLLPresence          {"lastupdated":"2016-12-18T17:48:13","presence":false}
4: Hue ambient light sensor 1                 ZLLLightLevel        {"daylight":false,"lastupdated":"2016-12-18T17:53:00","dark":true,"lightlevel":0}
5: MotionSensor 3.Companion                 CLIPGenericStatus    {"lastupdated":"2016-12-18T17:52:58","status":0}
6: Hue temperature sensor 2                 ZLLTemperature       {"lastupdated":"2016-12-18T17:53:26","temperature":1964}
7: Test Sensor                     ZLLPresence          {"lastupdated":"2016-12-18T17:49:45","presence":false}
8: Hue ambient light sensor 2                 ZLLLightLevel        {"daylight":false,"lastupdated":"2016-12-18T17:49:51","dark":true,"lightlevel":0}
9: MotionSensor 7.Companion                 CLIPGenericStatus    {"lastupdated":"2016-12-18T17:50:30","status":0}


Gruss
Chris
FHEM 5.8 (CentOS 7 auf ESXi 6.5), HM-CC-RT-DN, HM-Sec-Sc, HM-WDS40-TO, HM-LC-SW1-FM, HM-LC-Bl1PBU-FM, Sonos, Alexa, Nest Protect 2, Tradfri

Module: HUE, Lightify, ECOTOUCH, TelegramBot, Sonos, Alexa, Pushover, Enigma2

justme1968

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

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

oetti77

FHEM 5.8 (CentOS 7 auf ESXi 6.5), HM-CC-RT-DN, HM-Sec-Sc, HM-WDS40-TO, HM-LC-SW1-FM, HM-LC-Bl1PBU-FM, Sonos, Alexa, Nest Protect 2, Tradfri

Module: HUE, Lightify, ECOTOUCH, TelegramBot, Sonos, Alexa, Pushover, Enigma2

justme1968

welche ausgabe bekommst du fürversion 31_HUEDevicein fhem?

bekommst du für die temperatur und helligkeits senoren readings?

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

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

oetti77

Die Ausgabe von version liefert folgendes:


File            Rev   Last Change

31_HUEDevice.pm 12689 2016-11-29 21:43:01Z justme1968


Ich habe mal einen Screenshot angehangen, was aktuell angezeigt wird.

Gruß
Chris
FHEM 5.8 (CentOS 7 auf ESXi 6.5), HM-CC-RT-DN, HM-Sec-Sc, HM-WDS40-TO, HM-LC-SW1-FM, HM-LC-Bl1PBU-FM, Sonos, Alexa, Nest Protect 2, Tradfri

Module: HUE, Lightify, ECOTOUCH, TelegramBot, Sonos, Alexa, Pushover, Enigma2

justme1968

sehr komisch...

zeig mal bitte ein list vom device, von der bridge und die ausgabe von http://<bridge ip>/api/<key>/sensors

als text in code tags. nicht als screenshot.

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

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

oetti77

Danke für deinen Enthusiasmus  :)


list mySensor2

Internals:
   DEF        sensor 7 1 IODev=Ligthify
   ID         S7
   INTERVAL   1
   IODev      Ligthify
   NAME       mySensor2
   NR         344
   STATE      Initialized
   TYPE       HUEDevice
   Helper:
     devtype    S
     update_timeout 1
     Setlist:
Attributes:
   IODev      Ligthify



list HUEBridge01

Internals:
   DEF        10.10.122.98
   Host       10.10.122.98
   INTERVAL   60
   NAME       HUEBridge01
   NOTIFYDEV  global
   NR         243
   NTFY_ORDER 50-HUEBridge01
   STATE      connected
   TYPE       HUEBridge
   apiversion 1.16.0
   mac        00:17:88:14:1e:4e
   manufacturer Royal Philips Electronics
   modelName  Philips hue bridge 2012
   modelid    BSB001
   name       Philips hue
   noshutdown 0
   swversion  01036659
   updatestate 1
   zigbeechannel 11
   Readings:
     2016-11-27 19:48:43   lastError       resource, /lights/2, not available
     2016-12-19 19:55:41   state           connected
     2016-12-19 09:26:40   swupdate        ZGB_100B_0100 - 5.23.1.13452
   Helper:
     apiversion 69632
     count      0
     last_config_timestamp 1482173739
     offsetUTC  3600
     updatestate 1
Attributes:
   icon       hue_filled_bridge_v1
   key        ApSPTXrLSg6mZ85v8bI9xaWI9W06zlXMfHHkiaiq


http://10.10.122.98/api/ApSPTXrLSg6mZ85v8bI9xaWI9W06zlXMfHHkiaiq/sensors

{"1":{"state":{"daylight":null,"lastupdated":"none"},"config":{"on":true,"configured":false,"sunriseoffset":30,"sunsetoffset":-30},"name":"Daylight","type":"Daylight","modelid":"PHDL00","manufacturername":"Philips","swversion":"1.0"},
"2":{"state":{"temperature":2051,"lastupdated":"2016-12-19T18:53:52"},"config":{"on":true,"battery":100,"reachable":true,"alert":"none","ledindication":false,"usertest":false,"pending":[]},"name":"Hue temperature sensor 1","type":"ZLLTemperature","modelid":"SML001","manufacturername":"Philips","swversion":"6.1.0.18912","uniqueid":"00:17:88:01:02:01:a1:a1-02-0402"},
"3":{"state":{"presence":false,"lastupdated":"2016-12-19T18:44:16"},"config":{"on":true,"battery":100,"reachable":true,"alert":"none","ledindication":false,"usertest":false,"sensitivity":2,"sensitivitymax":2,"pending":[]},"name":"Küche","type":"ZLLPresence","modelid":"SML001","manufacturername":"Philips","swversion":"6.1.0.18912","uniqueid":"00:17:88:01:02:01:a1:a1-02-0406"},
"4":{"state":{"lightlevel":0,"dark":true,"daylight":false,"lastupdated":"2016-12-19T18:53:05"},"config":{"on":true,"battery":100,"reachable":true,"alert":"none","tholddark":16000,"tholdoffset":7000,"ledindication":false,"usertest":false,"pending":[]},"name":"Hue ambient light sensor 1","type":"ZLLLightLevel","modelid":"SML001","manufacturername":"Philips","swversion":"6.1.0.18912","uniqueid":"00:17:88:01:02:01:a1:a1-02-0400"},
"5":{"state":{"status":0,"lastupdated":"2016-12-19T18:49:01"},"config":{"on":true,"reachable":true},"name":"MotionSensor 3.Companion","type":"CLIPGenericStatus","modelid":"PHA_STATE","manufacturername":"Philips","swversion":"1.0","uniqueid":"MotionSensor 3.Companion","recycle":true},
"6":{"state":{"temperature":2006,"lastupdated":"2016-12-19T18:55:39"},"config":{"on":true,"battery":100,"reachable":true,"alert":"none","ledindication":false,"usertest":false,"pending":[]},"name":"Hue temperature sensor 2","type":"ZLLTemperature","modelid":"SML001","manufacturername":"Philips","swversion":"6.1.0.18912","uniqueid":"00:17:88:01:02:01:bb:79-02-0402"},
"7":{"state":{"presence":false,"lastupdated":"2016-12-19T17:55:12"},"config":{"on":true,"battery":100,"reachable":true,"alert":"none","ledindication":false,"usertest":false,"sensitivity":2,"sensitivitymax":2,"pending":[]},"name":"Test Sensor","type":"ZLLPresence","modelid":"SML001","manufacturername":"Philips","swversion":"6.1.0.18912","uniqueid":"00:17:88:01:02:01:bb:79-02-0406"},
"8":{"state":{"lightlevel":0,"dark":true,"daylight":false,"lastupdated":"2016-12-19T18:54:51"},"config":{"on":true,"battery":100,"reachable":true,"alert":"none","tholddark":16000,"tholdoffset":7000,"ledindication":false,"usertest":false,"pending":[]},"name":"Hue ambient light sensor 2","type":"ZLLLightLevel","modelid":"SML001","manufacturername":"Philips","swversion":"6.1.0.18912","uniqueid":"00:17:88:01:02:01:bb:79-02-0400"},
"9":{"state":{"status":0,"lastupdated":"2016-12-19T17:55:57"},"config":{"on":true,"reachable":true},"name":"MotionSensor 7.Companion","type":"CLIPGenericStatus","modelid":"PHA_STATE","manufacturername":"Philips","swversion":"1.0","uniqueid":"MotionSensor 7.Companion","recycle":true}}


Danke und Gruss
Chris
FHEM 5.8 (CentOS 7 auf ESXi 6.5), HM-CC-RT-DN, HM-Sec-Sc, HM-WDS40-TO, HM-LC-SW1-FM, HM-LC-Bl1PBU-FM, Sonos, Alexa, Nest Protect 2, Tradfri

Module: HUE, Lightify, ECOTOUCH, TelegramBot, Sonos, Alexa, Pushover, Enigma2

justme1968

dein sensor device verwendet das falsche IODev. ändere es bitte im DEF von Ligthify auf HUEBridge01.

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

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

oetti77

Läuft. Besten Dank Andre.


Internals:
   DEF        sensor 7 1 IODev=Ligthify
   ID         S7
   INTERVAL   1
   IODev      HUEBridge01
   NAME       mySensor2
   NR         344
   STATE      nomotion
   TYPE       HUEDevice
   lastupdated 2016-12-19 20:20:18
   manufacturername Philips
   modelid    SML001
   name       Test Sensor
   on         1
   reachable  1
   swversion  6.1.0.18912
   type       ZLLPresence
   uniqueid   00:17:88:01:02:01:bb:79-02-0406
   Readings:
     2016-12-19 20:20:18   battery         100
     2016-12-19 20:20:18   reachable       true
     2016-12-19 20:20:18   state           nomotion
   Helper:
     devtype    S
     update_timeout 1
     Setlist:
Attributes:
   IODev      HUEBridge01
FHEM 5.8 (CentOS 7 auf ESXi 6.5), HM-CC-RT-DN, HM-Sec-Sc, HM-WDS40-TO, HM-LC-SW1-FM, HM-LC-Bl1PBU-FM, Sonos, Alexa, Nest Protect 2, Tradfri

Module: HUE, Lightify, ECOTOUCH, TelegramBot, Sonos, Alexa, Pushover, Enigma2

justme1968

im DEF ändern. nicht (nur) im attribut.

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

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

oetti77

FHEM 5.8 (CentOS 7 auf ESXi 6.5), HM-CC-RT-DN, HM-Sec-Sc, HM-WDS40-TO, HM-LC-SW1-FM, HM-LC-Bl1PBU-FM, Sonos, Alexa, Nest Protect 2, Tradfri

Module: HUE, Lightify, ECOTOUCH, TelegramBot, Sonos, Alexa, Pushover, Enigma2