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.

    Shell scripts through mirror

    Scheduled Pinned Locked Moved Troubleshooting
    voice control
    2 Posts 2 Posters 1.3k 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.
    • T Offline
      Trmst
      last edited by

      Hi.

      I am trying to implement a way to turn my lights on and off. I have managed to write 2 very simple shell scripts in my rpi, one that turns lights on and one turns lights off.

      What is the easiest way to run these scripts through the magic mirror? I am also intending to run this by voice control, so a suggestion on how to do this is also appreciated.

      strawberry 3.141S 1 Reply Last reply Reply Quote 0
      • strawberry 3.141S Offline
        strawberry 3.141 Project Sponsor Module Developer @Trmst
        last edited by strawberry 3.141

        @trmst the way I’m calling the turn off monitor cmd in my voice module you can execute your shell script.

        https://github.com/fewieden/MMM-voice/blob/master/node_helper.js#L348

        official documentation https://nodejs.org/dist/latest-v8.x/docs/api/child_process.html#child_process_child_process_exec_command_options_callback

        Please create a github issue if you need help, so I can keep track

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