FHEM Forum

FHEM - Hausautomations-Systeme => Homematic => Thema gestartet von: vw2audi am 13 April 2017, 17:17:20

Titel: Rollladensteuerung mit Zeiteingabe (gelöst)
Beitrag von: vw2audi am 13 April 2017, 17:17:20
Hallo Leute,
ich versuche meine Rollos über eine Eingabe von Zeit zu steuern bekomme es aber nicht richtig zum laufen ;-(

Evtl. Sehr ihr ja was ich übersehen habe:

Hier meine config schnipsel:

define du_Rollo_Zeit_ho dummy
attr du_Rollo_Zeit_ho alias Zeit hoch
attr du_Rollo_Zeit_ho devStateIcon .*:rc_BLANK
attr du_Rollo_Zeit_ho group Rollos_Settings
attr du_Rollo_Zeit_ho icon icoUhr
attr du_Rollo_Zeit_ho room LichtRollo
attr du_Rollo_Zeit_ho setList state:time
attr du_Rollo_Zeit_ho sortby 10
attr du_Rollo_Zeit_ho webCmd state
define du_Rollo_Zeit_ho_WE dummy
attr du_Rollo_Zeit_ho_WE alias Zeit hoch WE
attr du_Rollo_Zeit_ho_WE devStateIcon .*:rc_BLANK
attr du_Rollo_Zeit_ho_WE group Rollos_Settings
attr du_Rollo_Zeit_ho_WE icon icoUhr
attr du_Rollo_Zeit_ho_WE setList state:time
attr du_Rollo_Zeit_ho_WE sortby 11
attr du_Rollo_Zeit_ho_WE webCmd state

define RO.Dummy_hoch DOIF (([[du_Rollo_Zeit_ho]|8] or [[du_Rollo_Zeit_ho_WE]|7])) {fhem("set RO.Wohnzimmer off")}


Hoffe es kann mir jemand helfen.

Danke
Titel: Antw:Rollladensteuerung mit Zeiteingabe
Beitrag von: Thorsten Pferdekaemper am 13 April 2017, 18:12:57
Hi,
meinst Du sowas wie das Modul WeekdayTimer?
Gruß,
   Thorsten
Titel: Antw:Rollladensteuerung mit Zeiteingabe
Beitrag von: vw2audi am 13 April 2017, 19:53:02
Hallo ich wollte es eigentlich ohne Modul machen! Will ja was dabei lernen ;-)
Titel: Antw:Rollladensteuerung mit Zeiteingabe
Beitrag von: vw2audi am 13 April 2017, 20:03:33
oder kann ich da auch die Zeiten manuell über das Webfrontend ändern?
Titel: Antw:Rollladensteuerung mit Zeiteingabe
Beitrag von: Thorsten Pferdekaemper am 13 April 2017, 20:27:39
Hi,
ja, kann man. ...aber vielleicht nicht so, wie Du Dir das vorstellst. Es gibt dazu aber was für FTUI.
Gruß,
   Thorsten
Titel: Antw:Rollladensteuerung mit Zeiteingabe
Beitrag von: Otto123 am 13 April 2017, 20:30:41
Hi,

warum über Perl in fhem?
define RO.Dummy_hoch DOIF (([[du_Rollo_Zeit_ho]|8] or [[du_Rollo_Zeit_ho_WE]|7])) (set RO.Wohnzimmer off)

gib mal ein list RO.Dummy_hoch ob der wirklich die Zeiten aus dem dummy liest.

Gruß Otto
Titel: Antw:Rollladensteuerung mit Zeiteingabe
Beitrag von: vw2audi am 14 April 2017, 20:02:37
Habe es mal ausgelesen.
Da steht folgendes:
. Internals:
   DEF        (([[du_Rollo_Zeit_ho]|8] or [[du_Rollo_Zeit_ho_WE]|7])) {fhem("set RO.Dummy off")}
   NAME       RO.Dummy_hoch
   NR         160
   NTFY_ORDER 50-RO.Dummy_hoch
   STATE      ???
   TYPE       DOIF
   Readings:
     2017-04-14 16:48:55   timer_01_c01    15.04.2017 07:15:00|8
     2017-04-14 16:48:55   timer_02_c01    15.04.2017 08:00:00|7
   Condition:
     0          (DOIF_time_once($hash,0,$wday,"8") or DOIF_time_once($hash,1,$wday,"7"))
   Days:
     0          8
     1          7
   Devices:
   Do:
     0:
       0          {fhem("set RO.Dummy off")}
     1:
   Helper:
     globalinit 1
     last_timer 2
     sleeptimer -1
   Itimer:
     all         du_Rollo_Zeit_ho du_Rollo_Zeit_ho_WE
   Localtime:
     0          1492233300
     1          1492236000
   Realtime:
     0          07:15:00
     1          08:00:00
   Regexp:
     All:
   State:
   Time:
     0          [du_Rollo_Zeit_ho]
     1          [du_Rollo_Zeit_ho_WE]
   Timecond:
     0          0
     1          0
   Timer:
     0          0
     1          0
   Timers:
     0           0  1
   Triggertime:
     1492233300:
       localtime  1492233300
       Hash:
     1492236000:
       localtime  1492236000
       Hash:
Attributes
Titel: Antw:Rollladensteuerung mit Zeiteingabe
Beitrag von: vw2audi am 15 April 2017, 19:48:22
keiner eine Idee?

(([[du_Rollo_Zeit_ho]|8] or [[du_Rollo_Zeit_ho_WE]|7])) {fhem("set RO.Dummy off")}

habe es mal geändert in:
(([du_Rollo_Zeit_ho] or [du_Rollo_Zeit_ho_WE])) {fhem("set RO.Dummy off")}

Funktioniert aber nicht ;-(
Titel: Antw:Rollladensteuerung mit Zeiteingabe
Beitrag von: KernSani am 15 April 2017, 20:13:42
Du solltest dir glaube ich mal die sehr ausführliche Beschreibung zu DOIF in der commandref durchlesen und code tags verwenden
([[du_Rollo_Zeit_ho]|8] or [[du_Rollo_Zeit_ho_WE]|7]) (set RO.Dummy off)
oder so ungefähr...

Titel: Antw:Rollladensteuerung mit Zeiteingabe
Beitrag von: vw2audi am 16 April 2017, 00:43:04
Hallo und danke für den Hinweis.

Bin mir nicht ganz sicher, ob is es richtig verstanden habe:

Hier mein Lösungsansatz:
define di.RO.Dummy_2 DOIF ([[du_Rollo_Zeit_ho]|Mo Di Mi Do Fr] or [[du_Rollo_Zeit_ho_WE]|Sa So]) (set RO.Dummy off)
attr di.RO.Dummy_2 do always

define di.RO.Dummy_3 DOIF ([[du_Rollo_Zeit_ru]|Mo Di Mi Do Fr] or [[du_Rollo_Zeit_ru]|Sa So]) (set RO.Dummy on)
attr di.RO.Dummy_3 do always


Es scheint jetzt mit den eingegebenen Zeiten zu funktionieren. Das ganze möchte ich jetzt gerne noch mit einem Schalter versehen um das ganze ein bzw. aus zu schalten.
Also einem Automatik "AN" / "AUS" Schalter, mal schauen ;-)

Ist das mit dem attr do always so korrekt?
Titel: Antw:Rollladensteuerung mit Zeiteingabe
Beitrag von: KernSani am 16 April 2017, 08:00:08
Moin,
Ja, da du kein DOELSE hast, ist das do always notwendig.
Wenn das Ganze dann gelöst ist, bitte noch "gelöst" setzen (Subject im ersten Post ändern)
Titel: Antw:Rollladensteuerung mit Zeiteingabe
Beitrag von: vw2audi am 17 April 2017, 00:15:21
Herzlichen Dank für alle eure Hinweise.

Ich habe es soweit fast gelöst. Es gibt da nurnoch eine Kleinigkeit, die ich nicht verstehe. Ich wollte das ganze jetzt ergänzen mit Twilight und einer kleinen Abfrage, ob schalter gesetzt sind:


define LichtWetter Twilight 50.7042889 7.5548326 3 694471

define di.RO.Dummy_ru_time_sun DOIF ([{twilight("LichtWetter","ss_weather","19:00","[du_Rollo_Zeit_ru]")}] and [du_Rollo_Master] eq "an" and [du_Rollo_Sun] eq "an") (set RO.Dummy on)
attr di.RO.Dummy_ru_time_sun do always


Leider reagiert er nicht, weder auf den Twilight wert, noch auf die [du_Rollo_Zeit_ru] (23:00).

Ein list ergibt folgendes:

Internals:
   DEF        ([{twilight("LichtWetter","ss_weather","19:00","[du_Rollo_Zeit_ru]")}] and [du_Rollo_Master] eq "an" and [du_Rollo_Sun] eq "an") (set RO.Dummy on)
   NAME       di.RO.Dummy_ru_time_sun
   NR         165
   NTFY_ORDER 50-di.RO.Dummy_ru_time_sun
   STATE      ???
   TYPE       DOIF
   Readings:
     2017-04-17 00:02:44   Device          myTL
     2017-04-17 00:02:44   e_myTL_ss       20:24:25
     2017-04-17 00:11:48   timer_01_c01    17.04.2017 19:53:44
   Condition:
     0          DOIF_time_once($hash,0,$wday) and InternalDoIf($hash,'du_Rollo_Master','STATE') eq "an" and InternalDoIf($hash,'du_Rollo_Sun','STATE') eq "an"
   Days:
   Devices:
     0           du_Rollo_Master du_Rollo_Sun
     all         du_Rollo_Master du_Rollo_Sun
   Do:
     0:
       0          set RO.Dummy on
   Helper:
     globalinit 1
     last_timer 1
     sleeptimer -1
   Internals:
     0           du_Rollo_Master:STATE du_Rollo_Sun:STATE
     all         du_Rollo_Master:STATE du_Rollo_Sun:STATE
   Itimer:
     all         du_Rollo_Zeit_ru
   Localtime:
     0          1492451624
   Realtime:
     0          19:53:44
   Regexp:
     All:
   State:
   Time:
     0          {twilight("LichtWetter","ss_weather","19:00","[du_Rollo_Zeit_ru]")}
   Timecond:
     0          0
   Timer:
     0          0
   Timers:
     0           0
   Triggertime:
     1492451624:
       localtime  1492451624
       Hash:
Attributes:
   do         always
Titel: Antw:Rollladensteuerung mit Zeiteingabe (gelöst)
Beitrag von: vw2audi am 19 April 2017, 00:35:30
gelöst
Titel: Antw:Rollladensteuerung mit Zeiteingabe (gelöst)
Beitrag von: Horti am 19 April 2017, 09:35:28
Hi,

könntest Du bitte den kompletten Code posten? Steige da nicht so ganz durch, woher kommen vor Allem $hash und $wday?
Titel: Antw:Rollladensteuerung mit Zeiteingabe (gelöst)
Beitrag von: vw2audi am 19 April 2017, 11:08:52
Hallo das ist eine gute Frage, bin ja auch absoluter Anfänger ;-)

Das stand so im List des Devices.

Hier einmal meine komplette config:
Der Dummy RO.Dummy dient in diesem Fall als Platzhalter für die eigentlichen Aktoren



define du_Rollo_Master dummy
attr du_Rollo_Master alias Automatik aktiv
attr du_Rollo_Master devStateIcon .*:rc_BLANK
attr du_Rollo_Master group Rollos_Settings
attr du_Rollo_Master icon fts_shutter_automatic
attr du_Rollo_Master room LichtRollo
attr du_Rollo_Master setList state:an,aus
attr du_Rollo_Master sortby 01
attr du_Rollo_Master webCmd state
define du_Rollo_Sun dummy
attr du_Rollo_Sun alias Sonnenuntergang
attr du_Rollo_Sun devStateIcon .*:rc_BLANK
attr du_Rollo_Sun group Rollos_Settings
attr du_Rollo_Sun icon weather_sunset
attr du_Rollo_Sun room LichtRollo
attr du_Rollo_Sun setList state:an,aus
attr du_Rollo_Sun sortby 02
attr du_Rollo_Sun webCmd state
define du_Rollo_Art dummy
attr du_Rollo_Art alias Art
attr du_Rollo_Art devStateIcon .*:rc_BLANK
attr du_Rollo_Art group Rollos_Settings
attr du_Rollo_Art icon fts_shutter_updown
attr du_Rollo_Art room LichtRollo
attr du_Rollo_Art setList state:Normal,Urlaub
attr du_Rollo_Art sortby 03
attr du_Rollo_Art webCmd state
define du_Rollo_Zeit_ho dummy
attr du_Rollo_Zeit_ho alias Zeit hoch
attr du_Rollo_Zeit_ho devStateIcon .*:rc_BLANK
attr du_Rollo_Zeit_ho group Rollos_Settings
attr du_Rollo_Zeit_ho icon icoUhr
attr du_Rollo_Zeit_ho room LichtRollo
attr du_Rollo_Zeit_ho setList state:time
attr du_Rollo_Zeit_ho sortby 10
attr du_Rollo_Zeit_ho webCmd state
define du_Rollo_Zeit_ho_WE dummy
attr du_Rollo_Zeit_ho_WE alias Zeit hoch WE
attr du_Rollo_Zeit_ho_WE devStateIcon .*:rc_BLANK
attr du_Rollo_Zeit_ho_WE group Rollos_Settings
attr du_Rollo_Zeit_ho_WE icon icoUhr
attr du_Rollo_Zeit_ho_WE setList state:time
attr du_Rollo_Zeit_ho_WE sortby 11
attr du_Rollo_Zeit_ho_WE webCmd state
define du_Rollo_Zeit_ru dummy
attr du_Rollo_Zeit_ru alias Zeit runter:
attr du_Rollo_Zeit_ru devStateIcon .*:rc_BLANK
attr du_Rollo_Zeit_ru group Rollos_Settings
attr du_Rollo_Zeit_ru icon icoUhr
attr du_Rollo_Zeit_ru room LichtRollo
attr du_Rollo_Zeit_ru setList state:time
attr du_Rollo_Zeit_ru sortby 21
attr du_Rollo_Zeit_ru webCmd state

define RO.Dummy dummy
attr RO.Dummy devStateIcon runter:fts_shutter_10 hoch:fts_shutter_100 0\d.*:fts_shutter_10 1\d.*:fts_shutter_20 2\d.*:fts_shutter_30 3\d.*:fts_shutter_40 4\d.*:fts_shutter_50 5\d.*:fts_shutter_60 6\d.*:fts_shutter_70 7\d.*:fts_shutter_80 8\d.*:fts_shutter_90 9\d.*:fts_shutter_100
attr RO.Dummy eventMap on:hoch off:runter stop:stopp up:minus;; down:plus
attr RO.Dummy fp_Erdgeschoss 79,330,1,RO.Dummy,
attr RO.Dummy group Rolladensteuerung,
attr RO.Dummy webCmd statusRequest:toggleDir:hoch:runter:minus:plus:stopp

define di.RO.Dummy_ho_time_auto DOIF ([[du_Rollo_Zeit_ho]|Mo Di Mi Do Fr] or [[du_Rollo_Zeit_ho_WE]|Sa So] and [du_Rollo_Master] eq "an") (set RO.Dummy off)
attr di.RO.Dummy_ho_time_auto do always

define di.RO.Dummy_ru_time_auto DOIF ([[du_Rollo_Zeit_ru]|Mo Di Mi Do Fr] or [[du_Rollo_Zeit_ru]|Sa So] and [du_Rollo_Master] eq "an" and [du_Rollo_Sun] eq "aus") (set RO.Dummy on)
attr di.RO.Dummy_ru_time_auto do always

define di.RO.Dummy_ru_time_sun DOIF ([{twilight("LichtWetter","ss_weather","19:00","[du_Rollo_Zeit_ru]")}] and [du_Rollo_Master] eq "an" and [du_Rollo_Sun] eq "an") (set RO.Dummy on)
attr di.RO.Dummy_ru_time_sun do always

Titel: Antw:Rollladensteuerung mit Zeiteingabe (gelöst)
Beitrag von: Horti am 19 April 2017, 18:14:51
OK, danke, bin ebenfalls ein Anfänger  ;)