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-HomeKit | Control your MagicMirror with Apple HomeKit

    Scheduled Pinned Locked Moved System
    27 Posts 17 Posters 21.3k Views 20 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.
    • P Offline
      p4lsec
      last edited by

      Okay, looks like something with my npm was broken. It was working before, so I think installing this module or Homebridge did it. Attempting to fix.

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

        @p4lsec said in MMM-HomeKit | Control your MagicMirror with Apple HomeKit:

        Excellent module!

        Hello ! Thank you for that compliment.
        Unfortunately, I don’t know where your problem comes from. What is the command you are executing that gives you this error?
        Keep me informed :wink:

        1 Reply Last reply Reply Quote 0
        • N Offline
          Niggich
          last edited by

          @XC2DN
          My Homebridge is at another Pi then the Mirror. How I have to use it?

          C 1 Reply Last reply Reply Quote 0
          • C Offline
            Caimin @Niggich
            last edited by

            @Niggich Making connection to the other pi through ssh to send commands? Or if your using a module which allows to give commands through a url u can use curl… In this example I use both…

             {
                   "name" : "Magic Mirror",
                   "on_cmd": "curl -s 'http://192.168.X.XX:8080/remote?action=MONITORON'",
                   "off_cmd": "curl -s 'http://192.168.X.XX:8080/remote?action=MONITOROFF'",
                   "state_cmd": "sshpass -p 'sshpassword' ssh -oStrictHostKeyChecking=no pi@192.168.X.XX vcgencmd display_power | grep -q '1' && echo '1'",
                   "polling": true,
                   "interval": 10,
                   "manufacturer": "XXX",
                   "model": "v 1.0.0"
               }
            

            You might need to install sshpass: apt-get install sshpass, which allows you to connect through ssh with password without being prompted on the command line for the password.

            N A 2 Replies Last reply Reply Quote 0
            • N Offline
              Niggich @Caimin
              last edited by

              @Caimin Thank you a lot. It is working like this. I install sshpass to send the Commands via ssh.

              1 Reply Last reply Reply Quote 0
              • K Offline
                kevinlingley
                last edited by

                This post is deleted!
                1 Reply Last reply Reply Quote 0
                • B Offline
                  Baassievalk
                  last edited by

                  This post is deleted!
                  1 Reply Last reply Reply Quote 0
                  • B Offline
                    Baassievalk
                    last edited by

                    Hi!

                    I need a little help setting it up…
                    When turning on the mirror in the HomeKit App I get the following log:

                    [2020-3-29 22:26:16] [Raspberry Pi] Mirror is off.
                    [2020-3-29 22:26:17] [Raspberry Pi] Failed to turn on Mirror
                    [2020-3-29 22:26:17] [Raspberry Pi] 
                    Als het goed is hebt u de gebruikelijke informatie ontvangen van uw
                    systeembeheerder. Gewoonlijk komt het neer op de volgende drie punten:
                    
                        1. Respecteer de privacy van anderen.
                        2. Denk na voordat u iets doet.
                        3. Veel mogelijkheden betekent veel verantwoordelijkheid.
                    
                    sudo: geen terminal aanwezig en geen wachtwoordvraag(askpass)-programma opgegeven
                    

                    Translated

                    [2020-3-29 22:26:16] [Raspberry Pi] Mirror is off.
                    [2020-3-29 22:26:17] [Raspberry Pi] Failed to turn on Mirror
                    [2020-3-29 22:26:17] [Raspberry Pi] 
                    "Als het goed is hebt u de gebruikelijke informatie ontvangen van uw
                    systeembeheerder. Gewoonlijk komt het neer op de volgende drie punten:
                    
                        1. Respecteer de privacy van anderen.
                        2. Denk na voordat u iets doet.
                        3. Veel mogelijkheden betekent veel verantwoordelijkheid." This is a little talk about privacy but then:
                    sudo: no terminal available and no  passwordask(askpass) programs gave up.
                    

                    If anyone knows a solution, would be appreciated!

                    N 1 Reply Last reply Reply Quote 0
                    • N Offline
                      NorthernMan54 @Baassievalk
                      last edited by

                      @Baassievalk
                      After much googling, the answer is here:

                      https://stackoverflow.com/questions/21659637/how-to-fix-sudo-no-tty-present-and-no-askpass-program-specified-error

                      and in particular this comment

                      username ALL = NOPASSWD: /fullpath/to/command, /fullpath/to/othercommand

                      In my setup I created a file called /etc/sudoers.d/010_cmdswitch2
                      And the file contains

                      homebrid ALL = NOPASSWD: /bin/chvt

                      chvt is the command I need to run, and homebrid is the account I use to run my homebridge with

                      1 Reply Last reply Reply Quote 1
                      • A Offline
                        a0ies
                        last edited by

                        This post is deleted!
                        1 Reply Last reply Reply Quote 0
                        • 1
                        • 2
                        • 3
                        • 1 / 3
                        • 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