Small size Input (sensor) and output (Relay) board (MQTT, Zigbe or Wifi)

Before I try to make one with ESP or something like…
I’m looking for a board or a small module which has at least 4 Input and 1 (maybe 2) outputs. What I want to do, I’d like to make a good garage door opener to turn my dumb opener smart.
The inputs shall get signal of:

  1. Opening (the 230V which goes to the motor for opening)
  2. Closing (the 230V which goes to the motor for closing)
  3. Fully opened
  4. Fully closed
    My gate has a microswitch for the fully opened and fully closed state but my garage door hasn’t.

Relay:

  1. Open/close

I need this because with it, I can make a template cover which can show states like: Opening, Closing, Open, Close
My door opener has a one button operation: Open-Stop-Close
So If I want to close I can listen if it is Opening or start to open, so I can “press” again and again the button until it start to close. Same if I want to open and it is currently closing or start to close for the 1st button press, the automation can press again until it start to open.

So my question if you know any board or module which has at least 4 inputs and at least 1 output relay and the inputs can be independent from the outputs. Maybe a switch module.

see this video

Thanks, but I made a lot of projects with ESP, Dingtian relay board, hacked door sensor etc. Currently my question is about a small size factor I/O board, module or device. E.g. there are Girier zigbee modules (1-4 channels) which would be nice, but the inputs are not independent from the outputs and some cases the outputs are not dry contact outputs. So I’m still ooking for an out of the box device which has at least 4 inputs and 1 or 2 dry contact outputs, if there is any. It will be much smaller that I can make by myself. The size matters in this case.