RandomTimer - result of function Value must be 'on' or 'off'

Begonnen von reuter14, 09 Dezember 2016, 23:07:30

Vorheriges Thema - Nächstes Thema

Dietmar63

erzeuge mal bitte ein list auf dem Gerät - dann kann ich vielleicht das richtige stateFormat liegen.
Gruß Dietmar
FB7390, CUL, 2 FHT, FS20
modules: 98_WOL.pm, 98_Heating_Control.pm,   98_WeekdayTimer.pm, 98_RandomTimer.pm, 59_Twilight.pm

Arminius73

Hier sind die Listings:

1.  Jalou_1_rdm


Internals:
   9495_UW_MSGCNT 180
   9495_UW_RAWMSG 0FFF0F210D08D00000004100130000619FB5FFFFFF01
   9495_UW_TIME 2017-03-14 06:10:04
   CODE       619FB5
   DEF        619FB5
   IODev      9495_UW
   LASTInputDev 9495_UW
   MSGCNT     180
   NAME       Jalou_1
   NR         587
   STATE      opened
   SUBTYPE    RolloTron Comfort Master
   TYPE       DUOFERN
   Readings:
     2017-03-14 06:10:04   dawnAutomatic   on
     2017-03-14 06:10:04   duskAutomatic   on
     2017-03-14 06:10:04   manualMode      off
     2017-03-14 06:10:04   moving          stop
     2017-03-14 06:10:04   position        0
     2017-03-14 06:10:04   state           opened
     2017-03-14 06:10:04   sunAutomatic    on
     2017-03-14 06:10:04   sunMode         off
     2017-03-14 06:10:04   sunPosition     65
     2017-03-14 06:10:04   timeAutomatic   on
     2017-03-14 06:10:04   ventilatingMode on
     2017-03-14 06:10:04   ventilatingPosition 80
     2017-03-14 06:10:04   version         1.3
   Helper:
Attributes:
   IODev      9495_UW
   room       DUOFERN

2. Jalou_1_rdm
Internals:
   COMMAND    off
   DEF        *{sunset_abs(200)} Jalou_1 *{sunset_abs(5*3600)} 900
   DEVICE     Jalou_1
   NAME       Jalou_1_rdm
   NR         591
   STATE      off
   TYPE       RandomTimer
   Readings:
     2017-03-14 00:15:30   Startzeit       2017-03-14 19:03:35
     2017-03-14 00:15:30   Stoppzeit       2017-03-15 00:00:15
     2017-03-10 16:19:23   TimeToSwitch    900
     2017-03-14 00:15:30   active          0
     2017-03-14 00:15:30   state           off
   Timer:
     Jalou_1_rdm_exec:
       HASH       Jalou_1_rdm
       MODIFIER   Exec
       NAME       Jalou_1_rdm_Exec
     Jalou_1_rdm_settimer:
       HASH       Jalou_1_rdm
       MODIFIER   SetTimer
       NAME       Jalou_1_rdm_SetTimer
   Helper:
     REL
     REP        *
     SIGMAWHENOFF 800
     SIGMAWHENON 200
     STARTTIME  14.03.2017  19:03:35
     STOPTIME   15.03.2017  00:00:15
     SWITCHMODE 800/200
     S_REL
     S_REP      *
     TIMESPEC_START *{sunset_abs(200)}
     TIMESPEC_STOP *{sunset_abs(5*3600)}
     TIMETOSWITCH 900
     active     0
     startTime  1489514615
     stopTime   1489532415
Attributes:
   onCmd      set HM_Steckdose_Sw toggle
   switchmode 800/200

Dietmar63

@Arminius73:
Ist das ein neuer Fall, oder hast du dich zwischendurch umbenannt?
Gruß Dietmar
FB7390, CUL, 2 FHT, FS20
modules: 98_WOL.pm, 98_Heating_Control.pm,   98_WeekdayTimer.pm, 98_RandomTimer.pm, 59_Twilight.pm

Arminius73

Hallo Dietmar,
ich bin neu im Forum und habe da wohl einiges durcheinander gebracht.
Es ist ein neuer Fall, aber Du hast meinen ersten Beitrag wohl nicht bekommen und Dich dann über meine Listings gewundert, die gesendet wurden, aber ich weiß noch nicht so recht wie, da ich noch immer den Sendeknopf suche.
Wenn ich besser mit den Dialogen umgehen kann, wiederhole ich meine erste Frage.
Es könnte auch an meinen 'NoScript addons' liegen, dass meine Antworten nicht gesendet werden.
Sorry!

Gruß,
Arminius73

Jump2016

@Dietmar63: meintest du so eine List:


Internals:
   DEF        192.168.x.xx
   ERROR      empty return buffer
   ERRORCOUNT 0
   ERRORTIME  2017-03-12 17:54:00
   INTERVAL   0
   LASTCMD    power
   MAC        74DA374AF367
   MODEL      SP2101W
   NAME       EDIPlug_01
   NR         119
   PName      Hz_warm
   POWER      ON
   STATE      ON / 0.07 W / 0.0061 A
   TYPE       EDIPLUG
   VERSION    2.03
   addr       http://192.168.x.xx:10000
   auth       admin:xxxx
   buf
   code       200
   conn
   data
   displayurl http://admin:xxxx@192.168.x.xx:10000/smartplug.cgi
   host       192.168.x.xx
   httpheader HTTP/1.0 200 OK

Content-Type: application/xml; charset=utf-8

Cache-Control: no-cache

Pragma: no-cache

Content-Length: 572

Connection: close

Date: Tue, 14 Mar 2017 23:54:56 GMT

Server: lighttpd/1.4.31-devel-299
   hu_blocking 0
   hu_filecount 120
   hu_portSfx :10000
   loglevel   4
   path       /smartplug.cgi
   port       10000
   protocol   http
   pwd        xxxx
   redirects  0
   timeout    2
   url        http://admin:xxxx@192.168.x.xx:10000/smartplug.cgi
   user       admin
   Readings:
     2017-03-14 23:54:46   current         0.0061 A
     2017-03-14 23:54:46   last_Toggle_Time 23:54:53 14.03.2017
     2017-03-14 23:54:46   onoff           on
     2017-03-14 23:54:46   power_day       0.000 kWh
     2017-03-14 23:54:46   power_month     0.000 kWh
     2017-03-14 23:54:46   power_now       0.07 W
     2017-03-14 23:54:46   power_week      0.000 kWh
     2017-03-14 23:54:46   state           ON / 0.07 W / 0.0061 A
   Helper:
     current    0.0061
     power      0.07
     list:








   Sslargs:
Attributes:
   alias      Schalter Heizstab
   eventMap   on:an off:aus
   group      Heizung
   interval   60
   model      SP2101W
   password   xxxx
   read-only  0
   room       Heizung
   sortby     1
   user       admin

Dietmar63

versuch mal:
attr stateFormat  EDIPlug_01  {(Value() =~ m/^on.*/i)  ? "on" : "off" }
Habe es aus dem Kopf heraus geschrieben - hoffe es ist syntaktisch richtig.
Gruß Dietmar
FB7390, CUL, 2 FHT, FS20
modules: 98_WOL.pm, 98_Heating_Control.pm,   98_WeekdayTimer.pm, 98_RandomTimer.pm, 59_Twilight.pm

Jump2016

Sorry, bin heute erst zum Testen gekommen.

Erhalte im Log anschließend die Meldung:
Error evaluating EDIPlug_01 stateFormat: Not enough arguments for main::Value at (eval 57649) line 1, near "() "

Jump2016

@Dietmar63

Kannst du dir das noch mal anschauen?

Dank dir.

Dietmar63


attr stateFormat  EDIPlug_01  {(Value("EDIPlug_01") =~ m/^on.*/i)  ? "on" : "off" }
Gruß Dietmar
FB7390, CUL, 2 FHT, FS20
modules: 98_WOL.pm, 98_Heating_Control.pm,   98_WeekdayTimer.pm, 98_RandomTimer.pm, 59_Twilight.pm

Jump2016

hallo Dietmar,

danke jetzt bin ich ein Schritt weiter  :)
Dank dir.

Nun bleibt aber der State auf "off" selbst wenn die Steckdose eingeschaltet ist.
Hast du ne Idee?

Dietmar63

Gib mal

{(Value("EDIPlug_01")}

wenn sie eingeschaltet ist ein und poste die Ausgabe
Gruß Dietmar
FB7390, CUL, 2 FHT, FS20
modules: 98_WOL.pm, 98_Heating_Control.pm,   98_WeekdayTimer.pm, 98_RandomTimer.pm, 59_Twilight.pm

Jump2016

Hab folgendes gemacht:

- Ediplug eingeschaltet
  - State ist: ON / 0.07 W / 0.0051 A

- Stateformat {(Value("EDIPlug_01"))} gesetzt.
  - State ist unverändert.

- Ediplug ausgeschaltet
  - State ist noch immer unverändert

Im Log steht nun
2017.04.01 18:38:55 3: EDIPlug_01, empty return buffer [1]

Dietmar63

Neuer Versuch


attr stateFormat  EDIPlug_01  {(Value("EDIPlug_01") =~ m/(ON|on)/i)  ? "on" : "off" }
Gruß Dietmar
FB7390, CUL, 2 FHT, FS20
modules: 98_WOL.pm, 98_Heating_Control.pm,   98_WeekdayTimer.pm, 98_RandomTimer.pm, 59_Twilight.pm

Jump2016


Dietmar63

Mit dem letzten stateFormat.
Wie ist die Ausgabe von
{(Value("EDIPlug_01")}
in der Weboberfläche?
Gruß Dietmar
FB7390, CUL, 2 FHT, FS20
modules: 98_WOL.pm, 98_Heating_Control.pm,   98_WeekdayTimer.pm, 98_RandomTimer.pm, 59_Twilight.pm