Moved batter calculation from here to node-red