kevinatown / MMM-Screencast

A module to cast to the magic mirror
MIT License
166 stars 34 forks source link

Screencast initialization issues #107

Closed the-elder-sun closed 3 years ago

the-elder-sun commented 3 years ago

Hello and thank you for building this tutorial!

I am just being introduced to the RaspberryPi world and thought this mirror was a great way to be introduced.

I have pasted the startup sequence (forgive my lack of terminology knowledge, did I mention I have never done this before?) and attached the config.js files below.

When I start the MM I get all of my modules except the Screencast. I am not even seeing an initialization visual. TBH I do not know what I am supposed to see or if there is additional configuration required with the application that I would like to display.

I am lost, please help and thank you!!

[31.03.2021 11:29.08.677] [LOG] Starting MagicMirror: v2.14.0 [31.03.2021 11:29.08.684] [LOG] Loading config ... [31.03.2021 11:29.08.689] [LOG] Loading module helpers ... [31.03.2021 11:29.08.691] [LOG] No helper found for module: alert. [31.03.2021 11:29.08.815] [LOG] Initializing new module helper ... [31.03.2021 11:29.08.816] [LOG] Module helper loaded: updatenotification [31.03.2021 11:29.08.817] [LOG] No helper found for module: clock. [31.03.2021 11:29.09.186] [LOG] Initializing new module helper ... [31.03.2021 11:29.09.186] [LOG] Module helper loaded: calendar [31.03.2021 11:29.09.187] [LOG] No helper found for module: compliments. [31.03.2021 11:29.09.188] [LOG] No helper found for module: currentweather. [31.03.2021 11:29.09.189] [LOG] No helper found for module: weatherforecast. [31.03.2021 11:29.09.208] [LOG] Initializing new module helper ... [31.03.2021 11:29.09.209] [LOG] Module helper loaded: newsfeed [31.03.2021 11:29.09.477] [LOG] Initializing new module helper ... [31.03.2021 11:29.09.477] [LOG] Module helper loaded: MMM-Screencast [31.03.2021 11:29.09.479] [LOG] All module helpers loaded. [31.03.2021 11:29.09.570] [LOG] Starting server on port 8080 ... [31.03.2021 11:29.09.590] [LOG] Server started ... [31.03.2021 11:29.09.591] [LOG] Connecting socket for: updatenotification [31.03.2021 11:29.09.592] [LOG] Connecting socket for: calendar [31.03.2021 11:29.09.593] [LOG] Starting node helper for: calendar [31.03.2021 11:29.09.595] [LOG] Connecting socket for: newsfeed [31.03.2021 11:29.09.596] [LOG] Starting node helper for: newsfeed [31.03.2021 11:29.09.596] [LOG] Connecting socket for: MMM-Screencast [31.03.2021 11:29.09.597] [LOG] Sockets connected & modules started ... [31.03.2021 11:29.09.892] [LOG] Launching application.

var 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: ["127.0.0.1", "::ffff:127.0.0.1", "::1"], // Set [] to allow all IP addresses // or add a specific IPv4 of 192.168.1.5 : // ["127.0.0.1", "::ffff:127.0.0.1", "::1", "::ffff:192.168.1.5"], // or IPv4 range of 192.168.3.0 --> 192.168.3.15 use CIDR format : // ["127.0.0.1", "::ffff:127.0.0.1", "::1", "::ffff:192.168.3.0/28"],

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",
logLevel: ["INFO", "LOG", "WARN", "ERROR", "DEBUG"], // Add "DEBUG" for even more logging
timeFormat: 12,
units: "imperial",
// serverOnly:  true/false/"local" ,
// local for armv6l processors, default
//   starts serveronly and then starts chrome browser
// false, default for all NON-armv6l devices
// true, force serveronly mode, because you want to.. no UI on this device

modules: [
    {
        module: "alert",
    },
    {
        module: "updatenotification",
        position: "top_bar"
    },
    {
        module: "clock",
        position: "top_left"
    },
    {
        module: "calendar",
        header: "US Holidays",
        position: "top_left",
        config: {
            calendars: [
                {
                    symbol: "calendar-check",
                    url: "webcal://www.calendarlabs.com/ical-calendar/ics/76/US_Holidays.ics",
                }
            ]
        }
    },
    {
        module: "compliments",
        position: "lower_third"
    },
    {
        module: "currentweather",
        position: "top_right",
        config: {
            location: "Germantown",
            locationID: "4624601", //ID from http://bulk.openweathermap.org/sample/city.list.json.gz; unzip the gz file and find your city
            appid: "a************************5"
        }
    },
    {
        module: "weatherforecast",
        position: "top_right",
        header: "Weather Forecast",
        config: {
            location: "Germantown",
            locationID: "4624601", //ID from http://bulk.openweathermap.org/sample/city.list.json.gz; unzip the gz file and find your city
            appid: "a************************5"
        }
    },
    {
        module: "newsfeed",
        position: "bottom_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
        }
        },
        {
    module: 'MMM-Screencast',
    position: 'center', // This position is for a hidden <div /> and not the screencast window
    config: {
        position: 'center',
        height: 700,
        width: 900,
            }
    },
        ]

};

/ DO NOT EDIT THE LINE BELOW / if (typeof module !== "undefined") {module.exports = config;}

the-elder-sun commented 3 years ago

Please be patient with me.....I have gotten the Screencast to play. Control of this module is now my concern. How do I start and stop the casting of the video. I don't see my mouse (which working for input) having a lot of options once the video begins to play.

the-elder-sun commented 3 years ago

I understand "tutoring" is not what this is supposed to be about.

If i wanted to edit the width and height of the modules appearance, where in the config.js file is that information stored or would that need to be manipulated in the DEV environment in the MM application? If so where?

robertalexa commented 3 years ago

Hi,

{
    module: 'MMM-Screencast',
    position: 'center', // This position is for a hidden <div /> and not the screencast window
    config: {
        position: 'center',
        height: 700,
        width: 900,
    }
 },

Based on your config, height and width are the 2 parameters you need to change to change the screencast window size. You should also add a param for the name that should be displayed. Have a look at my config for comparison

        // MMM-Screencast
        {
            module: "MMM-Screencast",
            disabled: false,
            position: "bottom_right", // This position is for a hidden <div /> and not the screencast window
            config: {
                position: "center",
                height: 600,
                width: 1000,
                castName: "Magic Mirror"
            }
        },

In your initial post, from the log , you can see the following: [31.03.2021 11:29.09.477] [LOG] Module helper loaded: MMM-Screencast [31.03.2021 11:29.09.596] [LOG] Connecting socket for: MMM-Screencast

This suggests that everything loaded correctly.

About controlling it, the controls happen on the source device, the device that is casting (your phone, your computer) and not on the device that is being casted to.

So on your phone, go on youtube, press the cast button, you will see your mirror (based on my config, you will see "Magic Mirror"). Press and wait. This will start the casting on the mirror. When you are done, you disconnect the casting from your phone. That will stop the casting on the mirror.

I hope this answers all your questions :)

kevinatown commented 3 years ago

Hi @the-elder-sun,

@robertalexa's answer was spot on! Thanks!

I am going to close this issue as it seems to be answered. Please feel free to reopen it if it doesn't solve it.