SoCo/SoCo — pull request #80 by lawrenceakka (2014-01-10 19:43:07+00:00)
Title: Deprecation of SonosDiscovery

Phase one of the implementation of #75.

1) The SonosDiscovery class and get_speaker_ips method are deprecated and replaced with the `discover` function. This returns actual SoCo instances (actually an iterator), not a list of IP addresses.

2) SoCo.speaker_ip is replaced with SoCo.ip_address.

3) SoCo instances can still be created by passing an IP address. The IP address is now checked to make sure it is valid. For any given IP address, however, there can only ever be one SoCo instance. Subsequent attempts to create another SoCo instance with the same IP address will return the pre-existing instance. This means that functions such as `get_group_coordinator` can simply create and return the relevant SoCo instance, even if it has already been created (I haven't written this bit yet)

Old:

```python
>>> import soco
>>> d = soco.SonosDiscovery()
>>> ips = d.get_speaker_ips()
>>> for i in ips:
... s = soco.SoCo(i)
... print s.player_name
```

New:

```python
>>> import soco
>>> for s in soco.discover():
... print s.player_name
```

If you are happy with this approach, I will update the docs.

We may need to hold off on @AdamJacobMuller 's code in #66 until this is sorted, since it will need some rebasing. In any case, I would like to think about whether `discover` should take parameters so that it can return zones of a particular type only.