Control With buttons or screen?

I’m new to raspberry pi
I cant get mopidy-ttsgpio to work

I installed pimusicbox
Downloaded ttsgpio via pip
Edited the config file with the text:

[ttsgpio]
debug_gpio_simulate = false # Set true to emulate GPIO buttons with on screen buttons
pin_button_main = 17
pin_button_next = 22
pin_button_previous = 23
pin_button_vol_up = 24
pin_button_vol_down = 25
pin_play_led = 18

In the bottom of the config file

When i try to sudo mopidy i get error

ERROR MPD server startup failed: [Errno 98] Address already in use

I edited the DAEMON_USER = mopidy to DAEMON_USER = root

When i start the raspberry, I get the following warnings

WARNING Found alsamixer configuration errors, the extension has been automatically disabled:
WARNING alsamixer/control must be set.
WARNING alsamixer/card must be set.
WARNING Found musicbox_webclient configuration errors, the extension has been automatically disabled:
WARNING musicbox_webclient/musicbox unknown config key.
WARNING Found ttsgpio configuration errors, the extension has been automatically disabled:
WARNING ttsgpio/debug_gpio_simulate invalid value for boolean: ‘false # Set true to emulate GPIO buttons with on screen buttons’
WARNING Please fix the extension configuration errors or disable the extensions to silence these messages.

And of course I get the text saying that ttsgpio is an disabled extension.

Just tried a fresh install, and i get the same errors

Any help will be highly appreciated.

Kind regards
vpvpvp

Anyone? Can anybody help me with the subjecs above.

Can anyone upload an image with the GPIO buttons working to google drive or simmilar.

I use a Raspberry Pi 2B

Kind regards

vpvpvp

It seems that you have something wrong in the debug_gpio_simulate = false line. You can remove that line as the default value false will be used anyway.

ERROR MPD server startup failed: [Errno 98] Address already in use This is because musicbox has already started mopidy so you don’t have to start it manually.

Thank you for your help. Its very kind of you.
I removed the line, and ttsgpio is now on the enabled extentions, but it i does not work anyway?

Tried to redownload the extention via pip install etc…
When i use sudo mopidy i still get the following error

ERROR MPD server startup failed: [Errno 98] Address already in use

But i dont know if that is important

When i reboot the pi i get the following warnings

WARNING Found alsamixer configuration errors, the extension has been automatically disabled:
WARNING alsamixer/control must be set.
WARNING alsamixer/card must be set.
WARNING Found musicbox_webclient configuration errors, the extension has been automatically disabled:
WARNING musicbox_webclient/musicbox unknown config key.
WARNING Please fix the extension configuration errors or disable the extensions to silence these messages.

Any help would be great :slight_smile:

vpvpvp

Hello, i’m new to linux.

Where can i find the mopidy config file, where i have to add :

[ttsgpio]
debug_gpio_simulate = false # Set true to emulate GPIO buttons with on screen buttons
pin_button_main = 17
pin_button_next = 22
pin_button_previous = 23
pin_button_vol_up = 24
pin_button_vol_down = 25
pin_play_led = 18

?
I added it in etc/init.d/mopidy and killed my pi musicbox.
Please help me

The Mopidy documentation at http://mopidy.readthedocs.org/en/latest/service/#configuration specifies /etc/mopidy/mopidy.conf. For musicbox this is a link to the main musicbox config file which lives at /boot/config/settings.ini.

Thx for your fast answer.
Helped me a lot .
I changed " daemon_user = root "

The buttons doesent work yet. Does your script start automatically at boot,or do i have to do this manually ?

And how can i test, that your script is running in the background?

Thx for your help

Still no luck for me as well. The extention is running, but i can´t seem to get the buttons working :frowning: :frowning: I dont get the google announcement of the tracks either :frowning:

@Curry44: I think you can see if the script is working if it is listed under “enabled extention” on start up. I am not really sure but i think so. I’m sure somebody else can help you :slight_smile:

Still problems getting the buttons to work. Any help would be appreciated

Kind regards

vpvpvp

“I don’t get the google announcement of the tracks either” - I’m not sure it still works, I have a feeling google introduced like a captcha code which stops the tts working. I notice on the https://github.com/9and3r/mopidy-ttsgpio that it’s recommended you install Festival tts before installing TTSGPIO

Actually i dont really want the annoucement. I just want to control the pimusicbox with buttons. Shutdown, turn on, next track, previous track

That all i need

Kind regards

vpvpvp

Although it may not be practical for you I actually found using an ir control easier, it required less wiring, programming skills and hardware but offered a wide choice of things you can do when using it.

My radio has very nice buttons i would like to use. I looked at your blog describing the installation and i might give it a go. But i prefer the button controlled radio.

Any help is appreciated

vpvpvp

Do you think it might not be working because it’s waiting for a reply from google tts, perhaps if you uninstalled TTSGPIO then installed Festival and then reinstalled the latest (updated about a week ago) TTSGPIO.
Fortunately it worked fine for me (see above) straight out of the box, so I can’t really offer any other advise as to why it might not be working.

Yes. Google started to use captcha so TTS stopped working. Because of that I switched to Festival. To get TTS working again you will have to install Festival and update mopidy-ttsgpio.

There is a button test script that could be helpful. Copy the file, change the pin numbers on the file if necessary, and run it using:
sudo python gpio_input_tester.py

This will print a message on the console when a button press or release is detected.

Where do i copy the file?. Tried the root of the sd card. Got error saying no file or directory :frowning:

Still no luck with button control :frowning:

vpvpvp

You can copy the file in any location you like. Just remember to change to that directory in the terminal. So you should type cd Path where Path is the Path where the file has been copied. After that try sudo python gpio_input_tester.py

I don’t know if Lunz is reading this anymore. However, I noticed when reading the adafruit tutorial on the capacitive touch “thing” that it says:

you need a small length of 30AWG Silicone Cover Stranded-Core Wire. I have found that thicker gauges of wire do not work as well for this technique, and thicker wire will cause false touches to be read along the length of the wire instead of focused at the button.

Apparently, also, you might want to keep the wires apart, not touching each other or crossing, as that can cause contamination of the signal.

This would be really nice to get working with mopidy. For example, the tutorial uses metal powder to make buttons on a wood surface (buttons for a sequencer/synthesizer). However, one could use the technique and make such buttons for controlling mopidy and maybe even embed them in some furniture (like a bookshelf).

see video

Love the furniture idea!

Hey guys, I’m still here!

Here is a video of what I’ve been working on – showing the touch buttons in action: https://www.youtube.com/watch?v=hTHq2mPqIF0

You can see, I’m using breadboard wires, which are pretty thin.

I made this python script to control MPC. It has some simple logic to see if you are playing anything and if there is nothing, play a predetermined playlist off spotify.

Then it is a simple call to the program in the /etc/rc.local file like this:

sudo python /path/to/file/5pad.py &

FYI: The & allows the program to run in the background.

Also, if you are running out of GPIO pins, I created an additional file which works with the I2C gpio expander from Adafruit