Reply To: Can't get Custom Clock app to work

Max2Play Home Forums Max2Play Add-ons Can't get Custom Clock app to work Reply To: Can't get Custom Clock app to work

8. März 2019 at 6:22 #44711

OK, I’ve done some digging and discovered what’s happening here.

First to respond to the previous post:
> The LMS log is in the Squeezebox Server plugin web interface, not in Squeezelite. You can find a link debug info at the bottom of each
> plugin’s web interface.
The squeezelite log and the LMS log are the same thing. The plugin web interface gets its log file from the squeezelite log.

To answer what’s happening with the CustomClock applet, I installed raspian on an SDcard and then installed LMS (Squeezelite) by following this: http://wiki.slimdevices.com/index.php/Debian_Package#installing_7.9.2.

Then I installed Jivelite by following this: http://www.hagensieker.com/jivelite/index.php

You can set-up the squeezelite service to start at boot, SSH into the Pi, manually start Jivelite and follow the warning and error messages in the SSH session.

Upon starting Jivelite I see this in the SSH session:
JiveLite 0.1.0
20190308 03:26:32.049 INFO jivelite – JiveMain.lua:267 JiveLite version 0.1.0
20190308 03:26:32.109 INFO jivelite.ui.draw – jiveL_initSDL:205 800,480 32 bits/pixel 4 bytes/pixel [R<<16 G<<8 B<<0]
20190308 03:26:32.109 INFO jivelite.ui.draw – jiveL_initSDL:206 Hardware acceleration is available
20190308 03:26:32.109 INFO jivelite.ui.draw – jiveL_initSDL:207 Window manager is not available
20190308 03:26:32.138 INFO jivelite.applets – AppletManager.lua:92 User Path: /root/.jivelite/userpath
20190308 03:26:32.253 INFO jivelite.applets – AppletManager.lua:318 Registering: DesktopJive
20190308 03:26:32.254 INFO jivelite.applets – AppletManager.lua:318 Registering: BlankScreenSaver
20190308 03:26:32.260 INFO jivelite.applets – AppletManager.lua:318 Registering: ChooseMusicSource
20190308 03:26:32.266 INFO jivelite.applets – AppletManager.lua:318 Registering: CustomClock
20190308 03:26:32.273 INFO jivelite.applets – AppletManager.lua:318 Registering: CustomizeHomeMenu
20190308 03:26:32.274 INFO jivelite.applets – AppletManager.lua:318 Registering: HDGridSkin
20190308 03:26:32.276 INFO jivelite.applets – AppletManager.lua:318 Registering: HDSkin
20190308 03:26:32.279 INFO jivelite.applets – AppletManager.lua:318 Registering: HttpAuth
20190308 03:26:32.293 INFO jivelite.applets – AppletManager.lua:318 Registering: ImageViewer
20190308 03:26:32.298 INFO jivelite.applets – AppletManager.lua:318 Registering: JogglerSkin
20190308 03:26:32.299 INFO jivelite.applets – AppletManager.lua:318 Registering: LicenseManager
20190308 03:26:32.300 INFO jivelite.applets – AppletManager.lua:318 Registering: LogSettings
20190308 03:26:32.304 INFO jivelite.applets – AppletManager.lua:318 Registering: NowPlaying
20190308 03:26:32.306 INFO jivelite.applets – AppletManager.lua:318 Registering: Quit
20190308 03:26:32.313 INFO jivelite.applets – AppletManager.lua:318 Registering: ScreenSavers
20190308 03:26:32.315 INFO jivelite.applets – AppletManager.lua:318 Registering: SelectPlayer
20190308 03:26:32.322 INFO jivelite.applets – AppletManager.lua:318 Registering: SelectSkin
20190308 03:26:32.327 INFO jivelite.applets – AppletManager.lua:318 Registering: SetupAppletInstaller
20190308 03:26:32.330 INFO jivelite.applets – AppletManager.lua:318 Registering: SetupDateTime
20190308 03:26:32.333 INFO jivelite.applets – AppletManager.lua:318 Registering: SetupLanguage
20190308 03:26:32.336 INFO jivelite.applets – AppletManager.lua:318 Registering: SetupWallpaper
20190308 03:26:32.339 INFO jivelite.applets – AppletManager.lua:318 Registering: SetupWelcome
20190308 03:26:32.346 INFO jivelite.applets – AppletManager.lua:318 Registering: SlimBrowser
20190308 03:26:32.377 INFO jivelite.applets – AppletManager.lua:318 Registering: SlimDiscovery
20190308 03:26:32.384 INFO jivelite.applets – AppletManager.lua:318 Registering: SlimMenus
20190308 03:26:32.391 INFO jivelite.applets – AppletManager.lua:318 Registering: WQVGAgridSkin
20190308 03:26:32.394 INFO jivelite.applets – AppletManager.lua:318 Registering: WQVGAsmallSkin
20190308 03:26:32.401 INFO applet.CustomClock – CustomClockMeta.lua:68 Using standard Now Playing screen
20190308 03:26:32.403 ERROR jivelite.applets – AppletManager.lua:474 Error while loading applet LicenseManager:/root/triode-jivelite/share/jive/jive/AppletManager.lua:442: LicenseManager|…userpath/applets/LicenseManager/LicenseManagerApplet.lua:232: ‚then‘ expected near ‚!‘
stack traceback:
/root/triode-jivelite/share/jive/jive/AppletManager.lua:474: in function ‚_ploadApplet‘
/root/triode-jivelite/share/jive/jive/AppletManager.lua:560: in function ‚loadApplet‘
…e/userpath/applets/LicenseManager/LicenseManagerMeta.lua:46: in function ‚configureA
20190308 03:26:32.416 INFO jivelite – JiveMain.lua:591 select skin: JogglerSkin
20190308 03:26:32.546 INFO jivelite.applets – AppletManager.lua:709 store settings: SetupAppletInstaller
20190308 03:26:32.643 INFO squeezebox.server – SlimServer.lua:752 connected raspberrypi
20190308 03:26:32.657 INFO squeezebox.server – SlimServer.lua:764 self.mac being set to—->nil
libpng warning: Interlace handling should be turned on when using png_read_image
libpng warning: Interlace handling should be turned on when using png_read_image
libpng warning: Interlace handling should be turned on when using png_read_image
libpng warning: Interlace handling should be turned on when using png_read_image

Notice the ERROR line: 20190308 03:26:32.403 ERROR jivelite.applets – AppletManager.lua:474 Error while loading applet LicenseManager:/root/triode-jivelite/share/jive/jive/AppletManager.lua:442: LicenseManager|…userpath/applets/LicenseManager/LicenseManagerApplet.lua:232: ‚then‘ expected near ‚!‘

When I click on the Custom Clock entry I see the same behavior as in max2play: nothing happens. But in the SSH session I see:
20190308 03:05:08.886 ERROR jivelite.applets – AppletManager.lua:474 Error while loading applet CustomClock:/root/triode-jivelite/share/jive/jive/AppletManager.lua:442: CustomClock|…elite/userpath/applets/CustomClock/CustomClockApplet.lua:347: ‚)‘ expected near ‚!‘
stack traceback:
/root/triode-jivelite/share/jive/jive/AppletManager.lua:474: in function ‚_ploadApplet‘
/root/triode-jivelite/share/jive/jive/AppletManager.lua:560: in function ‚loadApplet‘
/root/triode-jivelite/share/jive/jive/AppletMeta.lua:150: in function ‚callback‘
/root/triode-j
20190308 03:05:08.886 WARN jivelite.ui.draw – jiveL_dispatch_event:780 error in event function:
…ivelite/userpath/applets/CustomClock/CustomClockMeta.lua:41: attempt to index local ‚applet‘ (a nil value)
stack traceback:
…ivelite/userpath/applets/CustomClock/CustomClockMeta.lua:41: in function ‚callback‘
/root/triode-jivelite/share/jive/jive/ui/SimpleMenu.lua:189: in function ‚itemListener‘
/root/triode-jivelite/share/jive/jive/ui/Menu.lua:154: in function ‚_eventHandler‘
/root/triode-jivelite/share/jive/jive/ui/Menu.lua:1144: in function ‚ca

Notice the ERROR line:
20190308 03:05:08.886 ERROR jivelite.applets – AppletManager.lua:474 Error while loading applet CustomClock:/root/triode-jivelite/share/jive/jive/AppletManager.lua:442: CustomClock|…elite/userpath/applets/CustomClock/CustomClockApplet.lua:347: ‚)‘ expected near ‚!‘
It’s the same error as above.

Lines 347-350 in the CustomClockApplet.lua file are:
if ((oldMode and self.mode != oldMode) or self.licensed~=licensed) and self.window then
self.window:hide()
self.window = nil
end

According to https://stackoverflow.com/questions/34713203/what-does-lua-operator-mean/34713230: the ~= is not equals. It is the equivalent in other languages of !=

So the „!=“ entries in the CustomClockApplet.lua file are incorrect and should be „~=“.

Sure enough when I change all the „!=“ to „~=“ the CustomClock applet works correctly!

I stll have 2 problems: after changing all the „!=“ to „~=“ in the CustomClockApplet.lua file, there still are 2 other instances of the „!“ character in :
function _token_of(c)
local x,y = string.match(c,“^%s*([/!]?)%s*(%a+)%s*“)
return (x or „“) .. (y or „“)
end

and:

local html_tags = {
[„br“] = ‚\n‘,
[„/br“] = ‚\n‘,
[„li“] = “,
[„/li“] = “,
[„ul“] = „“,
[„/ul“] = „“,
[„ol“] = „“,
[„/ol“] = „“,
[„img“] = “,
[„/tr“] = “,
[„pre“] = „“,
[„/pre“] = „“,
[„b“] = „*“,
[„/b“] = „*“,
[„i“] = „/“,
[„/i“] = „/“,
[„big“] = „“,
[„/big“] = „“,
[„small“] = „“,
[„/small“] = „“,
[„strong“] = „*“,
[„/strong“] = „*“,
[„em“] = „/“,
[„/em“] = „/“,
[„u“] = „“,
[„/u“] = „“,
[„div“] = „“,
[„/div“] = „“,
[„html“] = „“,
[„/html“] = „“,
[„head“] = „“,
[„/head“] = „“,
[„body“] = „“,
[„/body“] = „“,
[„p“] = „“,
[„/p“] = „“,
[„a“] = „“,
[„/a“] = „“,
[„hr“] = „\n“ .. string.rep(„-„,44) .. „\n“,
[„font“] = „“,
[„/font“] = „“,
[„!doctype“] = „“,
[„void“] = „“,
[„/void“] = „“,
[„comment“] = „“,
[„/comment“] = „“,
[„style“] = „“,
[„/style“] = „“,
[„meta“] = „“,
[„tr“] = „“,
[„td“] = „\t“,
[„/td“] = „“,
[„table“] = „“,
[„/table“] =““,
[„th“] = „“,
[„/th“] = „“,
}

I don’t know if one of both of these should be changed as well.

The other problem is that if I install the CustomClock app in Jivelite, then fix the „!=“ so that it runs correctly, then uninstall and reinstall it again, the CustomClock app is copied back with the incorrect „!=“. The file is coming from http://superdatetimewu.sourceforge.net/CustomClock_JL_1.01.004.zip.

20190308 04:18:54.604 INFO applet.SetupAppletInstaller – SetupAppletInstallerApplet.lua:435 downloading: http://superdatetimewu.sourceforge.net/CustomClock_JL_1.01.004.zip to: /root/.jivelite/userpath/applets/CustomClock/ sha1: c4f6d3d143bc4876e843d3c1604ca469275b1cc7
20190308 04:18:55.015 INFO applet.SetupAppletInstaller – SetupAppletInstallerApplet.lua:462 sha1 verified
20190308 04:18:55.259 INFO applet.SetupAppletInstaller – SetupAppletInstallerApplet.lua:534 extracting file: /root/.jivelite/userpath/applets/CustomClock/strings.txt
20190308 04:18:55.260 INFO applet.SetupAppletInstaller – SetupAppletInstallerApplet.lua:534 extracting file: /root/.jivelite/userpath/applets/CustomClock/CustomClockApplet.lua
20190308 04:18:55.375 INFO applet.SetupAppletInstaller – SetupAppletInstallerApplet.lua:534 extracting file: /root/.jivelite/userpath/applets/CustomClock/CustomClockMeta.lua
20190308 04:18:55.376 INFO applet.SetupAppletInstaller – SetupAppletInstallerApplet.lua:534 extracting file: /root/.jivelite/userpath/applets/CustomClock/CustomSpectrumMeter.lua
20190308 04:18:55.377 INFO applet.SetupAppletInstaller – SetupAppletInstallerApplet.lua:534 extracting file: /root/.jivelite/userpath/applets/CustomClock/CustomVUMeter.lua
20190308 04:18:55.378 INFO jivelite.applets – AppletManager.lua:709 store settings: SetupAppletInstaller

I need to into piCorePlayer to see how it handles the „!=“ and why this isn’t a problem there.

Frank