NodeMCU connected with 4 channel relay module and then integrated with Home assistant through ESPhome.
For NodeMCU with 4 channel relay - please see the video in the link : • Home Automation - Control Light/Appli...
For Home Assistant installation on Raspberry pi :
• HOME AUTIOMATION - HOME ASSISTANT INS...