StopIteration Error - docker-compose up
I get the following error after running docker-compose up :
Attaching to home-notifier
home-notifier | INFO:root:Starting up chromecasts
home-notifier | INFO:root:Searching for None
home-notifier | Traceback (most recent call last):
home-notifier | File "main.py", line 19, in <module>
home-notifier | cast = next(cc for cc in chromecasts if cc.device.friendly_name == chromecast_name)
home-notifier | StopIteration
home-notifier exited with code 1
I changed GRP_NAME in Dockerfile to the device name. I have only one Google Device.
I believe there is something wrong with my GRP_NAME. I found GRP_NAME by:
- going into the Google Home app
- Clicking on Google Home Mini
- Clicking on the cog ⚙️ icon on the top right
- Selecting Device Information
- Getting Device Name
The comment on that line states:
#set envar to match your speaker or group name
This is saying that you should set the GRP_NAME environment variable to the name of your speaker/group. Instructions of how to do this in Windows can be found at https://phoenixnap.com/kb/windows-set-environment-variable#ftoc-heading-4 After setting the environment variable, you will have to restart main.py
Alternatively, you can change the line to set the speaker name directly. If you are unfamilar with python, the end result would look something like this:
cast_name = Living Room Speaker
I hope this helps!