Espeasy rules (for shutters) howto call them with hass.io?

Hi,

I have a question. I’m using an esp8266 and 2 relays to control my shutters (first relay is for power second for up and down (NO and NC of relay), I use espeasy rules to control them. I have 4 states to call, up, down, ventilation and stop.

I can call them with
http://ipadress/control?cmd=event,rol1 (up)
http://ipadress/control?cmd=event,rol2 (down)
etc

What sensor is the best to use cmd line swicht has only on and off?, or is there a better option to do?? I think also to use and gpio pin as state (for up and down, as additional gpio in the up/down rule) . Below the config i’m using in rules of espeasy

Blockquote
on rol1 do //up
gpio,5,1 // relais power
gpio,14,1 // rollup
TimerSet 1,15
endon
on Rules#Timer=1 do
gpio,5,0
gpio,14,0
endon
on rol2 do //down
gpio,5,1 // relais power
gpio,14,0 //roldown
timerSet 1,15
endon
on rol3 do //vent
gpio,5,1 // relais power
gpio,14,0 //roldown
timerSet 1,10
endon
on rol4 do //stop
gpio,5,0
gpio,14,0

endon