05-23-2018, 02:38 AM
(05-22-2018, 11:11 PM)Platheo Wrote:(05-22-2018, 10:03 PM)Platheo Wrote:(05-22-2018, 05:55 AM)RafaPolit Wrote: I wish people would report back what has worked for them so we can have this figured out sooner rather than later. All seems good, perhaps setting the --mixer_device_index to 0?
Hi Rafa,
I was able to get spotify-connect-web.service to activate by changing --mixer_device_index to 2; 0 did not work.
However, i still don't see it Moode Connect show up in Spotify as an option.
Code:pi@moode:~ $ sudo systemctl status spotify-connect-web.service
● spotify-connect-web.service
Loaded: loaded (/lib/systemd/system/spotify-connect-web.service; disabled; vendor preset: enabled)
Active: active (running) since Tue 2018-05-22 16:05:38 PDT; 207ms ago
Main PID: 2198 (spotify-connect)
CGroup: /system.slice/spotify-connect-web.service
├─2198 /bin/sh /home/pi/spotify/spotify-connect.sh
└─2199 python main.py --playback_device softvol -m Master --mixer_device_index 2 --bitrate 320 --name mo
May 22 16:05:38 moode systemd[1]: Started spotify-connect-web.service.
Here is my spotify-connect.sh contents:
Code:#!/bin/sh
cd /
cd home/pi/spotify/spotify-connect-web
LD_LIBRARY_PATH=/home/pi/spotify/spotify-connect-web python main.py --playback_device softvol -m Master --mixer_device_index 2 --bitrate 320 --name "moOde Connect" --key /home/pi/spotify/spotify-connect-web/spotify_appkey.key
cd /
I was able to resolve the issue with wsgi module missing by changing gevent.wsgi to gevent.pywsgi in main.py.
Now, i'm able to get spotify-connect-web.service to become active and not restart constantly. Also, Moode Connect is visible in Spotify now.
Everything works now!!
#!/usr/bin/env python
#First run the command avahi-publish-service TestConnect _spotify-connect._tcp 4000 VERSION=1.0 CPath=/login/_zeroconf
#TODO: Add error checking
#TODO: Show when request fails on webpage
import os
import sys
import argparse
import re
from flask import Flask, request, abort, jsonify, render_template, redirect, flash, url_for
from flask_bootstrap import Bootstrap
from flask_cors import CORS
from gevent.pywsgi import WSGIServer
from gevent import spawn_later, sleep
from connect_ffi import ffi, lib
from connect import Connect
from utils import get_zeroconf_vars, get_metadata, get_image_url