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 with touchscreen Display/Monitor

    Scheduled Pinned Locked Moved Hardware
    21 Posts 6 Posters 22.3k Views 7 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.
    • S Do not disturb
      sdetweil @core
      last edited by

      @core but this is effectively the same as the ir frame… the special touchfoil does the work… NOT the monitor…

      Sam

      How to add modules

      learning how to use browser developers window for css changes

      1 Reply Last reply Reply Quote 0
      • cowboysdudeC Offline
        cowboysdude Module Developer @core
        last edited by

        I have a 24" one that after I bought it found out that it will not work in Linux so my only option is to install MM on Windows … ugh. So when I can come across a NUC or something small I will until then …

        1 Reply Last reply Reply Quote 0
        • B Offline
          BJK @Snille
          last edited by

          @Snille Hi Snille
          I have had greate use of xin.sh file to run at start. It contained the:
          “DISPLAY=:0.0 xinput --set-prop “Multi touch Multi touch overlay device” “Coordinate Transformation Matrix” 0 1 0 -1 0 1 0 0 1”
          However, now using the pm2 start xin.sh for automatic start, I get an error in the pm2 log
          What do you use to correct the ir-frame ?
          Best
          Bo

          S B SnilleS 4 Replies Last reply Reply Quote 0
          • S Do not disturb
            sdetweil @BJK
            last edited by

            @BJK what is the error?

            Sam

            How to add modules

            learning how to use browser developers window for css changes

            1 Reply Last reply Reply Quote 0
            • B Offline
              BJK @BJK
              last edited by

              @sdetweil

              Well, I start the xin.sh with PM2 and it works with calibrating the IR-frame:

              xin.sh:
              #!/bin/bash
              DISPLAY=:0.0 xinput --set-prop “Multi touch Multi touch overlay device” “Coordinate Transformation Matrix” 0 -1 1 1 0 0 0 0 1

              However, after the mm.sh (the MagicMirror) has started, then when I go back to Raspberry disktop the the Calibration is off again. If I then run the xin.sh with “pm2 start xin.sh” in a terminal window then the calibration is okay again.

              This is the error that I get from pm2 log file:

              Bo@MMpi:~ $ pm2 list
              ┌────┬────────────────────┬──────────┬──────┬───────────┬──────────┬──────────┐
              │ id │ name │ mode │ ↺ │ status │ cpu │ memory │
              ├────┼────────────────────┼──────────┼──────┼───────────┼──────────┼──────────┤
              │ 0 │ xin │ fork │ 15 │ errored │ 0% │ 0b │
              └────┴────────────────────┴──────────┴──────┴───────────┴──────────┴──────────┘
              [PM2][WARN] Current process list is not synchronized with saved list. App led mm differs. Type ‘pm2 save’ to synchronize.
              Bo@MMpi:~ $ pm2 log
              [TAILING] Tailing last 15 lines for [all] processes (change the value with --lines option)
              /home/Bo/.pm2/pm2.log last 15 lines:
              PM2 | 2022-03-31T20:11:38: PM2 log: App [xin:0] online
              PM2 | 2022-03-31T20:11:38: PM2 log: App [xin:0] exited with code [0] via signal [SIGINT]
              PM2 | 2022-03-31T20:11:38: PM2 log: App [xin:0] starting in -fork mode-
              PM2 | 2022-03-31T20:11:38: PM2 log: App [xin:0] online
              PM2 | 2022-03-31T20:11:38: PM2 log: App [xin:0] exited with code [0] via signal [SIGINT]
              PM2 | 2022-03-31T20:11:38: PM2 log: App [xin:0] starting in -fork mode-
              PM2 | 2022-03-31T20:11:38: PM2 log: App [xin:0] online
              PM2 | 2022-03-31T20:11:38: PM2 log: App [xin:0] exited with code [0] via signal [SIGINT]
              PM2 | 2022-03-31T20:11:38: PM2 log: App [xin:0] starting in -fork mode-
              PM2 | 2022-03-31T20:11:38: PM2 log: App [xin:0] online
              PM2 | 2022-03-31T20:11:38: PM2 log: App [xin:0] exited with code [0] via signal [SIGINT]
              PM2 | 2022-03-31T20:11:38: PM2 log: App [xin:0] starting in -fork mode-
              PM2 | 2022-03-31T20:11:38: PM2 log: App [xin:0] online
              PM2 | 2022-03-31T20:11:38: PM2 log: App [xin:0] exited with code [0] via signal [SIGINT]
              PM2 | 2022-03-31T20:11:38: PM2 log: Script /home/Bo/xin.sh had too many unstable restarts (16). Stopped. “errored”

              /home/Bo/.pm2/logs/xin-out.log last 15 lines:
              /home/Bo/.pm2/logs/xin-error.log last 15 lines:
              0|xin | Invalid MIT-MAGIC-COOKIE-1 keyUnable to connect to X server
              0|xin | Invalid MIT-MAGIC-COOKIE-1 keyUnable to connect to X server
              0|xin | Invalid MIT-MAGIC-COOKIE-1 keyUnable to connect to X server
              0|xin | Invalid MIT-MAGIC-COOKIE-1 keyUnable to connect to X server
              0|xin | Invalid MIT-MAGIC-COOKIE-1 keyUnable to connect to X server
              0|xin | Invalid MIT-MAGIC-COOKIE-1 keyUnable to connect to X server
              0|xin | Unable to connect to X server
              0|xin | Invalid MIT-MAGIC-COOKIE-1 keyInvalid MIT-MAGIC-COOKIE-1 keyUnable to connect to X server
              0|xin | Invalid MIT-MAGIC-COOKIE-1 keyUnable to connect to X server
              0|xin | Unable to connect to X server
              0|xin | Invalid MIT-MAGIC-COOKIE-1 keyInvalid MIT-MAGIC-COOKIE-1 keyUnable to connect to X server
              0|xin | Invalid MIT-MAGIC-COOKIE-1 keyUnable to connect to X server
              0|xin | Unable to connect to X server
              0|xin | Invalid MIT-MAGIC-COOKIE-1 keyUnable to connect to X server
              0|xin | Invalid MIT-MAGIC-COOKIE-1 keyUnable to connect to X server

              Should I do something else with pm2 or run the xin.sh in an other way?

              It would be so nice to have i done automatically :beaming_face_with_smiling_eyes:

              Best Bo

              1 Reply Last reply Reply Quote 0
              • B Offline
                BJK @BJK
                last edited by

                @sdetweil

                @sdetweil

                Well, I start the xin.sh with PM2 and it works with calibrating the IR-frame:

                xin.sh:
                #!/bin/bash
                DISPLAY=:0.0 xinput --set-prop “Multi touch Multi touch overlay device” “Coordinate Transformation Matrix” 0 -1 1 1 0 0 0 0 1

                However, after the mm.sh (the MagicMirror) has started, then when I go back to Raspberry disktop the the Calibration is off again. If I then run the xin.sh with “pm2 start xin.sh” in a terminal window then the calibration is okay again.

                This is the error that I get from pm2 log file:

                Bo@MMpi:~ $ pm2 list
                ┌────┬────────────────────┬──────────┬──────┬───────────┬──────────┬──────────┐
                │ id │ name │ mode │ ↺ │ status │ cpu │ memory │
                ├────┼────────────────────┼──────────┼──────┼───────────┼──────────┼──────────┤
                │ 0 │ xin │ fork │ 15 │ errored │ 0% │ 0b │
                └────┴────────────────────┴──────────┴──────┴───────────┴──────────┴──────────┘
                [PM2][WARN] Current process list is not synchronized with saved list. App led mm differs. Type ‘pm2 save’ to synchronize.
                Bo@MMpi:~ $ pm2 log
                [TAILING] Tailing last 15 lines for [all] processes (change the value with --lines option)
                /home/Bo/.pm2/pm2.log last 15 lines:
                PM2 | 2022-03-31T20:11:38: PM2 log: App [xin:0] online
                PM2 | 2022-03-31T20:11:38: PM2 log: App [xin:0] exited with code [0] via signal [SIGINT]
                PM2 | 2022-03-31T20:11:38: PM2 log: App [xin:0] starting in -fork mode-
                PM2 | 2022-03-31T20:11:38: PM2 log: App [xin:0] online
                PM2 | 2022-03-31T20:11:38: PM2 log: App [xin:0] exited with code [0] via signal [SIGINT]
                PM2 | 2022-03-31T20:11:38: PM2 log: App [xin:0] starting in -fork mode-
                PM2 | 2022-03-31T20:11:38: PM2 log: App [xin:0] online
                PM2 | 2022-03-31T20:11:38: PM2 log: App [xin:0] exited with code [0] via signal [SIGINT]
                PM2 | 2022-03-31T20:11:38: PM2 log: App [xin:0] starting in -fork mode-
                PM2 | 2022-03-31T20:11:38: PM2 log: App [xin:0] online
                PM2 | 2022-03-31T20:11:38: PM2 log: App [xin:0] exited with code [0] via signal [SIGINT]
                PM2 | 2022-03-31T20:11:38: PM2 log: App [xin:0] starting in -fork mode-
                PM2 | 2022-03-31T20:11:38: PM2 log: App [xin:0] online
                PM2 | 2022-03-31T20:11:38: PM2 log: App [xin:0] exited with code [0] via signal [SIGINT]
                PM2 | 2022-03-31T20:11:38: PM2 log: Script /home/Bo/xin.sh had too many unstable restarts (16). Stopped. “errored”

                /home/Bo/.pm2/logs/xin-out.log last 15 lines:
                /home/Bo/.pm2/logs/xin-error.log last 15 lines:
                0|xin | Invalid MIT-MAGIC-COOKIE-1 keyUnable to connect to X server
                0|xin | Invalid MIT-MAGIC-COOKIE-1 keyUnable to connect to X server
                0|xin | Invalid MIT-MAGIC-COOKIE-1 keyUnable to connect to X server
                0|xin | Invalid MIT-MAGIC-COOKIE-1 keyUnable to connect to X server
                0|xin | Invalid MIT-MAGIC-COOKIE-1 keyUnable to connect to X server
                0|xin | Invalid MIT-MAGIC-COOKIE-1 keyUnable to connect to X server
                0|xin | Unable to connect to X server
                0|xin | Invalid MIT-MAGIC-COOKIE-1 keyInvalid MIT-MAGIC-COOKIE-1 keyUnable to connect to X server
                0|xin | Invalid MIT-MAGIC-COOKIE-1 keyUnable to connect to X server
                0|xin | Unable to connect to X server
                0|xin | Invalid MIT-MAGIC-COOKIE-1 keyInvalid MIT-MAGIC-COOKIE-1 keyUnable to connect to X server
                0|xin | Invalid MIT-MAGIC-COOKIE-1 keyUnable to connect to X server
                0|xin | Unable to connect to X server
                0|xin | Invalid MIT-MAGIC-COOKIE-1 keyUnable to connect to X server
                0|xin | Invalid MIT-MAGIC-COOKIE-1 keyUnable to connect to X server

                Should I do something else with pm2 or run the xin.sh in an other way?

                It would be so nice to have i done automatically 😁

                the mm.sh file:
                cd ~/MagicMirror
                DISPLAY=:0 npm start

                Best Bo

                S B 2 Replies Last reply Reply Quote 0
                • S Do not disturb
                  sdetweil @BJK
                  last edited by

                  @BJK first

                  do
                  pm2 save

                  to sync the disk list with the memory list of things pm2 manages

                  then do

                  pm2 info 0

                  to get the startup info from the task definition

                  we’re you running as root ( or using sudo ) when u did the pm2 start xin.sh?

                  Sam

                  How to add modules

                  learning how to use browser developers window for css changes

                  1 Reply Last reply Reply Quote 0
                  • B Offline
                    BJK @BJK
                    last edited by

                    @BJK

                    Regarding: “we’re you running as root ( or using sudo ) when u did the pm2 start xin.sh?”

                    I just wrote “pm2 start xin.sh”,and then “pm2 start mm.sh” and then at last “pm2 save”

                    Should I have used “sudo pm2 start xin.sh” ?

                    S B 2 Replies Last reply Reply Quote 0
                    • S Do not disturb
                      sdetweil @BJK
                      last edited by sdetweil

                      @BJK no… NEVER use sudo for anything unless you know WHY you are doing it…

                      and you were logged on as user pi, right?

                      Sam

                      How to add modules

                      learning how to use browser developers window for css changes

                      1 Reply Last reply Reply Quote 0
                      • B Offline
                        BJK @BJK
                        last edited by

                        @BJK
                        and you were logged on as user pi, right?
                        Well, instead of user pi, I am user Bo. So my home directory is like home/Bo/MagicMirror/modules…
                        But any idea about the xin.sh error? Would it help to let pm2 just run the xin.sh once?
                        Best

                        S 1 Reply Last reply Reply Quote 0
                        • S Do not disturb
                          sdetweil @BJK
                          last edited by

                          @BJK pm2’s JOB is to start and run stuff AND KEEP it running…

                          so, if it ends. pm2 will start it back up…

                          and if it errors too many times too fast it will stop restarting…

                          Sam

                          How to add modules

                          learning how to use browser developers window for css changes

                          1 Reply Last reply Reply Quote 0
                          • SnilleS Offline
                            Snille Module Developer @BJK
                            last edited by Snille

                            @BJK I don’t start the xin.sh (with pm2). if you read in the xin.sh file you will find instructions how I did it… :) Here you can download the xin.sh.

                            The script (if you don’t want to download it):

                            #!/bin/bash
                            
                            # Before I just tested with the xinput command directly in the autostart file, but that did not work. So now instead I just created a script called xin.sh.
                            # nano ~/xin.sh
                            # Then added
                            # DISPLAY=:0.0 xinput --set-prop "Multi touch Multi touch overlay device" "Coordinate Transformation Matrix" 0 1 0 -1 0 1 0 0 1
                            # There should actually be 3 spaces between “Multi touch” and “Multi touch overlay device”. For some reason the board removes the extra spaces here.
                            #
                            # You can actually find the “name” of the device with this commandDISPLAY=:0.0 xinput list
                            # Shows something like this:
                            #
                            # Virtual core pointer id=2 [master pointer (3)]
                            #   Virtual core XTEST pointer id=4 [slave pointer (2)]
                            #   Multi touch Multi touch overlay device id=6 [slave pointer (2)]
                            # Virtual core keyboard id=3 [master keyboard (2)]
                            # Virtual core XTEST keyboard id=5 [slave keyboard (3)]
                            #
                            # Depending on what you have connected to your RPi. 🙂
                            # 
                            # So, after creating the xin.sh I added that to the autostart file for LXDE:
                            # Like this:
                            # nano ~/.config/lxsession/LXDE-pi/autostart
                            # Added at the end of the file.
                            # @/home/pi/xin.sh
                            # Restarted and it works.
                            #
                            DISPLAY=:0.0 xinput --set-prop "Multi touch   Multi touch overlay device" "Coordinate Transformation Matrix" 0 1 0 -1 0 1 0 0 1
                            

                            You have to figure out your own “matrix” of course… :) Not sure if mine is the same…

                            If you cant find it, make it and share it!
                            Modules: MMM-homeassistant-sensors, MMM-Modulebar, MMM-Profilepicture, MMM-Videoplayer

                            B 1 Reply Last reply Reply Quote 0
                            • B Offline
                              BJK @Snille
                              last edited by

                              @Snille

                              Thank you! :beaming_face_with_smiling_eyes:
                              Now, after your precise suggestions, I did read up on the autostart for Raspberry:
                              https://forums.raspberrypi.com/viewtopic.php?t=313191
                              https://forums.raspberrypi.com/viewtopic.php?f=66&t=294014

                              and using:
                              “sudo nano /etc/xdg/lxsession/LXDE-pi/autostart”

                              I pasted my line at the end of the the autostart:
                              @/home/pi/xin.sh
                              and then saved the file

                              In the xin.sh file, I have:
                              line1: #!/bin/bash
                              line 2: DISPLAY=:0.0 xinput --set-prop “Multi touch Multi touch overlay device” “Coordinate Transformation Matrix” 0 -1 1 1 0 0 0 0 1

                              So, just two lines and "line1or2: " is not part of the file :smirking_face: (and - as you said - I do have a bit different coordinate compared to you)

                              AND now it WORKS! Thank you !

                              SnilleS S 2 Replies Last reply Reply Quote 0
                              • SnilleS Offline
                                Snille Module Developer @BJK
                                last edited by

                                @BJK Great to hear!! :)

                                If you cant find it, make it and share it!
                                Modules: MMM-homeassistant-sensors, MMM-Modulebar, MMM-Profilepicture, MMM-Videoplayer

                                1 Reply Last reply Reply Quote 0
                                • S Do not disturb
                                  sdetweil @BJK
                                  last edited by

                                  @BJK LXDE/autostart is running as root I think…

                                  pm2 autostart is NOT running as root, so u have to use sudo

                                  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
                                  • 2
                                  • 1 / 2
                                  • 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