[Addon] Addons Menu - Install addons the easy way

Raspberry Pi related support

Re: [Addon] Addons Menu - Install addons the easy way

Postby rern » 22 Sep 2017, 12:42

Hi R101,

Making previously installed and current addons to behave nicely in this Addons Menu has been very challenging. Even more to make it simple enough for anyone to use as delivery method for their addons.

For your situation, it could be:
- somehow the update uninstalled everything but the uninstall file, /usr/local/bin/uninstall_enha.sh
- installed and update status trigered
- or may be the uninstall file was from earlier version that get installed status differently
- delete /usr/local/bin/uninstall_enha.sh should get it back to normal

Some notes along the way...

Addons Menu:
Get addon installed status from existence of its uninstall file, /usr/local/bin/uninstall_<alias>.sh
Get installed version from database addons

Any addon installed before Addons Menu:
- its uninstall file triggers installed status and saved as version 1 in database
- this version 1 vs current version in addons list triggers update status
- update uninstalls then reinstalls the addon with current version

Cleanup/Reinstall vs Update:
- Cleanup/Reinstall deleted Addons Menu database (addons versions data)
- Addons Menu will preserve the database across update
- each addon should preserve its configuration across update of that addon
rAudio @ https://github.com/rern/rAudio-1
Raspberry Pi 4B
Raspberry Pi 3B > SMSL M8 DAC
Raspberry Pi Zero W
User avatar
rern
 
Posts: 723
Joined: 14 Jul 2016, 08:15

Re: [Addon] Addons Menu - Install addons the easy way

Postby R101 » 22 Sep 2017, 13:18

Hi rern,

Yes, the uninstall file was still present and deleting it allowed SSH reinstall of the enhancements.

It must be impossible to allow for every possible variation in a personal setup, particularly when you are not starting from a clean install, so I am amazed at how well this test version works. It seems fine now, the only irritation for me is that my preferred main page layout does not "stick".

Thanks.
(Pi 3B, rAudio-1, JLS I2S over USB)
R101
 
Posts: 343
Joined: 29 Apr 2016, 16:16

Re: [Addon] Addons Menu - Install addons the easy way

Postby rern » 23 Sep 2017, 08:41

cmh714 wrote:Small issue with Web Radio Import...sorted properly but the "Add New" needs/should be at the top ...


This was fixed.
By the way, the original + add new bar is located at the bottom of the list. So I kept it that way. But once the list long enough to push it down the screen, I think it should be at the top as you mentioned as well.
rAudio @ https://github.com/rern/rAudio-1
Raspberry Pi 4B
Raspberry Pi 3B > SMSL M8 DAC
Raspberry Pi Zero W
User avatar
rern
 
Posts: 723
Joined: 14 Jul 2016, 08:15

Re: [Addon] Addons Menu - Install addons the easy way

Postby cmh714 » 26 Sep 2017, 00:06

rern wrote:
cmh714 wrote:Small issue with Web Radio Import...sorted properly but the "Add New" needs/should be at the top ...


This was fixed.
By the way, the original + add new bar is located at the bottom of the list. So I kept it that way. But once the list long enough to push it down the screen, I think it should be at the top as you mentioned as well.


Just grabbed the update and yes, thanks for fixing. And considering the move to the top :)

Cheers and again, nice work!!
cmh714
 
Posts: 470
Joined: 04 May 2014, 03:06

Re: [Addon] Addons Menu - Install addons the easy way

Postby ianhaynes » 27 Sep 2017, 16:30

When I launch the add-ons panel from the menu I occasionally get an error dialog "Addons server cannot be reached. Try check and set date to current".

Is this indicating a local connection error or something more serious?

Ian
Pi 2, Ver. 0.5b, IQAudio DAC+
ianhaynes
 
Posts: 207
Joined: 04 Mar 2015, 12:51

Re: [Addon] Addons Menu - Install addons the easy way

Postby rern » 28 Sep 2017, 04:23

ianhaynes wrote:When I launch the add-ons panel from the menu I occasionally get an error dialog "Addons server cannot be reached. Try check and set date to current".

Is this indicating a local connection error or something more serious?

Nothing serious. It happened when the install file download failed.
Most of the time, it's caused by RPi system date not current.

RPi doesn't have a real-time clock chip to tell current time. Every boot will take it back to 1970. A workaround is to install fake-hwclock to store and tell current time on each boot. I think RuneAudio doesn't use it because it's not critical.
RuneAudio gets the current time from Internet time servers which take sometime after boot.

According to my test, CA certificate verification with GitHub will fail and download will not start if the system date was more than 180 days back.

Anyway, I'll make Addons Menu update the RPi time and try again if download failed before give up.
rAudio @ https://github.com/rern/rAudio-1
Raspberry Pi 4B
Raspberry Pi 3B > SMSL M8 DAC
Raspberry Pi Zero W
User avatar
rern
 
Posts: 723
Joined: 14 Jul 2016, 08:15

Re: [Addon] Addons Menu - Install addons the easy way

Postby rern » 01 Oct 2017, 07:45

20171001 update
    Fix missing installed status
    Fully auto update
    Improve terminal messages and errors handling
Please force update.

As of 20170925 update, installed status was missing. Update notification will not be shown.

Click Install.
Addons Menu will notify "already installed" and show Update button.
Click Update.

If get stuck, like @ianhaynes reporting in the next post, reinstall by:
Code: Select all
rm /usr/local/bin/uninstall_addo.sh
redis-cli hdel addons addo
wget -qN --show-progress https://github.com/rern/RuneAudio_Addons/raw/master/install.sh
chmod +x install.sh
./install.sh
Last edited by rern on 01 Oct 2017, 12:20, edited 3 times in total.
rAudio @ https://github.com/rern/rAudio-1
Raspberry Pi 4B
Raspberry Pi 3B > SMSL M8 DAC
Raspberry Pi Zero W
User avatar
rern
 
Posts: 723
Joined: 14 Jul 2016, 08:15

Re: [Addon] Addons Menu - Install addons the easy way

Postby ianhaynes » 01 Oct 2017, 10:01

Thanks for the explanation of the 'time' error, the message now makes sense.

When I opened the Add Ons just now I got a message saying an update was available so said 'yes' to install. It stopped with the following error:

Code: Select all
Please wait until finished...

/usr/bin/sudo /usr/local/bin/uninstall_addo.sh u
[[ $? != 1 ]] && wget -qN https://github.com/rern/RuneAudio_Addons/raw/master/install.sh
chmod 755 install.sh
/usr/bin/sudo ./install.sh u
 Remove files ...
removed '/srv/http/addons.php'
removed '/srv/http/addonsbash.php'
removed '/srv/http/addonsdl.php'
removed '/srv/http/addonsdl.sh'
removed '/srv/http/addonshead.php'
removed '/srv/http/addonslist.php'
removed '/srv/http/addonslog.php'
removed '/srv/http/assets/css/addons.css'
removed '/srv/http/assets/js/addons.js'
sudo: ./install.sh: command not found


The Addons entry in the Rune menu has been removed (as I'd expect). If I try to install again from scratch, the script tells me that the Addons menu is already install, 'Please try update instead'.

I've tried using uninstall_addo.sh, which says several files don't exist ( they were removed by the update script) but still get he message that Addons Menu is already installed.

How do I get out of this?

Ian
Pi 2, Ver. 0.5b, IQAudio DAC+
ianhaynes
 
Posts: 207
Joined: 04 Mar 2015, 12:51

Re: [Addon] Addons Menu - Install addons the easy way

Postby rern » 01 Oct 2017, 10:58

To reinstall from scratch, this will clear all installed markers:
Code: Select all
rm /usr/local/bin/uninstall_addo.sh
redis-cli hdel addons addo


This update should smooth out most of the issues.

On start, it downlads latest addonslist.php.
If there's a download error because the unset date, it will be set with time servers.
If there's an update, it will be downloaded and update. So it always be up-to-date.

Thanks for reporting.
rAudio @ https://github.com/rern/rAudio-1
Raspberry Pi 4B
Raspberry Pi 3B > SMSL M8 DAC
Raspberry Pi Zero W
User avatar
rern
 
Posts: 723
Joined: 14 Jul 2016, 08:15

Re: [Addon] Addons Menu - Install addons the easy way

Postby ianhaynes » 01 Oct 2017, 12:15

Thanks, I was able to re-install and get the Addons menu back.

Having done that I noticed the new Webradio Sorting and installed that. It appeared to install correctly but all I then got was the spinning 'Connecting' indicator. Having rebooted via SSH the autostart track plays but still no proper Rune screen, so perhaps the Webradio sort has upset something else?

Ian

PS: This on 0.4b v20170229
Pi 2, Ver. 0.5b, IQAudio DAC+
ianhaynes
 
Posts: 207
Joined: 04 Mar 2015, 12:51

support RuneAudio Donate with PayPal

PreviousNext

Return to Raspberry Pi

Who is online

Users browsing this forum: No registered users and 13 guests