Identifying switches and sensors (for home automation config)

Thanks Paul, the resistor idea sounds perfect. I'll give that a try.
I'd like to have as few boards and shields as possible so I'll come back to the mcp23017 if the resistor doesn't work.

Thanks,
Phil