private static string addRedElectrica(DBStorage db, string message)
        {
            RedElectrica red;

            try
            {
                red = (RedElectrica)JsonConvert.DeserializeObject(message, typeof(RedElectrica));
            }
            catch (Exception) { return("ERR"); }
            if (red == null || !red.isValid())
            {
                return("ERR");
            }

            return(db.addRedElectrica(red) ? "OK" : "ERR");
        }