gotwalt / sonos

Control Sonos speakers with Ruby
MIT License
383 stars 77 forks source link

added facility to look up speaker by uid and name #54

Closed pfeffed closed 8 years ago

pfeffed commented 8 years ago

I've been using this code for a while on a local fork and just realized I never submitted a PR for it. With this patch, you do things like:

if you know the name:

sonos = Sonos::System.new living_room = sonos.find_speaker_by_name("Living Room")

if you happen to know the uid:

sonos = Sonos::System.new living_room = sonos.find_speaker_by_uid("RINCON_1234EEFEE12341400")

gotwalt commented 8 years ago

👍 Thanks!