Open and close a damper


do you help me with a rasph or arduino loop to open and close a damper by timing relay operation?


@Massimotruglio83 can you provide a little bit more detail about your project.


Let us know if we can help here @Massimotruglio83



I have to create an automatism. pressing a button will energize a 20 x relay. But then you have to turn it off otherwise I can not use the wall panel


20 x relay :astonished: .what are you trying to do?
you can turn on/off relays with this code:

  int currentValue = getValue.asInt();
  if (currentValue == 1)
    //do whatever you want when button is on
    digitalWrite(4, HIGH);
   //do whatever yo want when button is off
    digitalWrite(4, HIGH);

next on your dashboard go to
add new > devices/widgets > custom widget > button widget and fill all details with channel 1 as selected.


20 minutes of water on the lawn I have to give it … I need a timer your code just turns on and off


You can use the Pulse function, see this thread Any way to get a timed button?