JonasJoKuJonas / homeassistant-WebUntis

Custom component to access data from Web Untis in Home Assistant
https://community.home-assistant.io/t/webuntis-timetable-in-ha/568273
MIT License
46 stars 11 forks source link

"no right for timetable" error message #92

Closed derandiunddasbo closed 10 months ago

derandiunddasbo commented 11 months ago

When trying to configure the WebUntis integration, I'm getting this error message:

image
[...]
2023-10-12 16:06:29.705 ERROR (SyncWorker_4) [webuntis] {'jsonrpc': '2.0', 'id': '2023-10-12 16:06:29.665531', 'error': {'message': 'no right for timetable', 'code': -8509}}
[...]

That's probably because of our school (mis-)using one WebUntis student account for the whole class and the account has no personal timetable per se. Is there anything I can do about this without trying to convince some school "admin" to change permissions for the API? (*)

Regarding the "Max, Mustermann" in the first screenshot: I'm not sure, if the correct name is mandatory for the integration to work properly. In the account's profile, the name is only declared as "Mustermann" (no first or middle name), but the integration doesn't accept only one word for the last option. Thus, I had to add something.

image

(*) The author of the python-webuntis package states, that "...If you get no right for … you will have to ask your admin.". While I don't expect much from trying to explain some "admin" at our school, why I would need additional permissions for WebUntis, at least I'd like to know, what this means?

Is a school admin able to configure the behaviour of the WebUntis API for this school in some Untis admin web UI? If so, is this documented somewhere, how he could do this?

JonasJoKuJonas commented 10 months ago

Try requesting you class timetable. Set the timetable_source to klasse and enter the name of you class. (the name should be displayed in your untis mobile app at the top of your timetable) in my example 12TGI

image

let me know if it works ;)

derandiunddasbo commented 10 months ago

Thank you! Using the name visible in the Untis Mobile app works indeed. For me, the installation manual was a bit unclear regarding the full "name/class/..." value. Maybe you should mention in the readme that the correct value can be retrieved from the Untis Mobile app.