Implement a watchdog and use it to observe activity.
Map light names to ids automatically.