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.

    MMM-transitfeed https error

    Scheduled Pinned Locked Moved Unsolved Troubleshooting
    2 Posts 2 Posters 217 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.
    • D Offline
      DIY_556
      last edited by sdetweil

      Hi Everyone, I’m trying to get my mirror to display transit info for MTA’s L.
      I tried using the NYC specific module but I couldn’t figure out a way around the API key requirement(the MTA stopped requiring API keys a few months ago and there’s no way to get one.)
      I keep getting a “SyntaxError: Unexpected identifier ‘https’” error. How do I fix this?

      {
      			module: "MMM-transitfeed",
      			position: "bottom_right",
      			config: {
      				gtfs_config: {
      						agencies: [
      								{
      									"url": "https://api.mta.info/#/subwayRealTimeFeeds",
      									"realtimeUrls: ["https://api-endpoint.mta.info/Dataservice/mtagtfsfeeds/nyct%2Fgtfs-l"],
      									exclude: ['shapes']
      								},
      							],
      						},
      				queries: [
      						{route_name: "L", stop_name: "1 Av", direction: 1},
      					],
      					departuresPerRoute: 3,
      					showTimeFromNow: 15,
      					showTimeEstimated: false,
      					showStationNames: true,
      					showAllTerminus: true,
      					departingSoonMinutes: 2,
      					departingSoonColor: "#f66",
      				},
      
      S 1 Reply Last reply Reply Quote 0
      • S Offline
        sdetweil @DIY_556
        last edited by

        @DIY_556 said in MMM-transitfeed https error:

        "realtimeUrls: [“https://api-endpoint.mta.info/Dataservice/mtagtfsfeeds/nyct%2Fgtfs-l”],

        well you have a misplaced " in front of realtimeUrls
        which with the one in front of https makes the start and end of a string and then
        https is an unknown JS token

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        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