Function to update gpio pins via rest added