This is the forum archive of Homey. For more information about Homey, visit the Official Homey website.

The Homey Community has been moved to https://community.athom.com.

This forum is now read-only for archive purposes.

[NEW UPDATE] Magister for Homey (v2.0.7)

gruijter_devgruijter_dev Member
edited October 2017 in Apps

Magister

Homey app to interface with the Magister school information system.

After adding a student in the settings page, the following functionality is available:

Flow:

  • Trigger : New incoming grade
  • Trigger : Change in day-roster today or tomorrow
  • Condition : A lesson was scrapped today or tomorrow
  • Condition : A test is planned today or tomorrow
  • Action : Let Homey say all new grades for the last 24hrs or 7 days
  • Action : Let Homey say the day-roster of today or tomorrow
  • Action : Let Homey say the homework of today or tomorrow
  • Action : Let Homey say the tests of today or tomorrow

Trigger Flow tokens:

  • Incoming grade: grade, weight, class, description, studentname
  • Roster change : scrapped hour, 1st hour, last hour, begin time, end time, studentname

Insights:

  • Log new incoming grades for all classes

Known limitations:

Using parent credentials is not fully functional (no student picture, and only one student per school). Using student credentials is preferred.

Migrating from Version 1 app:

Students and flows must be re-added when migrating from V1 to V2. The V1 student device should be deleted manually.

Donate:

If you like the app you can show your appreciation by posting it in the forum. If you really like the app you can buy me a beer.

Paypal donate

btc: 14VR1QCpqWUWiSLa1sn3Dpzq3Wrp83zFfC

eth: 0xEcF4747203Eba214c071fDAa4825cD867B410d70

ltc: LfGJu1AdnPFMoBXwHvf2qG9sCV1onyXDvd

===============================================================================

Version changelog

v2.0.7	2017.10.01 Minor bugfixes
v2.0.6	2017.08.05 Condition cards bugfix. Removed driver
v2.0.5	2017.08.05 Complete rewrite from device to app settings. Extra flowcards. Parent login partially implemented. Student login is preferred
«134

Comments

  • Sweet !

  • Thanks! I hope it is useful. Do you have a magister account to test with?
  • Yes, I have a Magister account. 
  • When will this be available in the Appstore? It is just a short time to test, because the school year is almost over.
    My children have the last test this week, so it won't be long until the last grades will be available in Magister.
    Otherwise it will be September/October for testing, when the first grades will be available:).
  • gruijter_devgruijter_dev Member
    edited July 2016
    Hello @Esmiranda . It is pending approval from Athom. I have asked @Emile to speed this up, but I guess they have to find time to do the approval. It would be very cool if you could already test before summervacation !

    If you know how to test from GitHub, you could already start now. But you have to be somewhat tech-savvy to do that:
    https://github.com/gruijter/com.gruijter.magister

  • @gruijter_dev. I am trying with my son to figure out how to do this from github. So if we succeed we can test sooner. Otherwise we will have to wait untill Athom approves the app.
  • Yes. We succeeded to install it from GitHub :).
  • gruijter_devgruijter_dev Member
    edited July 2016
    You can start by following the steps mentioned here: https://developers.athom.com/library/getting-started/

    (you only need steps 2, 3 and 5).
    To execute step 5 you have to first download my app from GitHub. Then you can do step 5 with the following command:
    athom project --run com.gruijter.magister-master
  • * We succeed to fill in the login information at devices. Then we saw my daughters name as device. So it looked like it worked. But then we tried to make a flow and couldn't find it anymore. We went back to devices and it was gone.
    And when we look at the apps page, it had an orange triangle with ! saying " Deze app is gecrashed."
    * So we tried to disable and  enable it again. Then it worked again. Good thing is the flow didn't lose the 'device'. 
    We tried some things. He told there were no lessons today and tomorrow, but there was an description (and he told what description). But then .... again the app crashed :(.
    * So again we disabled and enabled it. And we turned off the checkmarks at options (say new grades, say roster changes).
    * roster today, roster tomorrow, homework today, homework tomorrow looks like they work correctly.
    * the description from earlier doesn't work anymore. Homey output says: "er is wel een omschrijving: undefined undefined.
    * new grades today and new grades last 7 days say there are none. But that is not correct.
    * When I give the command through my mobile, it answers through the homey.
    * And then ... the app crashed again :(.

    Stack trace:

    TypeError: Cannot read property '0' of null
    at /drivers/student/driver.js:572:19
    at /node_modules/magister.js/lib/node/magister-node.js:2449:20
    at Request._callback (/node_modules/magister.js/lib/node/magister-node.js:5379:16)
    at Request.self.callback (/node_modules/magister.js/node_modules/request/request.js:198:22)
    at emitTwo (events.js:87:13)
    at Request.emit (events.js:172:7)
    at Request.<anonymous> (/node_modules/magister.js/node_modules/request/request.js:1073:14)
    at emitOne (events.js:82:20)
    at Request.emit (events.js:169:7)
    at IncomingMessage.<anonymous> (/node_modules/magister.js/node_modules/request/request.js:1019:12)
  • @esmiranda: Maybe a bit to ask, but if I could use your daughters login I could find out where the problem lies. Maybe you could give me a temporary password? But I fully understand if you don't want to give me the login details (but if you do, send me a PM)
  •  
     
    Also I can't find where this list can be seen.

    I tried 'new grade' and 'changed roster' in a flow with push notifications and these work, except there are no new grades/changed roster for now.
  • The insights are only created when new grades are entered in Magister by the teachers. So after first install you have to wait for a grade to arrive
  • Okay, at the Insights. Now I understand.

    But waiting for a grade to arrive wont work, because the app keeps crashing.  When I disable and enable it, it will work for a little bit. But then it crashes again.
  • The stack trace you posted shows that Magister is providing a different datastructure for your daughter then what I get from my son's school. If I find some time tonight I will try to write some code to prevent the app from crashing when it receives unknown data, or when it is not receiving certain data at all. But without being able to look at the exact data response from Magister it is a bit like working in the dark.

    I will let you know if/when I posted a trial version on GitHub.

    BTW, I really appreciate your effort to help me test and bugfix the app! 
  • Okay. Thanks for your effort also. I was really surprised by this app :smile: to work with Homey.

    When later on it might work for multiple students I can test this also, because my son and daughter have both an account (same school).
  • @Esmiranda: I sent you a PM
  • @gruijter_dev ;: App doesn't crash anymore. I sent you a PM.
  • gruijter_devgruijter_dev Member
    edited July 2016
    The App is released in the app store. This is the version that crashes for @Esmiranda (but works perfect for my own kids :smiley:  ). An update for the appstore is on its way...

    Experimental users can already try v0.0.7 from GitHub.
  • Superfast approval by @Emile (Thx!). V0.0.7 is now available from the appstore.
  • Tested the new version and looks fine. It doesn't crash anymore.

    For my daughter the school blocked the grades this week (testweek until tomorrow), so I have to wait until the grades are available again. For my son it works fine. For him (also testweek until tomorrow) I also have to wait until the teachers have the latest grades put in Magister. So maybe more test results this and next week.
    Otherwise it will be next school year (September).

    Thanks @grutijter_dev ;for this (s)c(h)ool App. 
  • gruijter_devgruijter_dev Member
    edited August 2016
    Version 0.0.9 of the app has just been released in the app store.

    - support for Homey Firmware 0.9.x
    - suppress  roster change event at midnight
    - Improved grade change logging
    - Improved handling of deleted student

  • I have a problem adding a second child. The first one goes ok, but when adding the second child nothing happens after clicking on the Connect button. I get a green check mark, but that is it..
  • Hi @Alexander,

    Is the app still running, or did it crash when trying to add the second child? If it crashed, what error do you get when clicking on the red triangle in settings-apps?
  • I think the app is still running. See screenshot for where it is waiting for something.
    If I go to settings there is no red triangle.

  • If you switch around the order in which you add the two studenst, does the problem stay with the same student, or is it always the second one that is not showing up?
  • AlexanderAlexander Member
    edited August 2016
    The problem is with the student. Adding this student as the first one did also not work.
    But it is a normal Magister account. It works ok with the ios/android apps.
  • With a lot of help from gruijter_dev the problem is solved.  Thanks!

    Until the new version is published in the appstore you can download it from Github and install it by hand..
  • When we use the app, Homey tells us 4 or 5 times per hour (24h/day) the roster of today and tomorrow. How to stop this?
  • gruijter_devgruijter_dev Member
    edited August 2016
    In the settings of the student make sure that the 'say roster change' is disabled. If you install the latest version I posted on GitHub this problem should be solved by the way
Sign In or Register to comment.