RandomTimer - neues Modul

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

Vorheriges Thema - Nächstes Thema

Bastel-Frank

Welche Funktion hat der "*"?

Dietmar63

Gruß Dietmar
FB7390, CUL, 2 FHT, FS20
modules: 98_WOL.pm, 98_Heating_Control.pm,   98_WeekdayTimer.pm, 98_RandomTimer.pm, 59_Twilight.pm

fruit

Sorry, no German (feel free to reply in German if you prefer, I'll try and make some sense of google translate)

I have been using this module for a few months, very useful and much better than my previous switched at commands.

I am getting odd messages in the logs. I have tried various modifications to the defines but cannot see why they are happening.
These are a few from January. I cannot find any similar reports from searches.
2015.01.10 08:18:25 1: PERL WARNING: Use of uninitialized value $@ in substitution (s///) at ./FHEM/98_RandomTimer.pm line 412.
2015.01.08 05:53:27 1: PERL WARNING: Use of uninitialized value $@ in substitution (s///) at ./FHEM/98_RandomTimer.pm line 412.
2015.01.07 17:05:31 1: PERL WARNING: Use of uninitialized value $@ in substitution (s///) at ./FHEM/98_RandomTimer.pm line 412.
2015.01.07 07:05:59 1: PERL WARNING: Use of uninitialized value $@ in substitution (s///) at ./FHEM/98_RandomTimer.pm line 412.
2015.01.06 08:09:51 1: PERL WARNING: Use of uninitialized value $@ in substitution (s///) at ./FHEM/98_RandomTimer.pm line 412.


I am puzzled as they don't appear at exactly the same time every day, but that could be 'sunset' related

I have
define RT_Socket_23_1 RandomTimer *{sunset_abs()} 0056ccfe03 00:30:00 480
attr RT_Socket_23_1 disable 1
attr RT_Socket_23_1 room TRX_LIGHT
attr RT_Socket_23_1 switchmode 800/200

define RT_Socket_23_2 RandomTimer *05:30:00 0056ccfe03 08:30:00 480
attr RT_Socket_23_2 disable 1
attr RT_Socket_23_2 room TRX_LIGHT
attr RT_Socket_23_2 switchmode 800/200


Feel free to follow up in German if you prefer

Dietmar63

#198
I have checked in a new version of RT.
Try with that version an let me know, if it works better.

sunset() ist not the problem.
Gruß Dietmar
FB7390, CUL, 2 FHT, FS20
modules: 98_WOL.pm, 98_Heating_Control.pm,   98_WeekdayTimer.pm, 98_RandomTimer.pm, 59_Twilight.pm

fruit

Thanks, I'll update in the morning and see how it goes.
Feel free to follow up in German if you prefer

fruit

Sorry for the delay, I have been away both days since updating.

All is good, RandomTimer is working as expected with no more warnings in the logs.
Many thanks, and for this useful module.

May I suggest a few minor corrections to the commandref documentation for your next commit, I hope this is a suitable format..

/i'm able to switch/I'm able to switch/
/over the word./over the world./
/<h3>Deskrition/<h3>Description/
/trys/tries/


the timespec <a href="#at">at</a> &nbsp;.

would read better as

the <a href="#at">at</a> timespec &nbsp;.
Feel free to follow up in German if you prefer

yellowpinky

@ Dietmar63
Der Parameter "switchmode" ist anscheinend fix auf 800/200 eingestellt, da andere Werte meiner Meinung nach keinen Einfluß auf das Schaltverhalten haben.
Ich wollte mein ToilettenLicht schalten -> ca. 30sec. ein und ca.1h aus. Ich wollte mich dabei dem Parameter switchmode 10/800 bedienen, aber leider ist das Verhalten eher 800/200.
Ist dieser Parameter für meinen Anwendungsfall überhaupt die richtige ?

LG
Yellow Pinky

Dietmar63

Da hast du etwas falsch verstanden. Es wird bei 200/800 mit 20% Wahrscheinlichkeit eingeschaltet und mit 80% Wahrscheinlichkeit ausgeschaltet. Es hat nichts mit der Dauer zu tun.
Gruß Dietmar
FB7390, CUL, 2 FHT, FS20
modules: 98_WOL.pm, 98_Heating_Control.pm,   98_WeekdayTimer.pm, 98_RandomTimer.pm, 59_Twilight.pm

yellowpinky

Danke für die schnelle Antwort,
...aber ist es nicht so, dass wenn die Wahrscheinlichkeit sehr klein ist das ein Ein Befehl "durch geht", dann die Zeit wo die Lampe ausgeschaltet bleibt sich verlängert.
Anbei noch ein Screenshot wo der switchmode auf 800/200 ist obwohl auf 10/800 konfiguriert..
LG

Dietmar63

#204
@yellowpinky
schalte mal verbose 5 ein, dann kannst du sehen wann RT zu schalten versucht, und wie die Zufallsfunktion genutzt wird.

RT soll eher wie eine Zufallsfunktion einer Zeitschaltuhr ein Gerät schalten und eine Anwesenheit vortäuschen - hoffentlich.
ToilettenLicht schalten -> ca. 30sec. ein und ca.1h aus kann man eher nicht machen.

zu 10/800:
du musst ein wenig warten - dann schaltet RT um.
Gruß Dietmar
FB7390, CUL, 2 FHT, FS20
modules: 98_WOL.pm, 98_Heating_Control.pm,   98_WeekdayTimer.pm, 98_RandomTimer.pm, 59_Twilight.pm

Benni

Hallo,

das mit dem 30 Sekunden AN habe ich ich bei mir über das Attribut onCmd des RandomTimer mit Schaltbefehl on-for-timer gelöst, nur dass es bei mir nicht nur einfach 30 Sekunden sind, sondern eine zufällige Zeit zwischen 30 und 120 Sekunden:

attr EG.TL.RT.Toilettenlicht onCmd {fhem("set @ on-for-timer ".int(rand(90)+30))}

Das zu schaltende device muss on-for-timer dazu natürlich unterstützen.

Gruß Benni.

Dietmar63

Das geht, aber das hast du das Modul anders  genutzt, als es gedacht war.
Gruß Dietmar
FB7390, CUL, 2 FHT, FS20
modules: 98_WOL.pm, 98_Heating_Control.pm,   98_WeekdayTimer.pm, 98_RandomTimer.pm, 59_Twilight.pm

yellowpinky

Hi;

Danke für die schnellen Antworten.
Der Parameter switchmode funktioniert anscheinend nur wenn er 3stellig eingegeben wird -> also 010/800 anstatt 10/800.
Diesen Zugang für das Lösunsproblem Toilette- oder auch Flurlicht finde ich nicht so schlecht, da die Auszeiten bei timetoswitch 60 bei mir zwischen 10min und 2Std. geschwankt haben.
Wirkt frinde ich sehr realistisch.

onCmd benötige ich leider für den dimm Befehle, also fällt das on-for-timer leider aus.

awel

Hilfe - F1 - Hilfe - fhem hängt nach letztem Update

Seit dem Update vom 19.01.2015 hängt fhem bei mir, wenn RandomTimer den Schaltvorgang ausführt; die Definition funktioniert noch fehlerfrei ohne Meldung.
Auch mit verbose 5 habe ich Log keine Einträge, aber putty zeigt mir vom Raspberry folgende Meldung:

Undefined subroutine &main::get_switchmode called at ./FHEM/98_RandomTimer.pm line 373.

Bin für schnelle Hilfe dankbar,
mfG Achim

Dietmar63

Gruß Dietmar
FB7390, CUL, 2 FHT, FS20
modules: 98_WOL.pm, 98_Heating_Control.pm,   98_WeekdayTimer.pm, 98_RandomTimer.pm, 59_Twilight.pm