Introduced PWRMAX als treshold for outgoing or incoming power. Before this sometimes useless values occured (e.g. 1000000 W for a normal family home). Introduced simple functions for the structure and error handling.
Clean up and translate comments. Adds calculation of nearest 5 min time.
Initial upload from backup.