FHEM Forum

FHEM => English Corner => Thema gestartet von: kroonen am 21 Oktober 2014, 22:56:16

Titel: rpi_gpio pulse relais webcmd
Beitrag von: kroonen am 21 Oktober 2014, 22:56:16
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
Titel: Antw:rpi_gpio pulse relais webcmd
Beitrag von: rudolfkoenig am 22 Oktober 2014, 09:35:29
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.
Titel: Antw:rpi_gpio pulse relais webcmd
Beitrag von: kroonen am 22 Oktober 2014, 18:53:45
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
Titel: Antw:rpi_gpio pulse relais webcmd
Beitrag von: rudolfkoenig am 22 Oktober 2014, 22:26:03
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.
Titel: Antw:rpi_gpio pulse relais webcmd
Beitrag von: kroonen am 23 Oktober 2014, 20:16:19
Rudolf,

This wat I was looking for, thnx

regards Richard