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-Webuntis

    Scheduled Pinned Locked Moved Education
    30 Posts 6 Posters 4.9k Views 6 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 Offline
      schmucke @HeikoGr
      last edited by

      @HeikoGr no Problem.

      Of cource, they have a login - but they dont know they passwords… i just try to get the Information from the teachers. Thank you!

      1 Reply Last reply Reply Quote 0
      • E Offline
        Eli @Eli
        last edited by

        It works on my mirror now. But I can only see the info page telling that all is according to plan. Unfortunately, the school is only striking the lessons in the schedule without any comment. But I can’t manage to display the students schedule. I log in with password, not qr. Maybe I miss a simple option?

        Maybe as a small improvement you might want to update your example config and add a few options+screenshots? Might help some of us…

        But great work! Thumbs up!

        H 1 Reply Last reply Reply Quote 0
        • H Offline
          HeikoGr
          last edited by

          The default is to show only changes in the schedule.
          But you are right: a few more examples and screenshots are on my todo list!

          You can try this (look for showRegularLessons).

                  {
                      disabled: false,
                      module: "MMM-Webuntis",
                      header: "schedule for next 3 days",
                      position: "top_right",
                      config: {
                          students: [
                              {
                                  title: "children",
                                  qrcode: "untis://s[...]",
                              },
                          ],
                          days: 3,
                          showRegularLessons: true
                      }
                  },
          
          E 1 Reply Last reply Reply Quote 0
          • E Offline
            Eli @HeikoGr
            last edited by Eli

            @HeikoGr Thanks for coming back on this, appreciate!

            Unfortunately I have no luck with this either.
            I added the days option, also the examsDays.
            I still get only “Unterricht nach Plan - no changes, all according to plan” (and now also “no exams planned” - of course).

            I also added useClassTimeTable and showRegularLessons and showSubject - no change.

            It seems the school is hiding all info :)

            On the web interface I can see the schedule and the changes are visible in that schedule/table by stroke thru boxes for the specific lessons only, no comments in addition.

            But it would already help if I could see the table in my mirror.

            I tried without any options - I guess this is what brings up your screenshot - but same result.

            I assume the QR option should be no difference compared to user/password, right?

            I checked startup log and I see an error for this module now - no clue how to fix though…
            using latest version

            [2025-01-21 17:40:37.807] [ERROR] ERROR! Could not find main module js file for untis
            [2025-01-21 17:40:37.961] [ERROR] GitError: Error: spawn git ENOENT
            at ChildProcess._handle.onexit (node:internal/child_process:284:19)
            at onErrorNT (node:internal/child_process:477:16)
            at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
            at Object.action (C:\MagicMirror\modules\MMM-Remote-Control\node_modules\simple-git\dist\cjs\index.js:1445:25)
            at PluginStore.exec (C:\MagicMirror\modules\MMM-Remote-Control\node_modules\simple-git\dist\cjs\index.js:1494:29)
            at C:\MagicMirror\modules\MMM-Remote-Control\node_modules\simple-git\dist\cjs\index.js:1921:43
            at new Promise ()
            at GitExecutorChain.handleTaskData (C:\MagicMirror\modules\MMM-Remote-Control\node_modules\simple-git\dist\cjs\index.js:1919:16)
            at GitExecutorChain. (C:\MagicMirror\modules\MMM-Remote-Control\node_modules\simple-git\dist\cjs\index.js:1903:44)
            at Generator.next ()
            at fulfilled (C:\MagicMirror\modules\MMM-Remote-Control\node_modules\simple-git\dist\cjs\index.js:52:24) {
            task: {
            commands: [ ‘remote’, ‘-v’ ],
            format: ‘utf-8’,
            parser: [Function: parseGetRemotesVerbose]
            }
            }

            If I use the debug option, I don’t get the above error, but I see:
            [2025-01-21 17:49:39.758] [LOG] Connecting socket for: MMM-Webuntis
            [2025-01-21 17:49:39.879] [INFO] [MMM-Webuntis] Node helper started
            [2025-01-21 17:49:39.984] [LOG] Sockets connected & modules started …
            [2025-01-21 17:49:40.077] [INFO]

            Ready to go! Please point your browser to: blabla
            [2025-01-21 17:49:47.299] [LOG] Create new calendarfetcher for url: https://calendar.googlblabla
            [2025-01-21 17:49:47.643] [INFO] [MMM-Webuntis] Successfully fetched data
            [2025-01-21 17:49:47.648] [INFO] updatenotification: Updater Class Loaded!
            [2025-01-21 17:49:47.652] [INFO] updatenotification: Checking PM2 using…
            [2025-01-21 17:49:47.659] [INFO] Checking git for module: MMM-Webuntis
            [2025-01-21 17:49:47.746] [INFO] updatenotification: [PM2] You are not using pm2
            [2025-01-21 17:49:47.759] [INFO] Checking git for module: MMM-Videoplayer
            [2025-01-21 17:49:47.836] [INFO] Checking git for module: MagicMirror
            [2025-01-21 17:49:48.305] [LOG] [MMM-Webuntis] ERROR for student: TypeError: Cannot read properties of undefined (reading ‘0’)

            H 1 Reply Last reply Reply Quote 0
            • H Offline
              HeikoGr @Eli
              last edited by

              @Eli looks interesting

              • Why are the references to c:\ do you run magicmirror on windows?
              • what’s your way to install a new module? Do you use an module for this?
              E 1 Reply Last reply Reply Quote 0
              • H Offline
                HeikoGr @Eli
                last edited by HeikoGr

                @Eli the module surely isn‘t running properly.

                I think the module MMM-Remote-Control tries to run git to get the npm module untis (which is required by my module) and has no success.

                But this is only a guess… could be totally wrong

                1 Reply Last reply Reply Quote 0
                • O Offline
                  OliWer
                  last edited by OliWer

                  Hey,

                  first let me say thanks for this module and your work!
                  I have a similar issue as Eli:
                  I only get info “all according to plan”. Even if I use “showRegularLessons”: true, I’m not getting anything else.
                  in the startuplog I get this error for MMM-Webuntis:
                  1|MagicMirror | [2025-01-22 09:02:11.901] [LOG] [MMM-Webuntis] ERROR for : TypeError: Cannot read properties of undefined (reading ‘0’)

                  My config is as follow (removed real data from URL:

                  
                  {
                                          module:"MMM-Webuntis",
                                          position:"bottom_left",
                                          header:"Emma Schule",
                                          config: {
                                                  students: [
                                                                  {
                                                                  title:"",
                                                                  qrcode:"untis://setschool?url=ikarus.webuntis.com&school=12345&user=MyChild&key=Realkey&schoolNumber=123456789",
                                                                  days:"10",
                                                                  },
                                                            ],
                                                  showRegularLessons: true
                                                  }
                                  },
                  

                  Any help is much appreciated, cause I find the idea really good!

                  H 1 Reply Last reply Reply Quote 0
                  • H Offline
                    HeikoGr
                    last edited by

                    Note to myself: enhance error handling

                    I did a clean reinstall on my machine and it worked with your config (and our qr code).

                    Maybe the school doesn’t publish personal timetables?

                    Can you try to set useClassTimetable: true,

                    O 1 Reply Last reply Reply Quote 0
                    • O Offline
                      OliWer @HeikoGr
                      last edited by

                      @HeikoGr
                      added that to my config, but nothing changed.
                      When I login to WebUntis via Browser, I can see a “My Timetable” (Mein Stundenplan). Not sure if there is a language difference or something.
                      When I change the login information, I get error messages in the log, so the login itself seems to work and it gets data, even if it is just “all according to plan”. But not the data.

                      What I also noticed is that there are two “My Timetable” in the web overview - one marked with beta.
                      URL for non-beta: https://ikarus.webuntis.com/timetable-students-my/
                      URL for beta: https://ikarus.webuntis.com/timetable-new/my-student

                      URL for class: https://ikarus.webuntis.com/timetable-classes/

                      So I think the school allowed the timetables you are asking for.

                      Thanks for taking your time! Let me know if I can provide further information.

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

                        Hello,
                        I am experiencing an issue with your MMM-WebUntis module. Despite following the setup instructions and providing the correct credentials, I am unable to log in. After testing, I believe the issue may be related to the presence of an umlaut (e.g., ö) and/or a whitespace in the school name.

                        My Setup:
                        MagicMirror Version: v2.29.0
                        MMM-WebUntis Module Version: Latest from repository
                        School Name: Contains an umlaut (ö) and a space
                        Login Method: My school uses iserv (iserv.de) for authentication. I do not have direct login credentials for the WebUntis portal but instead rely on the QR code provided by the school, which works in the official WebUntis app.

                        Configuration:

                        Here is an example of my configuration (with pseudodata replacing sensitive values):

                        {
                          module: "MMM-Webuntis",
                          position: "top_right",
                          header: "WebUntis Schedule",
                          config: {
                            students: [
                              {
                                title: "Student1",
                                qrcode: "untis://setschool?url=kadmos.webuntis.com&school=schulname with ö and space&user=username&key=ABC12345&schoolNumber=1234567",
                                useClassTimetable: true
                              }
                            ],
                            days: 10,
                            mode: "verbose"
                          }
                        }
                        

                        Error Messages:

                        Here are the errors I encountered:

                        When using the QR code:

                        [LOG]   ERROR for Student1: Error: Request failed with status code 400
                        

                        Debugging with the check.js script

                        Error: getaddrinfo ENOTFOUND undefined
                        

                        When manually entering the school name, username, and password instead of using qrcode:

                        Error: Failed to login. {"jsonrpc":"2.0","id":"Awesome","error":{"message":"bad credentials","code":-8504}}
                        

                        Observations:

                        The QR code provided by webuntis contains the following (copied directly from the QR code content):
                        You see, the miscoding of the ö.

                        untis://setschool?url=example.webuntis.com&school=school name with � and space&user=username&key=ABC12345&schoolNumber=1234567
                        

                        Notably:
                        The umlaut (ö) in the school name seems to cause issues.
                        There is also a whitespace in the school name.

                        Even when encoding the URL (e.g., using %C3%B6 for ö and %20 for the whitespace), I still encounter errors. I tried various configurations, including:

                        "school%20name%20with%20%C3%B6%20and%20space"
                        "schoolname with ö and space"
                        "schoolname+with+oe+and+space"
                         ...
                        

                        The QR code works perfectly in the WebUntis app, so I believe the credentials and format are correct. But my school uses iserv for authentication, meaning I do not have a standard WebUntis username and password.

                        H 1 Reply Last reply Reply Quote 0
                        • 1
                        • 2
                        • 3
                        • 2 / 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