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
    75 Posts 12 Posters 11.1k Views 12 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.
    • 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
        • H Offline
          HeikoGr @kurkarte
          last edited by

          @kurkarte you can try to search your school at https://webuntis.com/ . On the next site the school name in the URL could work if you replace empty spa es with „+“ signs.

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

            @OliWer i pushed a fix to github.

            I was able to reproduce your error.
            it should work now.

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

              Data is getting displayed now, will play around with it more later. Thank you very much!

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

                @HeikoGr
                Hi, I am running on an RPI normally. The test system is running on Windows, yes. But both show the same issue.
                I install modules the standard way, fro a git console by pulling and npm install.

                I also tried without remote control module - same issue.

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

                  @HeikoGr Smashing, Heiko! Works perfect now! Many thanks!

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

                    @Eli said in MMM-Webuntis:

                    @HeikoGr Smashing, Heiko! Works perfect now! Many thanks!

                    Small update: Seems to work only when debug mode is true…

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

                      @Eli maybe your school doesn‘t show more than 2 days to the future (like our school).

                      Because the only differences in the debug mode are more log output and not filtering past lessons (there is also an undocumented option „debugLastDays“ - so i was able to develop during the holidays…). How many future days do you see in the untis app or on webuntis.com?

                      H E 2 Replies Last reply Reply Quote 0
                      • H Offline
                        HeikoGr @HeikoGr
                        last edited by

                        @HeikoGr a new commit is on github with a fix in the handling of “days” - maybe this fixes your problem.

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

                          Fix works for me, thanks for your work!

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

                            @HeikoGr Sorry, for the delayed reply. You are acorrect, also works without debug mode. Seems there was some other hickup with the server and just next time I enabled debug again is was working again. So all fine.

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

                              Achtung, ich habe eine neue Version veröffentlicht und dabei die Konfigurations Variablen umbenannt - es muss die config.js angepasst werden.

                              Dafür habe ich jetzt aber auch eine Tabellenansicht implementiert:
                              f12ereEHEk.png

                              T 1 Reply Last reply Reply Quote 1
                              • T Offline
                                thk @HeikoGr
                                last edited by

                                @HeikoGr
                                Hallo & Vielen Dank für dieses tolle Modul!
                                I do love the module and especially the grid-view.

                                Is there a way to limit the number of hours displayed?
                                By that the vertical height of the grid-view could be reduced, I suppose.

                                I am asking because the generated table is exceeding the needed length to display the last hours of actual school, especially when there are weekdays in the grid which span across the whole day, like “kein Unterricht”.

                                I see there is a grid-comlumn-end, but I struggle to use it properly.
                                Thanks a lot in advance for any hint :-)

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

                                  @thk thank you for you kind word. I was able to implement a new config option “maxGridLessons” which will cut-off everything below the configured lesson. A “… more” badge is placed if an actual lesson is hidden because of this cutoff.

                                  T 1 Reply Last reply Reply Quote 0
                                  • T Offline
                                    thk @HeikoGr
                                    last edited by

                                    @HeikoGr
                                    Perfect!
                                    Thank you so much for this fast feature implementation, exactly what I was looking for.

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

                                      Attention / Important

                                      (for our school) Untis GmbH changed url and schoolname.
                                      You may need to log in your (childrens) account(s) an edit the config.js according to the new values.

                                      At least they didn’t switch off te old json-rpc api MMM-Webuntis is using

                                      1 Reply Last reply Reply Quote 1
                                      • A Offline
                                        AlexLin @schmucke
                                        last edited by

                                        @schmucke, @HeikoGr
                                        I have the same situation and i finally managed to receive the timetable for my daughter by using parents account. She did not register herself for Webuntis so no chance. I made a research on the module and the webuntis API.

                                        By concept the function

                                        getOwnClassTimetableForRange(rangeStart, rangeEnd);
                                        

                                        must fail, because the parents account does not have an own timetable. So I used the function

                                        getTimetableForRange(rangeStart, rangeEnd, id, WebUntisElementType.STUDENT);
                                        

                                        The trick was to determine which “id” is to use. The id is meant as student’s id, in my case of my daughter. So I had to make a detour via

                                        const studentList = await untis.getStudents();
                                        

                                        I made a debug output of studentList to console and searched for the name of my daughter and found the id I needed for the function above. This list is very long because it showed all students of school (more than one thousand).
                                        Afterwards I could use the function and received her timetable successfully.
                                        It only worked by login with username & pass not by qrcode and only by hardcoded id because I did not find a filter method for the studentList, e.g. by name, etc. If available it should be possible not hardcoded but by config - Param.

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

                                          that’s great - i will look how i may use this in my module.
                                          Thank you

                                          1 Reply Last reply Reply Quote 0
                                          • R Offline
                                            Rondejavu
                                            last edited by

                                            Ein guten Morgen,

                                            ich benutze Ihr WebUntis nun schon seid geraumer Zeit.

                                            Leider musste ich feststellen das seid ca. 2Wochen keine Verbindung mehr zu WebUntis stattfindet.
                                            mir wird jedes mal Error code 404 angezeigt.
                                            Was ich mir leider nicht vorstellen kann, da ich es auch über Handy nutze und dort alle Termine sowie den Stundenplan einsehen kann.

                                            Es wäre nett wenn ich dafür etwas Hilfe bekommen könnte damit dies wieder angezeigt wird.

                                            MfG
                                            Krause

                                            H 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
                                            • 3
                                            • 4
                                            • 2 / 4
                                            • 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