So I ran worker with sudo and the lights blinked for a few seconds and then this message repeatedly pops up. I'm guessing it's because the server command isn't working.
ERROR:root:Invalid URL 'web/next?key=': No schema supplied. Perhaps you meant
http://web/next?key=?
Any suggestions?
The code is trying to retrieve an environment variable, SERVER_HOST, which doesn't exist. And it needs a schema.
I added SERVER_HOST to my environment, and modified app.py to
return 'http://' + host + '/next?key=' + key
cd ~/stranger/stranger_things_lights/
source .venv/bin/activate
export SERVER_HOST=$HOSTNAME
sudo -E env PATH="$PATH" make install-pi
sudo -E env PATH="$PATH" make run-server
Now it gets past that, flashes the initialization of the lights, but still loops on an error connecting to the server.
fetching
http://raspberypi4/next?key=
ERROR:root:HTTPConnectionPool(host='raspberypi4', port=80): Max retries exceeded with url: /next?key= (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7fb04c2a50>: Failed to establish a new connection: [Errno 111] Connection refused'))
It should be something other than port 80. I think port 5000, but I have played around with that without success.