MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.

    Running MM² as an offline demo with local module data references

    Scheduled Pinned Locked Moved Solved Troubleshooting
    3 Posts 2 Posters 1.7k Views 2 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • AlbinolanA Offline
      Albinolan
      last edited by Albinolan

      Hi, as the title states, I am looking for a way to run mm² without an internet connection as a demo. It is for my end of year major project, and my MM² based smart display will need to run for days on end without connecting to the internet, since I will not have access to it to connect it to the internet when it is being marked. Is there a way I can change the modules so they refer to local files and not internet servers? I currently have the default calendar, weather, date and clock modules as well as mmm-localpublictransport (I think thats the name). It is also already setup to launch MM² when the raspberry pi is powered on.

      I think that the calendar and module should be able to refer to a local iCal file, but the weather and public transport modules rely on complex API’s that I’m not quite sure how to localise.

      Any help/tips would be appreciated.

      ? 1 Reply Last reply Reply Quote 0
      • ? Offline
        A Former User @Albinolan
        last edited by A Former User

        @albinolan
        If your API needs simple RESTful HTTP Request/Response, You can make Fake HTTP Endpoint in your local RPI with webserver module or nginx, Apache…

        By Example,
        currentWeather module use http://api.openweathermap.org/data/2.5/weather?q=London&APPID=YOUR_APIKEY for getting weather data.
        When you type that URL in your browser, you can get weather data like this;

        {"coord":{"lon":-0.13,"lat":51.51},"weather":[{"id":804,"main":"Clouds","description":"overcast clouds","icon":"04d"}],"base":"stations","main":{"temp":293.288,"pressure":1026.05,"humidity":76,"temp_min":293.288,"temp_max":293.288,"sea_level":1033.49,"grnd_level":1026.05},"wind":{"speed":1.86,"deg":250.502},"clouds":{"all":100},"dt":1534836850,"sys":{"message":0.0038,"country":"GB","sunrise":1534827349,"sunset":1534878617},"id":2643743,"name":"London","cod":200}
        

        Now, you can make a local webserver(using nginx/Apache or makeing your own tiny webserver with node.js) to host this result and assign a URL like this; http://localhost:8080/currentweather_fake

        Then, modify currentweather module to direct this local url as API endpoint.
        It will work, I think.

        AlbinolanA 1 Reply Last reply Reply Quote 0
        • AlbinolanA Offline
          Albinolan @Guest
          last edited by

          @Sean Thanks, seems bout right. Will try it when I get home.

          1 Reply Last reply Reply Quote 0

          Hello! It looks like you're interested in this conversation, but you don't have an account yet.

          Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

          With your input, this post could be even better 💗

          Register Login
          • 1 / 1
          • First post
            Last post
          Enjoying MagicMirror? Please consider a donation!
          MagicMirror created by Michael Teeuw.
          Forum managed by Sam, technical setup by Karsten.
          This forum is using NodeBB as its core | Contributors
          Contact | Privacy Policy