Smart power box with data logging function