Fabrizz / MMM-LiveLyrics

A lyrics module for MM2. It uses Genius data and MMM-OnSpotify to overlay the song lyrics
GNU General Public License v3.0
7 stars 3 forks source link

MMM-OnSpotify does not hide when LiveLyrics is showing #7

Open konnorve opened 1 year ago

konnorve commented 1 year ago

I recently updated my MagicMirror with a new Raspberry Pi 4 and the most recent software following the manual installation instructions provided by the MagicMirror documentation (as of a few days ago).

While LiveLyrics is open, the OnSpotify module does not hide. I tried to force the behavior by setting the hideSpotifyModule to true but no luck. My access tokens work just fine.

2023-08-06-133204_1080x1920_scrot

An example screenshot of the behavior is below.

Additionally I have whitelisted all the IP address using the following line in the config: ipWhitelist: []

let config = {
    address: "localhost",   // Address to listen on, can be:
                            // - "localhost", "127.0.0.1", "::1" to listen on loopback interface
                            // - another specific IPv4/6 to listen on a specific interface
                            // - "0.0.0.0", "::" to listen on any interface
                            // Default, when address config is left out or empty, is "localhost"
    port: 8080,
    basePath: "/",          // The URL path where MagicMirror² is hosted. If you are using a Reverse proxy
                            // you must set the sub path here. basePath must end with a /
    ipWhitelist: [],    
    useHttps: false,        // Support HTTPS or not, default "false" will use HTTP
    httpsPrivateKey: "",    // HTTPS private key path, only require when useHttps is true
    httpsCertificate: "",   // HTTPS Certificate path, only require when useHttps is true

    language: "en",
    locale: "en-US",
    logLevel: ["INFO", "LOG", "WARN", "ERROR"], // Add "DEBUG" for even more logging
    timeFormat: 12,
    units: "imperial",

    modules: [
        {
            module: "alert",
        },
        {
            module: "updatenotification",
            position: "top_bar"
        },
        {
            module: "clock",
            position: "top_left",
            showPeriod: true,
            showSunTimes: true

        },
        {
            module: "calendar",
            position: "top_left",
            config: {
                calendars: [
                    {
                        url: $$TOKEN$$
                    }
                ]
            }
        },
        {
            module: "weather",
            position: "top_right",
            config: {
                weatherProvider: "openweathermap",
                type: "current",
                apiKey: $$TOKEN$$

            }
        },
        {
            module: "weather",
            position: "top_right",
            header: "Weather Forecast",
            config: {
                weatherProvider: "openweathermap",
                type: "forecast",
                apiKey: $$TOKEN$$
            }
        },
        {
            module: "MMM-OnSpotify",
            position: "top_left", /* bottom_left, bottom_center */ 
            config: {
                clientID: $$CLIENT$$,
                clientSecret: $$SECRET$$,
                accessToken: $$TOKEN$$,
                refreshToken: $$TOKEN$$,
                displayWhenEmpty: "user",
                spotifyCodeExperimentalShow: false,
            }
        },
        {
        // This is the base config. See more config options below
            module: "MMM-LiveLyrics",
            position: "fullscreen_below", // Do not change position
            config: {
                accessToken: $$TOKEN$$,
                showConnectionQrOnLoad: false,
                hideSpotifyModule: true,
            }
        },
        {
            module: "newsfeed",
            position: "top_bar",
            config: {
                feeds: [
                    {
                        title: "New York Times",
                        url: "https://rss.nytimes.com/services/xml/rss/nyt/HomePage.xml"
                    }
                ],
                showSourceTitle: true,
                showPublishDate: true,
                broadcastNewsFeeds: true,
                broadcastNewsUpdates: true
            }
        },
    ]
};

Do I need to configure someone for module cross-talk? Do you have any suggestions on how to debug communications between modules?

Fabrizz commented 1 year ago

Hey, you need to make sure that both modules are on the last version. The only communication between them is some messages that signa, the existstance of the other module. If you have the log enabled, you can see the module hiding or not. In a couple of hours I'm going to send a configuration snippet that I know that works.

Fabrizz commented 1 year ago

Add:

showConnectionQrOnLoad: false,
startHidden: true,

And turn on the lyirics using <mirror:port>/LiveLyrics (ex: http://localhost:8080/LiveLyrics/). Check if the issue resolves. It maybe has something to do with the fact that by default I dont use MM2 hide/show functions, as they sometimes are overwritten