Decentralized, integrated automation system for medium- and low-voltage grids