must test on raspberry, will implements energy