An Online Hierarchical Energy Management System for Energy Communities, Complying with the Current Technical Legislation Framework