I would suggest you familiarize yourself with Ohm’s Law if you haven’t already.
Also, you should always reference the official Raspberry Pi documentation before you believe what you see on a random youtube video. Raspberry Pi Documentation - Raspberry Pi hardware
I don’t care what some random youtube video tells you, I am telling you exactly what you need to know to fix your problem…
You can not cross the 5v and 3.3v pins on the pi, period.
You can not reliably run a 4 channel coil relay from the 5v or 3.3v pins of the Pi, period.
(if you were using a Solid State relay, it would probably be OK, but not a coil relay)
You MUST use a separate dedicated 5v power supply for the low-side voltage on the coil relay because the Pis maximum current draw from the 5v pin is only what your Pi’s power supply is MINUS what the Pi is already using… So if you have 2A power supply, and the Pi is already using about 1.5A, that only leaves 0.5A for all of the peripherals that you have plugged into the GPIO voltage pins… which is NOT enough to run your coil relay. Each coil on a 5v relay can use 60ma or more… so when all 4 coils are energized, that means your relay is pulling 240ma or more. And then you also have whatever sensors you have attached which are also drawing current.
You have made no mention of what your power supply is rated for… I would bet that it is maxed out when your relay is energized. Just because a power supply says it is rated for 2 amps, does not mean it can actually provide a full 2 amps constantly… if you run a PSU at or near it’s maximum rating, it will overheat, and quickly fail… and it will also suffer from current and voltage drops, which is what is causing your problem.
Also, you have not specified if the relay board you are using is high-level or low-level triggered. That is VERY important. Mycodo can use both types, but you need to make sure you have the correct settings for your relay board… and of course the high-level trigger will use more power from the Pis GPIO header. If you are using a Raspberry Pi to run Mycodo, you will need to use a high-level trigger relay board… low-level triggered relays do not work reliably with the Pi due to it’s low-level voltage output not being enough to turn off the relay once it is turned on.
As far as the older version of Mycodo working and the newer version not working… that can easily be caused by changes in the software that require more power from the hardware… for instance, a 32 bit OS will use less power than a 64 bit OS installed on the same machine.
Please use a separate 5v PSU to power your relay. If you look at the Raspberry Pi documentation, it will tell you the same thing… don’t power high-current draw hardware directly from the GPIO pins, always use a separate power supply for peripherals.