rpi_gpio pulse relais webcmd

Begonnen von kroonen, 21 Oktober 2014, 22:56:16

Vorheriges Thema - Nächstes Thema

kroonen

Hi,

I want to use a relais as pulse for my garagedoor, so i made a timer for 1 second. listed below

define Garage RPI_GPIO 4
attr Garage active_low yes
attr Garage direction output
attr Garage devStateIcon on-for-timer .*:fts_shutter_100
attr Garage eventMap on:vent
attr Garage eventMap /on-for-timer 1:vent
attr Garage icon fts_garage
attr Garage room Garage
attr Garage webCmd vent

the webcmd works but de default icon toggle's only on and off. Default the smartphone skin doesn't show the webcmd. Is there a way to set de icon to use the webcmd?

any other ideas are also welcome

rudolfkoenig

Zitatthe webcmd works but de default icon toggle's only on and off.
Correct, you defined it that way with devStateIcon.
If it is not what you want (it is not clear to me), then please read the devStateIcon documentation first, and if you still won't get along, then tell me what you want to achieve.

ZitatDefault the smartphone skin doesn't show the webcmd.
Correct, this is how I designed it.

ZitatIs there a way to set de icon to use the webcmd?
Depends on how exactly you want it. devStateIcon may be a solution.

kroonen

Rudolf

What I want to actieve is when I open in me smartphone I want to see an icon that does my relais onfor 1 second so my garagepoor opens. If I again press the icon again it does the same , again the relais goes om for 1 second and garage door closed.

THe garagedoor works externally only with impulsswitch so this is how I can do this?

Regads Richard

rudolfkoenig

I'm not sure that you've read the part with "please read the devStateIcon documentation first", but anyway, here is something I just tested with a dummy:

define Garage dummy
attr Garage setList on off on-for-timer off-for-timer
attr Garage devStateIcon .*:fts_shutter_100:impulse
attr Garage eventMap /on-for-timer 1:impulse/
attr Garage webCmd :
attr Garage verbose 5


The setList is dummy specific, and verbose is only for debugging.
You might take a look at the fhem.cfg.demo, there are similar examples.

kroonen

Rudolf,

This wat I was looking for, thnx

regards Richard