Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


Idea: Pirate Audio 240x240 cover display
#21
@juantronik

Where do you source your audio for Moode?
ie. Local Library, Internet radio?

I have uploaded a new file to the tft-cover project on github at

If you want to test it, follow the install instructions, but don't install the service.

to test the script
SSH into the RPI, then
Code:
cd /home/pi/tft-cover

then

python3 moode-pirate.py

It's only been designed to work with the media library and internet radio.

This is in it's early stages and I need feedback.

IT has rudimentary scrolling for Artist, Album and Title and feedback on how this works, or is needed would be apptreciated

Cheers

Russ
Reply
#22
Hi Russ,

I have the same experience Maartin has. But on local mp3s the text doesn`t scoll, it overlays several times til you can`t read the text anymore.


Attached Files Thumbnail(s)
   
Reply
#23
(03-08-2020, 12:31 PM)maartin Wrote: After installing:
Rebooting leads to loss of current playlist. And no more text.

Having pictures with white (i.e. Linn) makes the text hard to read.

regarding
Text color: I have some options here that I have tried with some success and will add
Loss of playlist: Not sure what you mean here?
No more text: Has this reverted to the cover only script which I assume you stll have as a service?

Just to confirm:
The script with text is not fully integrated into the install and will only run by the command

Quote:python3 moode-pirate.py.

If the service is still installed you can stop it before running moode-pirate

Quote:sudo service stop tft-cover


(03-08-2020, 01:23 PM)juantronik Wrote: Hi Russ,

I have the same experience Maartin has. But on local mp3s the text doesn`t scoll, it overlays several times til you can`t read the text anymore.

OK. I'm not happy with the scrolling myself, and will find a better way

I have some improvements in mind, based on some more pimorini libraries that are used in their mopidy scripts.

Updates to follow in the next couple of days

Russ
Reply
#24
@maartin  and @juantronik

I have made some enhancements to the cover display script, and i am hoping you can test tit on your pirate audio.

Firstly I have created new github repository with a new name -  TFT-MoodeCoverArt - and taken tft-cover offline.

If you are willing to test, the instructions are in the readme file.
but basically, if you already have tft-cover running:

Quote:git clone https://github.com/rusconi/TFT-MoodeCoverArt.git
cd TFT-MoodeCoverArt
sudo chmod u+x TFT-MoodeCoverArt.sh

to run:

Quote:/home/pi/TFT-MoodeCoverArt/TFT-MoodeCoverArt.sh -s

to stop:

Quote:/home/pi/TFT-MoodeCoverArt/TFT-MoodeCoverArt.sh -q


If tft-cover is running at boot:

to stop temporarily:

Quote:sudo systemctl stop tft-cover

to disable over a reboot:

Quote:sudo systemctl disable tft-cover.service

@maartin 

Some improvement to coping with light background colours

@juantronik 

some improvement to scrolling text
I could not replicate the issue with text overlaying itself, but hopefully the scrolling changes will help

As before, I haven't any issues on my ST7735, so hoping the pirateaudio is ok

Thanks
Russ
Reply
#25
(03-12-2020, 09:46 AM)Hi Ross thank you for the very detailed guide. Your previous script worked very well , however the new code will display more information.I installed  as per your new post, however script will not work once the pi has rebooted.I can only get to work by : Wrote:
Code:
python3 /home/pi/TFT-MoodeCoverArt/tft_moode_coverart.py
it will not restart with :
Code:
/home/pi/TFT-MoodeCoverArt/tft_moode_coverart.sh -s

when working the radio station logo is displayed with the correct Artist and Title, however the screen also shows the four push button displays which are non responsive these need to configured via gpio as directed in an earlier post.
the rolling script on certain radio stations is hard to read.  
regards
Reply
#26
(03-12-2020, 11:51 AM)prithesh Wrote:
(03-12-2020, 09:46 AM)Hi Ross thank you for the very detailed guide. Your previous script worked very well , however the new code will display more information.I installed  as per your new post, however script will not work once the pi has rebooted.I can only get to work by : Wrote:
Code:
python3 /home/pi/TFT-MoodeCoverArt/tft_moode_coverart.py
it will not restart with :
Code:
/home/pi/TFT-MoodeCoverArt/tft_moode_coverart.sh -s

when working the radio station logo is displayed with the correct Artist and Title, however the screen also shows the four push button displays which are non responsive these need to configured via gpio as directed in an earlier post.
the rolling script on certain radio stations is hard to read.  
regards

Hi.

is there any output to the shell when you try this?
Code:
/home/pi/TFT-MoodeCoverArt/tft_moode_coverart.sh -s

and did you

Code:
sudo chmod u+x /home/pi/TFT-MoodeCoverArt/tft_moode_coverart.sh

When you say hard to read, is it clashing colours, or something else?

Regards

Russ
Reply
#27
Hello!! Its working fine for me at zero/rpi3+ and pirate audio headphones (last version moode and your instruction from github).. Show radios and mp3s covers.
....have one problem - its not start from rc.local (i made chmod before)... just one way for me - after moode start go to ssh and make manually
Code:
python3 /home/pi/TFT-MoodeCoverArt/tft_moode_coverart.py

and its work perfect!

Thanks a lot rusconi !

p.s. sorry for my bad english
Reply
#28
(03-12-2020, 11:43 PM)exviia Wrote: Hello!! Its working fine for me at zero/rpi3+ and pirate audio headphones (last version moode and your instruction from github).. Show radios and mp3s covers.
....have one problem - its not start from rc.local (i made chmod before)... just one way for me - after moode start go to ssh and make manually
Code:
python3 /home/pi/TFT-MoodeCoverArt/tft_moode_coverart.py

and its work perfect!

Thanks a lot rusconi  !

p.s. sorry for my bad english
You're English is better than some of my fellow countrymen Cool 
This is my complete /etc/rc.local file and it works for me:

Code:
#!/bin/sh -e

SQLDB=/var/local/www/db/moode-sqlite3.db

# Set cpu govenor
CPU_GOV=$(sqlite3 $SQLDB "select value from cfg_system where param='cpugov'")
echo "$CPU_GOV" | tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor

# USB storage auto-mounter
/usr/bin/udisks-glue --config=/etc/udisks-glue.conf > /dev/null 2>&1
#/usr/bin/devmon --exec-on-drive "/var/www/command/util.sh smb_add %d %f" --exec-on-remove "/var/www/command/util.sh smb_remove %f" --always-exec --no-gui > /dev/null 2>&1 &

# Work around for Katana driver load failure on Pi-4B
AUDIO_DEVICE=$(sqlite3 $SQLDB "select value from cfg_system where param='i2sdevice'")
PI_REVNUM_SEGMENT=$(awk '{if ($1=="Revision") print substr($3,3,3)}' /proc/cpuinfo)

if [ "$AUDIO_DEVICE" = "Allo Katana DAC" ] && [ $PI_REVNUM_SEGMENT = "311" ]; then
    rmmod snd_soc_allo_katana_codec
    rmmod snd_soc_audio_graph_card
    modprobe snd_soc_audio_graph_card
    modprobe snd_soc_allo_katana_codec
    echo `date +'%Y%m%d %H%M%S'` "rc.local ran Katana|Pi-4B driver reload" > /home/pi/katana.log
fi

# moOde startup and job processor daemon
/var/www/command/worker.php > /dev/null 2>&1

# start TFT-Moode-CoverArt
/home/pi/TFT-MoodeCoverArt/tft_moode_coverart.sh -s > /dev/null 2>&1

exit 0

If it still doesn't work you could use
Code:
usr/bin/python3 /home/pi/TFT-MoodeCoverArt/tft_moode_coverart.py > /dev/null 2>&1

to replace

Code:
/home/pi/TFT-MoodeCoverArt/tft_moode_coverart.sh -s > /dev/null 2>&1


Regards

Russ
Reply
#29
(03-12-2020, 09:46 AM)maartin Wrote: Hi Ross, thank you for being that enthusiastic!

I did a quick try following your instructions on Githhub.

Trying to start the script results to:
Code:
pi@moode:~ $ python3 /home/pi/TFT-MoodeCoverArt/tft_moode_coverart.py
Traceback (most recent call last):
 File "/home/pi/TFT-MoodeCoverArt/tft_moode_coverart.py", line 295, in <module>
   main()
 File "/home/pi/TFT-MoodeCoverArt/tft_moode_coverart.py", line 193, in main
   mn = mean(im_mean)
UnboundLocalError: local variable 'im_mean' referenced before assignment

Rebooting does not change.

The TFT shows funky RGB-Noise.

Thats for now.

All the Best
maartin

Thanks for finding that bug @maartin 

It was caused by the script not looking for a default image, which I have hopefully fixed.

Updated script uploaded to github.

I hope this fixes your RGB noise issue as well

Russ
Reply
#30
(03-12-2020, 11:57 PM)rusconi Wrote:
(03-12-2020, 11:43 PM)exviia Wrote: Hello!! Its working fine for me at zero/rpi3+ and pirate audio headphones (last version moode and your instruction from github).. Show radios and mp3s covers.
....have one problem - its not start from rc.local (i made chmod before)... just one way for me - after moode start go to ssh and make manually
Code:
python3 /home/pi/TFT-MoodeCoverArt/tft_moode_coverart.py

and its work perfect!

Thanks a lot rusconi  !

p.s. sorry for my bad english
You're English is better than some of my fellow countrymen Cool 
This is my complete /etc/rc.local file and it works for me:

Code:
#!/bin/sh -e

SQLDB=/var/local/www/db/moode-sqlite3.db

# Set cpu govenor
CPU_GOV=$(sqlite3 $SQLDB "select value from cfg_system where param='cpugov'")
echo "$CPU_GOV" | tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor

# USB storage auto-mounter
/usr/bin/udisks-glue --config=/etc/udisks-glue.conf > /dev/null 2>&1
#/usr/bin/devmon --exec-on-drive "/var/www/command/util.sh smb_add %d %f" --exec-on-remove "/var/www/command/util.sh smb_remove %f" --always-exec --no-gui > /dev/null 2>&1 &

# Work around for Katana driver load failure on Pi-4B
AUDIO_DEVICE=$(sqlite3 $SQLDB "select value from cfg_system where param='i2sdevice'")
PI_REVNUM_SEGMENT=$(awk '{if ($1=="Revision") print substr($3,3,3)}' /proc/cpuinfo)

if [ "$AUDIO_DEVICE" = "Allo Katana DAC" ] && [ $PI_REVNUM_SEGMENT = "311" ]; then
    rmmod snd_soc_allo_katana_codec
    rmmod snd_soc_audio_graph_card
    modprobe snd_soc_audio_graph_card
    modprobe snd_soc_allo_katana_codec
    echo `date +'%Y%m%d %H%M%S'` "rc.local ran Katana|Pi-4B driver reload" > /home/pi/katana.log
fi

# moOde startup and job processor daemon
/var/www/command/worker.php > /dev/null 2>&1

# start TFT-Moode-CoverArt
/home/pi/TFT-MoodeCoverArt/tft_moode_coverart.sh -s > /dev/null 2>&1

exit 0

If it still doesn't work you could use
Code:
usr/bin/python3 /home/pi/TFT-MoodeCoverArt/tft_moode_coverart.py > /dev/null 2>&1

to replace

Code:
/home/pi/TFT-MoodeCoverArt/tft_moode_coverart.sh -s > /dev/null 2>&1


Regards

Russ

Thanks for your help but this replace not work for me...  iam put next text in rc.local:



Code:
# start TFT-Moode-CoverArt
/home/pi/TFT-MoodeCoverArt/tft_moode_coverart.sh -s > /dev/null 2>&1
/home/pi/TFT-MoodeCoverArt/tft_moode_coverart.sh -q
sleep 10
python3 /home/pi/TFT-MoodeCoverArt/tft_moode_coverart.py
....iam not programmer, but it work now.

Thanks for help rusconi !!

p.s. and my gpio config for pirate audio, if somebody need it


Attached Files Thumbnail(s)
       
Reply


Forum Jump: