@ric63 welcome to the MySensors community! The power meter pulse sensor example should be a good base for a sketch. For saving to a file you could probably use the gateway log file, or export data from a controller.