on-for-timer, wie geht das?

Begonnen von accessburn, 17 März 2016, 14:35:00

Vorheriges Thema - Nächstes Thema

accessburn

Hallo,

ich schalte so eine Lampe

define Lampe dummy
attr Lampe alias Stehlampe
attr Lampe fp_Grundriss 462,633,0, ,Lampe
attr Lampe group Steuerung
attr Lampe icon light_floor_lamp
attr Lampe room Wohnzimmer
attr Lampe setList on off
define off_Lampe notify Lampe:off {system("sudo /home/pi/raspberry-remote/send 00010 1 0 &")}
define on_Lampe notify Lampe:on { system("sudo /home/pi/raspberry-remote/send 00010 1 1 &")}


in ftui dann so
<div data-type="switch" data-device="Lampe" data-icon="oa-light_floor_lamp"></div>

Ich möchte aber nach dem Klick auf ein Icon das die Lampe 10 Sekunden an ist. Hab on-for-timer gefunden. Jedoch sind die Infos etwas spärlich. Was mache ich da falsch? Der Timer läuft, aber "on" wird nicht gesendet? Hab ich da was falsch verstanden?

<div data-type="push" data-device="Lampe" data-set-on="on-for-timer 10"></div>
Wezzy Rpi2b> FHEM, Elro, Intenso, FTUI, Jeelink v3, Max!Cube, Fire5, Foscam, NAS, Fritz!Box + Fon, Max!Wandthermostat, Amazon Echo
Wezzy Rp3b> OctoPi
Jessie Rp3b> UPNP, NAS, Pi-Hole

justme1968

ein dummy kennt kein on-for-timer.

nimm einen readingsProxy statt dem dummy. dann ist on-for-timer automatisch mit dabei und du sparst die beiden notify.

gruß
  andre
hue, tradfri, alexa-fhem, homebridge-fhem, LightScene, readingsGroup, ...

https://github.com/sponsors/justme-1968

accessburn

Sachen gibts...
Aber danke für den Hinweis,

läuft:

define proxy readingsProxy Lampe:state
attr proxy setFn {($CMD eq "on")?"on":"off";}
attr proxy setList on off
attr proxy valueFn {$LASTCMD}
Wezzy Rpi2b> FHEM, Elro, Intenso, FTUI, Jeelink v3, Max!Cube, Fire5, Foscam, NAS, Fritz!Box + Fon, Max!Wandthermostat, Amazon Echo
Wezzy Rp3b> OctoPi
Jessie Rp3b> UPNP, NAS, Pi-Hole