Define dp[v][0] = maximum value you can rob from subtree rooted at if you do NOT rob house . Define dp[v][1] = maximum value you can rob from subtree rooted at if you DO rob house .
These two states capture all possibilities. For each node, you either rob it or skip it. The transition depends on which choice you made. This two-state pattern solves the constraint that adjacent houses cannot both be robbed.