GELÖST: Aquara motion Sensor, bei Bewegung u. ab best. Lux-Wert Steckdose anst.

Begonnen von Carpy, 27 Mai 2019, 17:56:18

Vorheriges Thema - Nächstes Thema

Carpy

Hallo,

ich habe einen Aquara motion detector via Zigbee angebunden:


Internals:
   CFGFN     
   DEF        RTCGQ11LM 0x00158d00030aa210 Motion_detect_01
   FRIENDLYNAME Motion_detect_01
   FUUID      5cea5306-f33f-73a1-2ffa-af83c58321165ca8
   IODev      MQTT
   MODEL      RTCGQ11LM
   NAME       Motion_detect_01
   NOTIFYDEV  RTCGQ11LM 0x00158d00030aa210 Motion_detect_01
   NR         292
   SID        0x00158d00030aa210
   STATE      no_motion
   TYPE       XiaomiMQTTDevice
   Helper:
     DBLOG:
       battery:
         myDbLog:
           TIME       1558971616.34791
           VALUE      ok
       battery_level:
         myDbLog:
           TIME       1558971616.34791
           VALUE      97
       illuminance:
         myDbLog:
           TIME       1558971616.34791
           VALUE      0
       linkquality:
         myDbLog:
           TIME       1558971616.34791
           VALUE      120
       lux:
         myDbLog:
           TIME       1558971616.34791
           VALUE      0
       occupancy:
         myDbLog:
           TIME       1558971616.34791
           VALUE      false
       state:
         myDbLog:
           TIME       1558971616.34791
           VALUE      no_motion
       transmission-state:
         myDbLog:
           TIME       1558971616.31801
           VALUE      incoming publish received
       voltage:
         myDbLog:
           TIME       1558971616.34791
           VALUE      2995
   READINGS:
     2019-05-27 17:40:16   battery         ok
     2019-05-27 17:40:16   battery_level   97
     2019-05-27 17:40:16   illuminance     0
     2019-05-27 17:40:16   linkquality     120
     2019-05-27 17:40:16   lux             0
     2019-05-27 17:40:16   occupancy       false
     2019-05-27 17:40:16   state           no_motion
     2019-05-27 17:40:16   transmission-state incoming publish received
     2019-05-27 17:40:16   voltage         2995
   message_ids:
   subscribe:
     zigbee2mqtt/Motion_detect_01
     xiaomi/0x00158d00030aa210/#
   subscribeExpr:
     ^zigbee2mqtt\/Motion_detect_01$
     ^xiaomi\/0x00158d00030aa210.*$
   subscribeQos:
     xiaomi/0x00158d00030aa210/# 0
     zigbee2mqtt/Motion_detect_01 0
Attributes:
   IODev      MQTT
   devStateIcon motion:motion_detector@red off:motion_detector@green no_motion:motion_detector@green
   room       XiaomiMQTTDevice


Ich möchte mit dem Detector bei Bewegung und unter einerm bestimmten Lux-Wert eine Steckdose (SMART_01) für eine bestimmt Zeit einschalten, das "Schalten bei Bewegungserkennung" funktioniert:
define Kueche_LED notify Motion_detect_01:motion {fhem("set SMART_01 on-for-timer 60")}
was ich nicht schaffe ist eine Abfrage wie:
([Motion_detect_01:lux] < 7) mit einzubauen (da stehe ich gerade vor dem "Wald" u. sehe die Bäume nicht).

Ich bin für jegliche Hilfe dankbar.
Raspberry Pi 2 Mod. B mit FHEM Latest Revision: 30126
SIGNALduino 433MHz
ESPEasy
LaCrosseGateway
Sonoff Steckdosen mit Tasmota

CoolTux


define Kueche_LED notify Motion_detect_01:motion { fhem("set SMART_01 on-for-timer 60") if ( ReadingsVal($NAME,'lux',0) < 7 ) }
Du musst nicht wissen wie es geht! Du musst nur wissen wo es steht, wie es geht.
Support me to buy new test hardware for development: https://www.paypal.com/paypalme/MOldenburg
My FHEM Git: https://git.cooltux.net/FHEM/
Das TuxNet Wiki:
https://www.cooltux.net

Carpy

Hallo CoolTux,

funktioniert super, recht herzlichen Dank!

Gruß
Kalle
Raspberry Pi 2 Mod. B mit FHEM Latest Revision: 30126
SIGNALduino 433MHz
ESPEasy
LaCrosseGateway
Sonoff Steckdosen mit Tasmota