MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    1. Home
    2. AlexLin
    3. Posts
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.
    A
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 0
    • Posts 1
    • Groups 0

    Posts

    Recent Best Controversial
    • RE: MMM-Webuntis

      @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.

      posted in Education
      A
      AlexLin
    • 1 / 1