Tradfri On/Off Switch für Rollo Steuerung ??

Begonnen von D3ltorohd, 13 November 2019, 17:55:11

Vorheriges Thema - Nächstes Thema

D3ltorohd

Hallo Com,

ich habe mir Testhalber einen On/Off Switch von Tradfri geholt. Hier habe ich insgesamt 6 Befehle die ich nutzen kann, On, Off, brightness_stop_click in 4 Ausführungen.

Damit würde ich gerne Rollo Befehle an mein Rollo Device senden. Wie pct 0, pct 100 und up-> stop und down-> stop. Quasi wenn ich einmal tippe, fährt er komplett runter, oder hoch, oder ich halte ihn gedrückt dann up oder down Befehl und beim los lassen stop.

Brauche ich noch mal ein extra Device, oder muss ich im Schalter Device vom Tradfri die Befehle ändern ?

Hier noch ein List vom Rollo Device ::



Internals:
   FUUID      5ce426a3-f33f-fc62-ef02-7d448e00de137320
   NAME       Schlafzimmer_li
   NR         32
   STATE      pct-20
   TYPE       ROLLO
   stoptime   1573659869
   READINGS:
     2019-07-07 13:59:18   ASC_Enable      on
     2019-11-13 16:44:29   ASC_ShuttersLastDrive night close
     2019-11-13 16:43:13   ASC_Time_DriveDown 14.11.2019 - 16:43
     2019-11-13 16:43:13   ASC_Time_DriveUp 14.11.2019 - 08:00
     2019-11-04 20:27:08   associatedWith  ASControl
     2019-11-13 16:44:14   command         pct-80
     2019-11-13 16:44:14   desired_pct     80
     2019-11-13 16:44:14   drive-type      modul
     2019-11-13 16:44:14   last_drive      drive-down
     2019-11-13 16:44:29   pct             20
     2019-11-13 16:44:29   state           pct-20
Attributes:
   ASC        2
   ASC_Closed_Pos 0
   ASC_ComfortOpen_Pos 90
   ASC_Drive_OffsetStart 1
   ASC_Open_Pos 100
   ASC_Pos_Reading pct
   ASC_ShuttersPlace window
   ASC_Time_Up_Early 08:00
   ASC_Ventilate_Pos 20
   ASC_Ventilate_Window_Open on
   ASC_WindowRec Schlafzimmer_li_Sensor
   ASC_WindowRec_subType threestate
   cmdIcon    open:fts_shutter_up closed:fts_shutter_down stop:fts_shutter_manual half:fts_shutter_50
   devStateIcon open:fts_shutter_10:closed closed:fts_shutter_100:open half:fts_shutter_50:closed drive-up:fts_shutter_up@red:stop drive-down:fts_shutter_down@red:stop pct-100:fts_shutter_10:open pct-90:fts_shutter_10:closed pct-80:fts_shutter_20:closed pct-70:fts_shutter_30:closed pct-60:fts_shutter_40:closed pct-50:fts_shutter_50:closed pct-40:fts_shutter_60:open pct-30:fts_shutter_70:open pct-20:fts_shutter_80:open pct-10:fts_shutter_90:open pct-0:fts_shutter_100:closed
   rl_autoStop 1
   rl_commandDown set JaroFB down 7
   rl_commandStop set JaroFB stop 7
   rl_commandUp set JaroFB up 7
   rl_excessBottom 2
   rl_excessTop 0
   rl_resetTime 0
   rl_secondsDown 19
   rl_secondsUp 19
   rl_switchTime 1
   rl_type    HomeKit
   room       Jalousien
   userattr   ASC_Antifreeze:off,soft,hard,am,pm ASC_Antifreeze_Pos:5,10,15,20,25,30,35,40,45,50,55,60,65,70,75,80,85,90,95,100 ASC_AutoAstroModeEvening:REAL,CIVIL,NAUTIC,ASTRONOMIC,HORIZON ASC_AutoAstroModeEveningHorizon:-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7,8,9 ASC_AutoAstroModeMorning:REAL,CIVIL,NAUTIC,ASTRONOMIC,HORIZON ASC_AutoAstroModeMorningHorizon:-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7,8,9 ASC_BlockingTime_afterManual ASC_BlockingTime_beforDayOpen ASC_BlockingTime_beforNightClose ASC_BrightnessSensor ASC_Closed_Pos:0,10,20,30,40,50,60,70,80,90,100 ASC_ComfortOpen_Pos:0,10,20,30,40,50,60,70,80,90,100 ASC_Down:time,astro,brightness,roommate ASC_DriveUpMaxDuration ASC_Drive_Offset ASC_Drive_OffsetStart ASC_GuestRoom:on,off ASC_LockOut:soft,hard,off ASC_LockOut_Cmd:inhibit,blocked,protection ASC_Mode_Down:absent,always,off,home ASC_Mode_Up:absent,always,off,home ASC_Open_Pos:0,10,20,30,40,50,60,70,80,90,100 ASC_Partymode:on,off ASC_Pos_Reading ASC_PrivacyDownTime_beforNightClose ASC_PrivacyDown_Pos ASC_RainProtection:on,off ASC_Roommate_Device ASC_Roommate_Reading ASC_Self_Defense_AbsentDelay ASC_Self_Defense_Exclude:on,off ASC_Self_Defense_Mode:absent,gone ASC_Shading_Angle_Left ASC_Shading_Angle_Right ASC_Shading_Direction ASC_Shading_MinMax_Elevation ASC_Shading_Min_OutsideTemperature ASC_Shading_Mode:absent,always,off,home ASC_Shading_Pos:10,20,30,40,50,60,70,80,90,100 ASC_Shading_StateChange_Cloudy ASC_Shading_StateChange_Sunny ASC_Shading_WaitingPeriod ASC_ShuttersPlace:window,terrace ASC_TempSensor ASC_Time_Down_Early ASC_Time_Down_Late ASC_Time_Up_Early ASC_Time_Up_Late ASC_Time_Up_WE_Holiday ASC_Up:time,astro,brightness,roommate ASC_Ventilate_Pos:10,20,30,40,50,60,70,80,90,100 ASC_Ventilate_Window_Open:on,off ASC_WiggleValue ASC_WindParameters ASC_WindProtection:on,off ASC_WindowRec ASC_WindowRec_PosAfterDayClosed:open,lastManual ASC_WindowRec_subType:twostate,threestate Jalousien Jalousien_map structexclude
   webCmd     open:closed:half:stop:pct


Grüße,
Base : Intel NUC Debian 9, FHEM aktuell || Zigbee (Coordinator FW Z-Stack 1.2 default Koenkk) || MaxCUL (culfw V 1.67 nanoCUL868) || SIGNALduino 433MHz (V 3.3.2.1-rc8 ) || Shelly s1

D3ltorohd

Keiner ne Idee wie ich das umsetzte ? Wenn ich den Taster drücke, das ich die Befehle die das Rollo Modul braucht senden kann ? Oder was eben FHEM weiter gibt ?
Base : Intel NUC Debian 9, FHEM aktuell || Zigbee (Coordinator FW Z-Stack 1.2 default Koenkk) || MaxCUL (culfw V 1.67 nanoCUL868) || SIGNALduino 433MHz (V 3.3.2.1-rc8 ) || Shelly s1

amenomade

Wie macht man in Fhem, dass ein Device auf Ereignisse eines anderen Devices reagiert? Wenn Du es noch nicht weisst, empfehlt sich die Einsteigerdoku zu lesen.

https://fhem.de/Heimautomatisierung-mit-fhem.pdf
Pi 3B, Alexa, CUL868+Selbstbau 1/2λ-Dipol-Antenne, USB Optolink / Vitotronic, Debmatic und HM / HmIP Komponenten, Rademacher Duofern Jalousien, Fritz!Dect Thermostaten, Proteus

D3ltorohd

#3
Bin ich hier auf dem richtigen Weg ?

defmod di_rc_tv DOIF ([remotecontrol:"on"]) (set tv on) DOELSE (set tv off)
attr di_rc_tv alias Steuerlogik
attr di_rc_tv devStateIcon cmd_1:general_an:cmd_2 cmd_2|initialized:general_aus:cmd_1
attr di_rc_tv group A) Fernbedienung (Ereignissteuerung)
attr di_rc_tv icon helper_doif
attr di_rc_tv room Schulungsraum

defmod remotecontrol dummy
attr remotecontrol alias Fernbedienung
attr remotecontrol devStateIcon .*:noIcon
attr remotecontrol group A) Fernbedienung (Ereignissteuerung)
attr remotecontrol icon it_remote
attr remotecontrol room Schulungsraum
attr remotecontrol webCmd on:off

defmod tv dummy
attr tv alias Funksteckdose TV
attr tv devStateIcon on:it_television@red off:it_television@blue
attr tv group A) Fernbedienung (Ereignissteuerung)
attr tv icon it_television
attr tv room Schulungsraum
save


Das müsste ich mit so einem Doif Lösen können oder ?

Reicht der erste Teil, oder brauch ich alle drei ?

Sollte das so richtig sein ? Remotecontrol ist indem Fall der Name meines Tradfri Devices ? :on das State was in Fhem steht beim drücken des Tasters ?

So richtig verstanden ??
define Rollo_Buero_Taster DOIF ([Tradfri_Switch_Buero:"on_click"]) (set Buero_li open) DOELSE (set Buero_li closed)

Hab aber keine attr gesetzt, wie hier im Beispiel, funktioniert aber dennoch wunderbar.
attr di_rc_tv alias Steuerlogik
attr di_rc_tv devStateIcon cmd_1:general_an:cmd_2 cmd_2|initialized:general_aus:cmd_1
attr di_rc_tv group A) Fernbedienung (Ereignissteuerung)
attr di_rc_tv icon helper_doif
attr di_rc_tv room Schulungsraum


Sollte ich das dennoch mit eintragen ?

EDIT::

So das klappt schon mal auf und zu. Jetzt hab ich aber 2 Rollos die gleichzeitig fahren sollen, noch ein Doif anlegen nur das andere Rollo Device angeben und vorne das gleiche Schalter Device ?
Hab ich mit einer Structure gelöst, dort sind beide Rollos drin, dann brauch ich nur einmal den Befehl an die Structure senden.

Des weiteren würde ich gern folgendes noch umsetzten. Drücken, ganz runter oder ganz hoch hab ich ja. Aber wenn ich drauf bleibe habe ich jeweils einen weiteren Befehl, beim los lassen noch mal. Also möchte ich das er fährt so lange ich drauf bleibe und beim los lassen den Stopp Befehl, wie baue ich das noch in mein doif ein ?

Da gibt es z.b.    

brightness_down_click und brightness_stop_click dazu dann wieder closed und stop das gleiche dann für hoch.
Base : Intel NUC Debian 9, FHEM aktuell || Zigbee (Coordinator FW Z-Stack 1.2 default Koenkk) || MaxCUL (culfw V 1.67 nanoCUL868) || SIGNALduino 433MHz (V 3.3.2.1-rc8 ) || Shelly s1

amenomade

Einfach mit DOELSEIF ergänzen:

([Tradfri_Switch_Buero:"on_click"]) (set Buero_li open)
DOELSEIF ([Tradfri_Switch_Buero:"on_click"]) (set  Buero_li closed)
DOELSEIF ([Tradfri_Switch_Buero:"brightness_down_click"]) (set Buero_li... was Du auch immer Buero_li für ein Kommando senden willst)
DOELSEIF ([Tradfri_Switch_Buero:"brightness_stop_click"]) (set Buero_li...)
...
Pi 3B, Alexa, CUL868+Selbstbau 1/2λ-Dipol-Antenne, USB Optolink / Vitotronic, Debmatic und HM / HmIP Komponenten, Rademacher Duofern Jalousien, Fritz!Dect Thermostaten, Proteus

D3ltorohd

Zitat von: amenomade am 20 November 2019, 18:35:44
Einfach mit DOELSEIF ergänzen:

([Tradfri_Switch_Buero:"on_click"]) (set Buero_li open)
DOELSEIF ([Tradfri_Switch_Buero:"on_click"]) (set  Buero_li closed)
DOELSEIF ([Tradfri_Switch_Buero:"brightness_down_click"]) (set Buero_li... was Du auch immer Buero_li für ein Kommando senden willst)
DOELSEIF ([Tradfri_Switch_Buero:"brightness_stop_click"]) (set Buero_li...)
...


Hat wunderbar geklappt, vielen Dank !!
Base : Intel NUC Debian 9, FHEM aktuell || Zigbee (Coordinator FW Z-Stack 1.2 default Koenkk) || MaxCUL (culfw V 1.67 nanoCUL868) || SIGNALduino 433MHz (V 3.3.2.1-rc8 ) || Shelly s1