michaelotto / sonos-monitor

Automatically turns on a Yamaha Receiver (and switches it to the appropriate input) when a Sonos Connect starts playing.
MIT License
19 stars 4 forks source link

Name-error: not defined #3

Closed geertouwerling closed 4 years ago

geertouwerling commented 7 years ago

Hi,

Trying to get my Sonos Connect to work, but get a name error after applying the UID to the sones-monitor.py. May be putting it in the wrong spot.

Discovering Sonos zones
   Slaapkamer (UID: RINCON_B8E937EE825401400)
   Badkamer (UID: RINCON_B8E937EE826401400)
   Woonkamer (UID: RINCON_000E58A4366201400)

The number of Sonos Connect devices found was not exactly 1.
Please specify which Sonos Connect device should be used by
using its UID as the first parameter.
Traceback (most recent call last):
  File "home/pi/sonos/sonos-monitor.py", line 117, in <module>
    connect_uid = RINCON_B8E937EE826401400
NameError: name 'RINCON_B8E937EE826401400' is not defined

Can you help? Thanks.

Geert

michaelotto commented 6 years ago

Just call the script with the name as the first parameter, don't try to tamper with the script itself.

E.g. call

python sonos-monitor.py RINCON_B8E937EE826401400