Yes that is perfectly straight forward. Use potential dividers so that you maximum 30V is below 5V for monitoring.