Update web server to support new REST API

- use state to change light status
- Fix bug about iteration on house: depending if we get
a premise or directly the object, drawing didn't worked.
Now we use when to be sure to get the same value.