SetExtensions on-till-overnight on-for-timer

Begonnen von mgmino, 07 März 2023, 03:13:26

Vorheriges Thema - Nächstes Thema

mgmino

set bedlamp on-for-timer 24000

gives the error message:

ZitatWrong timespec 24000: either HH:MM:SS or {perlcode}

The documentation says "on-for-timer <seconds>" the following executes:

set bedlamp on-for-timer 07:00



set bedlamp on-till-overnight 01:35

gives the error message:

ZitatUnknown argument on-till-overnight ...

Looking at the SetExtensions,pm module, it appears that this function was not implemented although the documentation suggests otherwise. I am willing to be part of the solution if appropriate and I am interpreting these items properly.

Beta-User

Could you please show a "list" of the bedlamp device?

Some Modules do not implement these commands via SetExtensions...
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

mgmino

The on-till function works as documented and the on-for-timer works but not as documented. I conclude that since some of the SetExtensions work, they all would. That said, he is the results of list bedlamp

Internals:
   BRIGHT     210
   DEF        lm12 C 1
   FUUID      5ee2dd52-f33f-f43b-4ad2-66a3c82cd2538c80
   HOUSE      C
   IODev      x10gw
   LASTInputDev x10gw
   MODEL      lm12
   MSGCNT     9
   NAME       bedlamp
   NR         18
   ONOFF      0
   STATE      off
   TYPE       X10
   UNIT       1
   eventCount 473
   x10gw_MSGCNT 9
   x10gw_TIME 2023-03-01 21:30:28
   READINGS:
     2022-12-23 01:06:44   IODev           x10gw
     2023-03-07 04:23:22   dimmer          100
     2023-03-07 04:23:22   onoff           0
     2023-03-07 04:23:22   state           off
   internals:
     interfaces dimmer
Attributes:
   IODev      x10gw
   alexaName  Bed Lamp
   devStateIcon on:lamp-on off:lamp-off
   genericDeviceType light
   group      Lights,
   icon       lamp
   room       Master Bedroom

betateilchen

The problem is not SetExtension, but X10 itself.
Please be aware of the special notes in the module's documentation.

https://commandref.fhem.de/#X10

Zitaton-for-timer requires a relative time in the "at" format (HH:MM:SS, HH:MM) or { <perl code> }, where the perl code returns a time specification).

Furthermore, on-till-overnight is not supported by X10.
-----------------------
Formuliere die Aufgabe möglichst einfach und
setze die Lösung richtig um - dann wird es auch funktionieren.
-----------------------
Lesen gefährdet die Unwissenheit!

mgmino

betateilchen: You have answered both questions. It appears that the X-10 module implements those extensions directly rather than use the SetExtensions module which I incorrectly assumed. It is these inconsistencies that drive a newbie nuts. Thank you for pointing me in the right direction (to the native device documentation). Another lesson learned.

betateilchen

#5
Zitat von: mgmino am 07 März 2023, 22:33:06
It appears that the X-10 module implements those extensions directly rather than use the SetExtensions module which I incorrectly assumed.

There is a very simple reason for this behavior: SetExtension.pm did not yet exist when X10.pm was created.
-----------------------
Formuliere die Aufgabe möglichst einfach und
setze die Lösung richtig um - dann wird es auch funktionieren.
-----------------------
Lesen gefährdet die Unwissenheit!