MagicMirror² v2.4.1 is available! For more information about this release, check out this topic.
Please read the release notes carefully since this update requires adjustments to your Raspberry Pi configuration!

MMM-Api - port specifics



  • Good day,

    After installing the MM-Api module, I was having issues returning info from the server.

    reading the documentation, it would seem as though port 3001 is used (from the examples).

    I can see the endpoints being created in the “node-helper.js”

    this.expressApp.get("/api/v1/modules", (req, res) => {
    	res.send({'success': 'true', 'modules': this.moduleData});
    });
    

    But I don’t see any specifics on the actual port to use or forward through my router inorder to hit these endpoints.

    Is it indeed port 3001?

    unfortunately, any testing I’ve done doesn’t seem to return any information or control the server in any way… so far.

    My goal is to have the “MMM-RSTP” module show it’s camera stream when I post to an endpoint through the “MMM-Api”, for a particular amount of time.

    The endpoint would be requested by ‘unityhome.online’ Alexa Cognitive Security Service

    Anyway, I digress…

    Has anyone got the Api Endpoints working on MagicMirror?

    Many thanks!



  • @chef it is the same port your magicmirror is running on, it’s only extending the server from magicmirror not setting up a new one



  • Make sure in the config.js that the IP address is not ‘localhost’, but is the IP address of the raspi.

    Default port is 8080. This is how the plugin will accept URL commands.

    Also, make sure any other PC or computers ip is added to the ‘white list’.

    That is how it is done