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.

    Magic Mirror Module Development - Powershell embeded

    Scheduled Pinned Locked Moved Development
    4 Posts 3 Posters 993 Views 3 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.
    • N Offline
      nkc
      last edited by

      Hi All, How are you.

      Please note I am not a developer, My question is … How can I embed and run a powershell script or code from a Magic Mirror module and return its result to a payload(or data).

      I have a pwershell script which I’d like to convert to a Magic Mirror module and since my background is not too technical , I need help or any suggestions or ideas.

      Thank you.

      Regards.

      S 1 Reply Last reply Reply Quote 0
      • S Offline
        sdetweil @nkc
        last edited by

        @nkc so you need the node_helper side of the module to execute the PowerShell script and capture it’s output. then send that output up to the browser side to display

        you can look at/enhance my python print to call PowerShell instead of python

        https://github.com/sdetweil/MMM-PythonPrint

        this runs a python script, captures it’s output and sends it up to the browser side to display.

        mm is all javascript

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        wishmaster270W 1 Reply Last reply Reply Quote 0
        • wishmaster270W Offline
          wishmaster270 Module Developer @sdetweil
          last edited by wishmaster270

          @nkc Hi,

          i think you can use my MMM-CommandToNotification module to call the script periodically and send it’s output as a notification.
          You then can use my MMM-ValuesByNotification module to display the value of the notification.

          S 1 Reply Last reply Reply Quote 1
          • S Offline
            sdetweil @wishmaster270
            last edited by

            @wishmaster270 I was going to recommend your modules but strayed into notifications , and I think that took him off path

            Sam

            How to add modules

            learning how to use browser developers window for css changes

            1 Reply Last reply Reply Quote 0
            • 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