[73_AutoShuttersControl.pm] Neues Modul zum automatisierten steuern von Rolläden

Begonnen von CoolTux, 30 Oktober 2018, 17:29:46

Vorheriges Thema - Nächstes Thema

pc1246

Zitat von: CoolTux am 10 November 2018, 18:03:27
Wie ist der TYPE von dem Device und was steht bei ASC_Pos_Reading
Moin
TYPE   tahoma
ASC_pos_reading stand auf position, und ich habe es auf dim geaendert!
Schrieb ich aber schon!
Gruss Christoph
HP T610
Onkyo_AVR;Enigma2; SB_Server; SB_Player; HM-USB; PhilipsTV; harmony hub; Jeelink mit PCA301; Somfy; S7-300; LGW; HUE; HM-IP auf Charly; div

CoolTux

Zitat von: pc1246 am 11 November 2018, 12:07:35
Moin
TYPE   tahoma
ASC_pos_reading stand auf position, und ich habe es auf dim geaendert!
Schrieb ich aber schon!
Gruss Christoph

Ich brauche da bitte list der entsprechenden Devices. Also vom Rolladen und vom ASC Device.

Grüße
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

enno

Zitat von: CoolTux am 11 November 2018, 12:29:31
Ich brauche da bitte list der entsprechenden Devices. Also vom Rolladen und vom ASC Device.

Gleiches Problem wie pc1246 ich hatte ASC_Pos_Reading aber auf devicestate gestellt....

Hier List vom Rolladen
Internals:
   COMMANDS   dim:slider,0,1,100 cancel:noArg close:noArg delayedStopIdentify down:noArg getName:noArg identify:noArg my:noArg open:noArg refreshMemorized1Position:noArg setClosure setDeployment setMemorized1Position setName setPosition setSecuredPosition startIdentify:noArg stop:noArg stopIdentify:noArg up:noArg wink
   DEF        DEVICE io://0204-8065-7110/14533821
   IODev      TAHOMA
   NAME       tahoma_14533821
   NR         263
   NTFY_ORDER 50-tahoma_14533821
   STATE      dim0
   SUBTYPE    DEVICE
   TYPE       tahoma
   device     io://0204-8065-7110/14533821
   fid        14533821
   inClass    RollerShutter
   inControllable io:RollerShutterGenericIOComponent
   inExecId   finished
   inExecState 4
   inLabel    Küchenrollo
   inPlaceOID bdc169a3-23ca-4583-a70a-b40739c33d7d
   inType     1
   Helper:
     DBLOG:
       ClosureState:
         MYSQL:
           TIME       1541912425.57113
           VALUE      0
   READINGS:
     2018-11-10 19:00:02   ASC_ShuttersLastDrive night close
     2018-11-10 21:43:10   ASC_Time_DriveDown AutoShuttersControl off
     2018-11-10 21:43:10   ASC_Time_DriveUp AutoShuttersControl off
     2018-11-11 06:00:25   ClosureState    0
     2018-11-11 03:21:12   NameState       Küchenrollo
     2018-11-11 06:00:25   OpenClosedState open
     2018-11-11 03:21:12   PriorityLockTimerState 0
     2018-11-11 12:43:19   RSSILevelState  72.0
     2018-11-11 03:21:12   StatusState     available
     2018-11-11 06:00:25   devicestate     open
     2018-11-11 06:00:25   state           dim0
Attributes:
   ASC        1
   ASC_Antifreeze off
   ASC_AutoAstroModeEvening CIVIL
   ASC_AutoAstroModeEveningHorizon none
   ASC_AutoAstroModeMorning CIVIL
   ASC_AutoAstroModeMorningHorizon none
   ASC_BrightnessMaxVal -1
   ASC_BrightnessMinVal -1
   ASC_Closed_Pos 100
   ASC_Down   astro
   ASC_Drive_Offset -1
   ASC_GuestRoom none
   ASC_Mode_Down always
   ASC_Mode_Up always
   ASC_Open_Pos 0
   ASC_Partymode off
   ASC_Pos_Reading devicestate
   ASC_Pos_after_ComfortOpen 20
   ASC_Roommate_Device none
   ASC_Roommate_Reading state
   ASC_Self_Defense_Exclude off
   ASC_Shading_Brightness_Reading brightness
   ASC_Shading_Brightness_Sensor none
   ASC_ShuttersPlace window
   ASC_Time_Down_Early 19:00
   ASC_Time_Down_Late 22:30
   ASC_Time_Up_Early 06:00
   ASC_Time_Up_Late 06:05
   ASC_Time_Up_WE_Holiday 06:00
   ASC_Up     astro
   ASC_Ventilate_Pos 70
   ASC_Ventilate_Window_Open on
   ASC_WindowRec EG_K_HM_Fenster
   ASC_WindowRec_subType twostate
   ASC_lock-out soft
   ASC_lock-outCmd none
   DbLogExclude .*
   DbLogInclude ClosureState
   IODev      TAHOMA
   alias      RollerShutter Küchenrollo
   devStateIcon .*dim0:rc_BLANK .*dim83:wd_blk_shutter_2 .*dim100:fts_shutter_1w_100@grey .*dim74:fts_shutter_1w_50@grey
   event-on-change-reading .*
   fp_Haus    1038,1719,0,tahoma_14533821,
   fp_Tablet  258,243,0,tahoma_14533821,
   room       18 Rollo
   userattr   ASC_Antifreeze:off,on 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_BrightnessMaxVal ASC_BrightnessMinVal ASC_Closed_Pos:0,10,20,30,40,50,60,70,80,90,100 ASC_Down:time,astro,brightness ASC_Drive_Offset ASC_GuestRoom:on,off 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_Pos_after_ComfortOpen:0,10,20,30,40,50,60,70,80,90,100 ASC_Roommate_Device ASC_Roommate_Reading ASC_Self_Defense_Exclude:on,off ASC_Shading_Brightness_Reading ASC_Shading_Brightness_Sensor ASC_ShuttersPlace:window,terrace 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 ASC_Ventilate_Pos:10,20,30,40,50,60,70,80,90,100 ASC_Ventilate_Window_Open:on,off ASC_WindowRec ASC_WindowRec_subType:twostate,threestate ASC_lock-out:soft,hard ASC_lock-outCmd:inhibit,blocked
   webCmd     dim


und vom ASC Device:

Internals:
   MID        da39a3ee5e6b4b0d3255bfef95601890afd80709
   NAME       AutoShuttersControl
   NOTIFYDEV  global,AutoShuttersControl,tahoma_14533821,EG_K_HM_Fenster
   NR         855
   NTFY_ORDER 51-AutoShuttersControl
   STATE      created new drive timer
   TYPE       AutoShuttersControl
   VERSION    0.2.0.1
   OLDREADINGS:
   READINGS:
     2018-11-09 20:24:31   lockOut         off
     2018-11-09 20:24:31   partyMode       off
     2018-11-10 10:10:00   room_18_Rollo   tahoma_14533821
     2018-11-09 20:24:31   selfDefense     off
     2018-11-10 21:43:10   state           created new drive timer
     2018-11-09 20:24:31   sunriseTimeWeHoliday off
     2018-11-10 19:00:02   tahoma_14533821_lastPosValue 0
     2018-11-10 19:00:02   tahoma_14533821_nextAstroTimeEvent 11.11.2018 - 06:05
     2018-11-10 10:10:00   userAttrList    rolled out
   helper:
     shuttersList:
       tahoma_14533821
   monitoredDevs:
     EG_K_HM_Fenster:
       tahoma_14533821 ASC_WindowRec
     tahoma_14533821:
Attributes:
   ASC_autoAstroModeEvening CIVIL
   ASC_autoAstroModeMorning REAL
   ASC_autoShuttersControlEvening on
   ASC_autoShuttersControlMorning on
   ASC_freezeTemp 3
   ASC_temperatureReading temperature
   ASC_temperatureSensor DG_HM_Wetterstation
   ASC_twilightDevice ASTRO
   DbLogExclude .*
   devStateIcon selfeDefense.terrace:fts_door_tilt created.new.drive.timer:clock .*asleep:scene_sleeping roommate.(awoken|home):user_available residents.(home|awoken):status_available manual:fts_shutter_manual selfeDefense.active:status_locked selfeDefense inactive:status_open day.open:scene_day night close:scene_night
   icon       fts_shutter_automatic
   room       18 Rollo


Gruss
  Enno
Einfacher FHEM Anwender auf Intel®NUC mit Proxmox und Debian

CoolTux


my %posSetCmds = (
    ZWave      => 'dim',
    Siro       => 'position',
    CUL_HM     => 'pct',
    ROLLO      => 'pct',
    SOMFY      => 'position',
    tahoma     => 'dim',
    KLF200Node => 'pct',
    DUOFERN    => 'position',
);


Das sind die Zuordnungen für die Fahrbefehle. Der aktuelle Status, also wo sich der Rolladen aktuell befindet wird über ASC_Pos_Reading ausgelesen.
Wäre also die Frage, lautet der set Befehl für den TYPE tahoma wirklich dim? also 'set Rolladen dim 90' fährt den Rolladen auf 90 Prozent?

Ansonsten brauche ich wohl eine verbose 5 Ausgabe von dem Rolladen.
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

enno

Zitat von: CoolTux am 11 November 2018, 13:07:16
Wäre also die Frage, lautet der set Befehl für den TYPE tahoma wirklich dim? also 'set Rolladen dim 90' fährt den Rolladen auf 90 Prozent?


set tahoma_14533821 dim 19 fährt das Rollo. Die Antwort im Reading state dim19

ClosureState 19
OpenClosedState open
devicestate open
state dim19
Einfacher FHEM Anwender auf Intel®NUC mit Proxmox und Debian

CoolTux

devicestate open

Wenn Du ASC_Pos_Reading devicestate gesetzt hast dann kann er das nicht zuordnen.
Im Reading ASC_Pos_Reading muss eine Zahl stehen. Also eine Zahl zwischen dem Wert von ASC_Closed_Pos und ASC_Open_Pos.
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

pc1246

Moin
Das tahoma Modul setzt den devicestate.
Internals:
   CFGFN     
   COMMANDS   dim:slider,0,1,100 cancel:noArg close:noArg delayedStopIdentify down:noArg getName:noArg identify:noArg my:noArg open:noArg refreshMemorized1Position:noArg setClosure setDeployment setMemorized1Position setName setPosition setSecuredPosition startIdentify:noArg stop:noArg stopIdentify:noArg up:noArg wink
   DEF        DEVICE io://0805-3505-1817/2370054
   IODev      Connexoon
   NAME       tahoma_2370054
   NR         107
   NTFY_ORDER 50-tahoma_2370054
   STATE      dim30
   SUBTYPE    DEVICE
   TYPE       tahoma
   device     io://0805-3505-1817/2370054
   fid        2370054
   inClass    RollerShutter
   inControllable io:RollerShutterVeluxIOComponent
   inExecId   finished
   inExecState 4
   inLabel    Rollo SZ
   inPlaceOID 7918ef38-215c-4802-bff5-5330cef37b22
   inType     1
   READINGS:
     2018-11-10 17:11:47   ASC_ShuttersLastDrive night close
     2018-11-11 12:05:44   ASC_Time_DriveDown 11.11.2018 - 17:10
     2018-11-11 12:05:44   ASC_Time_DriveUp 12.11.2018 - 06:54
     2018-11-11 14:36:39   ClosureState    30
     2018-11-11 14:36:39   NameState       Rollo SZ
     2018-11-11 14:36:39   OpenClosedState open
     2018-11-11 14:36:39   PriorityLockTimerState 0
     2018-11-11 14:36:39   RSSILevelState  96
     2018-11-11 14:36:39   StatusState     available
     2018-11-11 14:36:39   devicestate     open
     2018-11-11 14:36:39   state           dim30
Attributes:
   ASC        1
   ASC_Antifreeze off
   ASC_AutoAstroModeEvening CIVIL
   ASC_AutoAstroModeEveningHorizon 0
   ASC_AutoAstroModeMorning CIVIL
   ASC_AutoAstroModeMorningHorizon 0
   ASC_BrightnessMaxVal -1
   ASC_BrightnessMinVal -1
   ASC_Closed_Pos 100
   ASC_Down   astro
   ASC_Drive_Offset 1800
   ASC_GuestRoom none
   ASC_Mode_Down always
   ASC_Mode_Up always
   ASC_Open_Pos 0
   ASC_Partymode off
   ASC_Pos_Reading dim
   ASC_Pos_after_ComfortOpen 20
   ASC_Roommate_Device none
   ASC_Roommate_Reading state
   ASC_Self_Defense_Exclude off
   ASC_Shading_Brightness_Reading brightness
   ASC_Shading_Brightness_Sensor none
   ASC_ShuttersPlace window
   ASC_Time_Down_Early 15:30
   ASC_Time_Down_Late 22:30
   ASC_Time_Up_Early 04:30
   ASC_Time_Up_Late 17:43
   ASC_Time_Up_WE_Holiday 08:30
   ASC_Up     astro
   ASC_Ventilate_Pos 70
   ASC_Ventilate_Window_Open on
   ASC_WindowRec none
   ASC_WindowRec_subType twostate
   ASC_lock-out soft
   ASC_lock-outCmd none
   IODev      Connexoon
   alias      RollerShutter Rollo SZ
   room       Schlafzimmer
   userattr   ASC_Antifreeze:off,on 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_BrightnessMaxVal ASC_BrightnessMinVal ASC_Closed_Pos:0,10,20,30,40,50,60,70,80,90,100 ASC_Down:time,astro,brightness ASC_Drive_Offset ASC_GuestRoom:on,off 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_Pos_after_ComfortOpen:0,10,20,30,40,50,60,70,80,90,100 ASC_Roommate_Device ASC_Roommate_Reading ASC_Self_Defense_Exclude:on,off ASC_Shading_Brightness_Reading ASC_Shading_Brightness_Sensor ASC_ShuttersPlace:window,terrace 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 ASC_Ventilate_Pos:10,20,30,40,50,60,70,80,90,100 ASC_Ventilate_Window_Open:on,off ASC_WindowRec ASC_WindowRec_subType:twostate,threestate ASC_lock-out:soft,hard ASC_lock-outCmd:inhibit,blocked
   webCmd     dim


Internals:
   CFGFN     
   MID        da39a3ee5e6b4b0d3255bfef95601890afd80709
   NAME       ASC
   NOTIFYDEV  global,ASC,tahoma_2370054,tahoma_10875273,tahoma_2370054
   NR         85
   NTFY_ORDER 51-ASC
   STATE      created new drive timer
   TYPE       AutoShuttersControl
   VERSION    0.2.0.1
   OLDREADINGS:
   READINGS:
     2018-11-10 14:35:08   lockOut         off
     2018-11-10 14:35:08   partyMode       off
     2018-11-11 12:05:41   room_Schlafzimmer tahoma_2370054
     2018-11-11 12:05:41   room_tahoma     tahoma_10875273
     2018-11-10 14:35:08   selfDefense     off
     2018-11-11 12:05:44   state           created new drive timer
     2018-11-10 14:35:08   sunriseTimeWeHoliday off
     2018-11-11 12:05:44   tahoma_10875273_nextAstroTimeEvent 11.11.2018 - 17:10
     2018-11-11 04:30:01   tahoma_2370054_lastPosValue 0
     2018-11-11 12:05:44   tahoma_2370054_nextAstroTimeEvent 11.11.2018 - 17:10
     2018-11-11 12:05:41   userAttrList    rolled out
   helper:
     shuttersList:
       tahoma_10875273
       tahoma_2370054
   monitoredDevs:
     tahoma_10875273:
     tahoma_2370054:
Attributes:
   ASC_autoAstroModeEvening CIVIL
   ASC_autoAstroModeMorning CIVIL
   ASC_autoShuttersControlEvening on
   ASC_autoShuttersControlMorning on
   ASC_freezeTemp 3
   ASC_temperatureReading temperature
   ASC_twilightDevice
   devStateIcon selfeDefense.terrace:fts_door_tilt created.new.drive.timer:clock .*asleep:scene_sleeping roommate.(awoken|home):user_available residents.(home|awoken):status_available manual:fts_shutter_manual selfeDefense.active:status_locked selfeDefense inactive:status_open day.open:scene_day night close:scene_night
   icon       fts_shutter_automatic
   room       ASC


Wie gesagt, habe ich das Gefuehl, dass die Zahl zu dicht am dim steht!?

GRuss Christoph
HP T610
Onkyo_AVR;Enigma2; SB_Server; SB_Player; HM-USB; PhilipsTV; harmony hub; Jeelink mit PCA301; Somfy; S7-300; LGW; HUE; HM-IP auf Charly; div

CoolTux

ASC_Roommate_Reading state
Ist auch nicht korrekt. In dem Reading darf ausschließlich eine Zahl stehen.

Aber das ganze hat sich seit den ersten Versionen nicht geändert. Es dürfen ausschließlich numerische Werte in dem Reading zum ermitteln der aktuellen Position drin stehen. Es kann also auch schon früher auf die Art nicht funktioniert haben. Zu mindest nicht korrekt.
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

John85

Hallo,

find ich echt super, dass es dieses Modul jetzt gibt.
Hab es vorhin übers FHEM Update bekommen und gerade versucht einzurichten.

Die Suche der Rolläden-Devices hat aber erst erfolgreich funktioniert, nachdem ich in den Rolläden-Devices das Attribut "AutoShuttersControl" zu "ASC" geändert habe.
Darauf bin ich nur gekommen, weil das AutoShuttersControl Device dies als Fehlermeldung gebracht hat.

In der Commandref und im Wiki steht:
"all shutter devices which shall be controlled have to get set the attribut AutoShuttersControl with value 1 or 2."
"AutoShuttersControl - 0/1/2 1 = "Inverse oder Rollo Bsp."
...

Könnt ihr das bitte anpassen, falls dies tatsächlich ein Fehler ist?

Danke,
Jan

CoolTux

Danke Dir für die Info.
Mag bitte jemand den Wiki Eintrag ändern oder sogar komplett ergänzen? Ich passe die Commandref an.
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

MarkusHiba

Mit freundlichen Grüßen

MarkusHiba

FunkOdyssey

Zitat von: CoolTux am 10 November 2018, 22:53:11
Der set Befehl für ZWave steht mit dim fest im Code. Hier wird dann position nur als Reading für den aktuellen Status gewählt und dim als Set Befehl.

So, ich schaffe es leider nicht (mehr), die Z-Wave-Jalousien per ASC runterfahren zu lassen.
Ich hatte Verbose5 aktiviert und den heutigen Zeitpunkt um 16:40 Uhr beobachtet. Anbei die ganzen Logs.




Am Rande: Die Steuerung über userreadings mit den Position-Readings, die den gleichen Namen wie den Set-Befehl hatten, lief es zuvor einwandfrei. (Das war ein Workaround, den ich ein zwei Tage aktiv hatte)




CoolTux

Ok ich denke ich habe den Fehler gefunden.
Mach gleich ein fix fertig.
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

CoolTux

Fix ist online.
Entweder git im master branch, oder FHEM SVN, oder bis morgen früh warten und mit FHEM update holen.



Grüße
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

hexenmeister

Mir ist beim Testen etwas "kosmetisches" aufgefallen.
Hat man weder twiligt noch astro device, bekommt man eine unschöne Meldung im Log
2018.11.11 18:32:31 1: PERL WARNING: Use of uninitialized value in concatenation (.) or string at ./FHEM/73_AutoShuttersControl.pm line 368.
2018.11.11 18:32:31 1: stacktrace:
2018.11.11 18:32:31 1:     main::__ANON__                      called by ./FHEM/73_AutoShuttersControl.pm (368)
2018.11.11 18:32:31 1:     AutoShuttersControl::Notify         called by fhem.pl (3600)
2018.11.11 18:32:31 1:     main::CallFn                        called by fhem.pl (3520)
2018.11.11 18:32:31 1:     main::DoTrigger                     called by fhem.pl (631)