Hauptmenü

Ikea dimmen - langsam

Begonnen von ChristianH, 31 August 2018, 10:42:06

Vorheriges Thema - Nächstes Thema

Byte09

ok , ich poste dir in 5 minuten mal was.

gruss Byte09

Byte09

#16
hier ist maldie Rawdefinition , eine MSwitch was genau das tut, was du im ersten post angegeben hast.

wichtig: es funktioniert nur mit der Version vom MSwitch aus dem heutigen Fhemupdate , insofern falls nicht geschehen bitte erst ein update und restart machen.

weisst du , wie du eine rawdefinition einspielst ?

wenn du es hast , schau einfach mal drüber - im grunde ist es selbsterklärend - bei unklarheiten gerne nachhaken , aber bitte im MSwitchthread ( https://forum.fhem.de/index.php/topic,86199.0.html)

Ich hoffe das es läuft, das setzt voraus, das ich die ( deine ) devicenamen getroffen habe .

bei auslösung zu angegebenen Zeiten werd die Zielbedingung gesetzt , kannst du im webinterface einfach sehen . dann wird die lampe alle 8 sekunden um 5% gedimmt bis der zielwert erreicht ist.

die auslösezeiten kannst du ganz oben im interface setzten, die ziel - zeit zuordnung in den jeweiligen 'FreeCmds'

gruss Byte09

defmod Ikeadimmer1 MSwitch
attr Ikeadimmer1 MSwitch_Debug 0
attr Ikeadimmer1 MSwitch_Delete_Delays 0
attr Ikeadimmer1 MSwitch_Expert 1
attr Ikeadimmer1 MSwitch_Extensions 0
attr Ikeadimmer1 MSwitch_Help 0
attr Ikeadimmer1 MSwitch_Ignore_Types notify allowed at watchdog doif fhem2fhem telnet FileLog readingsGroup FHEMWEB autocreate eventtypes readingsproxy svg cul
attr Ikeadimmer1 MSwitch_Include_Devicecmds 1
attr Ikeadimmer1 MSwitch_Include_MSwitchcmds 0
attr Ikeadimmer1 MSwitch_Include_Webcmds 1
attr Ikeadimmer1 MSwitch_Inforoom MSwitch
attr Ikeadimmer1 MSwitch_Lock_Quickedit 1
attr Ikeadimmer1 MSwitch_Mode Notify
attr Ikeadimmer1 MSwitch_Safemode 0
attr Ikeadimmer1 disable 0
attr Ikeadimmer1 room 1_Test

setstate Ikeadimmer1 active
setstate Ikeadimmer1 2018-09-01 10:10:56 .Device_Affected FreeCmd-AbsCmd1,FreeCmd-AbsCmd2,FreeCmd-AbsCmd3,FreeCmd-AbsCmd4,FreeCmd-AbsCmd5,Ikeadimmer1-AbsCmd1
setstate Ikeadimmer1 2018-09-01 10:12:17 .Device_Affected_Details FreeCmd-AbsCmd1,cmd,cmd,{\
my~$ziel;;\
my~$soll;;\
\
$ziel~=~ReadingsVal("Ikeadimmer1"#[ko]"ziel"#[ko]0);;~#~bis~wohin~gedimmt~werden~soll\
$soll~=~ReadingsVal("trafo_wohnzimmer"#[ko]"pct"#[ko]0);;~#~zustand~der~lampe\
\
if~($soll~<=~$ziel~)~#~lösche~wiederholung~wenn~ziel~erreicht\
~{\
~fhem("set~Ikeadimmer1~del_delays");;\
~return;;\
~}\
\
if~($soll~>~5){$soll~=~$soll~-5}~else~{$soll=0};;~#~setze~zustand~der~lampe~-5\
fhem("set~trafo_wohnzimmer~pct~$soll");;\
},,delay1,delay1,000000,000000,,,0,0,4|FreeCmd-AbsCmd2,cmd,cmd,setreading~Ikeadimmer1~ziel~90,,delay1,delay1,000000,000000,[$EVTPART3]#[sp]eq#[sp]"18#[dp]00",,,,1|FreeCmd-AbsCmd3,cmd,cmd,setreading~Ikeadimmer1~ziel~60,,delay1,delay1,000000,000000,[$EVTPART3]#[sp]eq#[sp]"18#[dp]25",,,,1|FreeCmd-AbsCmd4,cmd,cmd,setreading~Ikeadimmer1~ziel~40,,delay1,delay1,000000,000000,[$EVTPART3]#[sp]eq#[sp]"22#[dp]25",,,,1|FreeCmd-AbsCmd5,cmd,cmd,setreading~Ikeadimmer1~ziel~0,,delay1,delay1,000000,000000,[$EVTPART3]#[sp]eq#[sp]"23#[dp]55",,,,1|Ikeadimmer1-AbsCmd1,exec_cmd1,no_action,,,delay1,delay1,000000,000000,[trafo_wohnzimmer#[dp]pct]#[sp]>=#[sp]0,,,,2
setstate Ikeadimmer1 2018-09-01 10:10:12 .Device_Events no_trigger
setstate Ikeadimmer1 2018-09-01 10:10:12 .First_init done
setstate Ikeadimmer1 2018-09-01 10:10:12 .Trigger_cmd_off no_trigger
setstate Ikeadimmer1 2018-09-01 10:10:12 .Trigger_cmd_on no_trigger
setstate Ikeadimmer1 2018-09-01 10:10:12 .Trigger_off no_trigger
setstate Ikeadimmer1 2018-09-01 10:10:12 .Trigger_on no_trigger
setstate Ikeadimmer1 2018-09-01 10:10:12 .Trigger_time on~off~ononly[09:15][18:00][18:25][22:25][23:55]~offonly
setstate Ikeadimmer1 2018-09-01 10:10:12 .V_Check V 1.2
setstate Ikeadimmer1 2018-09-01 10:14:03 Trigger_device no_trigger
setstate Ikeadimmer1 2018-09-01 10:10:12 Trigger_log off
setstate Ikeadimmer1 2018-09-01 10:10:12 last_event Ikeadimmer1-AbsCmd1_conditionon
setstate Ikeadimmer1 2018-09-01 10:14:06 state active

ChristianH

Es hakt noch ...

Logs gelöscht - neustart und noch mal mit den RAW Defintionen:

echo "" > /opt/fhem/log/fhem-2018-09.log
root@fhempi:~# /etc/init.d/fhem stop && sleep 15 && /etc/init.d/fhem start && tail -f /opt/fhem/log/fhem-2018-09.log
Stopping fhem...
Starting fhem...

2018.09.01 10:57:19 0: Server shutdown
2018.09.01 10:57:21 1: Shutdown executed
2018.09.01 10:57:35 1: Including fhem.cfg
2018.09.01 10:57:37 1: HMLAN_Parse: HMLAN1 new condition disconnected
2018.09.01 10:57:37 1: HMLAN_Parse: HMLAN1 new condition init
2018.09.01 10:57:50 1: Including ./log/fhem.save
2018.09.01 10:57:53 0: Featurelevel: 5.8
2018.09.01 10:57:53 0: Server started with 261 defined entities (fhem.pl:17238/2018-08-31 perl:5.024001 os:linux user:fhem pid:13151)
2018.09.01 10:57:54 1: HMLAN_Parse: HMLAN1 new condition ok
2018.09.01 11:00:04 0: vupdate - Ikeadimmer15866
2018.09.01 11:00:06 1: No Logdevice >FileLog_CUL_TX_0<
2018.09.01 11:00:06 1: No Logdevice >FileLog_CUL_TX_83<
2018.09.01 11:00:06 1: No Logdevice >FileLog_CUL_WS_3<
2018.09.01 11:00:27 1: PERL WARNING: Use of uninitialized value $detailarray[3] in substitution (s///) at ./FHEM/98_MSwitch.pm line 4184.
2018.09.01 11:00:27 1: PERL WARNING: Use of uninitialized value $detailarray[4] in substitution (s///) at ./FHEM/98_MSwitch.pm line 4185.
2018.09.01 11:00:27 1: PERL WARNING: Use of uninitialized value $detailarray[3] in substitution (s///) at ./FHEM/98_MSwitch.pm line 4186.
2018.09.01 11:00:27 1: PERL WARNING: Use of uninitialized value $detailarray[4] in substitution (s///) at ./FHEM/98_MSwitch.pm line 4187.
2018.09.01 11:00:27 1: PERL WARNING: Use of uninitialized value $detailarray[3] in substitution (s///) at ./FHEM/98_MSwitch.pm line 4188.
2018.09.01 11:00:27 1: PERL WARNING: Use of uninitialized value $detailarray[4] in substitution (s///) at ./FHEM/98_MSwitch.pm line 4189.
2018.09.01 11:00:27 1: PERL WARNING: Use of uninitialized value $testtimestroff in string ne at ./FHEM/98_MSwitch.pm line 4196.
2018.09.01 11:00:27 1: PERL WARNING: Use of uninitialized value $testtimestroff in substitution (s///) at ./FHEM/98_MSwitch.pm line 4198.
2018.09.01 11:00:27 1: PERL WARNING: Use of uninitialized value $testtimestroff in string ne at ./FHEM/98_MSwitch.pm line 4199.
2018.09.01 11:00:27 1: PERL WARNING: Use of uninitialized value in substr at ./FHEM/98_MSwitch.pm line 4201.
2018.09.01 11:00:27 1: PERL WARNING: Argument "" isn't numeric in multiplication (*) at ./FHEM/98_MSwitch.pm line 4201.
2018.09.01 11:00:27 1: PERL WARNING: Use of uninitialized value in substr at ./FHEM/98_MSwitch.pm line 4202.
2018.09.01 11:00:27 1: PERL WARNING: substr outside of string at ./FHEM/98_MSwitch.pm line 4202.
2018.09.01 11:00:27 1: PERL WARNING: Use of uninitialized value in multiplication (*) at ./FHEM/98_MSwitch.pm line 4202.
2018.09.01 11:00:27 1: PERL WARNING: Use of uninitialized value in substr at ./FHEM/98_MSwitch.pm line 4203.
2018.09.01 11:00:27 1: PERL WARNING: substr outside of string at ./FHEM/98_MSwitch.pm line 4203.
2018.09.01 11:00:27 1: PERL WARNING: Use of uninitialized value in multiplication (*) at ./FHEM/98_MSwitch.pm line 4203.
2018.09.01 11:00:27 1: PERL WARNING: Use of uninitialized value $testtimestron in string ne at ./FHEM/98_MSwitch.pm line 4211.
2018.09.01 11:00:27 1: PERL WARNING: Use of uninitialized value $testtimestron in substitution (s///) at ./FHEM/98_MSwitch.pm line 4213.
2018.09.01 11:00:27 1: PERL WARNING: Use of uninitialized value $testtimestron in string ne at ./FHEM/98_MSwitch.pm line 4214.



Wenn ich nach dem Anlegen mal ein list Ikeadimmer1 mache:



Internals:
   CFGFN     
   NAME       Ikeadimmer1
   NOTIFYDEV  no_trigger
   NR         363
   NTFY_ORDER 45-Ikeadimmer1
   STATE      active
   TYPE       MSwitch
   Version    V1.74
   Helper:
     DBLOG:
       state:
         myDbLog:
           TIME       1535792506.49657
           VALUE      active
   READINGS:
     2018-09-01 11:01:51   Trigger_device  no_trigger
     2018-09-01 11:00:04   Trigger_log     off
     2018-09-01 10:10:12   last_event      Ikeadimmer1-AbsCmd1_conditionon
     2018-09-01 11:01:46   state           active
   helper:
     eventfrom  Sonos
     timer:
       1535817600-3 1535817600-3
       1535819100-3 1535819100-3
       1535833500-3 1535833500-3
       1535838900-3 1535838900-3
       1535839210 1535839210-5
Attributes:
   MSwitch_Debug 0
   MSwitch_Delete_Delays 0
   MSwitch_Expert 1
   MSwitch_Extensions 0
   MSwitch_Help 0
   MSwitch_Ignore_Types notify allowed at watchdog doif fhem2fhem telnet FileLog readingsGroup FHEMWEB autocreate eventtypes readingsproxy svg cul
   MSwitch_Include_Devicecmds 1
   MSwitch_Include_MSwitchcmds 0
   MSwitch_Include_Webcmds 1
   MSwitch_Inforoom MSwitch
   MSwitch_Lock_Quickedit 1
   MSwitch_Mode Notify
   MSwitch_Safemode 0
   disable    0
   room       1_Test


Sehe ich die Funktion zum Dimmen gar nicht und wundere mich gerade, wie das SONOS hier reinspielt. Könnte auch ne WebEx anbieten ;)

Christian

Byte09