Solution 1:

I found a solution with command blocks:

The contraption from the front above

What the numbers are:

  1. /testforblock ~ ~+3 ~ minecraft:door C
  2. /testforblock ~ ~+3 ~ minecraft:door C
  3. /setblock XR YR ZR minecraft:wooden_door O
  4. /setblock XL YL ZL minecraft:wooden_door O
  5. /setblock XR YR ZR minecraft:wooden_door C
  6. /setblock XL YL ZL minecraft:wooden_door C

And what the letters are:

  • XR, YR, ZR are the coordinates of the Right door
  • XL, YL, ZL are the coordinates of the Left door
  • O and C are the door state numbers. O stands for open, C for closed. Instead of these two numbers, use:

    • O = 4, C = 0 when the doors are facing east (positive X)
    • O = 5, C = 1 when the doors are facing south (positive Z)
    • O = 6, C = 2 when the doors are facing west (negative X)
    • O = 7, C = 3 when the doors are facing north (negative Z)

You can tell which way the door is facing by pressing F3 and pointing at it:

How to use F3

Note in the screenshot that you are looking west, too, even though the door is on the closer side of the block to you.