RandomTimer - neues Modul

Begonnen von Dietmar63, 28 Juli 2013, 15:52:40

Vorheriges Thema - Nächstes Thema

Nestor


Beta-User

...seems we generated a new problem by parseParams usage: https://forum.fhem.de/index.php/topic,114623.0.html

Will revert that back until we have found a backwards compatible solution.
Server: HP-elitedesk@Debian 12, aktuelles FHEM@ConfigDB | CUL_HM (VCCU) | MQTT2: MiLight@ESP-GW, BT@OpenMQTTGw | MySensors: seriell, v.a. 2.3.1@RS485 | ZWave | ZigBee@deCONZ | SIGNALduino | MapleCUN | RHASSPY
svn: u.a MySensors, Weekday-&RandomTimer, Twilight,  div. attrTemplate-files

Nestor

#587
Maybe parseparams() can be enhanced to allow timespec as a parameter?

This seems to fix the issue:
--- - 2020-09-29 20:22:43.000000000 +0200
+++ fhem.pl 2020-09-29 20:18:11.000000000 +0200
@@ -5824,7 +5824,7 @@
       $key = undef;

     # the key can not start with a { -> it must be a perl expression # vim:}
-    } elsif( $key =~ m/^\s*{/ ) { # for vim: }
+    } elsif( $key =~ m/^\s*(\+|\*|\*\d+)?{/ ) { # for vim: }
       $value = $param;
       $key = undef;
     }

Beta-User

Maybe, but imo this isn't the right place to suggest that kind of changes to Rudi (most likely dev corner should be the right place, so all the other maintainers could also give some feedback on possible side effects?).

In case if that's implemented in fhem.pl, we could reimplement your suggustion, but for the moment, the module code in svn is reverted more or less back to the previous version.
Server: HP-elitedesk@Debian 12, aktuelles FHEM@ConfigDB | CUL_HM (VCCU) | MQTT2: MiLight@ESP-GW, BT@OpenMQTTGw | MySensors: seriell, v.a. 2.3.1@RS485 | ZWave | ZigBee@deCONZ | SIGNALduino | MapleCUN | RHASSPY
svn: u.a MySensors, Weekday-&RandomTimer, Twilight,  div. attrTemplate-files

rudolfkoenig

Zitatthis isn't the right place to suggest that kind of changes to Rudi
You probably should suggest this directly to justme1968, the author of the function.
I suspect that if I am "fixing" this function, it will break other things.

cortmen

#590
Tach zusammen, habe wahrscheinlich nur ein kl. Problem mit den RandomTimer.
Meine RandomTimer aktualisieren nicht  die Starttime-/Stoptime im laufe der Nacht. (24Std)
Nach einen Neustart von fhem passt wieder alles für die nächsten 24  Std.

Siehe kurzes list:


Internals:
   COMMAND   
   DEF        {sunset("REAL",0,"16:22","16:30")} MiLight_Zone1 {sunrise("REAL",0,"07:55","08:10")} 600 180:240
   DEVICE     MiLight_Zone1
   FUUID      5dab68c6-f33f-0190-3ec2-c115df0c72b35bc9
   FVERSION   98_RandomTimer.pm:0.230300/2020-10-26
   NAME       RND_Esszimmertisch
   NR         301
   STATE      disabled
   TYPE       RandomTimer
   READINGS:
     2021-01-15 08:10:05   LastCommand     set MiLight_Zone1 off
     2021-01-16 09:38:33   StartTime       2021-01-16 16:32:32
     2021-01-16 09:38:33   StopTime        2021-01-17 08:09:59
     2021-01-16 09:37:35   TimeToSwitch    600
     2021-01-16 18:13:50   active          0
     2021-01-16 18:13:50   state           disabled
   TIMER:
     RND_Esszimmertisch_RT_Exec:
       HASH       RND_Esszimmertisch
       MODIFIER   RT_Exec
       NAME       RND_Esszimmertisch_RT_Exec
     RND_Esszimmertisch_RT_SetTimer:
       HASH       RND_Esszimmertisch
       MODIFIER   RT_SetTimer
       NAME       RND_Esszimmertisch_RT_SetTimer
   helper:
     NEXT_CHECK 16.01.2021  18:24:07
     REL       
     REP       
     SIGMAWHENOFF 750
     SIGMAWHENON 900
     STARTTIME  16.01.2021  16:32:32
     STOPTIME   17.01.2021  08:09:59
     SWITCHMODE 750/900
     S_REL     
     TIMESPEC_START {sunset("REAL",0,"16:22","16:30")}
     TIMESPEC_STOP {sunrise("REAL",0,"07:55","08:10")}
     TIMETOSWITCH 600
     VAR_DURATION 180
     VAR_START  240
     active     0
     offReading state
     offRegex   .*off.*
     startTime  1610811152
     stopTime   1610867399
Attributes:
   devStateIcon on:on-for-timer off:off
   disableCond ( ReadingsVal("Home","modeAlarm","") eq "disarm")
   disableCondCmd offCmd
   offCmd     set @ off
   offState   .*off.*
   onCmd      { fhem"set @ on;set @ command Weiss;set @  brightness 60";}
   room       Timer
   switchmode 750/900
   verbose    3

Beta-User

Für "wiederholend" braucht es einen Stern, oder?
Server: HP-elitedesk@Debian 12, aktuelles FHEM@ConfigDB | CUL_HM (VCCU) | MQTT2: MiLight@ESP-GW, BT@OpenMQTTGw | MySensors: seriell, v.a. 2.3.1@RS485 | ZWave | ZigBee@deCONZ | SIGNALduino | MapleCUN | RHASSPY
svn: u.a MySensors, Weekday-&RandomTimer, Twilight,  div. attrTemplate-files

cortmen

:)Werde es mal testen, thnx

*{sunset("REAL",0,"16:22","16:30")} MiLight_Zone1 *{sunrise("REAL",0,"07:55","08:10")} 600 180:240

grappa24

gibt es eine Möglichkeit, den Start bzw. die Ausführung noch von einer Bedingung abhängig zu machen?

*{sunset("REAL",1000,"16:00","23:00")} AnwSim 22:30:00 300

sprich der RandomTimer soll in meinem Fall nur starten, wenn ReadingsVal("Bewohner", "state", "absent") == "absent"
FHEM 6.1, 2 x RasPi 3B+, Debian Buster; KNX, FS20, HM, HUE, Tradfri, Shellies, KLF200
Rollo-/Lichtsteuerung/-szenarien, T-Sensoren, Fensterkontakte, Heizungssteuerung, HEOS, Sprachsteuerung mit Alexa-FHEM, Netatmo, Nuki, ...

Beta-User

Das sollte über das Attribut "diableCond" zu lösen sein. Aber bitte möglichst mit "eq" statt "==" ;) .
Server: HP-elitedesk@Debian 12, aktuelles FHEM@ConfigDB | CUL_HM (VCCU) | MQTT2: MiLight@ESP-GW, BT@OpenMQTTGw | MySensors: seriell, v.a. 2.3.1@RS485 | ZWave | ZigBee@deCONZ | SIGNALduino | MapleCUN | RHASSPY
svn: u.a MySensors, Weekday-&RandomTimer, Twilight,  div. attrTemplate-files

grappa24

#595
gibts eigentlich das attribut switchmode noch? Ich hab den vor ewigen Zeiten mal damit aufgesetzt ?
Edit: Sorry, habs gesehen, gibts noch  ;)
FHEM 6.1, 2 x RasPi 3B+, Debian Buster; KNX, FS20, HM, HUE, Tradfri, Shellies, KLF200
Rollo-/Lichtsteuerung/-szenarien, T-Sensoren, Fensterkontakte, Heizungssteuerung, HEOS, Sprachsteuerung mit Alexa-FHEM, Netatmo, Nuki, ...

Beta-User

Na ja, ich habe zwar den kompletten Code renoviert und ein paar weitere Möglichkeiten vorgesehen, wie man den Zufall in geordnete Bahnen lenken kann, aber das Grundprinzip ist unverändert 8) .
Zumindest in der commandref ist daher auch switchmode noch zu finden, und es hat auch noch die ursprüngliche Funktion (hoffe ich jedenfalls ;D ).
Server: HP-elitedesk@Debian 12, aktuelles FHEM@ConfigDB | CUL_HM (VCCU) | MQTT2: MiLight@ESP-GW, BT@OpenMQTTGw | MySensors: seriell, v.a. 2.3.1@RS485 | ZWave | ZigBee@deCONZ | SIGNALduino | MapleCUN | RHASSPY
svn: u.a MySensors, Weekday-&RandomTimer, Twilight,  div. attrTemplate-files

refi

Hallo,
ich habe bisher die RandomTimer bei Nichtverwendung per "attr disable 1" deaktiviert. disableCond verwende ich nicht. Nach dem Update hat das Attribut "disable" bei mir keine Wirkung mehr. Soll das so?
Danke! Gruß René
Raspberry Pi3: Duofern, Z-Wave, EnOcean

Beta-User

Sorry, da habe ich etwas zu viel weggeräumt ::) . Mit der jetzigen Version im svn sollte es wieder klappen.
Server: HP-elitedesk@Debian 12, aktuelles FHEM@ConfigDB | CUL_HM (VCCU) | MQTT2: MiLight@ESP-GW, BT@OpenMQTTGw | MySensors: seriell, v.a. 2.3.1@RS485 | ZWave | ZigBee@deCONZ | SIGNALduino | MapleCUN | RHASSPY
svn: u.a MySensors, Weekday-&RandomTimer, Twilight,  div. attrTemplate-files

refi

Vielen Dank für die schnelle Hilfe !!! Geht wieder!
Raspberry Pi3: Duofern, Z-Wave, EnOcean