mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-13 17:26:34 +00:00
90_at.pm: add modifyTimeSpec command for at.
git-svn-id: https://svn.fhem.de/fhem/trunk@8057 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
b0c66e58d8
commit
0a77b7d67c
26
fhem/CHANGED
26
fhem/CHANGED
@ -1,6 +1,8 @@
|
|||||||
# Add changes at the top of the list. Keep it in ASCII, and 80-char wide.
|
# Add changes at the top of the list. Keep it in ASCII, and 80-char wide.
|
||||||
# Do not insert empty lines here, update check depends on it.
|
# Do not insert empty lines here, update check depends on it.
|
||||||
- added: New module 71_PHILIPS_AUDIO.pm for Philips MCi, Streamium and Fidelio devices.
|
- feature: set command modifyTimeSpec for at, to be used in webCmd
|
||||||
|
- added: New module 71_PHILIPS_AUDIO.pm for Philips MCi, Streamium and
|
||||||
|
Fidelio devices.
|
||||||
- bugfix: FB_CALLMONITOR: fixed reverse-search for search.ch
|
- bugfix: FB_CALLMONITOR: fixed reverse-search for search.ch
|
||||||
- feature: help is now a separate module
|
- feature: help is now a separate module
|
||||||
- feature: pahColor() added to Color.pm to convert temperatures
|
- feature: pahColor() added to Color.pm to convert temperatures
|
||||||
@ -16,10 +18,10 @@
|
|||||||
FWext is automatically deleted after deletion of last
|
FWext is automatically deleted after deletion of last
|
||||||
RSS device; RSS Overview and elements opened in new tab;
|
RSS device; RSS Overview and elements opened in new tab;
|
||||||
refresh 0 to disable autorefresh; new function plotFromUrl
|
refresh 0 to disable autorefresh; new function plotFromUrl
|
||||||
- bugfix: SOMFY: use correct attributename when calculating updatetime
|
- bugfix: SOMFY: use correct attributename when calculating updatetime
|
||||||
- feature: 95_FLOORPLAN.pm: arrange by drag&drop,
|
- feature: 95_FLOORPLAN.pm: arrange by drag&drop,
|
||||||
copy, rename, delete processes userattr fp_<name>
|
copy, rename, delete processes userattr fp_<name>
|
||||||
- added: 30_LIGHTIFY.pm: New module for OSRAM LIGHTIFY gateways
|
- added: 30_LIGHTIFY.pm: New module for OSRAM LIGHTIFY gateways
|
||||||
- changed: 98_pilight.pm: New protocols
|
- changed: 98_pilight.pm: New protocols
|
||||||
- feature: 55_InfoPanel - added direct link to rect,circle,ellipse,
|
- feature: 55_InfoPanel - added direct link to rect,circle,ellipse,
|
||||||
img, trash
|
img, trash
|
||||||
@ -34,7 +36,7 @@
|
|||||||
- feature: YAMAHA_AVR: new commands play, pause, stop, skip, shuffle, repeat
|
- feature: YAMAHA_AVR: new commands play, pause, stop, skip, shuffle, repeat
|
||||||
- feature: 71_YAMAHA_NP: New command set and readings for menu navigation
|
- feature: 71_YAMAHA_NP: New command set and readings for menu navigation
|
||||||
- feature: 71_YAMAHA_NP: New command 'dimmer [1..3]'
|
- feature: 71_YAMAHA_NP: New command 'dimmer [1..3]'
|
||||||
- bugfix: 31_MilightDevice: if already off don't turn on to set dim level!
|
- bugfix: 31_MilightDevice: if already off don't turn on to set dim level!
|
||||||
- added: new dustbin icon
|
- added: new dustbin icon
|
||||||
- bugfix: SYSMON: some warnings
|
- bugfix: SYSMON: some warnings
|
||||||
- changed: SYSMON: documentation
|
- changed: SYSMON: documentation
|
||||||
@ -47,8 +49,8 @@
|
|||||||
Saturation set/transition, set with command saturation
|
Saturation set/transition, set with command saturation
|
||||||
Bugfix for long transition on hue=0 and hue = 360
|
Bugfix for long transition on hue=0 and hue = 360
|
||||||
Set hardware brightness to minimum before off
|
Set hardware brightness to minimum before off
|
||||||
- bugfix: FB_CALLMONITOR: allow spaces in phone numbers stored in phonebooks
|
- bugfix: FB_CALLMONITOR: allow spaces in phone numbers stored in phonebooks
|
||||||
- bugfix: SYSMON: Symbol '#' in Readings prevents update
|
- bugfix: SYSMON: Symbol '#' in Readings prevents update
|
||||||
- feature: new helper module TimeSeries.pm (Boris)
|
- feature: new helper module TimeSeries.pm (Boris)
|
||||||
- feature: 71_YAMAHA_NP.pm: Make timer setting more convenient.
|
- feature: 71_YAMAHA_NP.pm: Make timer setting more convenient.
|
||||||
- changed: FB_CALLMONITOR: allow chars in phone numbers for reverse search
|
- changed: FB_CALLMONITOR: allow chars in phone numbers for reverse search
|
||||||
@ -60,14 +62,14 @@
|
|||||||
tunerAudioModeDAB, tunerFrequencyDAB.
|
tunerAudioModeDAB, tunerFrequencyDAB.
|
||||||
New internals: NP_ICON_x, UDN, Friendly_Name
|
New internals: NP_ICON_x, UDN, Friendly_Name
|
||||||
- changed: 73_km200.pm: More services found.
|
- changed: 73_km200.pm: More services found.
|
||||||
- bugfix: FB_CALLMONITOR: read phonebooks after all attributes are set
|
- bugfix: FB_CALLMONITOR: read phonebooks after all attributes are set
|
||||||
from fhem.cfg.
|
from fhem.cfg.
|
||||||
- feature: 70_XBMC.pm: clear readings when stopping media
|
- feature: 70_XBMC.pm: clear readings when stopping media
|
||||||
- feature: 70_XBMC.pm: new reading is3DFile for 3D files
|
- feature: 70_XBMC.pm: new reading is3DFile for 3D files
|
||||||
- bugfix: 70_XBMC.pm: improved JSON separator
|
- bugfix: 70_XBMC.pm: improved JSON separator
|
||||||
- added 73_km200: More services added.
|
- added: 73_km200: More services added.
|
||||||
- changed 73_km200: Fhem get-command is able to return raw.
|
- changed: 73_km200: Fhem get-command is able to return raw.
|
||||||
- bugfix 73_km200: Handling of unknown attributes corrected.
|
- bugfix: 73_km200: Handling of unknown attributes corrected.
|
||||||
- feature: 31_MilightDevice.pm: Add hue/ct colorpickers.
|
- feature: 31_MilightDevice.pm: Add hue/ct colorpickers.
|
||||||
Add "presets" set command.
|
Add "presets" set command.
|
||||||
- feature: 70_XBMC.pm: new commands poweron,poweroff.
|
- feature: 70_XBMC.pm: new commands poweron,poweroff.
|
||||||
|
@ -14,6 +14,7 @@ at_Initialize($)
|
|||||||
|
|
||||||
$hash->{DefFn} = "at_Define";
|
$hash->{DefFn} = "at_Define";
|
||||||
$hash->{UndefFn} = "at_Undef";
|
$hash->{UndefFn} = "at_Undef";
|
||||||
|
$hash->{SetFn} = "at_Set";
|
||||||
$hash->{AttrFn} = "at_Attr";
|
$hash->{AttrFn} = "at_Attr";
|
||||||
$hash->{StateFn} = "at_State";
|
$hash->{StateFn} = "at_State";
|
||||||
$hash->{AttrList} = "disable:0,1 disabledForIntervals ".
|
$hash->{AttrList} = "disable:0,1 disabledForIntervals ".
|
||||||
@ -24,6 +25,7 @@ at_Initialize($)
|
|||||||
|
|
||||||
my $at_stt_sec;
|
my $at_stt_sec;
|
||||||
my $at_stt_day;
|
my $at_stt_day;
|
||||||
|
my $at_detailFnCalled;
|
||||||
|
|
||||||
sub
|
sub
|
||||||
at_SecondsTillTomorrow($) # 86400, if tomorrow is no DST change
|
at_SecondsTillTomorrow($) # 86400, if tomorrow is no DST change
|
||||||
@ -198,6 +200,29 @@ at_adjustAlign($$)
|
|||||||
return undef;
|
return undef;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sub
|
||||||
|
at_Set($@)
|
||||||
|
{
|
||||||
|
my ($hash, @a) = @_;
|
||||||
|
|
||||||
|
my $cmd = ($at_detailFnCalled ? "modifyTimeSpec" : "modifyTimeSpec:time");
|
||||||
|
$at_detailFnCalled = 0;
|
||||||
|
return "no set argument specified" if(int(@a) < 2);
|
||||||
|
return "Unknown argument $a[1], choose one of $cmd"
|
||||||
|
if($a[1] ne "modifyTimeSpec");
|
||||||
|
|
||||||
|
my ($err, undef) = GetTimeSpec($a[2]);
|
||||||
|
return $err if($err);
|
||||||
|
|
||||||
|
my $def = ($hash->{RELATIVE} eq "yes" ? "+":"").
|
||||||
|
($hash->{PERIODIC} eq "yes" ? "*":"").
|
||||||
|
$a[2];
|
||||||
|
$hash->{OLDDEF} = $hash->{DEF};
|
||||||
|
my $ret = at_Define($hash, "$hash->{NAME} at $def");
|
||||||
|
delete $hash->{OLDDEF};
|
||||||
|
return $ret;
|
||||||
|
}
|
||||||
|
|
||||||
sub
|
sub
|
||||||
at_Attr(@)
|
at_Attr(@)
|
||||||
{
|
{
|
||||||
@ -258,6 +283,8 @@ at_fhemwebFn($$$$)
|
|||||||
my ($FW_wname, $d, $room, $pageHash) = @_; # pageHash is set for summaryFn.
|
my ($FW_wname, $d, $room, $pageHash) = @_; # pageHash is set for summaryFn.
|
||||||
my $hash = $defs{$d};
|
my $hash = $defs{$d};
|
||||||
|
|
||||||
|
$at_detailFnCalled = 1 if(!$pageHash);
|
||||||
|
|
||||||
my $ts = $hash->{TIMESPEC}; $ts =~ s/'/\\'/g;
|
my $ts = $hash->{TIMESPEC}; $ts =~ s/'/\\'/g;
|
||||||
my $isPerl = ($ts =~ m/^{(.*)}/);
|
my $isPerl = ($ts =~ m/^{(.*)}/);
|
||||||
$ts = $1 if($isPerl);
|
$ts = $1 if($isPerl);
|
||||||
@ -353,9 +380,9 @@ EOF
|
|||||||
define a4 at *17:00:00 set lamp on # every day
|
define a4 at *17:00:00 set lamp on # every day
|
||||||
|
|
||||||
# relative ones
|
# relative ones
|
||||||
define a5 at +00:00:10 set lamp on # switch on in 10 seconds
|
define a5 at +00:00:10 set lamp on # switch on in 10 seconds
|
||||||
define a6 at +00:00:02 set lamp on-for-timer 1 # Blink once in 2 seconds
|
define a6 at +00:00:02 set lamp on-for-timer 1 # Blink once in 2 seconds
|
||||||
define a7 at +*{3}00:00:02 set lamp on-for-timer 1 # Blink 3 times
|
define a7 at +*{3}00:00:02 set lamp on-for-timer 1 # Blink 3 times
|
||||||
|
|
||||||
# Blink 3 times if the piri sends a command
|
# Blink 3 times if the piri sends a command
|
||||||
define n1 notify piri:on.* define a8 at +*{3}00:00:02 set lamp on-for-timer 1
|
define n1 notify piri:on.* define a8 at +*{3}00:00:02 set lamp on-for-timer 1
|
||||||
@ -403,7 +430,18 @@ EOF
|
|||||||
|
|
||||||
|
|
||||||
<a name="atset"></a>
|
<a name="atset"></a>
|
||||||
<b>Set</b> <ul>N/A</ul><br>
|
<b>Set</b>
|
||||||
|
<ul>
|
||||||
|
<a name="modifyTimeSpec"></a>
|
||||||
|
<li>modifyTimeSpec <timespec><br>
|
||||||
|
Change the execution time. Note: the N-times repetition is ignored.
|
||||||
|
It is intended to be used in combination with
|
||||||
|
<a href="#webCmd">webCmd</a>, for an easier modification from the room
|
||||||
|
overview in FHEMWEB.
|
||||||
|
</li>
|
||||||
|
</ul><br>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a name="atget"></a>
|
<a name="atget"></a>
|
||||||
<b>Get</b> <ul>N/A</ul><br>
|
<b>Get</b> <ul>N/A</ul><br>
|
||||||
@ -546,7 +584,17 @@ EOF
|
|||||||
|
|
||||||
|
|
||||||
<a name="atset"></a>
|
<a name="atset"></a>
|
||||||
<b>Set</b> <ul>N/A</ul><br>
|
<b>Set</b>
|
||||||
|
<ul>
|
||||||
|
<a name="modifyTimeSpec"></a>
|
||||||
|
<li>modifyTimeSpec <timespec><br>
|
||||||
|
Ändert die Ausführungszeit. Achtung: die N-malige
|
||||||
|
Wiederholungseinstellung wird ignoriert. Gedacht zur einfacheren
|
||||||
|
Modifikation im FHEMWEB Raumübersicht, dazu muss man
|
||||||
|
modifyTimeSpec in <a href="webCmd">webCmd</a> spezifizieren.
|
||||||
|
</li>
|
||||||
|
</ul><br>
|
||||||
|
|
||||||
|
|
||||||
<a name="atget"></a>
|
<a name="atget"></a>
|
||||||
<b>Get</b> <ul>N/A</ul><br>
|
<b>Get</b> <ul>N/A</ul><br>
|
||||||
|
@ -806,12 +806,15 @@ FW_createTime(elName, devName, vArr, currVal, set, params, cmd)
|
|||||||
|
|
||||||
var inp = $(newEl).find("[type=text]");
|
var inp = $(newEl).find("[type=text]");
|
||||||
var btn = $(newEl).find("[type=button]");
|
var btn = $(newEl).find("[type=button]");
|
||||||
$(inp).val(currVal ? currVal : "12:00");
|
currVal = (currVal ? currVal : "12:00")
|
||||||
|
.replace(/[^\d]*(\d\d):(\d\d).*/g,"$1:$2");
|
||||||
|
$(inp).val(currVal)
|
||||||
if(elName)
|
if(elName)
|
||||||
$(inp).attr("name", elName);
|
$(inp).attr("name", elName);
|
||||||
|
|
||||||
var hh, mm; // the slider elements
|
var hh, mm; // the slider elements
|
||||||
newEl.setValueFn = function(arg) {
|
newEl.setValueFn = function(arg) {
|
||||||
|
arg = arg.replace(/[^\d]*(\d\d):(\d\d).*/g,"$1:$2");
|
||||||
$(inp).val(arg);
|
$(inp).val(arg);
|
||||||
var hhmm = arg.split(":");
|
var hhmm = arg.split(":");
|
||||||
if(hhmm.length == 2 && hh && mm) {
|
if(hhmm.length == 2 && hh && mm) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user