mknx/smarthome — pull request #83 by ohinckel (2014-02-07 17:52:13+00:00)
Title: Make it possible to attache items to a given plugin

Hint: this pull requests depends on the new functionality introduced in pull request #81 (plugin methods).

With this path it will be possible to restrict the item attachment to a given plugin. This is useful when you have registered a plugin multiple times.

E.g. having something like this in `plugin.conf` which configures the KNX plugin for two environments (it's just an example, don't know if it works this way):
```
[knx1]
class_name = KNX
class_path = plugins.knx
host = myhome.dyndns.org
...
[knx2]
class_name = KNX
class_path = plugins.knx
host = otherhome.dyndns.org
```

Attaching the different items to the different plugin is now possible using this in `items.conf`:
```
[home1]
[[light]]
plugin = knx1
knx_addr = 1/0/1
[home2]
[[light]]
plugin = knx2
knx_addr = 1/0/1
```

This will only attach the item `home1.light` to the KNX plugin instance `knx1` and `home2.light` to the plugin instance `knx2` to make it possible to use two completely different environments using two different KNX devices (e.g. eibd on different hosts).

I don't know if SmartHome.py was designed to register a plugin multiple times, but it seems it's not forbidden at the moment. Registering a plugin two times could also solve the problem "How to use two different devices when a plugin can only handle one device?" - e.g. using two power meter devices with the SML plugin (see also my [comment](https://github.com/mknx/smarthome/pull/63#issuecomment-33908034) in pull request #63).