scaarup / aula

Fetches information from Aula about your children
GNU General Public License v3.0
54 stars 14 forks source link

Ugeplaner fra Meebook #17

Closed thomaspalmdk closed 1 year ago

thomaspalmdk commented 1 year ago

Med høje forventninger installerede jeg denne integration :-) Har genstartet HA et par gange, men i min log har jeg et par fejl - måske er de uden betydning? Anyways; jeg laver lige et issue på hver af fejlene.

Snip direkte fra HA-loggen:

Denne fejl stammer fra en brugerdefineret integration.

Logger: custom_components.aula.sensor
Source: custom_components/aula/client.py:113
Integration: Aula (documentation, issues)
First occurred: 20.02.12 (1 occurrences)
Last logged: 20.02.12

Unexpected error fetching sensor data: 'personer'
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 205, in _async_refresh
    self.data = await self._async_update_data()
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 164, in _async_update_data
    return await self.update_method()
  File "/config/custom_components/aula/sensor.py", line 40, in async_update_data
    await hass.async_add_executor_job(client.update_data)
  File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/aula/client.py", line 122, in update_data
    ugeplan(thisweek,"this")
  File "/config/custom_components/aula/client.py", line 113, in ugeplan
    for person in ugeplaner.json()["personer"]:
KeyError: 'personer'
scaarup commented 1 year ago

Hey. Det er fedt du gider rapportere det her. Integrationen er sprit ny og endnu ikke i HACS - den er kun testet af mig.

Skal lige høre:

Har du sat flueben i "ugeplaner", da du installerede integrationen? Går dine børn/barn i folkeskole eller institution? Er der ugeplaner/ugenoter for dem i Aula?

thomaspalmdk commented 1 year ago

Så et opslag på facebook om din integration, så det varede ikke mange sekunder før jeg fik installeret :-) Jeg satte flueben i det hele. Min knægt går i folkeskole. Klassetimerne kommer fint ind i kalenderen. (Er det ugeplaner?) Lærerne skriver også "ugeplan" (det hedder det i Aula-app'en) med fritekst. Disse kan jeg ikke finde i HA.

scaarup commented 1 year ago

Okay fedt, så er der da noget, der virker ;) Klassetimerne - er det jeg kalder for skoleskema/schoolschedule. Ugeplaner er det du nævner som noget fritekst.

Nå men jeg har lige udgivet en ny version hvor vi debug logger ift. dit issue. Vil du være venlig, at upgrade til den, enable debug logging og paste din log her?

logger:
  default: info
  logs:
    custom_components.aula: debug
thomaspalmdk commented 1 year ago

Her er hvad jeg fik ud af den manøvre; jeg synes ikke fejlen giver mening :-/ (Jeg har sløret mit unilogin, jeg ved ikke hvor hemmeligt det er. Det er erstattet med thom????)

2022-11-11 21:09:14.672 DEBUG (SyncWorker_3) [custom_components.aula.client] self._schoolschedule True
2022-11-11 21:09:14.672 DEBUG (SyncWorker_3) [custom_components.aula.client] self._ugeplan True
2022-11-11 21:09:14.672 DEBUG (SyncWorker_3) [custom_components.aula.client] is_logged_in? False
2022-11-11 21:09:14.672 DEBUG (SyncWorker_3) [custom_components.aula.client] Logging in
2022-11-11 21:09:16.926 DEBUG (MainThread) [custom_components.aula.calendar] 0 no client._children ... yet
2022-11-11 21:09:17.330 DEBUG (MainThread) [custom_components.aula.calendar] 1 no client._children ... yet
2022-11-11 21:09:17.733 DEBUG (MainThread) [custom_components.aula.calendar] 2 no client._children ... yet
2022-11-11 21:09:18.136 DEBUG (MainThread) [custom_components.aula.calendar] 3 no client._children ... yet
2022-11-11 21:09:18.431 DEBUG (SyncWorker_3) [custom_components.aula.client] LOGIN: True
2022-11-11 21:09:18.523 DEBUG (SyncWorker_3) [custom_components.aula.client] Fetching calendars...
2022-11-11 21:09:18.523 DEBUG (SyncWorker_3) [custom_components.aula.client] Calendar post-data: {"instProfileIds":[427266],"resourceIds":[],"start":"2022-11-11 00:00:00.0000+0000","end":"2022-11-25 00:00:00.0000+0000"}
2022-11-11 21:09:18.540 DEBUG (MainThread) [custom_components.aula.calendar] Got client._children, breaking
2022-11-11 21:09:18.930 DEBUG (SyncWorker_3) [custom_components.aula.client] guardian :thom????
2022-11-11 21:09:19.171 DEBUG (SyncWorker_3) [custom_components.aula.client] ugeplaner status_code 403
2022-11-11 21:09:19.171 DEBUG (SyncWorker_3) [custom_components.aula.client] ugeplaner response {"responseStatus":{"errorCode":"Forbidden","message":"Token is invalid (Person not found: 'thom????')"}}
2022-11-11 21:09:19.229 DEBUG (MainThread) [custom_components.aula.sensor] Finished fetching sensor data in 4.561 seconds (success: False)
2022-11-11 21:09:19.250 DEBUG (SyncWorker_6) [custom_components.aula.client] self._schoolschedule True
2022-11-11 21:09:19.251 DEBUG (SyncWorker_6) [custom_components.aula.client] self._ugeplan True
2022-11-11 21:09:19.374 DEBUG (SyncWorker_6) [custom_components.aula.client] is_logged_in? True
2022-11-11 21:09:19.455 DEBUG (SyncWorker_6) [custom_components.aula.client] Fetching calendars...
2022-11-11 21:09:19.455 DEBUG (SyncWorker_6) [custom_components.aula.client] Calendar post-data: {"instProfileIds":[427266],"resourceIds":[],"start":"2022-11-11 00:00:00.0000+0000","end":"2022-11-25 00:00:00.0000+0000"}
2022-11-11 21:09:19.818 DEBUG (SyncWorker_6) [custom_components.aula.client] guardian :thom????
2022-11-11 21:09:19.935 DEBUG (SyncWorker_6) [custom_components.aula.client] ugeplaner status_code 403
2022-11-11 21:09:19.935 DEBUG (SyncWorker_6) [custom_components.aula.client] ugeplaner response {"responseStatus":{"errorCode":"Forbidden","message":"Token is invalid (Person not found: 'thom????')"}}
2022-11-11 21:10:18.859 DEBUG (SyncWorker_0) [custom_components.aula.calendar] Updating calendars...
2022-11-11 21:10:18.870 DEBUG (SyncWorker_0) [custom_components.aula.calendar] Parsing skoleskema.json...
thomaspalmdk commented 1 year ago

Når jeg kikker på Aula-app'en, iphone, så hedder menupunktet til ugeplanerne "ugeplan - meebook forældre". Når jeg kikker på aula.dk, så er der ingen menu-punkter der leder til noget i den retning. Måske jeg mangler et eller andet?

thomaspalmdk commented 1 year ago

Mere debugging: Jeg kan se mit unilogin registreret på min meebook-profil.

scaarup commented 1 year ago

Ah meebook, det siger mig ikke noget. Men det kan jo egentlig være, at det ikke er alle skoler, det har ugeplaner via minuddannelse.net, som jeg egentlig antog…

thomaspalmdk commented 1 year ago

Det lyder plausibelt. Dog skulle man vel antage at Aula-API'et returnerede ugeplanerne uanset hvor de kom fra. Men så smart er det jo tydeligvis ikke lavet. Hvis jeg kan få det til at virke og hvis det har interesse, så kan jeg godt prøve at køre Aula-app'en igennem en proxy og se hvilke API'er den kalder og om den ledes til meebook og trækker information derfra? Det kan også være meget at gøre ud af det, måske du i stedet skulle være opmærksom på, at der kan være ugeplaner placeret på andre systemer end "minuddannelse" og så håndtere det i programmet.

scaarup commented 1 year ago

Du behøver ikke køre den igennem en proxy, du kan bare poppe dev tools i din browser og se hvilke kald, der laves under network tab’en. Så kan vi da lige se om det er noget vi kan bruge 🙂

thomaspalmdk commented 1 year ago

Jeg kan ikke komme fra Aula i min browser til meebook - det er kun i Aula-app'en at jeg kan se dén sammenhæng. Ligeledes er der i Aula i browser ingen informationer trukket ind fra meebook. Det var derfor jeg ville gøre et forsøg på at debugge app'en. Jeg kan give det et forsøg i morgen..

scaarup commented 1 year ago

Ah på den måde.

JanHG commented 1 year ago

Jeg har samme problem som Thomas. Hos os bruges der også Meebook. I Aula Android app'en ligger der et punkt efter 'Overblik' der hedder 'Ugens forløb - Meebook forældre', her får man et kort overblik, men man skal reelt klikke videre til Meebok for at kunne bruge det til noget. Det er røvirriterende! :-) Der er også 'Elevplaner med nyt - Meebook forældre', men det bruges ikke hos os.

Jeg afventer Thomas' debugging, men sig til hvis jeg kan hjælpe med noget.

philipheyde commented 1 year ago

Hejsa. Tak for et fedt initiativ! Skema/kalender virker rigtig godt for mig allerede, men som der beskrives ovenfor, er der problemer med ugeplanen. Et hurtigt kig i dev-tools i webversionen viser, at der rigtigt nok hentes data til ugeplanen fra meebook's domæne, når denne skal vises på Aula: https://app.meebook.com/aulaapi/relatedweekplan/all?currentWeekNumber=2022-W45&userProfile=guardian&childFilter[]={child1Id}&childFilter[]={child1ID}&institutionFilter[]={institutionID}&institutionFilter[]={institutionFilterID}

(jeg har erstattet et par af værdierne i kaldet med child1Id, child1Id, institutionID, institutionFilterID, så der ikke går GDPR i den ;) )

thomaspalmdk commented 1 year ago

Jeg har lavet en hurtig debug-session. Min fremgang var følgende:

  1. Log ind
  2. Tryk hen på "Ugeplaner - meebook forældre"

Jeg gjorde det mere end en gang, og jeg kan se, at vejen igennem ikke er ens hver gang. Jeg tror måske app'en cache'r noget af det, så den ikke skal hente friske data hver gang den starter. Dog er der stadig et tydeligt resultat - det er måske noget vi kan bruge til noget.

Anyways; det er ikke alle kald jeg kopieret ind, jeg vil tro nogle af dem er i brug allerede i integrationen.

(Nogle af de returnerede informationer har jeg sløret)

GET https://www.aula.dk/portal/

Resultatet er en masse HTML og nogle cookies der sættes.
HTML'en gengiver jeg ikke.
Der sættes disse 2 cookies:
PHPSESSID | 653s.....fhuj
Csrfp-Token | 18de.....db57

GET https://www.aula.dk/api/v14/?method=profiles.getProfilesByLogin

Resultatet er dette JSON.
Jeg har skåret det meget ned, da jeg tænker det allerede er i brug.
{
    "status": {
        "code": 0,
        "message": "OK"
    },
    "data": {
        "profiles": [{
            "institutionProfiles": [{
                "id": 420000,
                "profileId": 410000,
                "institutionCode": "280000",
                "institutionName": "KXXXXXXXskolen",
                "municipalityCode": "219",
                "municipalityName": "Hiller\u00f8d",
                "firstName": "Thomas XXXXXXXXXXX",
                },
                "email": "aula@pXXXXXXXXXX.dk",
            }],
            "children": [{
                "institutionProfile": {
                    "id": 420000,
                    "profileId": 410000,
                    "institutionCode": "280000",
                    "institutionName": "KXXXXXXXskolen",
                    "municipalityCode": "219",
                    "municipalityName": "Hiller\u00f8d",
                    "firstName": "Lucas XX XX",
                    },
                    "metadata": "5L"
                },
                "id": 420000,
                "profileId": 41000,
                "userId": "luca????",
                "name": "Lucas XX XX XX",
                "profilePicture": null,
                "shortName": "LMAP",
                "institutionCode": "280000",
                "hasCustodyOrExtendedAccess": false
            }],
            "profileId": 410000,
            "displayName": "Thomas XX XX XX"
        }]
    },
    "version": 14,
    "module": "profiles",
    "method": "getProfilesByLogin"
}

Her et et spændende kald: GET https://www.aula.dk/api/v14/?method=profiles.getProfileContext

Resultatet er dette JSON.
Jeg har skåret det MEGET ned, det er tilsyneladende en masse ligegyldigt LOREM IPSUM and what-not, men.... Kik godt efter. der er en widgte-supplier i dette tilfælde, her er nævnt "meebook".
{
    "status": {
        "code": 0,
        "message": "OK"
    },
    "data": {
        "id": 410000,
        "userId": "thom????",
        "portalRole": "guardian",
        "supportRole": false,
        "municipalAdmin": false,
        "isGroupHomeAdmin": false,
        "institutionProfile": {
            "encryptionKey": "3ed9.....6440",
            "communicationBlock": false,
            "address": {
                "id": 420000,
            },
            "email": "aula@XXXXXXXXXXX.dk",
            "birthday": null,
            "phone": "",
            "delegatedCalendarProfiles": [],
            "relations": [{
                "id": 420000,
                "profileId": 410000,
                "institution": {
                    "administrativeAuthority": {
                    }
                },
                "mainGroupName": "5L",
                "metadata": "5L"
            }],
            "id": 420000,
            "institution": {
                "institutionCode": "280000",
                "administrativeAuthority": {
                }
            },
            "metadata": "Lucas 5L"
        },
        "institutions": [{
            "institutionProfileId": 420000,
            "children": [{
                "id": 420000,
                "profileId": 410000,
                "userId": "luca????",
            }],
            "groups": [{
                "id": 780000,
                "name": "5L",
            }, {
                "id": 310000,
            }, {
                "id": 320000,
            }, {
                "id": 870000,
            }],
            "institutionRole": "guardian",
            "permissions": [{
                "permissionId": 32,
            }, {
                "permissionId": 39,
            }, {
                "permissionId": 41,
            }, {
                "permissionId": 38,
            }, {
                "permissionId": 46,
            }, {
                "permissionId": 47,
            }, {
                "permissionId": 63,
            }, {
                "permissionId": 87,
            }, {
                "permissionId": 29,
            }, {
                "permissionId": 62,
            }, {
                "permissionId": 116,
            }, {
                "permissionId": 57,
            }, {
                "permissionId": 26,
            }],
            "mailboxId": 830000,
            "administrativeAuthority": {
            }
        }],
        "municipalGroups": [{
        }],
        "mobilePhonenumber": "30000000",
        "homePhonenumber": null,
        "workPhonenumber": null,
        "moduleWidgetConfiguration": {
            "moduleConfigurations": [{
                "placement": "Default",
                "module": {
                },
            }, {
                "placement": "Default",
                "module": {
                },
            }, {
                "placement": "Default",
                "module": {
                },
            }, {
                "placement": "Default",
                "module": {
                },
                "restrictedGroups": [{
                }, {
                }, {
                }]
            }, {
                "placement": "Default",
                "module": {
                },
            }, {
                "placement": "Default",
                "module": {
                },
            }, {
                "placement": "LeftMenu",
                "module": {
                },
            }, {
                "placement": "LeftMenu",
                "module": {
                },
            }],
            "widgetConfigurations": [{
                "placement": "RightOfOverview",
                "widget": {
                    "widgetId": "0034",
                    "isSecure": true,
                    "canAccessOnMobile": false,
                    "canBePlacedInsideModule": true,
                    "canBePlacedOnGroup": false,
                    "canBePlacedOnFullPage": false,
                    "supportsTestMode": false,
                    "widgetSupplier": "KMD A\/S",
                    "isPilot": false,
                    "widgetVersion": "0001",
                    "iconEmployee": "",
                    "iconHover": "",
                    "id": 25,
                    "name": "KMD Educa Elev - Mit Barns Frav\u00e6r",
                    "icon": "",
                    "description": "KMD Educa Elev - Mit Barns Frav\u00e6r - SSO",
                    "url": "https:\/\/kmdelevfravaer.dk\/Fravaer\/Fravaer.aspx",
                    "type": "sso"
                },
                "id": 7604,
                "order": 1,
            }, {
                "placement": "RightOfOverview",
                "widget": {
                    "widgetId": "0003",
                    "isSecure": true,
                    "canAccessOnMobile": true,
                    "canBePlacedInsideModule": false,
                    "canBePlacedOnGroup": false,
                    "canBePlacedOnFullPage": false,
                    "supportsTestMode": true,
                    "widgetSupplier": "Meebook",
                    "isPilot": false,
                    "widgetVersion": "0001",
                    "iconEmployee": "",
                    "iconHover": "",
                    "id": 3,
                    "name": "Ugens forl\u00f8b - Meebook For\u00e6ldre",
                    "icon": "",
                    "description": "Parent widiget that shows the books the students\/children will work with in the current week",
                    "url": "\/widgets\/W0003V0001",
                    "type": "secure"
                },
                "id": 62122,
                "order": 2,
                "institutionRole": "guardian",
                "scope": "Institution",
                "centralDisplayMode": "ShownAsDefault",
                "municipalityDisplayMode": "ShownAsDefault",
                "institutionDisplayMode": "ShownAsDefault",
                "aggregatedDisplayMode": "Shown",
                "restrictedGroups": []
            }, {
                "placement": "RightOfOverview",
                "widget": {
                    "widgetId": "0002",
                    "isSecure": true,
                    "canAccessOnMobile": true,
                    "canBePlacedInsideModule": false,
                    "canBePlacedOnGroup": false,
                    "canBePlacedOnFullPage": false,
                    "supportsTestMode": true,
                    "widgetSupplier": "Meebook",
                    "isPilot": false,
                    "widgetVersion": "0001",
                    "iconEmployee": "",
                    "iconHover": "",
                    "id": 2,
                    "name": "Elevplaner med nyt - Meebook For\u00e6ldre",
                    "icon": "",
                    "description": "Parent widiget that shows student plans with unseen events",
                    "url": "\/widgets\/W0002V0001",
                    "type": "secure"
                },
                "id": 62121,
                "order": 3,
                "institutionRole": "guardian",
                "scope": "Institution",
                "centralDisplayMode": "ShownAsDefault",
                "municipalityDisplayMode": "ShownAsDefault",
                "institutionDisplayMode": "ShownAsDefault",
                "aggregatedDisplayMode": "Shown",
                "restrictedGroups": []
            }, {
                "placement": "RightOfOverview",
                "widget": {
                    "widgetId": "0069",
                    "isSecure": true,
                    "canAccessOnMobile": true,
                    "canBePlacedInsideModule": true,
                    "canBePlacedOnGroup": true,
                    "canBePlacedOnFullPage": true,
                    "supportsTestMode": true,
                    "widgetSupplier": "KMD A\/S",
                    "isPilot": false,
                    "widgetVersion": "0001",
                    "iconEmployee": "",
                    "iconHover": "",
                    "id": 64,
                    "name": "KMD Educa Elev - Kontaktoplysninger",
                    "icon": "",
                    "description": "KMD Educa Elev - Kontaktoplysninger",
                    "url": "\/widgets\/W0069V0001",
                    "type": "secure"
                },
                "id": 62123,
                "order": 4,
                "institutionRole": "guardian",
                "scope": "Institution",
                "centralDisplayMode": "ShownAsDefault",
                "municipalityDisplayMode": "ShownAsDefault",
                "institutionDisplayMode": "ShownAsDefault",
                "aggregatedDisplayMode": "Shown",
                "restrictedGroups": []
            }, {
                "placement": "RightOfOverview",
                "widget": {
                    "widgetId": "0013",
                    "isSecure": true,
                    "canAccessOnMobile": true,
                    "canBePlacedInsideModule": true,
                    "canBePlacedOnGroup": false,
                    "canBePlacedOnFullPage": false,
                    "supportsTestMode": true,
                    "widgetSupplier": "IBK",
                    "isPilot": false,
                    "widgetVersion": "0002",
                    "iconEmployee": "",
                    "iconHover": "",
                    "id": 12,
                    "name": "Nyttige links",
                    "icon": "",
                    "description": "Simpel liste med maximum 10 links pr. brugerkategori. Kontakt Kenneth Petersen (kp@iks.dk), Ikast-Brande Kommune for yderligere informationer.",
                    "url": "\/widgets\/W0013V0002",
                    "type": "secure"
                },
                "id": 93324,
                "order": 5,
                "institutionRole": "guardian",
                "scope": "Institution",
                "centralDisplayMode": "ShownAsDefault",
                "municipalityDisplayMode": "ShownAsDefault",
                "institutionDisplayMode": "ShownAsDefault",
                "aggregatedDisplayMode": "Shown",
                "restrictedGroups": []
            }, {
                "placement": "BelowCalendar",
                "widget": {
                    "widgetId": "0004",
                    "isSecure": true,
                    "canAccessOnMobile": true,
                    "canBePlacedInsideModule": true,
                    "canBePlacedOnGroup": true,
                    "canBePlacedOnFullPage": true,
                    "supportsTestMode": true,
                    "widgetSupplier": "Meebook",
                    "isPilot": false,
                    "widgetVersion": "0001",
                    "iconEmployee": "",
                    "iconHover": "",
                    "id": 4,
                    "name": "Ugeplan - Meebook For\u00e6ldre",
                    "icon": "",
                    "description": "Parent widiget that shows a week plan for each student\/child",
                    "url": "\/widgets\/W0004V0001",
                    "type": "secure"
                },
                "id": 28825,
                "order": 6,
                "institutionRole": "guardian",
                "scope": "Institution",
                "centralDisplayMode": "ShownAsDefault",
                "municipalityDisplayMode": "ShownAsDefault",
                "institutionDisplayMode": "ShownAsDefault",
                "aggregatedDisplayMode": "Shown",
                "restrictedGroups": []
            }]
        },
        "isSteppedUp": true,
        "loginPortalRole": null,
        "groupHomes": []
    },
    "version": 14,
    "module": "profiles",
    "method": "getProfileContext"
}

GET https://www.aula.dk/api/v14/?method=consents.getConsentResponses&returnOnlyPendingConsentResponses=false (ikke gengivet)

GET https://www.aula.dk/api/v14/?method=municipalConfiguration.getBlockedCommunicationProfiles (ikke gengivet)

GET https://www.aula.dk/api/v14/?method=notifications.getNotificationsForActiveProfile&activeChildrenIds[]=420000&activeInstitutionCodes[]=280000 (ikke gengivet)

Nu bliver det spændende igen. Læg mærke til widgetId er nævnt her - kommer fra tidligere forespørgsel. GET https://www.aula.dk/api/v14/?method=aulaToken.getAulaToken&widgetId=0004

Returnerer denne JSON.
Denne token (benævnt data) bruges til at logge direkte på i næste kald.
{
    "status": {
        "code": 0,
        "message": "OK"
    },
    "data": "eyJ0.....YccQ",
    "version": 14,
    "module": "aulaToken",
    "method": "getAulaToken"
}

Her er første kald til meebook. Jeg kan ikke helt se hvorfor der laves en "options"-request. Læg mærke til perioden er nævnt, childFilter er tilsyneladende unilogin. OPTIONS https://app.meebook.com/aulaapi/relatedweekplan/all?currentWeekNumber=2022-W45&userProfile=guardian&childFilter[]=luca????&institutionFilter[]=280000 Options-requesten returnerer ikke noget.

Det samme kald laves igen, bare som GET. GET https://app.meebook.com/aulaapi/relatedweekplan/all?currentWeekNumber=2022-W45&userProfile=guardian&childFilter[]=luca????&institutionFilter[]=280000

I dette kald er der et par headers med:
Først er authorization (bearer token). Læg mærke til, at token er den fra forrige kald.
Dernæst en sessionuuid med unilogin. Den sidste x-version ved jeg ikke om er nødvendig.
Bearer eyJ0.....YccQ
sessionuuid thom????
x-version 1.0

Returnerer denne JSON.
[{
    "id": 390000,
    "name": "Lucas XX XX XX",
    "unilogin": "luca????",
    "weekPlan": [{
        "date": "mandag 7. nov.",
        "tasks": [{
            "id": 3012463,
            "type": "comment",
            "author": "Sidsel XX",
            "group": "5L (22\/23)",
            "pill": "Idr\u00e6t",
            "content": "Vi forts\u00e6tter med cirkeltr\u00e6ning.\nMedbring idr\u00e6tst\u00f8j, h\u00e5ndkl\u00e6de og gerne indesko.",
            "editUrl": "https:\/\/app.meebook.com\/\/arsplaner\/dlap\/\/1000000\/\/200000"
        }, {
            "id": 3009075,
            "type": "comment",
            "author": "Signe XX",
            "group": "5L (22\/23)",
            "pill": "Engelsk",
            "content": "Medbring: \n- Pitstop tekstbog \n- Pitstop arbejdsbog\n\nI timen: \nVi skal arbejde med et lille interview om en fan der elsker historien \"Eragon\". Hertil skal vi lave nogle l\u00e6se- og skrive\u00f8velser.",
            "editUrl": "https:\/\/app.meebook.com\/\/arsplaner\/dlap\/\/940000\/\/200000"
        }, {
            "id": 3009068,
            "type": "comment",
            "author": "Signe XX",
            "group": "5L (22\/23)",
            "pill": "Dansk",
            "content": "I timen: \nMedbring: \n- Fandango tekstbog \n- Fandango arbejdsbog \n\nI timen: \nVi skal arbejde videre med Casa Battlo.",
            "editUrl": "https:\/\/app.meebook.com\/\/arsplaner\/dlap\/\/990000\/\/200000"
        }]
    }, {
        "date": "tirsdag 8. nov.",
        "tasks": [{
            "id": 3009068,
            "type": "comment",
            "author": "Signe XX",
            "group": "5L (22\/23)",
            "pill": "Dansk",
            "content": "Lektie:\n- Min femte danskbog s. 22+23\n\nMedbring: \n- Min femte danskbog\n\nI timen: \nVi starter med bibliotekstime. Bagefter skal eleverne arbejde med ugens opgaver i min femte danskbog s. 24+25.",
            "editUrl": "https:\/\/app.meebook.com\/\/arsplaner\/dlap\/\/990000\/\/200000"
        }]
    }, {
        "date": "onsdag 9. nov.",
        "tasks": [{
            "id": 3010988,
            "type": "comment",
            "author": "Sidsel XX",
            "group": "5L (22\/23)",
            "pill": "Matematik",
            "content": "OBS: Vi har matematik. Vi starter p\u00e5 nyt kapitel og arbejder med de orange.",
            "editUrl": "https:\/\/app.meebook.com\/\/arsplaner\/dlap\/\/940000\/\/200000"
        }, {
            "id": 3009076,
            "type": "comment",
            "author": "Signe XX",
            "group": "5L (22\/23)",
            "pill": "Historie",
            "content": "Medbring: \n- Historie 5 \n\nI timen: \nVi skal arbejde med emnet \"Mayaerne\" og forskellige mayakulturer.",
            "editUrl": "https:\/\/app.meebook.com\/\/arsplaner\/dlap\/\/920000\/\/200000"
        }]
    }, {
        "date": "torsdag 10. nov.",
        "tasks": [{
            "id": 3010988,
            "type": "comment",
            "author": "Sidsel XX",
            "group": "5L (22\/23)",
            "pill": "Matematik",
            "content": "Vi arbejder med den 1. bl\u00e5.\nLektie til i dag: 1. orange",
            "editUrl": "https:\/\/app.meebook.com\/\/arsplaner\/dlap\/\/940000\/\/200000"
        }, {
            "id": 3009075,
            "type": "comment",
            "author": "Signe XX",
            "group": "5L (22\/23)",
            "pill": "Engelsk",
            "content": "Vi skal arbejde med grammatik\u00f8velser.",
            "editUrl": "https:\/\/app.meebook.com\/\/arsplaner\/dlap\/\/940000\/\/200000"
        }, {
            "id": 3009068,
            "type": "comment",
            "author": "Signe XX",
            "group": "5L (22\/23)",
            "pill": "Dansk",
            "content": "Medbring: \n- Fandango tekstbog \n- Fandango arbejdsbog \n\nI timen: \nVi skal arbejde f\u00e6rdig med \"Casa Battlo\" og lave en opsamlingsopgave p\u00e5 begrebet \"komposition\"",
            "editUrl": "https:\/\/app.meebook.com\/\/arsplaner\/dlap\/\/990000\/\/200000"
        }, {
            "id": 3009078,
            "type": "comment",
            "author": "Signe XX",
            "group": "5L (22\/23)",
            "pill": "Kristendom",
            "content": "Medbring: \n- Liv og religion 5\n\nI timen: \nEleverne skal lave en research p\u00e5 computer med symboler i forskellige religioner. Derefter skal de lave en planche omkring et symbol de v\u00e6lger.",
            "editUrl": "https:\/\/app.meebook.com\/\/arsplaner\/dlap\/\/990000\/\/200000"
        }]
    }, {
        "date": "fredag 11. nov.",
        "tasks": [{
            "id": 3010988,
            "type": "comment",
            "author": "Sidsel XX",
            "group": "5L (22\/23)",
            "pill": "Matematik",
            "content": "Vi arbejder med den 1. gr\u00f8nne. \nLektie til i dag: 1. bl\u00e5",
            "editUrl": "https:\/\/app.meebook.com\/\/arsplaner\/dlap\/\/940000\/\/200000"
        }]
    }]
}]
kai74 commented 1 year ago

Hej @scaarup Jeg får eksakt den samme fejl. Skriv om du ønsker min debug log.

scaarup commented 1 year ago

@thomaspalmdk tak for en masse god og brugbar data ;).

Det lader faktisk til, at det foregår meget på samme måde som med "min uddannelse". Det her kald du nævner "GET https://www.aula.dk/api/v14/?method=aulaToken.getAulaToken&widgetId=0004", bruger jeg allerede til at få et token til "min uddannelse", blot med et andet widgetid.

Det ser lovende ud. Jeg skal nok få lavet en branch med en test, så vi kan komme videre med dette.

scaarup commented 1 year ago

Hey @thomaspalmdk eller andre.

Vil I checke denne her branch ud, enable debug log på integrationen, genstarte HA og post'e jeres log?

https://github.com/scaarup/aula/tree/meebook-integration

Har lavet et lille forsøg med at hive widgetid'er og navne ud, samt et forsøg på at lave et token til Meebook for at hente data.

kai74 commented 1 year ago

Hej @scaarup Jeg har afinstalleret Aula, restartet, installeret aule. restartet. Men den er ikke så glad for at installere. Jeg har valgt at installere den sidste Beta version.

image
scaarup commented 1 year ago

Hej @scaarup Jeg har afinstalleret Aula, restartet, installeret aule. restartet. Men den er ikke så glad for at installere. Jeg har valgt at installere den sidste Beta version.

image

Den omtalte branch (https://github.com/scaarup/aula/tree/meebook-integration) er ikke released, så hvis du vil teste den, så skal den lige checkes ud manuelt.

scaarup commented 1 year ago

Jeg har prøvet at lave en pre-release til den, så se om den dukker op som beta i HACS. Men ellers er det bare at checke den ud manuelt.

kai74 commented 1 year ago

Hej Tak for hjælpen så langt. Jeg har Prøvet at Checke den ud manuelt, men det ser ud som jeg får nesten de samme fejl. Nu ville jeg prøvet at installere den via Hack. Men den kommer ikke videre.. Men så hænger den her.

image

Jeg får prøve at installere den manuelt igen. Så må jeg sende dig LOG.

thomaspalmdk commented 1 year ago

Her er lidt log.


                _       
     /\        | |      
    /  \  _   _| | __ _ 
   / /\ \| | | | |/ _` |
  / ____ \ |_| | | (_| |
 /_/    \_\__,_|_|\__,_|                                               
Aula integration, version: 0.1.155
This is a custom integration
If you have any issues with this you need to open an issue here:
https://github.com/scaarup/aula/issues
-------------------------------------------------------------------

2022-11-14 16:20:04.775 INFO (MainThread) [homeassistant.components.sensor] Setting up sensor.aula
2022-11-14 16:20:04.971 DEBUG (SyncWorker_1) [custom_components.aula.client] self._schoolschedule True
2022-11-14 16:20:04.971 DEBUG (SyncWorker_1) [custom_components.aula.client] self._ugeplan True
2022-11-14 16:20:04.971 DEBUG (SyncWorker_1) [custom_components.aula.client] is_logged_in? False
2022-11-14 16:20:04.971 DEBUG (SyncWorker_1) [custom_components.aula.client] Logging in
2022-11-14 16:20:04.985 INFO (SyncWorker_7) [homeassistant.loader] Loaded calendar from homeassistant.components.calendar
2022-11-14 16:20:04.995 INFO (MainThread) [homeassistant.setup] Setting up calendar
2022-11-14 16:20:04.997 INFO (MainThread) [homeassistant.setup] Setup of domain calendar took 0.0 seconds
2022-11-14 16:20:05.007 INFO (MainThread) [homeassistant.components.calendar] Setting up calendar.aula
2022-11-14 16:20:05.011 DEBUG (MainThread) [custom_components.aula.calendar] 0 no client._children ... yet
2022-11-14 16:20:05.012 WARNING (MainThread) [homeassistant.util.async_] Detected blocking call to sleep inside the event loop. This is causing stability issues. Please report issue to the custom integration author for aula doing blocking calls at custom_components/aula/calendar.py, line 38: time.sleep(0.400)
2022-11-14 16:20:05.414 DEBUG (MainThread) [custom_components.aula.calendar] 1 no client._children ... yet
2022-11-14 16:20:05.415 WARNING (MainThread) [homeassistant.util.async_] Detected blocking call to sleep inside the event loop. This is causing stability issues. Please report issue to the custom integration author for aula doing blocking calls at custom_components/aula/calendar.py, line 38: time.sleep(0.400)
2022-11-14 16:20:05.817 DEBUG (MainThread) [custom_components.aula.calendar] 2 no client._children ... yet
2022-11-14 16:20:05.818 WARNING (MainThread) [homeassistant.util.async_] Detected blocking call to sleep inside the event loop. This is causing stability issues. Please report issue to the custom integration author for aula doing blocking calls at custom_components/aula/calendar.py, line 38: time.sleep(0.400)
2022-11-14 16:20:06.223 DEBUG (MainThread) [custom_components.aula.calendar] 3 no client._children ... yet
2022-11-14 16:20:06.225 WARNING (MainThread) [homeassistant.util.async_] Detected blocking call to sleep inside the event loop. This is causing stability issues. Please report issue to the custom integration author for aula doing blocking calls at custom_components/aula/calendar.py, line 38: time.sleep(0.400)
2022-11-14 16:20:06.628 DEBUG (MainThread) [custom_components.aula.calendar] 4 no client._children ... yet
2022-11-14 16:20:06.630 WARNING (MainThread) [homeassistant.util.async_] Detected blocking call to sleep inside the event loop. This is causing stability issues. Please report issue to the custom integration author for aula doing blocking calls at custom_components/aula/calendar.py, line 38: time.sleep(0.400)
2022-11-14 16:20:07.034 DEBUG (MainThread) [custom_components.aula.calendar] 5 no client._children ... yet
2022-11-14 16:20:07.036 WARNING (MainThread) [homeassistant.util.async_] Detected blocking call to sleep inside the event loop. This is causing stability issues. Please report issue to the custom integration author for aula doing blocking calls at custom_components/aula/calendar.py, line 38: time.sleep(0.400)
2022-11-14 16:20:07.439 DEBUG (MainThread) [custom_components.aula.calendar] 6 no client._children ... yet
2022-11-14 16:20:07.441 WARNING (MainThread) [homeassistant.util.async_] Detected blocking call to sleep inside the event loop. This is causing stability issues. Please report issue to the custom integration author for aula doing blocking calls at custom_components/aula/calendar.py, line 38: time.sleep(0.400)
2022-11-14 16:20:07.647 DEBUG (SyncWorker_1) [custom_components.aula.client] LOGIN: True
2022-11-14 16:20:07.719 DEBUG (SyncWorker_1) [custom_components.aula.client] Fetching calendars...
2022-11-14 16:20:07.720 DEBUG (SyncWorker_1) [custom_components.aula.client] Calendar post-data: {"instProfileIds":[420000],"resourceIds":[],"start":"2022-11-14 00:00:00.0000+0000","end":"2022-11-28 00:00:00.0000+0000"}
2022-11-14 16:20:07.844 DEBUG (MainThread) [custom_components.aula.calendar] Got client._children, breaking
2022-11-14 16:20:08.237 DEBUG (SyncWorker_1) [custom_components.aula.client] guardian :thom????
2022-11-14 16:20:08.464 DEBUG (SyncWorker_1) [custom_components.aula.client] widgetId [{'placement': 'RightOfOverview', 'widget': {'widgetId': '0034', 'isSecure': True, 'canAccessOnMobile': False, 'canBePlacedInsideModule': True, 'canBePlacedOnGroup': False, 'canBePlacedOnFullPage': False, 'supportsTestMode': False, 'widgetSupplier': 'KMD A/S', 'isPilot': False, 'widgetVersion': '0001', 'iconEmployee': '', 'iconHover': '', 'id': 25, 'name': 'KMD Educa Elev - Mit Barns Fravær', 'icon': '', 'description': 'KMD Educa Elev - Mit Barns Fravær - SSO', 'url': 'https://kmdelevfravaer.dk/Fravaer/Fravaer.aspx', 'type': 'sso'}, 'id': 7604, 'order': 1, 'institutionRole': 'guardian', 'scope': 'Institution', 'centralDisplayMode': 'ShownAsDefault', 'municipalityDisplayMode': 'ShownAsDefault', 'institutionDisplayMode': 'ShownAsDefault', 'aggregatedDisplayMode': 'Shown', 'restrictedGroups': []}, {'placement': 'RightOfOverview', 'widget': {'widgetId': '0003', 'isSecure': True, 'canAccessOnMobile': True, 'canBePlacedInsideModule': False, 'canBePlacedOnGroup': False, 'canBePlacedOnFullPage': False, 'supportsTestMode': True, 'widgetSupplier': 'Meebook', 'isPilot': False, 'widgetVersion': '0001', 'iconEmployee': '', 'iconHover': '', 'id': 3, 'name': 'Ugens forløb - Meebook Forældre', 'icon': '', 'description': 'Parent widiget that shows the books the students/children will work with in the current week', 'url': '/widgets/W0003V0001', 'type': 'secure'}, 'id': 62122, 'order': 2, 'institutionRole': 'guardian', 'scope': 'Institution', 'centralDisplayMode': 'ShownAsDefault', 'municipalityDisplayMode': 'ShownAsDefault', 'institutionDisplayMode': 'ShownAsDefault', 'aggregatedDisplayMode': 'Shown', 'restrictedGroups': []}, {'placement': 'RightOfOverview', 'widget': {'widgetId': '0002', 'isSecure': True, 'canAccessOnMobile': True, 'canBePlacedInsideModule': False, 'canBePlacedOnGroup': False, 'canBePlacedOnFullPage': False, 'supportsTestMode': True, 'widgetSupplier': 'Meebook', 'isPilot': False, 'widgetVersion': '0001', 'iconEmployee': '', 'iconHover': '', 'id': 2, 'name': 'Elevplaner med nyt - Meebook Forældre', 'icon': '', 'description': 'Parent widiget that shows student plans with unseen events', 'url': '/widgets/W0002V0001', 'type': 'secure'}, 'id': 62121, 'order': 3, 'institutionRole': 'guardian', 'scope': 'Institution', 'centralDisplayMode': 'ShownAsDefault', 'municipalityDisplayMode': 'ShownAsDefault', 'institutionDisplayMode': 'ShownAsDefault', 'aggregatedDisplayMode': 'Shown', 'restrictedGroups': []}, {'placement': 'RightOfOverview', 'widget': {'widgetId': '0069', 'isSecure': True, 'canAccessOnMobile': True, 'canBePlacedInsideModule': True, 'canBePlacedOnGroup': True, 'canBePlacedOnFullPage': True, 'supportsTestMode': True, 'widgetSupplier': 'KMD A/S', 'isPilot': False, 'widgetVersion': '0001', 'iconEmployee': '', 'iconHover': '', 'id': 64, 'name': 'KMD Educa Elev - Kontaktoplysninger', 'icon': '', 'description': 'KMD Educa Elev - Kontaktoplysninger', 'url': '/widgets/W0069V0001', 'type': 'secure'}, 'id': 62123, 'order': 4, 'institutionRole': 'guardian', 'scope': 'Institution', 'centralDisplayMode': 'ShownAsDefault', 'municipalityDisplayMode': 'ShownAsDefault', 'institutionDisplayMode': 'ShownAsDefault', 'aggregatedDisplayMode': 'Shown', 'restrictedGroups': []}, {'placement': 'RightOfOverview', 'widget': {'widgetId': '0013', 'isSecure': True, 'canAccessOnMobile': True, 'canBePlacedInsideModule': True, 'canBePlacedOnGroup': False, 'canBePlacedOnFullPage': False, 'supportsTestMode': True, 'widgetSupplier': 'IBK', 'isPilot': False, 'widgetVersion': '0002', 'iconEmployee': '', 'iconHover': '', 'id': 12, 'name': 'Nyttige links', 'icon': '', 'description': 'Simpel liste med maximum 10 links pr. brugerkategori. Kontakt Kenneth Petersen (kp@iks.dk), Ikast-Brande Kommune for yderligere informationer.', 'url': '/widgets/W0013V0002', 'type': 'secure'}, 'id': 93324, 'order': 5, 'institutionRole': 'guardian', 'scope': 'Institution', 'centralDisplayMode': 'ShownAsDefault', 'municipalityDisplayMode': 'ShownAsDefault', 'institutionDisplayMode': 'ShownAsDefault', 'aggregatedDisplayMode': 'Shown', 'restrictedGroups': []}, {'placement': 'BelowCalendar', 'widget': {'widgetId': '0004', 'isSecure': True, 'canAccessOnMobile': True, 'canBePlacedInsideModule': True, 'canBePlacedOnGroup': True, 'canBePlacedOnFullPage': True, 'supportsTestMode': True, 'widgetSupplier': 'Meebook', 'isPilot': False, 'widgetVersion': '0001', 'iconEmployee': '', 'iconHover': '', 'id': 4, 'name': 'Ugeplan - Meebook Forældre', 'icon': '', 'description': 'Parent widiget that shows a week plan for each student/child', 'url': '/widgets/W0004V0001', 'type': 'secure'}, 'id': 28825, 'order': 6, 'institutionRole': 'guardian', 'scope': 'Institution', 'centralDisplayMode': 'ShownAsDefault', 'municipalityDisplayMode': 'ShownAsDefault', 'institutionDisplayMode': 'ShownAsDefault', 'aggregatedDisplayMode': 'Shown', 'restrictedGroups': []}]
2022-11-14 16:20:08.464 DEBUG (SyncWorker_1) [custom_components.aula.client] Widget 0034 KMD Educa Elev - Mit Barns Fravær
2022-11-14 16:20:08.464 DEBUG (SyncWorker_1) [custom_components.aula.client] Widget 0003 Ugens forløb - Meebook Forældre
2022-11-14 16:20:08.464 DEBUG (SyncWorker_1) [custom_components.aula.client] Widget 0002 Elevplaner med nyt - Meebook Forældre
2022-11-14 16:20:08.465 DEBUG (SyncWorker_1) [custom_components.aula.client] Widget 0069 KMD Educa Elev - Kontaktoplysninger
2022-11-14 16:20:08.465 DEBUG (SyncWorker_1) [custom_components.aula.client] Widget 0013 Nyttige links
2022-11-14 16:20:08.465 DEBUG (SyncWorker_1) [custom_components.aula.client] Widget 0004 Ugeplan - Meebook Forældre
2022-11-14 16:20:08.672 DEBUG (SyncWorker_1) [custom_components.aula.client] ugeplaner status_code 403
2022-11-14 16:20:08.673 DEBUG (SyncWorker_1) [custom_components.aula.client] ugeplaner response {"responseStatus":{"errorCode":"Forbidden","message":"Token is invalid (Person not found: 'thom????')"}}
2022-11-14 16:20:08.675 ERROR (MainThread) [custom_components.aula.sensor] Unexpected error fetching sensor data: 'HassLogger' object is not callable
Traceback (most recent call last):
  File "/config/custom_components/aula/client.py", line 123, in ugeplan
    for person in ugeplaner.json()["personer"]:
KeyError: 'personer'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 205, in _async_refresh
    self.data = await self._async_update_data()
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 164, in _async_update_data
    return await self.update_method()
  File "/config/custom_components/aula/sensor.py", line 40, in async_update_data
    await hass.async_add_executor_job(client.update_data)
  File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/aula/client.py", line 154, in update_data
    ugeplan(thisweek,"this")
  File "/config/custom_components/aula/client.py", line 131, in ugeplan
    _LOGGER("In the Meebook flow...")
TypeError: 'HassLogger' object is not callable
2022-11-14 16:20:08.683 DEBUG (MainThread) [custom_components.aula.sensor] Finished fetching sensor data in 3.718 seconds (success: False)
2022-11-14 16:20:08.686 DEBUG (SyncWorker_4) [custom_components.aula.client] self._schoolschedule True
2022-11-14 16:20:08.686 DEBUG (SyncWorker_4) [custom_components.aula.client] self._ugeplan True
2022-11-14 16:20:08.783 DEBUG (SyncWorker_4) [custom_components.aula.client] is_logged_in? True
2022-11-14 16:20:08.868 DEBUG (SyncWorker_4) [custom_components.aula.client] Fetching calendars...
2022-11-14 16:20:08.868 DEBUG (SyncWorker_4) [custom_components.aula.client] Calendar post-data: {"instProfileIds":[420000],"resourceIds":[],"start":"2022-11-14 00:00:00.0000+0000","end":"2022-11-28 00:00:00.0000+0000"}
2022-11-14 16:20:09.325 DEBUG (SyncWorker_4) [custom_components.aula.client] guardian :thom????
2022-11-14 16:20:09.534 DEBUG (SyncWorker_4) [custom_components.aula.client] widgetId [{'placement': 'RightOfOverview', 'widget': {'widgetId': '0034', 'isSecure': True, 'canAccessOnMobile': False, 'canBePlacedInsideModule': True, 'canBePlacedOnGroup': False, 'canBePlacedOnFullPage': False, 'supportsTestMode': False, 'widgetSupplier': 'KMD A/S', 'isPilot': False, 'widgetVersion': '0001', 'iconEmployee': '', 'iconHover': '', 'id': 25, 'name': 'KMD Educa Elev - Mit Barns Fravær', 'icon': '', 'description': 'KMD Educa Elev - Mit Barns Fravær - SSO', 'url': 'https://kmdelevfravaer.dk/Fravaer/Fravaer.aspx', 'type': 'sso'}, 'id': 7604, 'order': 1, 'institutionRole': 'guardian', 'scope': 'Institution', 'centralDisplayMode': 'ShownAsDefault', 'municipalityDisplayMode': 'ShownAsDefault', 'institutionDisplayMode': 'ShownAsDefault', 'aggregatedDisplayMode': 'Shown', 'restrictedGroups': []}, {'placement': 'RightOfOverview', 'widget': {'widgetId': '0003', 'isSecure': True, 'canAccessOnMobile': True, 'canBePlacedInsideModule': False, 'canBePlacedOnGroup': False, 'canBePlacedOnFullPage': False, 'supportsTestMode': True, 'widgetSupplier': 'Meebook', 'isPilot': False, 'widgetVersion': '0001', 'iconEmployee': '', 'iconHover': '', 'id': 3, 'name': 'Ugens forløb - Meebook Forældre', 'icon': '', 'description': 'Parent widiget that shows the books the students/children will work with in the current week', 'url': '/widgets/W0003V0001', 'type': 'secure'}, 'id': 62122, 'order': 2, 'institutionRole': 'guardian', 'scope': 'Institution', 'centralDisplayMode': 'ShownAsDefault', 'municipalityDisplayMode': 'ShownAsDefault', 'institutionDisplayMode': 'ShownAsDefault', 'aggregatedDisplayMode': 'Shown', 'restrictedGroups': []}, {'placement': 'RightOfOverview', 'widget': {'widgetId': '0002', 'isSecure': True, 'canAccessOnMobile': True, 'canBePlacedInsideModule': False, 'canBePlacedOnGroup': False, 'canBePlacedOnFullPage': False, 'supportsTestMode': True, 'widgetSupplier': 'Meebook', 'isPilot': False, 'widgetVersion': '0001', 'iconEmployee': '', 'iconHover': '', 'id': 2, 'name': 'Elevplaner med nyt - Meebook Forældre', 'icon': '', 'description': 'Parent widiget that shows student plans with unseen events', 'url': '/widgets/W0002V0001', 'type': 'secure'}, 'id': 62121, 'order': 3, 'institutionRole': 'guardian', 'scope': 'Institution', 'centralDisplayMode': 'ShownAsDefault', 'municipalityDisplayMode': 'ShownAsDefault', 'institutionDisplayMode': 'ShownAsDefault', 'aggregatedDisplayMode': 'Shown', 'restrictedGroups': []}, {'placement': 'RightOfOverview', 'widget': {'widgetId': '0069', 'isSecure': True, 'canAccessOnMobile': True, 'canBePlacedInsideModule': True, 'canBePlacedOnGroup': True, 'canBePlacedOnFullPage': True, 'supportsTestMode': True, 'widgetSupplier': 'KMD A/S', 'isPilot': False, 'widgetVersion': '0001', 'iconEmployee': '', 'iconHover': '', 'id': 64, 'name': 'KMD Educa Elev - Kontaktoplysninger', 'icon': '', 'description': 'KMD Educa Elev - Kontaktoplysninger', 'url': '/widgets/W0069V0001', 'type': 'secure'}, 'id': 62123, 'order': 4, 'institutionRole': 'guardian', 'scope': 'Institution', 'centralDisplayMode': 'ShownAsDefault', 'municipalityDisplayMode': 'ShownAsDefault', 'institutionDisplayMode': 'ShownAsDefault', 'aggregatedDisplayMode': 'Shown', 'restrictedGroups': []}, {'placement': 'RightOfOverview', 'widget': {'widgetId': '0013', 'isSecure': True, 'canAccessOnMobile': True, 'canBePlacedInsideModule': True, 'canBePlacedOnGroup': False, 'canBePlacedOnFullPage': False, 'supportsTestMode': True, 'widgetSupplier': 'IBK', 'isPilot': False, 'widgetVersion': '0002', 'iconEmployee': '', 'iconHover': '', 'id': 12, 'name': 'Nyttige links', 'icon': '', 'description': 'Simpel liste med maximum 10 links pr. brugerkategori. Kontakt Kenneth Petersen (kp@iks.dk), Ikast-Brande Kommune for yderligere informationer.', 'url': '/widgets/W0013V0002', 'type': 'secure'}, 'id': 93324, 'order': 5, 'institutionRole': 'guardian', 'scope': 'Institution', 'centralDisplayMode': 'ShownAsDefault', 'municipalityDisplayMode': 'ShownAsDefault', 'institutionDisplayMode': 'ShownAsDefault', 'aggregatedDisplayMode': 'Shown', 'restrictedGroups': []}, {'placement': 'BelowCalendar', 'widget': {'widgetId': '0004', 'isSecure': True, 'canAccessOnMobile': True, 'canBePlacedInsideModule': True, 'canBePlacedOnGroup': True, 'canBePlacedOnFullPage': True, 'supportsTestMode': True, 'widgetSupplier': 'Meebook', 'isPilot': False, 'widgetVersion': '0001', 'iconEmployee': '', 'iconHover': '', 'id': 4, 'name': 'Ugeplan - Meebook Forældre', 'icon': '', 'description': 'Parent widiget that shows a week plan for each student/child', 'url': '/widgets/W0004V0001', 'type': 'secure'}, 'id': 28825, 'order': 6, 'institutionRole': 'guardian', 'scope': 'Institution', 'centralDisplayMode': 'ShownAsDefault', 'municipalityDisplayMode': 'ShownAsDefault', 'institutionDisplayMode': 'ShownAsDefault', 'aggregatedDisplayMode': 'Shown', 'restrictedGroups': []}]
2022-11-14 16:20:09.534 DEBUG (SyncWorker_4) [custom_components.aula.client] Widget 0034 KMD Educa Elev - Mit Barns Fravær
2022-11-14 16:20:09.534 DEBUG (SyncWorker_4) [custom_components.aula.client] Widget 0003 Ugens forløb - Meebook Forældre
2022-11-14 16:20:09.534 DEBUG (SyncWorker_4) [custom_components.aula.client] Widget 0002 Elevplaner med nyt - Meebook Forældre
2022-11-14 16:20:09.534 DEBUG (SyncWorker_4) [custom_components.aula.client] Widget 0069 KMD Educa Elev - Kontaktoplysninger
2022-11-14 16:20:09.534 DEBUG (SyncWorker_4) [custom_components.aula.client] Widget 0013 Nyttige links
2022-11-14 16:20:09.534 DEBUG (SyncWorker_4) [custom_components.aula.client] Widget 0004 Ugeplan - Meebook Forældre
2022-11-14 16:20:09.639 DEBUG (SyncWorker_4) [custom_components.aula.client] ugeplaner status_code 403
2022-11-14 16:20:09.640 DEBUG (SyncWorker_4) [custom_components.aula.client] ugeplaner response {"responseStatus":{"errorCode":"Forbidden","message":"Token is invalid (Person not found: 'thom????')"}}
2022-11-14 16:20:09.643 ERROR (MainThread) [homeassistant.components.sensor] Error while setting up aula platform for sensor
Traceback (most recent call last):
  File "/config/custom_components/aula/client.py", line 123, in ugeplan
    for person in ugeplaner.json()["personer"]:
KeyError: 'personer'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 281, in _async_setup_platform
    await asyncio.shield(task)
  File "/config/custom_components/aula/sensor.py", line 55, in async_setup_entry
    await hass.async_add_executor_job(client.update_data)
  File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/aula/client.py", line 154, in update_data
    ugeplan(thisweek,"this")
  File "/config/custom_components/aula/client.py", line 131, in ugeplan
    _LOGGER("In the Meebook flow...")
TypeError: 'HassLogger' object is not callable
kai74 commented 1 year ago

også lidt Log.

_ /\ | | / \ _ _| | __ _ / /\ \| | | | |/ _ | / _ \ || | | (| | // _\,||_,|
Aula integration, version: 0.1.155 This is a custom integration If you have any issues with this you need to open an issue here: https://github.com/scaarup/aula/issues

2022-11-14 16:54:41.448 INFO (MainThread) [homeassistant.components.sensor] Setting up sensor.aula 2022-11-14 16:54:41.458 INFO (SyncWorker_5) [homeassistant.loader] Loaded calendar from homeassistant.components.calendar 2022-11-14 16:54:41.463 DEBUG (SyncWorker_9) [custom_components.aula.client] self._schoolschedule True 2022-11-14 16:54:41.463 DEBUG (SyncWorker_9) [custom_components.aula.client] self._ugeplan True 2022-11-14 16:54:41.463 DEBUG (SyncWorker_9) [custom_components.aula.client] is_logged_in? False 2022-11-14 16:54:41.463 DEBUG (SyncWorker_9) [custom_components.aula.client] Logging in 2022-11-14 16:54:41.483 INFO (MainThread) [homeassistant.setup] Setting up calendar 2022-11-14 16:54:41.485 INFO (MainThread) [homeassistant.setup] Setup of domain calendar took 0.0 seconds 2022-11-14 16:54:41.494 INFO (MainThread) [homeassistant.components.calendar] Setting up calendar.aula 2022-11-14 16:54:41.498 DEBUG (MainThread) [custom_components.aula.calendar] 0 no client.children ... yet 2022-11-14 16:54:41.499 WARNING (MainThread) [homeassistant.util.async] Detected blocking call to sleep inside the event loop. This is causing stability issues. Please report issue to the custom integration author for aula doing blocking calls at custom_components/aula/calendar.py, line 38: time.sleep(0.400) 2022-11-14 16:54:41.900 DEBUG (MainThread) [custom_components.aula.calendar] 1 no client.children ... yet 2022-11-14 16:54:41.901 WARNING (MainThread) [homeassistant.util.async] Detected blocking call to sleep inside the event loop. This is causing stability issues. Please report issue to the custom integration author for aula doing blocking calls at custom_components/aula/calendar.py, line 38: time.sleep(0.400) 2022-11-14 16:54:42.303 DEBUG (MainThread) [custom_components.aula.calendar] 2 no client.children ... yet 2022-11-14 16:54:42.304 WARNING (MainThread) [homeassistant.util.async] Detected blocking call to sleep inside the event loop. This is causing stability issues. Please report issue to the custom integration author for aula doing blocking calls at custom_components/aula/calendar.py, line 38: time.sleep(0.400) 2022-11-14 16:54:42.705 DEBUG (MainThread) [custom_components.aula.calendar] 3 no client.children ... yet 2022-11-14 16:54:42.706 WARNING (MainThread) [homeassistant.util.async] Detected blocking call to sleep inside the event loop. This is causing stability issues. Please report issue to the custom integration author for aula doing blocking calls at custom_components/aula/calendar.py, line 38: time.sleep(0.400) 2022-11-14 16:54:43.110 DEBUG (MainThread) [custom_components.aula.calendar] 4 no client.children ... yet 2022-11-14 16:54:43.116 WARNING (MainThread) [homeassistant.util.async] Detected blocking call to sleep inside the event loop. This is causing stability issues. Please report issue to the custom integration author for aula doing blocking calls at custom_components/aula/calendar.py, line 38: time.sleep(0.400) 2022-11-14 16:54:43.519 DEBUG (MainThread) [custom_components.aula.calendar] 5 no client.children ... yet 2022-11-14 16:54:43.520 WARNING (MainThread) [homeassistant.util.async] Detected blocking call to sleep inside the event loop. This is causing stability issues. Please report issue to the custom integration author for aula doing blocking calls at custom_components/aula/calendar.py, line 38: time.sleep(0.400) 2022-11-14 16:54:43.782 DEBUG (SyncWorker_9) [custom_components.aula.client] LOGIN: True 2022-11-14 16:54:43.909 DEBUG (SyncWorker_9) [custom_components.aula.client] Fetching calendars... 2022-11-14 16:54:43.909 DEBUG (SyncWorker_9) [custom_components.aula.client] Calendar post-data: {"instProfileIds":[1408713],"resourceIds":[],"start":"2022-11-14 00:00:00.0000+0000","end":"2022-11-28 00:00:00.0000+0000"} 2022-11-14 16:54:43.921 DEBUG (MainThread) [custom_components.aula.calendar] Got client._children, breaking 2022-11-14 16:54:44.760 DEBUG (SyncWorker_9) [custom_components.aula.client] guardian :kaixXXXX 2022-11-14 16:54:45.042 DEBUG (SyncWorker_9) [custom_components.aula.client] widgetId [{'placement': 'RightOfOverview', 'widget': {'widgetId': '0003', 'isSecure': True, 'canAccessOnMobile': True, 'canBePlacedInsideModule': False, 'canBePlacedOnGroup': False, 'canBePlacedOnFullPage': False, 'supportsTestMode': True, 'widgetSupplier': 'Meebook', 'isPilot': False, 'widgetVersion': '0001', 'iconEmployee': '', 'iconHover': '', 'id': 3, 'name': 'Ugens forløb - Meebook Forældre', 'icon': '', 'description': 'Parent widiget that shows the books the students/children will work with in the current week', 'url': '/widgets/W0003V0001', 'type': 'secure'}, 'id': 2620, 'order': 1, 'institutionRole': 'guardian', 'scope': 'Municipality', 'centralDisplayMode': 'ShownAsDefault', 'municipalityDisplayMode': 'ShownAsDefault', 'institutionDisplayMode': 'ShownAsDefault', 'aggregatedDisplayMode': 'Shown', 'restrictedGroups': []}, {'placement': 'RightOfOverview', 'widget': {'widgetId': '0004', 'isSecure': True, 'canAccessOnMobile': True, 'canBePlacedInsideModule': True, 'canBePlacedOnGroup': True, 'canBePlacedOnFullPage': True, 'supportsTestMode': True, 'widgetSupplier': 'Meebook', 'isPilot': False, 'widgetVersion': '0001', 'iconEmployee': '', 'iconHover': '', 'id': 4, 'name': 'Ugeplan - Meebook Forældre', 'icon': '', 'description': 'Parent widiget that shows a week plan for each student/child', 'url': '/widgets/W0004V0001', 'type': 'secure'}, 'id': 2621, 'order': 2, 'institutionRole': 'guardian', 'scope': 'Municipality', 'centralDisplayMode': 'ShownAsDefault', 'municipalityDisplayMode': 'ShownAsDefault', 'institutionDisplayMode': 'ShownAsDefault', 'aggregatedDisplayMode': 'Shown', 'restrictedGroups': []}, {'placement': 'RightOfOverview', 'widget': {'widgetId': '0047', 'isSecure': True, 'canAccessOnMobile': True, 'canBePlacedInsideModule': True, 'canBePlacedOnGroup': False, 'canBePlacedOnFullPage': True, 'supportsTestMode': True, 'widgetSupplier': 'IST', 'isPilot': False, 'widgetVersion': '0001', 'iconEmployee': '', 'iconHover': '', 'id': 39, 'name': 'Fravær - forældreindberetning', 'icon': 'static/widget/W0047V0001.svg', 'description': 'Fravær hjælper dig med at se dine børns fravær og giver dig mulighed for at melde dem syge.', 'url': 'https://saml.borger.tabulex.dk/simplesaml/module.php/tabulexaulalogin/aula.php?appid=fravaerforaeldre', 'type': 'sso'}, 'id': 34723, 'order': 3, 'institutionRole': 'guardian', 'scope': 'Institution', 'centralDisplayMode': 'ShownAsDefault', 'municipalityDisplayMode': 'ShownAsDefault', 'institutionDisplayMode': 'ShownAsDefault', 'aggregatedDisplayMode': 'Shown', 'restrictedGroups': []}] 2022-11-14 16:54:45.042 DEBUG (SyncWorker_9) [custom_components.aula.client] Widget 0003 Ugens forløb - Meebook Forældre 2022-11-14 16:54:45.042 DEBUG (SyncWorker_9) [custom_components.aula.client] Widget 0004 Ugeplan - Meebook Forældre 2022-11-14 16:54:45.042 DEBUG (SyncWorker_9) [custom_components.aula.client] Widget 0047 Fravær - forældreindberetning 2022-11-14 16:54:45.282 DEBUG (SyncWorker_9) [custom_components.aula.client] ugeplaner status_code 403 2022-11-14 16:54:45.283 DEBUG (SyncWorker_9) [custom_components.aula.client] ugeplaner response {"responseStatus":{"errorCode":"Forbidden","message":"Token is invalid (Person not found: 'kaixXXXX')"}} 2022-11-14 16:54:45.285 ERROR (MainThread) [custom_components.aula.sensor] Unexpected error fetching sensor data: 'HassLogger' object is not callable Traceback (most recent call last): File "/config/custom_components/aula/client.py", line 123, in ugeplan for person in ugeplaner.json()["personer"]: KeyError: 'personer'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 205, in _async_refresh self.data = await self._async_update_data() File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 164, in _async_update_data return await self.update_method() File "/config/custom_components/aula/sensor.py", line 40, in async_update_data await hass.async_add_executor_job(client.update_data) File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run result = self.fn(*self.args, **self.kwargs) File "/config/custom_components/aula/client.py", line 154, in update_data ugeplan(thisweek,"this") File "/config/custom_components/aula/client.py", line 131, in ugeplan _LOGGER("In the Meebook flow...") TypeError: 'HassLogger' object is not callable 2022-11-14 16:54:45.290 DEBUG (MainThread) [custom_components.aula.sensor] Finished fetching sensor data in 3.829 seconds (success: False) 2022-11-14 16:54:45.291 DEBUG (SyncWorker_6) [custom_components.aula.client] self._schoolschedule True 2022-11-14 16:54:45.292 DEBUG (SyncWorker_6) [custom_components.aula.client] self._ugeplan True 2022-11-14 16:54:45.406 DEBUG (SyncWorker_6) [custom_components.aula.client] is_logged_in? True 2022-11-14 16:54:45.810 DEBUG (SyncWorker_6) [custom_components.aula.client] Fetching calendars... 2022-11-14 16:54:45.810 DEBUG (SyncWorker_6) [custom_components.aula.client] Calendar post-data: {"instProfileIds":[1408713],"resourceIds":[],"start":"2022-11-14 00:00:00.0000+0000","end":"2022-11-28 00:00:00.0000+0000"} 2022-11-14 16:54:46.263 DEBUG (SyncWorker_6) [custom_components.aula.client] guardian :kaixXXXX 2022-11-14 16:54:46.395 INFO (SyncWorker_3) [pyelectroluxconnect.Session] No model name in profile file, try to find in other sites 2022-11-14 16:54:46.395 INFO (SyncWorker_3) [pyelectroluxconnect.Session] Trying to get model 911438427_01 info from https://www.electrolux-ui.com/ website 2022-11-14 16:54:46.539 DEBUG (SyncWorker_6) [custom_components.aula.client] widgetId [{'placement': 'RightOfOverview', 'widget': {'widgetId': '0003', 'isSecure': True, 'canAccessOnMobile': True, 'canBePlacedInsideModule': False, 'canBePlacedOnGroup': False, 'canBePlacedOnFullPage': False, 'supportsTestMode': True, 'widgetSupplier': 'Meebook', 'isPilot': False, 'widgetVersion': '0001', 'iconEmployee': '', 'iconHover': '', 'id': 3, 'name': 'Ugens forløb - Meebook Forældre', 'icon': '', 'description': 'Parent widiget that shows the books the students/children will work with in the current week', 'url': '/widgets/W0003V0001', 'type': 'secure'}, 'id': 2620, 'order': 1, 'institutionRole': 'guardian', 'scope': 'Municipality', 'centralDisplayMode': 'ShownAsDefault', 'municipalityDisplayMode': 'ShownAsDefault', 'institutionDisplayMode': 'ShownAsDefault', 'aggregatedDisplayMode': 'Shown', 'restrictedGroups': []}, {'placement': 'RightOfOverview', 'widget': {'widgetId': '0004', 'isSecure': True, 'canAccessOnMobile': True, 'canBePlacedInsideModule': True, 'canBePlacedOnGroup': True, 'canBePlacedOnFullPage': True, 'supportsTestMode': True, 'widgetSupplier': 'Meebook', 'isPilot': False, 'widgetVersion': '0001', 'iconEmployee': '', 'iconHover': '', 'id': 4, 'name': 'Ugeplan - Meebook Forældre', 'icon': '', 'description': 'Parent widiget that shows a week plan for each student/child', 'url': '/widgets/W0004V0001', 'type': 'secure'}, 'id': 2621, 'order': 2, 'institutionRole': 'guardian', 'scope': 'Municipality', 'centralDisplayMode': 'ShownAsDefault', 'municipalityDisplayMode': 'ShownAsDefault', 'institutionDisplayMode': 'ShownAsDefault', 'aggregatedDisplayMode': 'Shown', 'restrictedGroups': []}, {'placement': 'RightOfOverview', 'widget': {'widgetId': '0047', 'isSecure': True, 'canAccessOnMobile': True, 'canBePlacedInsideModule': True, 'canBePlacedOnGroup': False, 'canBePlacedOnFullPage': True, 'supportsTestMode': True, 'widgetSupplier': 'IST', 'isPilot': False, 'widgetVersion': '0001', 'iconEmployee': '', 'iconHover': '', 'id': 39, 'name': 'Fravær - forældreindberetning', 'icon': 'static/widget/W0047V0001.svg', 'description': 'Fravær hjælper dig med at se dine børns fravær og giver dig mulighed for at melde dem syge.', 'url': 'https://saml.borger.tabulex.dk/simplesaml/module.php/tabulexaulalogin/aula.php?appid=fravaerforaeldre', 'type': 'sso'}, 'id': 34723, 'order': 3, 'institutionRole': 'guardian', 'scope': 'Institution', 'centralDisplayMode': 'ShownAsDefault', 'municipalityDisplayMode': 'ShownAsDefault', 'institutionDisplayMode': 'ShownAsDefault', 'aggregatedDisplayMode': 'Shown', 'restrictedGroups': []}] 2022-11-14 16:54:46.539 DEBUG (SyncWorker_6) [custom_components.aula.client] Widget 0003 Ugens forløb - Meebook Forældre 2022-11-14 16:54:46.539 DEBUG (SyncWorker_6) [custom_components.aula.client] Widget 0004 Ugeplan - Meebook Forældre 2022-11-14 16:54:46.539 DEBUG (SyncWorker_6) [custom_components.aula.client] Widget 0047 Fravær - forældreindberetning 2022-11-14 16:54:46.647 DEBUG (SyncWorker_6) [custom_components.aula.client] ugeplaner status_code 403 2022-11-14 16:54:46.647 DEBUG (SyncWorker_6) [custom_components.aula.client] ugeplaner response {"responseStatus":{"errorCode":"Forbidden","message":"Token is invalid (Person not found: 'kaixXXXX')"}} 2022-11-14 16:54:46.648 ERROR (MainThread) [homeassistant.components.sensor] Error while setting up aula platform for sensor Traceback (most recent call last): File "/config/custom_components/aula/client.py", line 123, in ugeplan for person in ugeplaner.json()["personer"]: KeyError: 'personer'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 281, in _async_setup_platform await asyncio.shield(task) File "/config/custom_components/aula/sensor.py", line 55, in async_setup_entry await hass.async_add_executor_job(client.update_data) File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run result = self.fn(*self.args, **self.kwargs) File "/config/custom_components/aula/client.py", line 154, in update_data ugeplan(thisweek,"this") File "/config/custom_components/aula/client.py", line 131, in ugeplan _LOGGER("In the Meebook flow...") TypeError: 'HassLogger' object is not callable 2022-11-14 16:54:47.680 INFO (SyncWorker_3) [pyelectroluxconnect.Session] No model name in profile file, try to find in other sites 2022-11-14 16:54:47.680 INFO (SyncWorker_3) [pyelectroluxconnect.Session] Trying to get model 914550476_02 info from https://www.electrolux-ui.com/ website 2022-11-14 16:55:11.428 WARNING (MainThread) [homeassistant.components.sensor] Updating rest sensor took longer than the scheduled update interval 0:00:01 2022-11-14 16:55:14.970 ERROR (MainThread) [homeassistant.core] Connection to SABnzbd API failed: Unable to communicate with Sabnzbd API 2022-11-14 16:55:19.416 INFO (SyncWorker_11) [pyelectroluxconnect.Session] No model name in profile file, try to find in other sites 2022-11-14 16:55:19.416 INFO (SyncWorker_11) [pyelectroluxconnect.Session] Trying to get model 911438427_01 info from https://www.electrolux-ui.com/ website 2022-11-14 16:55:25.835 INFO (SyncWorker_11) [pyelectroluxconnect.Session] No model name in profile file, try to find in other sites 2022-11-14 16:55:25.835 INFO (SyncWorker_11) [pyelectroluxconnect.Session] Trying to get model 914550476_02 info from https://www.electrolux-ui.com/ website 2022-11-14 16:55:33.358 INFO (MainThread) [homeassistant.components.websocket_api.http.connection] [281471798313984] Connection closed by client 2022-11-14 16:55:44.079 DEBUG (SyncWorker_8) [custom_components.aula.calendar] Updating calendars... 2022-11-14 16:55:44.094 DEBUG (SyncWorker_8) [custom_components.aula.calendar] Parsing skoleskema.json... 2022-11-14 16:55:56.808 INFO (MainThread) [homeassistant.components.websocket_api.http.connection] [281471801727280] Connection closed by client `

scaarup commented 1 year ago

Tak @kai74 og @thomaspalmdk.

Jeg har lige rettet lidt på client.py i denne branch https://github.com/scaarup/aula/tree/meebook-integration. Vil I opdatere og give det et skud mere?

thomaspalmdk commented 1 year ago

Jeg synes det er en lidt spøjs fejl Meebook slutter med. :-/

                _       
     /\        | |      
    /  \  _   _| | __ _ 
   / /\ \| | | | |/ _` |
  / ____ \ |_| | | (_| |
 /_/    \_\__,_|_|\__,_|                                               
Aula integration, version: 0.1.155
This is a custom integration
If you have any issues with this you need to open an issue here:
https://github.com/scaarup/aula/issues
-------------------------------------------------------------------

2022-11-14 19:19:58.721 INFO (MainThread) [homeassistant.components.sensor] Setting up sensor.aula
2022-11-14 19:19:58.909 DEBUG (SyncWorker_3) [custom_components.aula.client] self._schoolschedule True
2022-11-14 19:19:58.909 DEBUG (SyncWorker_3) [custom_components.aula.client] self._ugeplan True
2022-11-14 19:19:58.910 DEBUG (SyncWorker_3) [custom_components.aula.client] is_logged_in? False
2022-11-14 19:19:58.910 DEBUG (SyncWorker_3) [custom_components.aula.client] Logging in
2022-11-14 19:19:58.915 INFO (SyncWorker_7) [homeassistant.loader] Loaded calendar from homeassistant.components.calendar
2022-11-14 19:19:58.971 INFO (MainThread) [homeassistant.setup] Setting up calendar
2022-11-14 19:19:58.974 INFO (MainThread) [homeassistant.setup] Setup of domain calendar took 0.0 seconds
2022-11-14 19:19:58.986 INFO (MainThread) [homeassistant.components.calendar] Setting up calendar.aula
2022-11-14 19:19:58.990 DEBUG (MainThread) [custom_components.aula.calendar] 0 no client._children ... yet
2022-11-14 19:19:58.993 WARNING (MainThread) [homeassistant.util.async_] Detected blocking call to sleep inside the event loop. This is causing stability issues. Please report issue to the custom integration author for aula doing blocking calls at custom_components/aula/calendar.py, line 38: time.sleep(0.400)
2022-11-14 19:19:59.395 DEBUG (MainThread) [custom_components.aula.calendar] 1 no client._children ... yet
2022-11-14 19:19:59.398 WARNING (MainThread) [homeassistant.util.async_] Detected blocking call to sleep inside the event loop. This is causing stability issues. Please report issue to the custom integration author for aula doing blocking calls at custom_components/aula/calendar.py, line 38: time.sleep(0.400)
2022-11-14 19:19:59.800 DEBUG (MainThread) [custom_components.aula.calendar] 2 no client._children ... yet
2022-11-14 19:19:59.800 WARNING (MainThread) [homeassistant.util.async_] Detected blocking call to sleep inside the event loop. This is causing stability issues. Please report issue to the custom integration author for aula doing blocking calls at custom_components/aula/calendar.py, line 38: time.sleep(0.400)
2022-11-14 19:20:00.202 DEBUG (MainThread) [custom_components.aula.calendar] 3 no client._children ... yet
2022-11-14 19:20:00.204 WARNING (MainThread) [homeassistant.util.async_] Detected blocking call to sleep inside the event loop. This is causing stability issues. Please report issue to the custom integration author for aula doing blocking calls at custom_components/aula/calendar.py, line 38: time.sleep(0.400)
2022-11-14 19:20:00.606 DEBUG (MainThread) [custom_components.aula.calendar] 4 no client._children ... yet
2022-11-14 19:20:00.607 WARNING (MainThread) [homeassistant.util.async_] Detected blocking call to sleep inside the event loop. This is causing stability issues. Please report issue to the custom integration author for aula doing blocking calls at custom_components/aula/calendar.py, line 38: time.sleep(0.400)
2022-11-14 19:20:01.012 DEBUG (MainThread) [custom_components.aula.calendar] 5 no client._children ... yet
2022-11-14 19:20:01.017 WARNING (MainThread) [homeassistant.util.async_] Detected blocking call to sleep inside the event loop. This is causing stability issues. Please report issue to the custom integration author for aula doing blocking calls at custom_components/aula/calendar.py, line 38: time.sleep(0.400)
2022-11-14 19:20:01.420 DEBUG (MainThread) [custom_components.aula.calendar] 6 no client._children ... yet
2022-11-14 19:20:01.423 WARNING (MainThread) [homeassistant.util.async_] Detected blocking call to sleep inside the event loop. This is causing stability issues. Please report issue to the custom integration author for aula doing blocking calls at custom_components/aula/calendar.py, line 38: time.sleep(0.400)
2022-11-14 19:20:01.792 DEBUG (SyncWorker_3) [custom_components.aula.client] LOGIN: True
2022-11-14 19:20:01.826 DEBUG (MainThread) [custom_components.aula.calendar] Got client._children, breaking
2022-11-14 19:20:01.884 DEBUG (SyncWorker_3) [custom_components.aula.client] Fetching calendars...
2022-11-14 19:20:01.884 DEBUG (SyncWorker_3) [custom_components.aula.client] Calendar post-data: {"instProfileIds":[420000],"resourceIds":[],"start":"2022-11-14 00:00:00.0000+0000","end":"2022-11-28 00:00:00.0000+0000"}
2022-11-14 19:20:02.491 DEBUG (SyncWorker_3) [custom_components.aula.client] guardian :thom????
2022-11-14 19:20:02.706 DEBUG (SyncWorker_3) [custom_components.aula.client] widgetId [{'placement': 'RightOfOverview', 'widget': {'widgetId': '0034', 'isSecure': True, 'canAccessOnMobile': False, 'canBePlacedInsideModule': True, 'canBePlacedOnGroup': False, 'canBePlacedOnFullPage': False, 'supportsTestMode': False, 'widgetSupplier': 'KMD A/S', 'isPilot': False, 'widgetVersion': '0001', 'iconEmployee': '', 'iconHover': '', 'id': 25, 'name': 'KMD Educa Elev - Mit Barns Fravær', 'icon': '', 'description': 'KMD Educa Elev - Mit Barns Fravær - SSO', 'url': 'https://kmdelevfravaer.dk/Fravaer/Fravaer.aspx', 'type': 'sso'}, 'id': 7604, 'order': 1, 'institutionRole': 'guardian', 'scope': 'Institution', 'centralDisplayMode': 'ShownAsDefault', 'municipalityDisplayMode': 'ShownAsDefault', 'institutionDisplayMode': 'ShownAsDefault', 'aggregatedDisplayMode': 'Shown', 'restrictedGroups': []}, {'placement': 'RightOfOverview', 'widget': {'widgetId': '0003', 'isSecure': True, 'canAccessOnMobile': True, 'canBePlacedInsideModule': False, 'canBePlacedOnGroup': False, 'canBePlacedOnFullPage': False, 'supportsTestMode': True, 'widgetSupplier': 'Meebook', 'isPilot': False, 'widgetVersion': '0001', 'iconEmployee': '', 'iconHover': '', 'id': 3, 'name': 'Ugens forløb - Meebook Forældre', 'icon': '', 'description': 'Parent widiget that shows the books the students/children will work with in the current week', 'url': '/widgets/W0003V0001', 'type': 'secure'}, 'id': 62122, 'order': 2, 'institutionRole': 'guardian', 'scope': 'Institution', 'centralDisplayMode': 'ShownAsDefault', 'municipalityDisplayMode': 'ShownAsDefault', 'institutionDisplayMode': 'ShownAsDefault', 'aggregatedDisplayMode': 'Shown', 'restrictedGroups': []}, {'placement': 'RightOfOverview', 'widget': {'widgetId': '0002', 'isSecure': True, 'canAccessOnMobile': True, 'canBePlacedInsideModule': False, 'canBePlacedOnGroup': False, 'canBePlacedOnFullPage': False, 'supportsTestMode': True, 'widgetSupplier': 'Meebook', 'isPilot': False, 'widgetVersion': '0001', 'iconEmployee': '', 'iconHover': '', 'id': 2, 'name': 'Elevplaner med nyt - Meebook Forældre', 'icon': '', 'description': 'Parent widiget that shows student plans with unseen events', 'url': '/widgets/W0002V0001', 'type': 'secure'}, 'id': 62121, 'order': 3, 'institutionRole': 'guardian', 'scope': 'Institution', 'centralDisplayMode': 'ShownAsDefault', 'municipalityDisplayMode': 'ShownAsDefault', 'institutionDisplayMode': 'ShownAsDefault', 'aggregatedDisplayMode': 'Shown', 'restrictedGroups': []}, {'placement': 'RightOfOverview', 'widget': {'widgetId': '0069', 'isSecure': True, 'canAccessOnMobile': True, 'canBePlacedInsideModule': True, 'canBePlacedOnGroup': True, 'canBePlacedOnFullPage': True, 'supportsTestMode': True, 'widgetSupplier': 'KMD A/S', 'isPilot': False, 'widgetVersion': '0001', 'iconEmployee': '', 'iconHover': '', 'id': 64, 'name': 'KMD Educa Elev - Kontaktoplysninger', 'icon': '', 'description': 'KMD Educa Elev - Kontaktoplysninger', 'url': '/widgets/W0069V0001', 'type': 'secure'}, 'id': 62123, 'order': 4, 'institutionRole': 'guardian', 'scope': 'Institution', 'centralDisplayMode': 'ShownAsDefault', 'municipalityDisplayMode': 'ShownAsDefault', 'institutionDisplayMode': 'ShownAsDefault', 'aggregatedDisplayMode': 'Shown', 'restrictedGroups': []}, {'placement': 'RightOfOverview', 'widget': {'widgetId': '0013', 'isSecure': True, 'canAccessOnMobile': True, 'canBePlacedInsideModule': True, 'canBePlacedOnGroup': False, 'canBePlacedOnFullPage': False, 'supportsTestMode': True, 'widgetSupplier': 'IBK', 'isPilot': False, 'widgetVersion': '0002', 'iconEmployee': '', 'iconHover': '', 'id': 12, 'name': 'Nyttige links', 'icon': '', 'description': 'Simpel liste med maximum 10 links pr. brugerkategori. Kontakt Kenneth Petersen (kp@iks.dk), Ikast-Brande Kommune for yderligere informationer.', 'url': '/widgets/W0013V0002', 'type': 'secure'}, 'id': 93324, 'order': 5, 'institutionRole': 'guardian', 'scope': 'Institution', 'centralDisplayMode': 'ShownAsDefault', 'municipalityDisplayMode': 'ShownAsDefault', 'institutionDisplayMode': 'ShownAsDefault', 'aggregatedDisplayMode': 'Shown', 'restrictedGroups': []}, {'placement': 'BelowCalendar', 'widget': {'widgetId': '0004', 'isSecure': True, 'canAccessOnMobile': True, 'canBePlacedInsideModule': True, 'canBePlacedOnGroup': True, 'canBePlacedOnFullPage': True, 'supportsTestMode': True, 'widgetSupplier': 'Meebook', 'isPilot': False, 'widgetVersion': '0001', 'iconEmployee': '', 'iconHover': '', 'id': 4, 'name': 'Ugeplan - Meebook Forældre', 'icon': '', 'description': 'Parent widiget that shows a week plan for each student/child', 'url': '/widgets/W0004V0001', 'type': 'secure'}, 'id': 28825, 'order': 6, 'institutionRole': 'guardian', 'scope': 'Institution', 'centralDisplayMode': 'ShownAsDefault', 'municipalityDisplayMode': 'ShownAsDefault', 'institutionDisplayMode': 'ShownAsDefault', 'aggregatedDisplayMode': 'Shown', 'restrictedGroups': []}]
2022-11-14 19:20:02.706 DEBUG (SyncWorker_3) [custom_components.aula.client] Widget 0034 KMD Educa Elev - Mit Barns Fravær
2022-11-14 19:20:02.706 DEBUG (SyncWorker_3) [custom_components.aula.client] Widget 0003 Ugens forløb - Meebook Forældre
2022-11-14 19:20:02.706 DEBUG (SyncWorker_3) [custom_components.aula.client] Widget 0002 Elevplaner med nyt - Meebook Forældre
2022-11-14 19:20:02.706 DEBUG (SyncWorker_3) [custom_components.aula.client] Widget 0069 KMD Educa Elev - Kontaktoplysninger
2022-11-14 19:20:02.706 DEBUG (SyncWorker_3) [custom_components.aula.client] Widget 0013 Nyttige links
2022-11-14 19:20:02.706 DEBUG (SyncWorker_3) [custom_components.aula.client] Widget 0004 Ugeplan - Meebook Forældre
2022-11-14 19:20:02.706 DEBUG (SyncWorker_3) [custom_components.aula.client] In the Meebook flow...
2022-11-14 19:20:02.787 DEBUG (SyncWorker_3) [custom_components.aula.client] Token Bearer eyJ0....eTYA
2022-11-14 19:20:03.095 DEBUG (SyncWorker_3) [custom_components.aula.client] Meebook ugeplaner status_code 400
2022-11-14 19:20:03.096 DEBUG (SyncWorker_3) [custom_components.aula.client] Meebook ugeplaner response {"supportId":"88949909","exceptionMessage":"Support-ID 88949909 - Du skal v\u00e6lge en eller flere elever i Aula top-menu, for at se data"}
2022-11-14 19:20:03.096 WARNING (SyncWorker_3) [custom_components.aula.client] Could not parse ugeplaner (Meebook)
2022-11-14 19:20:03.105 DEBUG (SyncWorker_3) [custom_components.aula.client] In the Meebook flow...
2022-11-14 19:20:03.184 DEBUG (SyncWorker_3) [custom_components.aula.client] Token Bearer eyJ0....2YTw
2022-11-14 19:20:03.260 DEBUG (SyncWorker_3) [custom_components.aula.client] Meebook ugeplaner status_code 400
2022-11-14 19:20:03.260 DEBUG (SyncWorker_3) [custom_components.aula.client] Meebook ugeplaner response {"supportId":"88949910","exceptionMessage":"Support-ID 88949910 - Du skal v\u00e6lge en eller flere elever i Aula top-menu, for at se data"}
2022-11-14 19:20:03.261 WARNING (SyncWorker_3) [custom_components.aula.client] Could not parse ugeplaner (Meebook)
2022-11-14 19:20:03.270 DEBUG (MainThread) [custom_components.aula.sensor] Finished fetching sensor data in 4.362 seconds (success: True)
2022-11-14 19:20:03.272 DEBUG (SyncWorker_2) [custom_components.aula.client] self._schoolschedule True
2022-11-14 19:20:03.273 DEBUG (SyncWorker_2) [custom_components.aula.client] self._ugeplan True
2022-11-14 19:20:03.394 DEBUG (SyncWorker_2) [custom_components.aula.client] is_logged_in? True
2022-11-14 19:20:03.476 DEBUG (SyncWorker_2) [custom_components.aula.client] Fetching calendars...
2022-11-14 19:20:03.477 DEBUG (SyncWorker_2) [custom_components.aula.client] Calendar post-data: {"instProfileIds":[420000],"resourceIds":[],"start":"2022-11-14 00:00:00.0000+0000","end":"2022-11-28 00:00:00.0000+0000"}
2022-11-14 19:20:03.973 DEBUG (SyncWorker_2) [custom_components.aula.client] guardian :thom????
2022-11-14 19:20:04.209 DEBUG (SyncWorker_2) [custom_components.aula.client] widgetId [{'placement': 'RightOfOverview', 'widget': {'widgetId': '0034', 'isSecure': True, 'canAccessOnMobile': False, 'canBePlacedInsideModule': True, 'canBePlacedOnGroup': False, 'canBePlacedOnFullPage': False, 'supportsTestMode': False, 'widgetSupplier': 'KMD A/S', 'isPilot': False, 'widgetVersion': '0001', 'iconEmployee': '', 'iconHover': '', 'id': 25, 'name': 'KMD Educa Elev - Mit Barns Fravær', 'icon': '', 'description': 'KMD Educa Elev - Mit Barns Fravær - SSO', 'url': 'https://kmdelevfravaer.dk/Fravaer/Fravaer.aspx', 'type': 'sso'}, 'id': 7604, 'order': 1, 'institutionRole': 'guardian', 'scope': 'Institution', 'centralDisplayMode': 'ShownAsDefault', 'municipalityDisplayMode': 'ShownAsDefault', 'institutionDisplayMode': 'ShownAsDefault', 'aggregatedDisplayMode': 'Shown', 'restrictedGroups': []}, {'placement': 'RightOfOverview', 'widget': {'widgetId': '0003', 'isSecure': True, 'canAccessOnMobile': True, 'canBePlacedInsideModule': False, 'canBePlacedOnGroup': False, 'canBePlacedOnFullPage': False, 'supportsTestMode': True, 'widgetSupplier': 'Meebook', 'isPilot': False, 'widgetVersion': '0001', 'iconEmployee': '', 'iconHover': '', 'id': 3, 'name': 'Ugens forløb - Meebook Forældre', 'icon': '', 'description': 'Parent widiget that shows the books the students/children will work with in the current week', 'url': '/widgets/W0003V0001', 'type': 'secure'}, 'id': 62122, 'order': 2, 'institutionRole': 'guardian', 'scope': 'Institution', 'centralDisplayMode': 'ShownAsDefault', 'municipalityDisplayMode': 'ShownAsDefault', 'institutionDisplayMode': 'ShownAsDefault', 'aggregatedDisplayMode': 'Shown', 'restrictedGroups': []}, {'placement': 'RightOfOverview', 'widget': {'widgetId': '0002', 'isSecure': True, 'canAccessOnMobile': True, 'canBePlacedInsideModule': False, 'canBePlacedOnGroup': False, 'canBePlacedOnFullPage': False, 'supportsTestMode': True, 'widgetSupplier': 'Meebook', 'isPilot': False, 'widgetVersion': '0001', 'iconEmployee': '', 'iconHover': '', 'id': 2, 'name': 'Elevplaner med nyt - Meebook Forældre', 'icon': '', 'description': 'Parent widiget that shows student plans with unseen events', 'url': '/widgets/W0002V0001', 'type': 'secure'}, 'id': 62121, 'order': 3, 'institutionRole': 'guardian', 'scope': 'Institution', 'centralDisplayMode': 'ShownAsDefault', 'municipalityDisplayMode': 'ShownAsDefault', 'institutionDisplayMode': 'ShownAsDefault', 'aggregatedDisplayMode': 'Shown', 'restrictedGroups': []}, {'placement': 'RightOfOverview', 'widget': {'widgetId': '0069', 'isSecure': True, 'canAccessOnMobile': True, 'canBePlacedInsideModule': True, 'canBePlacedOnGroup': True, 'canBePlacedOnFullPage': True, 'supportsTestMode': True, 'widgetSupplier': 'KMD A/S', 'isPilot': False, 'widgetVersion': '0001', 'iconEmployee': '', 'iconHover': '', 'id': 64, 'name': 'KMD Educa Elev - Kontaktoplysninger', 'icon': '', 'description': 'KMD Educa Elev - Kontaktoplysninger', 'url': '/widgets/W0069V0001', 'type': 'secure'}, 'id': 62123, 'order': 4, 'institutionRole': 'guardian', 'scope': 'Institution', 'centralDisplayMode': 'ShownAsDefault', 'municipalityDisplayMode': 'ShownAsDefault', 'institutionDisplayMode': 'ShownAsDefault', 'aggregatedDisplayMode': 'Shown', 'restrictedGroups': []}, {'placement': 'RightOfOverview', 'widget': {'widgetId': '0013', 'isSecure': True, 'canAccessOnMobile': True, 'canBePlacedInsideModule': True, 'canBePlacedOnGroup': False, 'canBePlacedOnFullPage': False, 'supportsTestMode': True, 'widgetSupplier': 'IBK', 'isPilot': False, 'widgetVersion': '0002', 'iconEmployee': '', 'iconHover': '', 'id': 12, 'name': 'Nyttige links', 'icon': '', 'description': 'Simpel liste med maximum 10 links pr. brugerkategori. Kontakt Kenneth Petersen (kp@iks.dk), Ikast-Brande Kommune for yderligere informationer.', 'url': '/widgets/W0013V0002', 'type': 'secure'}, 'id': 93324, 'order': 5, 'institutionRole': 'guardian', 'scope': 'Institution', 'centralDisplayMode': 'ShownAsDefault', 'municipalityDisplayMode': 'ShownAsDefault', 'institutionDisplayMode': 'ShownAsDefault', 'aggregatedDisplayMode': 'Shown', 'restrictedGroups': []}, {'placement': 'BelowCalendar', 'widget': {'widgetId': '0004', 'isSecure': True, 'canAccessOnMobile': True, 'canBePlacedInsideModule': True, 'canBePlacedOnGroup': True, 'canBePlacedOnFullPage': True, 'supportsTestMode': True, 'widgetSupplier': 'Meebook', 'isPilot': False, 'widgetVersion': '0001', 'iconEmployee': '', 'iconHover': '', 'id': 4, 'name': 'Ugeplan - Meebook Forældre', 'icon': '', 'description': 'Parent widiget that shows a week plan for each student/child', 'url': '/widgets/W0004V0001', 'type': 'secure'}, 'id': 28825, 'order': 6, 'institutionRole': 'guardian', 'scope': 'Institution', 'centralDisplayMode': 'ShownAsDefault', 'municipalityDisplayMode': 'ShownAsDefault', 'institutionDisplayMode': 'ShownAsDefault', 'aggregatedDisplayMode': 'Shown', 'restrictedGroups': []}]
2022-11-14 19:20:04.209 DEBUG (SyncWorker_2) [custom_components.aula.client] Widget 0034 KMD Educa Elev - Mit Barns Fravær
2022-11-14 19:20:04.210 DEBUG (SyncWorker_2) [custom_components.aula.client] Widget 0003 Ugens forløb - Meebook Forældre
2022-11-14 19:20:04.210 DEBUG (SyncWorker_2) [custom_components.aula.client] Widget 0002 Elevplaner med nyt - Meebook Forældre
2022-11-14 19:20:04.210 DEBUG (SyncWorker_2) [custom_components.aula.client] Widget 0069 KMD Educa Elev - Kontaktoplysninger
2022-11-14 19:20:04.210 DEBUG (SyncWorker_2) [custom_components.aula.client] Widget 0013 Nyttige links
2022-11-14 19:20:04.210 DEBUG (SyncWorker_2) [custom_components.aula.client] Widget 0004 Ugeplan - Meebook Forældre
2022-11-14 19:20:04.211 DEBUG (SyncWorker_2) [custom_components.aula.client] In the Meebook flow...
2022-11-14 19:20:04.316 DEBUG (SyncWorker_2) [custom_components.aula.client] Token Bearer eyJ0....JsDA
2022-11-14 19:20:04.410 DEBUG (SyncWorker_2) [custom_components.aula.client] Meebook ugeplaner status_code 400
2022-11-14 19:20:04.410 DEBUG (SyncWorker_2) [custom_components.aula.client] Meebook ugeplaner response {"supportId":"88949911","exceptionMessage":"Support-ID 88949911 - Du skal v\u00e6lge en eller flere elever i Aula top-menu, for at se data"}
2022-11-14 19:20:04.411 WARNING (SyncWorker_2) [custom_components.aula.client] Could not parse ugeplaner (Meebook)
2022-11-14 19:20:04.413 DEBUG (SyncWorker_2) [custom_components.aula.client] In the Meebook flow...
2022-11-14 19:20:04.499 DEBUG (SyncWorker_2) [custom_components.aula.client] Token Bearer eyJ0....JsDA
2022-11-14 19:20:04.565 DEBUG (SyncWorker_2) [custom_components.aula.client] Meebook ugeplaner status_code 400
2022-11-14 19:20:04.565 DEBUG (SyncWorker_2) [custom_components.aula.client] Meebook ugeplaner response {"supportId":"88949912","exceptionMessage":"Support-ID 88949912 - Du skal v\u00e6lge en eller flere elever i Aula top-menu, for at se data"}
2022-11-14 19:20:04.565 WARNING (SyncWorker_2) [custom_components.aula.client] Could not parse ugeplaner (Meebook)
scaarup commented 1 year ago

nej det er helt perfekt, nu er der hul igennem. Vi har et token og får et svar fra Meebook :) Jeg fjernede det her "childFilter" fra mit kald til meebook, men som så åbenbart skal være der

Nu har jeg tilføjet det igen, med samme logik som på Min Uddannelse. Giv det lige et skud mere - client.py er opdateret ;)

kai74 commented 1 year ago

Måske trænger jeg nye briller. Nu kan kun se fejl i opsætning af aula sensor, andet kan jeg ikke se. Lidt underlig.

scaarup commented 1 year ago

Måske trænger jeg nye briller. Nu kan kun se fejl i opsætning af aula sensor, andet kan jeg ikke se. Lidt underlig.

Der er hul igennem, så det er fremskridt :). Hvis du har prøvet med den seneste version af client.py, så må du gerne paste din log.

thomaspalmdk commented 1 year ago

Min installation fejler ret hurtigt...

                _       
     /\        | |      
    /  \  _   _| | __ _ 
   / /\ \| | | | |/ _` |
  / ____ \ |_| | | (_| |
 /_/    \_\__,_|_|\__,_|                                               
Aula integration, version: 0.1.155
This is a custom integration
If you have any issues with this you need to open an issue here:
https://github.com/scaarup/aula/issues
-------------------------------------------------------------------

2022-11-14 20:30:16.518 INFO (MainThread) [homeassistant.components.sensor] Setting up sensor.aula
2022-11-14 20:30:16.539 INFO (SyncWorker_3) [homeassistant.loader] Loaded calendar from homeassistant.components.calendar
2022-11-14 20:30:16.541 ERROR (MainThread) [homeassistant.components.sensor] Error while setting up aula platform for sensor
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 281, in _async_setup_platform
    await asyncio.shield(task)
  File "/config/custom_components/aula/sensor.py", line 33, in async_setup_entry
    from .client import Client
  File "/config/custom_components/aula/client.py", line 141
    self._bearertoken = self._session.get(API + "?method=aulaToken.getAulaToken&widgetId=0004, verify=True).json()["data"]
                                                                                                                        ^
SyntaxError: unterminated string literal (detected at line 141)
2022-11-14 20:30:16.563 INFO (MainThread) [homeassistant.setup] Setting up calendar
2022-11-14 20:30:16.565 INFO (MainThread) [homeassistant.setup] Setup of domain calendar took 0.0 seconds
2022-11-14 20:30:16.580 INFO (MainThread) [homeassistant.components.calendar] Setting up calendar.aula
2022-11-14 20:30:16.590 ERROR (MainThread) [homeassistant.components.calendar] Error while setting up aula platform for calendar
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 281, in _async_setup_platform
    await asyncio.shield(task)
  File "/config/custom_components/aula/calendar.py", line 24, in async_setup_entry
    from .client import Client
  File "/config/custom_components/aula/client.py", line 141
    self._bearertoken = self._session.get(API + "?method=aulaToken.getAulaToken&widgetId=0004, verify=True).json()["data"]
                                                                                                                        ^
SyntaxError: unterminated string literal (detected at line 141)
scaarup commented 1 year ago

Ah for silvan, det er jo mig, der ikke har fået lukket et sæt double quotes. Sorry, men det skulle være rettet nu.

thomaspalmdk commented 1 year ago

Det kom der ret meget debugging ud af :-)

                _       
     /\        | |      
    /  \  _   _| | __ _ 
   / /\ \| | | | |/ _` |
  / ____ \ |_| | | (_| |
 /_/    \_\__,_|_|\__,_|                                               
Aula integration, version: 0.1.155
This is a custom integration
If you have any issues with this you need to open an issue here:
https://github.com/scaarup/aula/issues
-------------------------------------------------------------------

2022-11-14 21:02:15.238 INFO (MainThread) [homeassistant.components.sensor] Setting up sensor.aula
2022-11-14 21:02:15.466 DEBUG (SyncWorker_6) [custom_components.aula.client] self._schoolschedule True
2022-11-14 21:02:15.466 DEBUG (SyncWorker_6) [custom_components.aula.client] self._ugeplan True
2022-11-14 21:02:15.467 DEBUG (SyncWorker_6) [custom_components.aula.client] is_logged_in? False
2022-11-14 21:02:15.467 DEBUG (SyncWorker_6) [custom_components.aula.client] Logging in
2022-11-14 21:02:15.483 INFO (SyncWorker_5) [homeassistant.loader] Loaded calendar from homeassistant.components.calendar
2022-11-14 21:02:15.561 INFO (MainThread) [homeassistant.setup] Setting up calendar
2022-11-14 21:02:15.563 INFO (MainThread) [homeassistant.setup] Setup of domain calendar took 0.0 seconds
2022-11-14 21:02:15.578 INFO (MainThread) [homeassistant.components.calendar] Setting up calendar.aula
2022-11-14 21:02:15.587 DEBUG (MainThread) [custom_components.aula.calendar] 0 no client._children ... yet
2022-11-14 21:02:15.590 WARNING (MainThread) [homeassistant.util.async_] Detected blocking call to sleep inside the event loop. This is causing stability issues. Please report issue to the custom integration author for aula doing blocking calls at custom_components/aula/calendar.py, line 38: time.sleep(0.400)
2022-11-14 21:02:15.992 DEBUG (MainThread) [custom_components.aula.calendar] 1 no client._children ... yet
2022-11-14 21:02:15.993 WARNING (MainThread) [homeassistant.util.async_] Detected blocking call to sleep inside the event loop. This is causing stability issues. Please report issue to the custom integration author for aula doing blocking calls at custom_components/aula/calendar.py, line 38: time.sleep(0.400)
2022-11-14 21:02:16.395 DEBUG (MainThread) [custom_components.aula.calendar] 2 no client._children ... yet
2022-11-14 21:02:16.396 WARNING (MainThread) [homeassistant.util.async_] Detected blocking call to sleep inside the event loop. This is causing stability issues. Please report issue to the custom integration author for aula doing blocking calls at custom_components/aula/calendar.py, line 38: time.sleep(0.400)
2022-11-14 21:02:16.798 DEBUG (MainThread) [custom_components.aula.calendar] 3 no client._children ... yet
2022-11-14 21:02:16.800 WARNING (MainThread) [homeassistant.util.async_] Detected blocking call to sleep inside the event loop. This is causing stability issues. Please report issue to the custom integration author for aula doing blocking calls at custom_components/aula/calendar.py, line 38: time.sleep(0.400)
2022-11-14 21:02:17.202 DEBUG (MainThread) [custom_components.aula.calendar] 4 no client._children ... yet
2022-11-14 21:02:17.203 WARNING (MainThread) [homeassistant.util.async_] Detected blocking call to sleep inside the event loop. This is causing stability issues. Please report issue to the custom integration author for aula doing blocking calls at custom_components/aula/calendar.py, line 38: time.sleep(0.400)
2022-11-14 21:02:17.605 DEBUG (MainThread) [custom_components.aula.calendar] 5 no client._children ... yet
2022-11-14 21:02:17.607 WARNING (MainThread) [homeassistant.util.async_] Detected blocking call to sleep inside the event loop. This is causing stability issues. Please report issue to the custom integration author for aula doing blocking calls at custom_components/aula/calendar.py, line 38: time.sleep(0.400)
2022-11-14 21:02:18.009 DEBUG (MainThread) [custom_components.aula.calendar] 6 no client._children ... yet
2022-11-14 21:02:18.010 WARNING (MainThread) [homeassistant.util.async_] Detected blocking call to sleep inside the event loop. This is causing stability issues. Please report issue to the custom integration author for aula doing blocking calls at custom_components/aula/calendar.py, line 38: time.sleep(0.400)
2022-11-14 21:02:18.136 DEBUG (SyncWorker_6) [custom_components.aula.client] LOGIN: True
2022-11-14 21:02:18.212 DEBUG (SyncWorker_6) [custom_components.aula.client] Fetching calendars...
2022-11-14 21:02:18.212 DEBUG (SyncWorker_6) [custom_components.aula.client] Calendar post-data: {"instProfileIds":[420000],"resourceIds":[],"start":"2022-11-14 00:00:00.0000+0000","end":"2022-11-28 00:00:00.0000+0000"}
2022-11-14 21:02:18.411 DEBUG (MainThread) [custom_components.aula.calendar] Got client._children, breaking
2022-11-14 21:02:18.693 DEBUG (SyncWorker_6) [custom_components.aula.client] guardian :thom????
2022-11-14 21:02:18.920 DEBUG (SyncWorker_6) [custom_components.aula.client] widgetId [{'placement': 'RightOfOverview', 'widget': {'widgetId': '0034', 'isSecure': True, 'canAccessOnMobile': False, 'canBePlacedInsideModule': True, 'canBePlacedOnGroup': False, 'canBePlacedOnFullPage': False, 'supportsTestMode': False, 'widgetSupplier': 'KMD A/S', 'isPilot': False, 'widgetVersion': '0001', 'iconEmployee': '', 'iconHover': '', 'id': 25, 'name': 'KMD Educa Elev - Mit Barns Fravær', 'icon': '', 'description': 'KMD Educa Elev - Mit Barns Fravær - SSO', 'url': 'https://kmdelevfravaer.dk/Fravaer/Fravaer.aspx', 'type': 'sso'}, 'id': 7604, 'order': 1, 'institutionRole': 'guardian', 'scope': 'Institution', 'centralDisplayMode': 'ShownAsDefault', 'municipalityDisplayMode': 'ShownAsDefault', 'institutionDisplayMode': 'ShownAsDefault', 'aggregatedDisplayMode': 'Shown', 'restrictedGroups': []}, {'placement': 'RightOfOverview', 'widget': {'widgetId': '0003', 'isSecure': True, 'canAccessOnMobile': True, 'canBePlacedInsideModule': False, 'canBePlacedOnGroup': False, 'canBePlacedOnFullPage': False, 'supportsTestMode': True, 'widgetSupplier': 'Meebook', 'isPilot': False, 'widgetVersion': '0001', 'iconEmployee': '', 'iconHover': '', 'id': 3, 'name': 'Ugens forløb - Meebook Forældre', 'icon': '', 'description': 'Parent widiget that shows the books the students/children will work with in the current week', 'url': '/widgets/W0003V0001', 'type': 'secure'}, 'id': 62122, 'order': 2, 'institutionRole': 'guardian', 'scope': 'Institution', 'centralDisplayMode': 'ShownAsDefault', 'municipalityDisplayMode': 'ShownAsDefault', 'institutionDisplayMode': 'ShownAsDefault', 'aggregatedDisplayMode': 'Shown', 'restrictedGroups': []}, {'placement': 'RightOfOverview', 'widget': {'widgetId': '0002', 'isSecure': True, 'canAccessOnMobile': True, 'canBePlacedInsideModule': False, 'canBePlacedOnGroup': False, 'canBePlacedOnFullPage': False, 'supportsTestMode': True, 'widgetSupplier': 'Meebook', 'isPilot': False, 'widgetVersion': '0001', 'iconEmployee': '', 'iconHover': '', 'id': 2, 'name': 'Elevplaner med nyt - Meebook Forældre', 'icon': '', 'description': 'Parent widiget that shows student plans with unseen events', 'url': '/widgets/W0002V0001', 'type': 'secure'}, 'id': 62121, 'order': 3, 'institutionRole': 'guardian', 'scope': 'Institution', 'centralDisplayMode': 'ShownAsDefault', 'municipalityDisplayMode': 'ShownAsDefault', 'institutionDisplayMode': 'ShownAsDefault', 'aggregatedDisplayMode': 'Shown', 'restrictedGroups': []}, {'placement': 'RightOfOverview', 'widget': {'widgetId': '0069', 'isSecure': True, 'canAccessOnMobile': True, 'canBePlacedInsideModule': True, 'canBePlacedOnGroup': True, 'canBePlacedOnFullPage': True, 'supportsTestMode': True, 'widgetSupplier': 'KMD A/S', 'isPilot': False, 'widgetVersion': '0001', 'iconEmployee': '', 'iconHover': '', 'id': 64, 'name': 'KMD Educa Elev - Kontaktoplysninger', 'icon': '', 'description': 'KMD Educa Elev - Kontaktoplysninger', 'url': '/widgets/W0069V0001', 'type': 'secure'}, 'id': 62123, 'order': 4, 'institutionRole': 'guardian', 'scope': 'Institution', 'centralDisplayMode': 'ShownAsDefault', 'municipalityDisplayMode': 'ShownAsDefault', 'institutionDisplayMode': 'ShownAsDefault', 'aggregatedDisplayMode': 'Shown', 'restrictedGroups': []}, {'placement': 'RightOfOverview', 'widget': {'widgetId': '0013', 'isSecure': True, 'canAccessOnMobile': True, 'canBePlacedInsideModule': True, 'canBePlacedOnGroup': False, 'canBePlacedOnFullPage': False, 'supportsTestMode': True, 'widgetSupplier': 'IBK', 'isPilot': False, 'widgetVersion': '0002', 'iconEmployee': '', 'iconHover': '', 'id': 12, 'name': 'Nyttige links', 'icon': '', 'description': 'Simpel liste med maximum 10 links pr. brugerkategori. Kontakt Kenneth Petersen (kp@iks.dk), Ikast-Brande Kommune for yderligere informationer.', 'url': '/widgets/W0013V0002', 'type': 'secure'}, 'id': 93324, 'order': 5, 'institutionRole': 'guardian', 'scope': 'Institution', 'centralDisplayMode': 'ShownAsDefault', 'municipalityDisplayMode': 'ShownAsDefault', 'institutionDisplayMode': 'ShownAsDefault', 'aggregatedDisplayMode': 'Shown', 'restrictedGroups': []}, {'placement': 'BelowCalendar', 'widget': {'widgetId': '0004', 'isSecure': True, 'canAccessOnMobile': True, 'canBePlacedInsideModule': True, 'canBePlacedOnGroup': True, 'canBePlacedOnFullPage': True, 'supportsTestMode': True, 'widgetSupplier': 'Meebook', 'isPilot': False, 'widgetVersion': '0001', 'iconEmployee': '', 'iconHover': '', 'id': 4, 'name': 'Ugeplan - Meebook Forældre', 'icon': '', 'description': 'Parent widiget that shows a week plan for each student/child', 'url': '/widgets/W0004V0001', 'type': 'secure'}, 'id': 28825, 'order': 6, 'institutionRole': 'guardian', 'scope': 'Institution', 'centralDisplayMode': 'ShownAsDefault', 'municipalityDisplayMode': 'ShownAsDefault', 'institutionDisplayMode': 'ShownAsDefault', 'aggregatedDisplayMode': 'Shown', 'restrictedGroups': []}]
2022-11-14 21:02:18.920 DEBUG (SyncWorker_6) [custom_components.aula.client] Widget 0034 KMD Educa Elev - Mit Barns Fravær
2022-11-14 21:02:18.920 DEBUG (SyncWorker_6) [custom_components.aula.client] Widget 0003 Ugens forløb - Meebook Forældre
2022-11-14 21:02:18.920 DEBUG (SyncWorker_6) [custom_components.aula.client] Widget 0002 Elevplaner med nyt - Meebook Forældre
2022-11-14 21:02:18.920 DEBUG (SyncWorker_6) [custom_components.aula.client] Widget 0069 KMD Educa Elev - Kontaktoplysninger
2022-11-14 21:02:18.920 DEBUG (SyncWorker_6) [custom_components.aula.client] Widget 0013 Nyttige links
2022-11-14 21:02:18.920 DEBUG (SyncWorker_6) [custom_components.aula.client] Widget 0004 Ugeplan - Meebook Forældre
2022-11-14 21:02:18.920 DEBUG (SyncWorker_6) [custom_components.aula.client] Setting meebook to 1
2022-11-14 21:02:18.920 DEBUG (SyncWorker_6) [custom_components.aula.client] In the Meebook flow...
2022-11-14 21:02:19.022 DEBUG (SyncWorker_6) [custom_components.aula.client] Token Bearer eyJ0.....Bbxg
2022-11-14 21:02:19.300 DEBUG (SyncWorker_6) [custom_components.aula.client] Meebook ugeplaner status_code 500
2022-11-14 21:02:19.300 DEBUG (SyncWorker_6) [custom_components.aula.client] Meebook ugeplaner response <!DOCTYPE html><html lang="da" class="html-layout-portal">
<head>
    <link rel="preload" href="/fonts/Kumbh_Sans/KumbhSans.ttf" as="font" type="font/ttf" crossorigin>
    <link rel="shortcut icon" href="/favicon.ico" />
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" >
<meta http-equiv="X-UA-Compatible" content="IE=edge" ><title></title><link href="/css/alpha-1667480922193.css" media="all" rel="stylesheet" type="text/css" >
<link href="/css/meebookorg/meebookorg.branding-1642000128668.css" media="screen" rel="stylesheet" type="text/css" ></head>
<body class="layout-portal">
<div class="portal-frontpage">
    <div class="portal-frontpage__content-wrapper-inner">
        <div class="portal-frontpage__top-content">
            <a href="javascript:;" class="meebook-logo" title="Meebook">&nbsp;</a>
        </div>

        <div class="portal-frontpage__main-content">

<!-- BEGIN SCRIPT error/error.phtml -->
<h1>Hov, der opstod en fejl</h1>
<p>Det kan der være forskellige grunde til.</p>
<p><strong>Billeder</strong><br />Hvis du prøvet at lægge et billede eller fil ind der mangler endelserne .jpg, .png eller .gif</p>
<p><strong>Pdf</strong><br />Du har lagt en pdf op uden endelsen .pdf</p>
<p><strong>Aktivering</strong><br />Du kan kun bruge dit aktiveringslink én gang. Log ind med din mail og password eller dit uni-login</p>
<!-- END error/error.phtml -->
        </div>
    </div>
</div>
<div class="footer-content">
        </div><div id="mbScreenLoader" class="request-loader-screen is-hidden">
    <div class="request-loader-screen__overlay">&nbsp;</div>
    <div class="request-loader__icon--circle-secondary">
        <p class="request-loader-screen__text">&nbsp;</p>
    </div>
</div>
<script type="text/javascript">
    </script>
<script type="text/javascript">
var BASEURL = '';
var DOMAINURL = 'https://app.meebook.com';
var PAGEURL = '/aulaapi/relatedweekplan/all';
var MODULE_RESTURL = '/rest/default/';
var OVERLAY_BUTTONS = ['&laquo;','&raquo;','Luk'];
</script>
<script type="text/javascript" src="https://apis.google.com/js/client:platform.js"></script>
<script type="text/javascript" src="/js/dist/vueApp.bundlee1aaf227acac7963c149.js"></script>
<script type="text/javascript" src="/js/alpha-mootools-1667480922193.js"></script>
<script type="text/javascript" src="/js/alpha-basic-1667480922193.js"></script><script type="text/javascript">
    </script>
</body>
</html>

2022-11-14 21:02:19.300 WARNING (SyncWorker_6) [custom_components.aula.client] Could not parse ugeplaner (Meebook)
2022-11-14 21:02:19.307 DEBUG (SyncWorker_6) [custom_components.aula.client] In the Meebook flow...
2022-11-14 21:02:19.385 DEBUG (SyncWorker_6) [custom_components.aula.client] Token Bearer eyJ0.....G8rg
2022-11-14 21:02:19.525 DEBUG (SyncWorker_6) [custom_components.aula.client] Meebook ugeplaner status_code 500
2022-11-14 21:02:19.525 DEBUG (SyncWorker_6) [custom_components.aula.client] Meebook ugeplaner response <!DOCTYPE html><html lang="da" class="html-layout-portal">
<head>
    <link rel="preload" href="/fonts/Kumbh_Sans/KumbhSans.ttf" as="font" type="font/ttf" crossorigin>
    <link rel="shortcut icon" href="/favicon.ico" />
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" >
<meta http-equiv="X-UA-Compatible" content="IE=edge" ><title></title><link href="/css/alpha-1667480922193.css" media="all" rel="stylesheet" type="text/css" >
<link href="/css/meebookorg/meebookorg.branding-1642000128668.css" media="screen" rel="stylesheet" type="text/css" ></head>
<body class="layout-portal">
<div class="portal-frontpage">
    <div class="portal-frontpage__content-wrapper-inner">
        <div class="portal-frontpage__top-content">
            <a href="javascript:;" class="meebook-logo" title="Meebook">&nbsp;</a>
        </div>

        <div class="portal-frontpage__main-content">

<!-- BEGIN SCRIPT error/error.phtml -->
<h1>Hov, der opstod en fejl</h1>
<p>Det kan der være forskellige grunde til.</p>
<p><strong>Billeder</strong><br />Hvis du prøvet at lægge et billede eller fil ind der mangler endelserne .jpg, .png eller .gif</p>
<p><strong>Pdf</strong><br />Du har lagt en pdf op uden endelsen .pdf</p>
<p><strong>Aktivering</strong><br />Du kan kun bruge dit aktiveringslink én gang. Log ind med din mail og password eller dit uni-login</p>
<!-- END error/error.phtml -->
        </div>
    </div>
</div>
<div class="footer-content">
        </div><div id="mbScreenLoader" class="request-loader-screen is-hidden">
    <div class="request-loader-screen__overlay">&nbsp;</div>
    <div class="request-loader__icon--circle-secondary">
        <p class="request-loader-screen__text">&nbsp;</p>
    </div>
</div>
<script type="text/javascript">
    </script>
<script type="text/javascript">
var BASEURL = '';
var DOMAINURL = 'https://app.meebook.com';
var PAGEURL = '/aulaapi/relatedweekplan/all';
var MODULE_RESTURL = '/rest/default/';
var OVERLAY_BUTTONS = ['&laquo;','&raquo;','Luk'];
</script>
<script type="text/javascript" src="https://apis.google.com/js/client:platform.js"></script>
<script type="text/javascript" src="/js/dist/vueApp.bundlee1aaf227acac7963c149.js"></script>
<script type="text/javascript" src="/js/alpha-mootools-1667480922193.js"></script>
<script type="text/javascript" src="/js/alpha-basic-1667480922193.js"></script><script type="text/javascript">
    </script>
</body>
</html>

2022-11-14 21:02:19.526 WARNING (SyncWorker_6) [custom_components.aula.client] Could not parse ugeplaner (Meebook)
2022-11-14 21:02:19.531 DEBUG (MainThread) [custom_components.aula.sensor] Finished fetching sensor data in 4.068 seconds (success: True)
2022-11-14 21:02:19.532 DEBUG (SyncWorker_2) [custom_components.aula.client] self._schoolschedule True
2022-11-14 21:02:19.532 DEBUG (SyncWorker_2) [custom_components.aula.client] self._ugeplan True
2022-11-14 21:02:19.629 DEBUG (SyncWorker_2) [custom_components.aula.client] is_logged_in? True
2022-11-14 21:02:19.701 DEBUG (SyncWorker_2) [custom_components.aula.client] Fetching calendars...
2022-11-14 21:02:19.701 DEBUG (SyncWorker_2) [custom_components.aula.client] Calendar post-data: {"instProfileIds":[420000],"resourceIds":[],"start":"2022-11-14 00:00:00.0000+0000","end":"2022-11-28 00:00:00.0000+0000"}
2022-11-14 21:02:20.316 DEBUG (SyncWorker_2) [custom_components.aula.client] guardian :thom????
2022-11-14 21:02:20.514 DEBUG (SyncWorker_2) [custom_components.aula.client] widgetId [{'placement': 'RightOfOverview', 'widget': {'widgetId': '0034', 'isSecure': True, 'canAccessOnMobile': False, 'canBePlacedInsideModule': True, 'canBePlacedOnGroup': False, 'canBePlacedOnFullPage': False, 'supportsTestMode': False, 'widgetSupplier': 'KMD A/S', 'isPilot': False, 'widgetVersion': '0001', 'iconEmployee': '', 'iconHover': '', 'id': 25, 'name': 'KMD Educa Elev - Mit Barns Fravær', 'icon': '', 'description': 'KMD Educa Elev - Mit Barns Fravær - SSO', 'url': 'https://kmdelevfravaer.dk/Fravaer/Fravaer.aspx', 'type': 'sso'}, 'id': 7604, 'order': 1, 'institutionRole': 'guardian', 'scope': 'Institution', 'centralDisplayMode': 'ShownAsDefault', 'municipalityDisplayMode': 'ShownAsDefault', 'institutionDisplayMode': 'ShownAsDefault', 'aggregatedDisplayMode': 'Shown', 'restrictedGroups': []}, {'placement': 'RightOfOverview', 'widget': {'widgetId': '0003', 'isSecure': True, 'canAccessOnMobile': True, 'canBePlacedInsideModule': False, 'canBePlacedOnGroup': False, 'canBePlacedOnFullPage': False, 'supportsTestMode': True, 'widgetSupplier': 'Meebook', 'isPilot': False, 'widgetVersion': '0001', 'iconEmployee': '', 'iconHover': '', 'id': 3, 'name': 'Ugens forløb - Meebook Forældre', 'icon': '', 'description': 'Parent widiget that shows the books the students/children will work with in the current week', 'url': '/widgets/W0003V0001', 'type': 'secure'}, 'id': 62122, 'order': 2, 'institutionRole': 'guardian', 'scope': 'Institution', 'centralDisplayMode': 'ShownAsDefault', 'municipalityDisplayMode': 'ShownAsDefault', 'institutionDisplayMode': 'ShownAsDefault', 'aggregatedDisplayMode': 'Shown', 'restrictedGroups': []}, {'placement': 'RightOfOverview', 'widget': {'widgetId': '0002', 'isSecure': True, 'canAccessOnMobile': True, 'canBePlacedInsideModule': False, 'canBePlacedOnGroup': False, 'canBePlacedOnFullPage': False, 'supportsTestMode': True, 'widgetSupplier': 'Meebook', 'isPilot': False, 'widgetVersion': '0001', 'iconEmployee': '', 'iconHover': '', 'id': 2, 'name': 'Elevplaner med nyt - Meebook Forældre', 'icon': '', 'description': 'Parent widiget that shows student plans with unseen events', 'url': '/widgets/W0002V0001', 'type': 'secure'}, 'id': 62121, 'order': 3, 'institutionRole': 'guardian', 'scope': 'Institution', 'centralDisplayMode': 'ShownAsDefault', 'municipalityDisplayMode': 'ShownAsDefault', 'institutionDisplayMode': 'ShownAsDefault', 'aggregatedDisplayMode': 'Shown', 'restrictedGroups': []}, {'placement': 'RightOfOverview', 'widget': {'widgetId': '0069', 'isSecure': True, 'canAccessOnMobile': True, 'canBePlacedInsideModule': True, 'canBePlacedOnGroup': True, 'canBePlacedOnFullPage': True, 'supportsTestMode': True, 'widgetSupplier': 'KMD A/S', 'isPilot': False, 'widgetVersion': '0001', 'iconEmployee': '', 'iconHover': '', 'id': 64, 'name': 'KMD Educa Elev - Kontaktoplysninger', 'icon': '', 'description': 'KMD Educa Elev - Kontaktoplysninger', 'url': '/widgets/W0069V0001', 'type': 'secure'}, 'id': 62123, 'order': 4, 'institutionRole': 'guardian', 'scope': 'Institution', 'centralDisplayMode': 'ShownAsDefault', 'municipalityDisplayMode': 'ShownAsDefault', 'institutionDisplayMode': 'ShownAsDefault', 'aggregatedDisplayMode': 'Shown', 'restrictedGroups': []}, {'placement': 'RightOfOverview', 'widget': {'widgetId': '0013', 'isSecure': True, 'canAccessOnMobile': True, 'canBePlacedInsideModule': True, 'canBePlacedOnGroup': False, 'canBePlacedOnFullPage': False, 'supportsTestMode': True, 'widgetSupplier': 'IBK', 'isPilot': False, 'widgetVersion': '0002', 'iconEmployee': '', 'iconHover': '', 'id': 12, 'name': 'Nyttige links', 'icon': '', 'description': 'Simpel liste med maximum 10 links pr. brugerkategori. Kontakt Kenneth Petersen (kp@iks.dk), Ikast-Brande Kommune for yderligere informationer.', 'url': '/widgets/W0013V0002', 'type': 'secure'}, 'id': 93324, 'order': 5, 'institutionRole': 'guardian', 'scope': 'Institution', 'centralDisplayMode': 'ShownAsDefault', 'municipalityDisplayMode': 'ShownAsDefault', 'institutionDisplayMode': 'ShownAsDefault', 'aggregatedDisplayMode': 'Shown', 'restrictedGroups': []}, {'placement': 'BelowCalendar', 'widget': {'widgetId': '0004', 'isSecure': True, 'canAccessOnMobile': True, 'canBePlacedInsideModule': True, 'canBePlacedOnGroup': True, 'canBePlacedOnFullPage': True, 'supportsTestMode': True, 'widgetSupplier': 'Meebook', 'isPilot': False, 'widgetVersion': '0001', 'iconEmployee': '', 'iconHover': '', 'id': 4, 'name': 'Ugeplan - Meebook Forældre', 'icon': '', 'description': 'Parent widiget that shows a week plan for each student/child', 'url': '/widgets/W0004V0001', 'type': 'secure'}, 'id': 28825, 'order': 6, 'institutionRole': 'guardian', 'scope': 'Institution', 'centralDisplayMode': 'ShownAsDefault', 'municipalityDisplayMode': 'ShownAsDefault', 'institutionDisplayMode': 'ShownAsDefault', 'aggregatedDisplayMode': 'Shown', 'restrictedGroups': []}]
2022-11-14 21:02:20.514 DEBUG (SyncWorker_2) [custom_components.aula.client] Widget 0034 KMD Educa Elev - Mit Barns Fravær
2022-11-14 21:02:20.514 DEBUG (SyncWorker_2) [custom_components.aula.client] Widget 0003 Ugens forløb - Meebook Forældre
2022-11-14 21:02:20.514 DEBUG (SyncWorker_2) [custom_components.aula.client] Widget 0002 Elevplaner med nyt - Meebook Forældre
2022-11-14 21:02:20.514 DEBUG (SyncWorker_2) [custom_components.aula.client] Widget 0069 KMD Educa Elev - Kontaktoplysninger
2022-11-14 21:02:20.514 DEBUG (SyncWorker_2) [custom_components.aula.client] Widget 0013 Nyttige links
2022-11-14 21:02:20.514 DEBUG (SyncWorker_2) [custom_components.aula.client] Widget 0004 Ugeplan - Meebook Forældre
2022-11-14 21:02:20.514 DEBUG (SyncWorker_2) [custom_components.aula.client] Setting meebook to 1
2022-11-14 21:02:20.515 DEBUG (SyncWorker_2) [custom_components.aula.client] In the Meebook flow...
2022-11-14 21:02:20.599 DEBUG (SyncWorker_2) [custom_components.aula.client] Token Bearer eyJ0.....s87g
2022-11-14 21:02:20.698 DEBUG (SyncWorker_2) [custom_components.aula.client] Meebook ugeplaner status_code 500
2022-11-14 21:02:20.698 DEBUG (SyncWorker_2) [custom_components.aula.client] Meebook ugeplaner response <!DOCTYPE html><html lang="da" class="html-layout-portal">
<head>
    <link rel="preload" href="/fonts/Kumbh_Sans/KumbhSans.ttf" as="font" type="font/ttf" crossorigin>
    <link rel="shortcut icon" href="/favicon.ico" />
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" >
<meta http-equiv="X-UA-Compatible" content="IE=edge" ><title></title><link href="/css/alpha-1667480922193.css" media="all" rel="stylesheet" type="text/css" >
<link href="/css/meebookorg/meebookorg.branding-1642000128668.css" media="screen" rel="stylesheet" type="text/css" ></head>
<body class="layout-portal">
<div class="portal-frontpage">
    <div class="portal-frontpage__content-wrapper-inner">
        <div class="portal-frontpage__top-content">
            <a href="javascript:;" class="meebook-logo" title="Meebook">&nbsp;</a>
        </div>

        <div class="portal-frontpage__main-content">

<!-- BEGIN SCRIPT error/error.phtml -->
<h1>Hov, der opstod en fejl</h1>
<p>Det kan der være forskellige grunde til.</p>
<p><strong>Billeder</strong><br />Hvis du prøvet at lægge et billede eller fil ind der mangler endelserne .jpg, .png eller .gif</p>
<p><strong>Pdf</strong><br />Du har lagt en pdf op uden endelsen .pdf</p>
<p><strong>Aktivering</strong><br />Du kan kun bruge dit aktiveringslink én gang. Log ind med din mail og password eller dit uni-login</p>
<!-- END error/error.phtml -->
        </div>
    </div>
</div>
<div class="footer-content">
        </div><div id="mbScreenLoader" class="request-loader-screen is-hidden">
    <div class="request-loader-screen__overlay">&nbsp;</div>
    <div class="request-loader__icon--circle-secondary">
        <p class="request-loader-screen__text">&nbsp;</p>
    </div>
</div>
<script type="text/javascript">
    </script>
<script type="text/javascript">
var BASEURL = '';
var DOMAINURL = 'https://app.meebook.com';
var PAGEURL = '/aulaapi/relatedweekplan/all';
var MODULE_RESTURL = '/rest/default/';
var OVERLAY_BUTTONS = ['&laquo;','&raquo;','Luk'];
</script>
<script type="text/javascript" src="https://apis.google.com/js/client:platform.js"></script>
<script type="text/javascript" src="/js/dist/vueApp.bundlee1aaf227acac7963c149.js"></script>
<script type="text/javascript" src="/js/alpha-mootools-1667480922193.js"></script>
<script type="text/javascript" src="/js/alpha-basic-1667480922193.js"></script><script type="text/javascript">
    </script>
</body>
</html>

2022-11-14 21:02:20.698 WARNING (SyncWorker_2) [custom_components.aula.client] Could not parse ugeplaner (Meebook)
2022-11-14 21:02:20.703 DEBUG (SyncWorker_2) [custom_components.aula.client] In the Meebook flow...
2022-11-14 21:02:20.783 DEBUG (SyncWorker_2) [custom_components.aula.client] Token Bearer eyJ0.....s87g
2022-11-14 21:02:20.899 DEBUG (SyncWorker_2) [custom_components.aula.client] Meebook ugeplaner status_code 500
2022-11-14 21:02:20.899 DEBUG (SyncWorker_2) [custom_components.aula.client] Meebook ugeplaner response <!DOCTYPE html><html lang="da" class="html-layout-portal">
<head>
    <link rel="preload" href="/fonts/Kumbh_Sans/KumbhSans.ttf" as="font" type="font/ttf" crossorigin>
    <link rel="shortcut icon" href="/favicon.ico" />
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" >
<meta http-equiv="X-UA-Compatible" content="IE=edge" ><title></title><link href="/css/alpha-1667480922193.css" media="all" rel="stylesheet" type="text/css" >
<link href="/css/meebookorg/meebookorg.branding-1642000128668.css" media="screen" rel="stylesheet" type="text/css" ></head>
<body class="layout-portal">
<div class="portal-frontpage">
    <div class="portal-frontpage__content-wrapper-inner">
        <div class="portal-frontpage__top-content">
            <a href="javascript:;" class="meebook-logo" title="Meebook">&nbsp;</a>
        </div>

        <div class="portal-frontpage__main-content">

<!-- BEGIN SCRIPT error/error.phtml -->
<h1>Hov, der opstod en fejl</h1>
<p>Det kan der være forskellige grunde til.</p>
<p><strong>Billeder</strong><br />Hvis du prøvet at lægge et billede eller fil ind der mangler endelserne .jpg, .png eller .gif</p>
<p><strong>Pdf</strong><br />Du har lagt en pdf op uden endelsen .pdf</p>
<p><strong>Aktivering</strong><br />Du kan kun bruge dit aktiveringslink én gang. Log ind med din mail og password eller dit uni-login</p>
<!-- END error/error.phtml -->
        </div>
    </div>
</div>
<div class="footer-content">
        </div><div id="mbScreenLoader" class="request-loader-screen is-hidden">
    <div class="request-loader-screen__overlay">&nbsp;</div>
    <div class="request-loader__icon--circle-secondary">
        <p class="request-loader-screen__text">&nbsp;</p>
    </div>
</div>
<script type="text/javascript">
    </script>
<script type="text/javascript">
var BASEURL = '';
var DOMAINURL = 'https://app.meebook.com';
var PAGEURL = '/aulaapi/relatedweekplan/all';
var MODULE_RESTURL = '/rest/default/';
var OVERLAY_BUTTONS = ['&laquo;','&raquo;','Luk'];
</script>
<script type="text/javascript" src="https://apis.google.com/js/client:platform.js"></script>
<script type="text/javascript" src="/js/dist/vueApp.bundlee1aaf227acac7963c149.js"></script>
<script type="text/javascript" src="/js/alpha-mootools-1667480922193.js"></script>
<script type="text/javascript" src="/js/alpha-basic-1667480922193.js"></script><script type="text/javascript">
    </script>
</body>
</html>

2022-11-14 21:02:20.899 WARNING (SyncWorker_2) [custom_components.aula.client] Could not parse ugeplaner (Meebook)
kai74 commented 1 year ago

Perfekt. Det eneste som ikke fungerer.

ugeplan: Not available

scaarup commented 1 year ago

okay @thomaspalmdk , nu får vi en eller andet generisk fejl tilbage i noget html. Jeg tænker det måske er pga den manglende sessionuuid i vores request headers. Jeg har prøvet at tilføje den nu.

thomaspalmdk commented 1 year ago

Nyt materiale :-)

                _       
     /\        | |      
    /  \  _   _| | __ _ 
   / /\ \| | | | |/ _` |
  / ____ \ |_| | | (_| |
 /_/    \_\__,_|_|\__,_|                                               
Aula integration, version: 0.1.155
This is a custom integration
If you have any issues with this you need to open an issue here:
https://github.com/scaarup/aula/issues
-------------------------------------------------------------------

2022-11-15 15:26:23.232 INFO (MainThread) [homeassistant.components.sensor] Setting up sensor.aula
2022-11-15 15:26:23.429 DEBUG (SyncWorker_6) [custom_components.aula.client] self._schoolschedule True
2022-11-15 15:26:23.429 DEBUG (SyncWorker_6) [custom_components.aula.client] self._ugeplan True
2022-11-15 15:26:23.429 DEBUG (SyncWorker_6) [custom_components.aula.client] is_logged_in? False
2022-11-15 15:26:23.429 DEBUG (SyncWorker_6) [custom_components.aula.client] Logging in
2022-11-15 15:26:23.438 INFO (SyncWorker_10) [homeassistant.loader] Loaded calendar from homeassistant.components.calendar
2022-11-15 15:26:23.465 INFO (MainThread) [homeassistant.setup] Setting up calendar
2022-11-15 15:26:23.467 INFO (MainThread) [homeassistant.setup] Setup of domain calendar took 0.0 seconds
2022-11-15 15:26:23.485 INFO (MainThread) [homeassistant.components.calendar] Setting up calendar.aula
2022-11-15 15:26:23.489 DEBUG (MainThread) [custom_components.aula.calendar] 0 no client._children ... yet
2022-11-15 15:26:23.492 WARNING (MainThread) [homeassistant.util.async_] Detected blocking call to sleep inside the event loop. This is causing stability issues. Please report issue to the custom integration author for aula doing blocking calls at custom_components/aula/calendar.py, line 38: time.sleep(0.400)
2022-11-15 15:26:23.894 DEBUG (MainThread) [custom_components.aula.calendar] 1 no client._children ... yet
2022-11-15 15:26:23.895 WARNING (MainThread) [homeassistant.util.async_] Detected blocking call to sleep inside the event loop. This is causing stability issues. Please report issue to the custom integration author for aula doing blocking calls at custom_components/aula/calendar.py, line 38: time.sleep(0.400)
2022-11-15 15:26:24.298 DEBUG (MainThread) [custom_components.aula.calendar] 2 no client._children ... yet
2022-11-15 15:26:24.300 WARNING (MainThread) [homeassistant.util.async_] Detected blocking call to sleep inside the event loop. This is causing stability issues. Please report issue to the custom integration author for aula doing blocking calls at custom_components/aula/calendar.py, line 38: time.sleep(0.400)
2022-11-15 15:26:24.702 DEBUG (MainThread) [custom_components.aula.calendar] 3 no client._children ... yet
2022-11-15 15:26:24.704 WARNING (MainThread) [homeassistant.util.async_] Detected blocking call to sleep inside the event loop. This is causing stability issues. Please report issue to the custom integration author for aula doing blocking calls at custom_components/aula/calendar.py, line 38: time.sleep(0.400)
2022-11-15 15:26:25.106 DEBUG (MainThread) [custom_components.aula.calendar] 4 no client._children ... yet
2022-11-15 15:26:25.107 WARNING (MainThread) [homeassistant.util.async_] Detected blocking call to sleep inside the event loop. This is causing stability issues. Please report issue to the custom integration author for aula doing blocking calls at custom_components/aula/calendar.py, line 38: time.sleep(0.400)
2022-11-15 15:26:25.509 DEBUG (MainThread) [custom_components.aula.calendar] 5 no client._children ... yet
2022-11-15 15:26:25.511 WARNING (MainThread) [homeassistant.util.async_] Detected blocking call to sleep inside the event loop. This is causing stability issues. Please report issue to the custom integration author for aula doing blocking calls at custom_components/aula/calendar.py, line 38: time.sleep(0.400)
2022-11-15 15:26:25.914 DEBUG (MainThread) [custom_components.aula.calendar] 6 no client._children ... yet
2022-11-15 15:26:25.918 WARNING (MainThread) [homeassistant.util.async_] Detected blocking call to sleep inside the event loop. This is causing stability issues. Please report issue to the custom integration author for aula doing blocking calls at custom_components/aula/calendar.py, line 38: time.sleep(0.400)
2022-11-15 15:26:26.008 DEBUG (SyncWorker_6) [custom_components.aula.client] LOGIN: True
2022-11-15 15:26:26.101 DEBUG (SyncWorker_6) [custom_components.aula.client] Fetching calendars...
2022-11-15 15:26:26.102 DEBUG (SyncWorker_6) [custom_components.aula.client] Calendar post-data: {"instProfileIds":[420000],"resourceIds":[],"start":"2022-11-15 00:00:00.0000+0000","end":"2022-11-29 00:00:00.0000+0000"}
2022-11-15 15:26:26.322 DEBUG (MainThread) [custom_components.aula.calendar] Got client._children, breaking
2022-11-15 15:26:26.734 DEBUG (SyncWorker_6) [custom_components.aula.client] guardian :thom????
2022-11-15 15:26:26.923 DEBUG (SyncWorker_6) [custom_components.aula.client] widgetId [{'placement': 'RightOfOverview', 'widget': {'widgetId': '0034', 'isSecure': True, 'canAccessOnMobile': False, 'canBePlacedInsideModule': True, 'canBePlacedOnGroup': False, 'canBePlacedOnFullPage': False, 'supportsTestMode': False, 'widgetSupplier': 'KMD A/S', 'isPilot': False, 'widgetVersion': '0001', 'iconEmployee': '', 'iconHover': '', 'id': 25, 'name': 'KMD Educa Elev - Mit Barns Fravær', 'icon': '', 'description': 'KMD Educa Elev - Mit Barns Fravær - SSO', 'url': 'https://kmdelevfravaer.dk/Fravaer/Fravaer.aspx', 'type': 'sso'}, 'id': 7604, 'order': 1, 'institutionRole': 'guardian', 'scope': 'Institution', 'centralDisplayMode': 'ShownAsDefault', 'municipalityDisplayMode': 'ShownAsDefault', 'institutionDisplayMode': 'ShownAsDefault', 'aggregatedDisplayMode': 'Shown', 'restrictedGroups': []}, {'placement': 'RightOfOverview', 'widget': {'widgetId': '0003', 'isSecure': True, 'canAccessOnMobile': True, 'canBePlacedInsideModule': False, 'canBePlacedOnGroup': False, 'canBePlacedOnFullPage': False, 'supportsTestMode': True, 'widgetSupplier': 'Meebook', 'isPilot': False, 'widgetVersion': '0001', 'iconEmployee': '', 'iconHover': '', 'id': 3, 'name': 'Ugens forløb - Meebook Forældre', 'icon': '', 'description': 'Parent widiget that shows the books the students/children will work with in the current week', 'url': '/widgets/W0003V0001', 'type': 'secure'}, 'id': 62122, 'order': 2, 'institutionRole': 'guardian', 'scope': 'Institution', 'centralDisplayMode': 'ShownAsDefault', 'municipalityDisplayMode': 'ShownAsDefault', 'institutionDisplayMode': 'ShownAsDefault', 'aggregatedDisplayMode': 'Shown', 'restrictedGroups': []}, {'placement': 'RightOfOverview', 'widget': {'widgetId': '0002', 'isSecure': True, 'canAccessOnMobile': True, 'canBePlacedInsideModule': False, 'canBePlacedOnGroup': False, 'canBePlacedOnFullPage': False, 'supportsTestMode': True, 'widgetSupplier': 'Meebook', 'isPilot': False, 'widgetVersion': '0001', 'iconEmployee': '', 'iconHover': '', 'id': 2, 'name': 'Elevplaner med nyt - Meebook Forældre', 'icon': '', 'description': 'Parent widiget that shows student plans with unseen events', 'url': '/widgets/W0002V0001', 'type': 'secure'}, 'id': 62121, 'order': 3, 'institutionRole': 'guardian', 'scope': 'Institution', 'centralDisplayMode': 'ShownAsDefault', 'municipalityDisplayMode': 'ShownAsDefault', 'institutionDisplayMode': 'ShownAsDefault', 'aggregatedDisplayMode': 'Shown', 'restrictedGroups': []}, {'placement': 'RightOfOverview', 'widget': {'widgetId': '0069', 'isSecure': True, 'canAccessOnMobile': True, 'canBePlacedInsideModule': True, 'canBePlacedOnGroup': True, 'canBePlacedOnFullPage': True, 'supportsTestMode': True, 'widgetSupplier': 'KMD A/S', 'isPilot': False, 'widgetVersion': '0001', 'iconEmployee': '', 'iconHover': '', 'id': 64, 'name': 'KMD Educa Elev - Kontaktoplysninger', 'icon': '', 'description': 'KMD Educa Elev - Kontaktoplysninger', 'url': '/widgets/W0069V0001', 'type': 'secure'}, 'id': 62123, 'order': 4, 'institutionRole': 'guardian', 'scope': 'Institution', 'centralDisplayMode': 'ShownAsDefault', 'municipalityDisplayMode': 'ShownAsDefault', 'institutionDisplayMode': 'ShownAsDefault', 'aggregatedDisplayMode': 'Shown', 'restrictedGroups': []}, {'placement': 'RightOfOverview', 'widget': {'widgetId': '0013', 'isSecure': True, 'canAccessOnMobile': True, 'canBePlacedInsideModule': True, 'canBePlacedOnGroup': False, 'canBePlacedOnFullPage': False, 'supportsTestMode': True, 'widgetSupplier': 'IBK', 'isPilot': False, 'widgetVersion': '0002', 'iconEmployee': '', 'iconHover': '', 'id': 12, 'name': 'Nyttige links', 'icon': '', 'description': 'Simpel liste med maximum 10 links pr. brugerkategori. Kontakt Kenneth Petersen (kp@iks.dk), Ikast-Brande Kommune for yderligere informationer.', 'url': '/widgets/W0013V0002', 'type': 'secure'}, 'id': 93324, 'order': 5, 'institutionRole': 'guardian', 'scope': 'Institution', 'centralDisplayMode': 'ShownAsDefault', 'municipalityDisplayMode': 'ShownAsDefault', 'institutionDisplayMode': 'ShownAsDefault', 'aggregatedDisplayMode': 'Shown', 'restrictedGroups': []}, {'placement': 'BelowCalendar', 'widget': {'widgetId': '0004', 'isSecure': True, 'canAccessOnMobile': True, 'canBePlacedInsideModule': True, 'canBePlacedOnGroup': True, 'canBePlacedOnFullPage': True, 'supportsTestMode': True, 'widgetSupplier': 'Meebook', 'isPilot': False, 'widgetVersion': '0001', 'iconEmployee': '', 'iconHover': '', 'id': 4, 'name': 'Ugeplan - Meebook Forældre', 'icon': '', 'description': 'Parent widiget that shows a week plan for each student/child', 'url': '/widgets/W0004V0001', 'type': 'secure'}, 'id': 28825, 'order': 6, 'institutionRole': 'guardian', 'scope': 'Institution', 'centralDisplayMode': 'ShownAsDefault', 'municipalityDisplayMode': 'ShownAsDefault', 'institutionDisplayMode': 'ShownAsDefault', 'aggregatedDisplayMode': 'Shown', 'restrictedGroups': []}]
2022-11-15 15:26:26.923 DEBUG (SyncWorker_6) [custom_components.aula.client] Widget 0034 KMD Educa Elev - Mit Barns Fravær
2022-11-15 15:26:26.923 DEBUG (SyncWorker_6) [custom_components.aula.client] Widget 0003 Ugens forløb - Meebook Forældre
2022-11-15 15:26:26.924 DEBUG (SyncWorker_6) [custom_components.aula.client] Widget 0002 Elevplaner med nyt - Meebook Forældre
2022-11-15 15:26:26.924 DEBUG (SyncWorker_6) [custom_components.aula.client] Widget 0069 KMD Educa Elev - Kontaktoplysninger
2022-11-15 15:26:26.924 DEBUG (SyncWorker_6) [custom_components.aula.client] Widget 0013 Nyttige links
2022-11-15 15:26:26.924 DEBUG (SyncWorker_6) [custom_components.aula.client] Widget 0004 Ugeplan - Meebook Forældre
2022-11-15 15:26:26.924 DEBUG (SyncWorker_6) [custom_components.aula.client] Setting meebook to 1
2022-11-15 15:26:26.924 DEBUG (SyncWorker_6) [custom_components.aula.client] In the Meebook flow...
2022-11-15 15:26:26.994 DEBUG (SyncWorker_6) [custom_components.aula.client] Headers: {'Date': 'Tue, 15 Nov 2022 14:26:26 GMT', 'Content-Type': 'application/json', 'Transfer-Encoding': 'chunked', 'Connection': 'keep-alive', 'Server': 'Apache', 'Expires': 'Thu, 19 Nov 1981 08:52:00 GMT', 'Cache-Control': 'no-store, no-cache, must-revalidate', 'Pragma': 'no-cache', 'Content-Encoding': 'gzip', 'Vary': 'Accept-Encoding', 'Content-Security-Policy': "default-src 'self' ; script-src 'self' *.google.com https://js.live.net *.tinymce.com cdnjs.cloudflare.com *.skoletube.dk *.aula.dk; style-src 'self' 'unsafe-inline' *.tinymce.com unpkg.com fonts.googleapis.com; img-src * data: blob: ; font-src 'self' data: *.tinymce.com unpkg.com fonts.gstatic.com; connect-src * data: blob:; media-src 'self' blob: *.aula.dk; object-src 'none' ; frame-src *.google.com *.youtube.com *.skoletube.dk *.emu.dk; upgrade-insecure-requests;", 'Expect-CT': 'enforce, max-age=30, report-uri="https://ncaula.report-uri.com/r/d/ct/reportOnly"', 'X-Frame-Options': 'DENY', 'X-XSS-Protection': '1; mode=block', 'X-Content-Type-Options': 'nosniff', 'Strict-Transport-Security': 'max-age=63072000; includeSubdomains', 'Last-Modified': 'Tue, 15 Nov 2022 14:26:26 GMT'}
2022-11-15 15:26:26.994 DEBUG (SyncWorker_6) [custom_components.aula.client] sessionuuid 0
2022-11-15 15:26:27.078 DEBUG (SyncWorker_6) [custom_components.aula.client] Token Bearer eyJ0.....Tmbg
2022-11-15 15:26:27.081 ERROR (MainThread) [custom_components.aula.sensor] Error requesting sensor data: Header part (0) from {'sessionuuid': 0} must be of type str or bytes, not <class 'int'>
2022-11-15 15:26:27.085 DEBUG (MainThread) [custom_components.aula.sensor] Finished fetching sensor data in 3.657 seconds (success: False)
2022-11-15 15:26:27.086 DEBUG (SyncWorker_9) [custom_components.aula.client] self._schoolschedule True
2022-11-15 15:26:27.086 DEBUG (SyncWorker_9) [custom_components.aula.client] self._ugeplan True
2022-11-15 15:26:27.199 DEBUG (SyncWorker_9) [custom_components.aula.client] is_logged_in? True
2022-11-15 15:26:27.304 DEBUG (SyncWorker_9) [custom_components.aula.client] Fetching calendars...
2022-11-15 15:26:27.304 DEBUG (SyncWorker_9) [custom_components.aula.client] Calendar post-data: {"instProfileIds":[420000],"resourceIds":[],"start":"2022-11-15 00:00:00.0000+0000","end":"2022-11-29 00:00:00.0000+0000"}
2022-11-15 15:26:27.803 DEBUG (SyncWorker_9) [custom_components.aula.client] guardian :thom????
2022-11-15 15:26:28.032 DEBUG (SyncWorker_9) [custom_components.aula.client] widgetId [{'placement': 'RightOfOverview', 'widget': {'widgetId': '0034', 'isSecure': True, 'canAccessOnMobile': False, 'canBePlacedInsideModule': True, 'canBePlacedOnGroup': False, 'canBePlacedOnFullPage': False, 'supportsTestMode': False, 'widgetSupplier': 'KMD A/S', 'isPilot': False, 'widgetVersion': '0001', 'iconEmployee': '', 'iconHover': '', 'id': 25, 'name': 'KMD Educa Elev - Mit Barns Fravær', 'icon': '', 'description': 'KMD Educa Elev - Mit Barns Fravær - SSO', 'url': 'https://kmdelevfravaer.dk/Fravaer/Fravaer.aspx', 'type': 'sso'}, 'id': 7604, 'order': 1, 'institutionRole': 'guardian', 'scope': 'Institution', 'centralDisplayMode': 'ShownAsDefault', 'municipalityDisplayMode': 'ShownAsDefault', 'institutionDisplayMode': 'ShownAsDefault', 'aggregatedDisplayMode': 'Shown', 'restrictedGroups': []}, {'placement': 'RightOfOverview', 'widget': {'widgetId': '0003', 'isSecure': True, 'canAccessOnMobile': True, 'canBePlacedInsideModule': False, 'canBePlacedOnGroup': False, 'canBePlacedOnFullPage': False, 'supportsTestMode': True, 'widgetSupplier': 'Meebook', 'isPilot': False, 'widgetVersion': '0001', 'iconEmployee': '', 'iconHover': '', 'id': 3, 'name': 'Ugens forløb - Meebook Forældre', 'icon': '', 'description': 'Parent widiget that shows the books the students/children will work with in the current week', 'url': '/widgets/W0003V0001', 'type': 'secure'}, 'id': 62122, 'order': 2, 'institutionRole': 'guardian', 'scope': 'Institution', 'centralDisplayMode': 'ShownAsDefault', 'municipalityDisplayMode': 'ShownAsDefault', 'institutionDisplayMode': 'ShownAsDefault', 'aggregatedDisplayMode': 'Shown', 'restrictedGroups': []}, {'placement': 'RightOfOverview', 'widget': {'widgetId': '0002', 'isSecure': True, 'canAccessOnMobile': True, 'canBePlacedInsideModule': False, 'canBePlacedOnGroup': False, 'canBePlacedOnFullPage': False, 'supportsTestMode': True, 'widgetSupplier': 'Meebook', 'isPilot': False, 'widgetVersion': '0001', 'iconEmployee': '', 'iconHover': '', 'id': 2, 'name': 'Elevplaner med nyt - Meebook Forældre', 'icon': '', 'description': 'Parent widiget that shows student plans with unseen events', 'url': '/widgets/W0002V0001', 'type': 'secure'}, 'id': 62121, 'order': 3, 'institutionRole': 'guardian', 'scope': 'Institution', 'centralDisplayMode': 'ShownAsDefault', 'municipalityDisplayMode': 'ShownAsDefault', 'institutionDisplayMode': 'ShownAsDefault', 'aggregatedDisplayMode': 'Shown', 'restrictedGroups': []}, {'placement': 'RightOfOverview', 'widget': {'widgetId': '0069', 'isSecure': True, 'canAccessOnMobile': True, 'canBePlacedInsideModule': True, 'canBePlacedOnGroup': True, 'canBePlacedOnFullPage': True, 'supportsTestMode': True, 'widgetSupplier': 'KMD A/S', 'isPilot': False, 'widgetVersion': '0001', 'iconEmployee': '', 'iconHover': '', 'id': 64, 'name': 'KMD Educa Elev - Kontaktoplysninger', 'icon': '', 'description': 'KMD Educa Elev - Kontaktoplysninger', 'url': '/widgets/W0069V0001', 'type': 'secure'}, 'id': 62123, 'order': 4, 'institutionRole': 'guardian', 'scope': 'Institution', 'centralDisplayMode': 'ShownAsDefault', 'municipalityDisplayMode': 'ShownAsDefault', 'institutionDisplayMode': 'ShownAsDefault', 'aggregatedDisplayMode': 'Shown', 'restrictedGroups': []}, {'placement': 'RightOfOverview', 'widget': {'widgetId': '0013', 'isSecure': True, 'canAccessOnMobile': True, 'canBePlacedInsideModule': True, 'canBePlacedOnGroup': False, 'canBePlacedOnFullPage': False, 'supportsTestMode': True, 'widgetSupplier': 'IBK', 'isPilot': False, 'widgetVersion': '0002', 'iconEmployee': '', 'iconHover': '', 'id': 12, 'name': 'Nyttige links', 'icon': '', 'description': 'Simpel liste med maximum 10 links pr. brugerkategori. Kontakt Kenneth Petersen (kp@iks.dk), Ikast-Brande Kommune for yderligere informationer.', 'url': '/widgets/W0013V0002', 'type': 'secure'}, 'id': 93324, 'order': 5, 'institutionRole': 'guardian', 'scope': 'Institution', 'centralDisplayMode': 'ShownAsDefault', 'municipalityDisplayMode': 'ShownAsDefault', 'institutionDisplayMode': 'ShownAsDefault', 'aggregatedDisplayMode': 'Shown', 'restrictedGroups': []}, {'placement': 'BelowCalendar', 'widget': {'widgetId': '0004', 'isSecure': True, 'canAccessOnMobile': True, 'canBePlacedInsideModule': True, 'canBePlacedOnGroup': True, 'canBePlacedOnFullPage': True, 'supportsTestMode': True, 'widgetSupplier': 'Meebook', 'isPilot': False, 'widgetVersion': '0001', 'iconEmployee': '', 'iconHover': '', 'id': 4, 'name': 'Ugeplan - Meebook Forældre', 'icon': '', 'description': 'Parent widiget that shows a week plan for each student/child', 'url': '/widgets/W0004V0001', 'type': 'secure'}, 'id': 28825, 'order': 6, 'institutionRole': 'guardian', 'scope': 'Institution', 'centralDisplayMode': 'ShownAsDefault', 'municipalityDisplayMode': 'ShownAsDefault', 'institutionDisplayMode': 'ShownAsDefault', 'aggregatedDisplayMode': 'Shown', 'restrictedGroups': []}]
2022-11-15 15:26:28.032 DEBUG (SyncWorker_9) [custom_components.aula.client] Widget 0034 KMD Educa Elev - Mit Barns Fravær
2022-11-15 15:26:28.033 DEBUG (SyncWorker_9) [custom_components.aula.client] Widget 0003 Ugens forløb - Meebook Forældre
2022-11-15 15:26:28.033 DEBUG (SyncWorker_9) [custom_components.aula.client] Widget 0002 Elevplaner med nyt - Meebook Forældre
2022-11-15 15:26:28.033 DEBUG (SyncWorker_9) [custom_components.aula.client] Widget 0069 KMD Educa Elev - Kontaktoplysninger
2022-11-15 15:26:28.033 DEBUG (SyncWorker_9) [custom_components.aula.client] Widget 0013 Nyttige links
2022-11-15 15:26:28.034 DEBUG (SyncWorker_9) [custom_components.aula.client] Widget 0004 Ugeplan - Meebook Forældre
2022-11-15 15:26:28.034 DEBUG (SyncWorker_9) [custom_components.aula.client] Setting meebook to 1
2022-11-15 15:26:28.034 DEBUG (SyncWorker_9) [custom_components.aula.client] In the Meebook flow...
2022-11-15 15:26:28.129 DEBUG (SyncWorker_9) [custom_components.aula.client] Headers: {'Date': 'Tue, 15 Nov 2022 14:26:28 GMT', 'Content-Type': 'application/json', 'Transfer-Encoding': 'chunked', 'Connection': 'keep-alive', 'Server': 'Apache', 'Expires': 'Thu, 19 Nov 1981 08:52:00 GMT', 'Cache-Control': 'no-store, no-cache, must-revalidate', 'Pragma': 'no-cache', 'Content-Encoding': 'gzip', 'Vary': 'Accept-Encoding', 'Content-Security-Policy': "default-src 'self' ; script-src 'self' *.google.com https://js.live.net *.tinymce.com cdnjs.cloudflare.com *.skoletube.dk *.aula.dk; style-src 'self' 'unsafe-inline' *.tinymce.com unpkg.com fonts.googleapis.com; img-src * data: blob: ; font-src 'self' data: *.tinymce.com unpkg.com fonts.gstatic.com; connect-src * data: blob:; media-src 'self' blob: *.aula.dk; object-src 'none' ; frame-src *.google.com *.youtube.com *.skoletube.dk *.emu.dk; upgrade-insecure-requests;", 'Expect-CT': 'enforce, max-age=30, report-uri="https://ncaula.report-uri.com/r/d/ct/reportOnly"', 'X-Frame-Options': 'DENY', 'X-XSS-Protection': '1; mode=block', 'X-Content-Type-Options': 'nosniff', 'Strict-Transport-Security': 'max-age=63072000; includeSubdomains', 'Last-Modified': 'Tue, 15 Nov 2022 14:26:28 GMT'}
2022-11-15 15:26:28.130 DEBUG (SyncWorker_9) [custom_components.aula.client] sessionuuid 0
2022-11-15 15:26:28.223 DEBUG (SyncWorker_9) [custom_components.aula.client] Token Bearer eyJ0.....V82A
2022-11-15 15:26:28.231 ERROR (MainThread) [homeassistant.components.sensor] Error while setting up aula platform for sensor
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 281, in _async_setup_platform
    await asyncio.shield(task)
  File "/config/custom_components/aula/sensor.py", line 55, in async_setup_entry
    await hass.async_add_executor_job(client.update_data)
  File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/aula/client.py", line 173, in update_data
    ugeplan(thisweek,"this")
  File "/config/custom_components/aula/client.py", line 156, in ugeplan
    ugeplaner = self._session.get(MEEBOOK_API + get_payload, headers={"Authorization":token, "accept":"application/json", "sessionuuid":sessionuuid}, verify=True)
  File "/usr/local/lib/python3.10/site-packages/requests/sessions.py", line 600, in get
    return self.request("GET", url, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/requests/sessions.py", line 573, in request
    prep = self.prepare_request(req)
  File "/usr/local/lib/python3.10/site-packages/requests/sessions.py", line 484, in prepare_request
    p.prepare(
  File "/usr/local/lib/python3.10/site-packages/requests/models.py", line 369, in prepare
    self.prepare_headers(headers)
  File "/usr/local/lib/python3.10/site-packages/requests/models.py", line 491, in prepare_headers
    check_header_validity(header)
  File "/usr/local/lib/python3.10/site-packages/requests/utils.py", line 1037, in check_header_validity
    raise InvalidHeader(
requests.exceptions.InvalidHeader: Header part (0) from {'sessionuuid': 0} must be of type str or bytes, not <class 'int'>
scaarup commented 1 year ago

I må gerne teste den seneste ændring på branchen: https://github.com/scaarup/aula/tree/meebook-integration

JanHG commented 1 year ago

Jeg har 3 børn; 1 i børnehave og 2 i skole. Der kommer en N/A ugeplan sensor ud for barnet i børnehave, da de ikke bruger ugeplaner, så det er fint. De to i skole, kommer der ingen ugeplans sensor for.

/\ | | / \ | | / /\ | | | | |/ ` | / __ \ || | | (| | // __,||_,| Aula integration, version: 0.1.155 This is a custom integration If you have any issues with this you need to open an issue here: https://github.com/scaarup/aula/issues

2022-11-17 09:49:18.660 DEBUG (SyncWorker_4) [custom_components.aula.client] self._schoolschedule True 2022-11-17 09:49:18.661 DEBUG (SyncWorker_4) [custom_components.aula.client] self._ugeplan True 2022-11-17 09:49:18.661 DEBUG (SyncWorker_4) [custom_components.aula.client] is_logged_in? False 2022-11-17 09:49:18.661 DEBUG (SyncWorker_4) [custom_components.aula.client] Logging in 2022-11-17 09:49:22.325 DEBUG (SyncWorker_4) [custom_components.aula.client] LOGIN: True 2022-11-17 09:49:22.718 DEBUG (SyncWorker_4) [custom_components.aula.client] Fetching calendars... 2022-11-17 09:49:22.719 DEBUG (SyncWorker_4) [custom_components.aula.client] Calendar post-data: {"instProfileIds":[1400000,3800000,3900000],"resourceIds":[],"start":"2022-11-17 00:00:00.0000+0000","end":"2022-12-01 00:00:00.0000+0000"} 2022-11-17 09:49:23.483 DEBUG (SyncWorker_4) [custom_components.aula.client] guardian :jan????? 2022-11-17 09:49:23.770 DEBUG (SyncWorker_4) [custom_components.aula.client] widgetId [{'placement': 'RightOfOverview', 'widget': {'widgetId': '0003', 'isSecure': True, 'canAccessOnMobile': True, 'canBePlacedInsideModule': False, 'canBePlacedOnGroup': False, 'canBePlacedOnFullPage': False, 'supportsTestMode': True, 'widgetSupplier': 'Meebook', 'isPilot': False, 'widgetVersion': '0001', 'iconEmployee': '', 'iconHover': '', 'id': 3, 'name': 'Ugens forløb - Meebook Forældre', 'icon': '', 'description': 'Parent widiget that shows the books the students/children will work with in the current week', 'url': '/widgets/W0003V0001', 'type': 'secure'}, 'id': 4867, 'order': 1, 'institutionRole': 'guardian', 'scope': 'Institution', 'centralDisplayMode': 'ShownAsDefault', 'municipalityDisplayMode': 'ShownAsDefault', 'institutionDisplayMode': 'ShownAsDefault', 'aggregatedDisplayMode': 'Shown', 'restrictedGroups': []}, {'placement': 'RightOfOverview', 'widget': {'widgetId': '0002', 'isSecure': True, 'canAccessOnMobile': True, 'canBePlacedInsideModule': False, 'canBePlacedOnGroup': False, 'canBePlacedOnFullPage': False, 'supportsTestMode': True, 'widgetSupplier': 'Meebook', 'isPilot': False, 'widgetVersion': '0001', 'iconEmployee': '', 'iconHover': '', 'id': 2, 'name': 'Elevplaner med nyt - Meebook Forældre', 'icon': '', 'description': 'Parent widiget that shows student plans with unseen events', 'url': '/widgets/W0002V0001', 'type': 'secure'}, 'id': 4866, 'order': 2, 'institutionRole': 'guardian', 'scope': 'Institution', 'centralDisplayMode': 'ShownAsDefault', 'municipalityDisplayMode': 'ShownAsDefault', 'institutionDisplayMode': 'ShownAsDefault', 'aggregatedDisplayMode': 'Shown', 'restrictedGroups': []}, {'placement': 'RightOfOverview', 'widget': {'widgetId': '0053', 'isSecure': True, 'canAccessOnMobile': True, 'canBePlacedInsideModule': True, 'canBePlacedOnGroup': False, 'canBePlacedOnFullPage': True, 'supportsTestMode': True, 'widgetSupplier': 'IST', 'isPilot': False, 'widgetVersion': '0001', 'iconEmployee': '', 'iconHover': '', 'id': 45, 'name': 'SFO Admin (forældre)', 'icon': 'static/widget/W0053V0001.svg', 'description': 'SFO Admin varetager tilknytning af yderligere kontaktpersoner til det enkelte barn', 'url': 'https://saml.borger.tabulex.dk/simplesaml/module.php/tabulexaulalogin/aula.php?appid=sfoadminforaeldre', 'type': 'sso'}, 'id': 49371, 'order': 3, 'institutionRole': 'guardian', 'scope': 'Institution', 'centralDisplayMode': 'ShownAsDefault', 'municipalityDisplayMode': 'ShownAsDefault', 'institutionDisplayMode': 'ShownAsDefault', 'aggregatedDisplayMode': 'Shown', 'restrictedGroups': []}, {'placement': 'RightOfOverview', 'widget': {'widgetId': '0047', 'isSecure': True, 'canAccessOnMobile': True, 'canBePlacedInsideModule': True, 'canBePlacedOnGroup': False, 'canBePlacedOnFullPage': True, 'supportsTestMode': True, 'widgetSupplier': 'IST', 'isPilot': False, 'widgetVersion': '0001', 'iconEmployee': '', 'iconHover': '', 'id': 39, 'name': 'Fravær - forældreindberetning', 'icon': 'static/widget/W0047V0001.svg', 'description': 'Fravær hjælper dig med at se dine børns fravær og giver dig mulighed for at melde dem syge.', 'url': 'https://saml.borger.tabulex.dk/simplesaml/module.php/tabulexaulalogin/aula.php?appid=fravaerforaeldre', 'type': 'sso'}, 'id': 86550, 'order': 4, 'institutionRole': 'guardian', 'scope': 'Institution', 'centralDisplayMode': 'ShownAsDefault', 'municipalityDisplayMode': 'ShownAsDefault', 'institutionDisplayMode': 'ShownAsDefault', 'aggregatedDisplayMode': 'Shown', 'restrictedGroups': []}, {'placement': 'BelowCalendar', 'widget': {'widgetId': '0004', 'isSecure': True, 'canAccessOnMobile': True, 'canBePlacedInsideModule': True, 'canBePlacedOnGroup': True, 'canBePlacedOnFullPage': True, 'supportsTestMode': True, 'widgetSupplier': 'Meebook', 'isPilot': False, 'widgetVersion': '0001', 'iconEmployee': '', 'iconHover': '', 'id': 4, 'name': 'Ugeplan - Meebook Forældre', 'icon': '', 'description': 'Parent widiget that shows a week plan for each student/child', 'url': '/widgets/W0004V0001', 'type': 'secure'}, 'id': 4868, 'order': 5, 'institutionRole': 'guardian', 'scope': 'Institution', 'centralDisplayMode': 'ShownAsDefault', 'municipalityDisplayMode': 'ShownAsDefault', 'institutionDisplayMode': 'ShownAsDefault', 'aggregatedDisplayMode': 'Shown', 'restrictedGroups': []}, {'placement': 'OwnPage', 'widget': {'widgetId': '0018', 'isSecure': True, 'canAccessOnMobile': True, 'canBePlacedInsideModule': True, 'canBePlacedOnGroup': True, 'canBePlacedOnFullPage': True, 'supportsTestMode': True, 'widgetSupplier': 'EasyIQ', 'isPilot': False, 'widgetVersion': '0001', 'iconEmployee': '', 'iconHover': '', 'id': 15, 'name': 'EasyIQ Links', 'icon': 'static/widget/W0018V0001.svg', 'description': 'Tilbyder linksamling til slutbrugere.', 'url': '/widgets/W0018V0001', 'type': 'secure'}, 'id': 10380, 'order': 6, 'institutionRole': 'guardian', 'scope': 'Institution', 'centralDisplayMode': 'ShownAsDefault', 'municipalityDisplayMode': 'ShownAsDefault', 'institutionDisplayMode': 'ShownAsDefault', 'aggregatedDisplayMode': 'Shown', 'restrictedGroups': []}] 2022-11-17 09:49:23.771 DEBUG (SyncWorker_4) [custom_components.aula.client] Widget 0003 Ugens forløb - Meebook Forældre 2022-11-17 09:49:23.771 DEBUG (SyncWorker_4) [custom_components.aula.client] Widget 0002 Elevplaner med nyt - Meebook Forældre 2022-11-17 09:49:23.771 DEBUG (SyncWorker_4) [custom_components.aula.client] Widget 0053 SFO Admin (forældre) 2022-11-17 09:49:23.771 DEBUG (SyncWorker_4) [custom_components.aula.client] Widget 0047 Fravær - forældreindberetning 2022-11-17 09:49:23.771 DEBUG (SyncWorker_4) [custom_components.aula.client] Widget 0004 Ugeplan - Meebook Forældre 2022-11-17 09:49:23.772 DEBUG (SyncWorker_4) [custom_components.aula.client] Setting meebook to 1 2022-11-17 09:49:23.772 DEBUG (SyncWorker_4) [custom_components.aula.client] In the Meebook flow... 2022-11-17 09:49:23.920 DEBUG (SyncWorker_4) [custom_components.aula.client] Token Bearer eyJ0.....Cyew 2022-11-17 09:49:24.282 DEBUG (SyncWorker_4) [custom_components.aula.client] Meebook ugeplaner status_code 500 2022-11-17 09:49:24.282 DEBUG (SyncWorker_4) [custom_components.aula.client] Meebook ugeplaner response <!DOCTYPE html>

Hov, der opstod en fejl

Det kan der være forskellige grunde til.

Billeder
Hvis du prøvet at lægge et billede eller fil ind der mangler endelserne .jpg, .png eller .gif

Pdf
Du har lagt en pdf op uden endelsen .pdf

Aktivering
Du kan kun bruge dit aktiveringslink én gang. Log ind med din mail og password eller dit uni-login

2022-11-17 09:49:24.283 WARNING (SyncWorker_4) [custom_components.aula.client] Could not parse ugeplaner (Meebook) ...

scaarup commented 1 year ago

Hej @JanHG Mange tak. Er det med de seneste ændringer fra branch'en lavet i dag? Din log bliver hakket i stykker af "Hov, der opstod en fejl".

JanHG commented 1 year ago

Ja, det er med seneste ændringer. "Hov, der opstod en fejl" er en del af loggen, det er blot HTML der bliver rendered. Der mangler ikke noget.

scaarup commented 1 year ago

Ja, det er med seneste ændringer. "Hov, der opstod en fejl" er en del af loggen, det er blot HTML der bliver rendered. Der mangler ikke noget.

Nå ja, det kommer jo fra fejlen på Meebook ;)

scaarup commented 1 year ago

Er der nogen, der lige kan "copy as curl" det her request, der laves i Aula i jeres browser: GET https://app.meebook.com/aulaapi/relatedweekplan/all?currentWeekNumber=2022-W45&userProfile=guardian&childFilter[]=X&institutionFilter[]=X

Jeg vil godt lige se præcis hvilke request headers vi skal sende med. Kan være vi mangler et eller andet og derfor får en HTTP 500.

Eller @thomaspalmdk var det kun i aula app'en du kunne se dette request?

JanHG commented 1 year ago

Jeg fandt det vist i browser versionen: curl "https://app.meebook.com/aulaapi/relatedweekplan/all?currentWeekNumber=2022-W46&userProfile=guardian&childFilter^\[^\]=lud?????&childFilter^\[^\]=ann?????&childFilter^\[^\]=agn?????&institutionFilter^\[^\]=269007&institutionFilter^\[^\]=G18264" ^ -H "authority: app.meebook.com" ^ -H "accept: application/json" ^ -H "accept-language: da-DK,da;q=0.9,en-US;q=0.8,en;q=0.7" ^ -H "authorization: Bearer eyJ0...zLug" ^ -H "dnt: 1" ^ -H "origin: https://www.aula.dk" ^ -H "referer: https://www.aula.dk/" ^ -H "sec-ch-ua: ^\^"Google Chrome^\^";v=^\^"107^\^", ^\^"Chromium^\^";v=^\^"107^\^", ^\^"Not=A?Brand^\^";v=^\^"24^\^"" ^ -H "sec-ch-ua-mobile: ?0" ^ -H "sec-ch-ua-platform: ^\^"Windows^\^"" ^ -H "sec-fetch-dest: empty" ^ -H "sec-fetch-mode: cors" ^ -H "sec-fetch-site: cross-site" ^ -H "sessionuuid: jan?????" ^ -H "user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36" ^ -H "x-version: 1.0" ^ --compressed

scaarup commented 1 year ago

Mange tak. Jeg har rettet lidt i client.py for at tilføje de fleste af disse headers.

JanHG commented 1 year ago

/\ | | / \ _| | / /\ | | | | |/ ` | / __ \ || | | (| | // __,||_,| Aula integration, version: 0.1.155 This is a custom integration If you have any issues with this you need to open an issue here: https://github.com/scaarup/aula/issues

2022-11-17 13:01:19.401 DEBUG (SyncWorker_6) [custom_components.aula.client] self._schoolschedule True 2022-11-17 13:01:19.401 DEBUG (SyncWorker_6) [custom_components.aula.client] self._ugeplan True 2022-11-17 13:01:19.401 DEBUG (SyncWorker_6) [custom_components.aula.client] is_logged_in? False 2022-11-17 13:01:19.402 DEBUG (SyncWorker_6) [custom_components.aula.client] Logging in 2022-11-17 13:01:21.525 DEBUG (MainThread) [custom_components.aula.calendar] 0 no client.children ... yet 2022-11-17 13:01:21.537 WARNING (MainThread) [homeassistant.util.async] Detected blocking call to sleep inside the event loop. This is causing stability issues. Please report issue to the custom integration author for aula doing blocking calls at custom_components/aula/calendar.py, line 38: time.sleep(0.400) 2022-11-17 13:01:21.942 DEBUG (MainThread) [custom_components.aula.calendar] 1 no client.children ... yet 2022-11-17 13:01:21.947 WARNING (MainThread) [homeassistant.util.async] Detected blocking call to sleep inside the event loop. This is causing stability issues. Please report issue to the custom integration author for aula doing blocking calls at custom_components/aula/calendar.py, line 38: time.sleep(0.400) 2022-11-17 13:01:22.353 DEBUG (MainThread) [custom_components.aula.calendar] 2 no client.children ... yet 2022-11-17 13:01:22.358 WARNING (MainThread) [homeassistant.util.async] Detected blocking call to sleep inside the event loop. This is causing stability issues. Please report issue to the custom integration author for aula doing blocking calls at custom_components/aula/calendar.py, line 38: time.sleep(0.400) 2022-11-17 13:01:22.764 DEBUG (MainThread) [custom_components.aula.calendar] 3 no client.children ... yet 2022-11-17 13:01:22.768 WARNING (MainThread) [homeassistant.util.async] Detected blocking call to sleep inside the event loop. This is causing stability issues. Please report issue to the custom integration author for aula doing blocking calls at custom_components/aula/calendar.py, line 38: time.sleep(0.400) 2022-11-17 13:01:23.174 DEBUG (MainThread) [custom_components.aula.calendar] 4 no client.children ... yet 2022-11-17 13:01:23.179 WARNING (MainThread) [homeassistant.util.async] Detected blocking call to sleep inside the event loop. This is causing stability issues. Please report issue to the custom integration author for aula doing blocking calls at custom_components/aula/calendar.py, line 38: time.sleep(0.400) 2022-11-17 13:01:23.585 DEBUG (MainThread) [custom_components.aula.calendar] 5 no client.children ... yet 2022-11-17 13:01:23.589 WARNING (MainThread) [homeassistant.util.async] Detected blocking call to sleep inside the event loop. This is causing stability issues. Please report issue to the custom integration author for aula doing blocking calls at custom_components/aula/calendar.py, line 38: time.sleep(0.400) 2022-11-17 13:01:23.996 DEBUG (MainThread) [custom_components.aula.calendar] 6 no client.children ... yet 2022-11-17 13:01:23.998 WARNING (MainThread) [homeassistant.util.async] Detected blocking call to sleep inside the event loop. This is causing stability issues. Please report issue to the custom integration author for aula doing blocking calls at custom_components/aula/calendar.py, line 38: time.sleep(0.400) 2022-11-17 13:01:24.405 DEBUG (MainThread) [custom_components.aula.calendar] 7 no client.children ... yet 2022-11-17 13:01:24.410 WARNING (MainThread) [homeassistant.util.async] Detected blocking call to sleep inside the event loop. This is causing stability issues. Please report issue to the custom integration author for aula doing blocking calls at custom_components/aula/calendar.py, line 38: time.sleep(0.400) 2022-11-17 13:01:24.816 DEBUG (MainThread) [custom_components.aula.calendar] 8 no client.children ... yet 2022-11-17 13:01:24.820 WARNING (MainThread) [homeassistant.util.async] Detected blocking call to sleep inside the event loop. This is causing stability issues. Please report issue to the custom integration author for aula doing blocking calls at custom_components/aula/calendar.py, line 38: time.sleep(0.400) 2022-11-17 13:01:25.226 DEBUG (MainThread) [custom_components.aula.calendar] 9 no client.children ... yet 2022-11-17 13:01:25.229 WARNING (MainThread) [homeassistant.util.async] Detected blocking call to sleep inside the event loop. This is causing stability issues. Please report issue to the custom integration author for aula doing blocking calls at custom_components/aula/calendar.py, line 38: time.sleep(0.400) 2022-11-17 13:01:25.633 DEBUG (MainThread) [custom_components.aula.calendar] 10 no client.children ... yet 2022-11-17 13:01:25.636 WARNING (MainThread) [homeassistant.util.async] Detected blocking call to sleep inside the event loop. This is causing stability issues. Please report issue to the custom integration author for aula doing blocking calls at custom_components/aula/calendar.py, line 38: time.sleep(0.400) 2022-11-17 13:01:25.892 DEBUG (SyncWorker_6) [custom_components.aula.client] LOGIN: True 2022-11-17 13:01:26.040 DEBUG (MainThread) [custom_components.aula.calendar] Got client._children, breaking 2022-11-17 13:01:26.148 DEBUG (SyncWorker_6) [custom_components.aula.client] Fetching calendars... 2022-11-17 13:01:26.149 DEBUG (SyncWorker_6) [custom_components.aula.client] Calendar post-data: {"instProfileIds":[1400000,3800000,3900000],"resourceIds":[],"start":"2022-11-17 00:00:00.0000+0000","end":"2022-12-01 00:00:00.0000+0000"} 2022-11-17 13:01:27.694 DEBUG (SyncWorker_6) [custom_components.aula.client] guardian :jan????? 2022-11-17 13:01:27.864 ERROR (MainThread) [aiohttp.server] Error handling request Traceback (most recent call last): File "/usr/local/lib/python3.10/site-packages/aiohttp/web_protocol.py", line 435, in _handle_request resp = await request_handler(request) File "/usr/local/lib/python3.10/site-packages/aiohttp/web_app.py", line 504, in _handle resp = await handler(request) File "/usr/local/lib/python3.10/site-packages/aiohttp/web_middlewares.py", line 117, in impl return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 60, in security_filter_middleware return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 100, in forwarded_middleware return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 28, in request_context_middleware return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 82, in ban_middleware return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 236, in auth_middleware return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 136, in handle result = await result File "/usr/src/homeassistant/homeassistant/components/hassio/ingress.py", line 56, in _handle return await self._handle_websocket(request, token, path) File "/usr/src/homeassistant/homeassistant/components/hassio/ingress.py", line 89, in _handle_websocket await ws_server.prepare(request) File "/usr/local/lib/python3.10/site-packages/aiohttp/web_ws.py", line 138, in prepare payload_writer = await super().prepare(request) File "/usr/local/lib/python3.10/site-packages/aiohttp/web_response.py", line 421, in prepare return await self._start(request) File "/usr/local/lib/python3.10/site-packages/aiohttp/web_response.py", line 429, in _start await self._write_headers() File "/usr/local/lib/python3.10/site-packages/aiohttp/web_response.py", line 502, in _write_headers await writer.write_headers(status_line, self._headers) File "/usr/local/lib/python3.10/site-packages/aiohttp/http_writer.py", line 131, in write_headers self._write(buf) File "/usr/local/lib/python3.10/site-packages/aiohttp/http_writer.py", line 76, in _write raise ConnectionResetError("Cannot write to closing transport") ConnectionResetError: Cannot write to closing transport 2022-11-17 13:01:27.965 WARNING (MainThread) [homeassistant.components.sensor] Setup of sensor platform aula is taking over 10 seconds. 2022-11-17 13:01:28.177 DEBUG (SyncWorker_6) [custom_components.aula.client] widgetId [{'placement': 'RightOfOverview', 'widget': {'widgetId': '0003', 'isSecure': True, 'canAccessOnMobile': True, 'canBePlacedInsideModule': False, 'canBePlacedOnGroup': False, 'canBePlacedOnFullPage': False, 'supportsTestMode': True, 'widgetSupplier': 'Meebook', 'isPilot': False, 'widgetVersion': '0001', 'iconEmployee': '', 'iconHover': '', 'id': 3, 'name': 'Ugens forløb - Meebook Forældre', 'icon': '', 'description': 'Parent widiget that shows the books the students/children will work with in the current week', 'url': '/widgets/W0003V0001', 'type': 'secure'}, 'id': 4867, 'order': 1, 'institutionRole': 'guardian', 'scope': 'Institution', 'centralDisplayMode': 'ShownAsDefault', 'municipalityDisplayMode': 'ShownAsDefault', 'institutionDisplayMode': 'ShownAsDefault', 'aggregatedDisplayMode': 'Shown', 'restrictedGroups': []}, {'placement': 'RightOfOverview', 'widget': {'widgetId': '0002', 'isSecure': True, 'canAccessOnMobile': True, 'canBePlacedInsideModule': False, 'canBePlacedOnGroup': False, 'canBePlacedOnFullPage': False, 'supportsTestMode': True, 'widgetSupplier': 'Meebook', 'isPilot': False, 'widgetVersion': '0001', 'iconEmployee': '', 'iconHover': '', 'id': 2, 'name': 'Elevplaner med nyt - Meebook Forældre', 'icon': '', 'description': 'Parent widiget that shows student plans with unseen events', 'url': '/widgets/W0002V0001', 'type': 'secure'}, 'id': 4866, 'order': 2, 'institutionRole': 'guardian', 'scope': 'Institution', 'centralDisplayMode': 'ShownAsDefault', 'municipalityDisplayMode': 'ShownAsDefault', 'institutionDisplayMode': 'ShownAsDefault', 'aggregatedDisplayMode': 'Shown', 'restrictedGroups': []}, {'placement': 'RightOfOverview', 'widget': {'widgetId': '0053', 'isSecure': True, 'canAccessOnMobile': True, 'canBePlacedInsideModule': True, 'canBePlacedOnGroup': False, 'canBePlacedOnFullPage': True, 'supportsTestMode': True, 'widgetSupplier': 'IST', 'isPilot': False, 'widgetVersion': '0001', 'iconEmployee': '', 'iconHover': '', 'id': 45, 'name': 'SFO Admin (forældre)', 'icon': 'static/widget/W0053V0001.svg', 'description': 'SFO Admin varetager tilknytning af yderligere kontaktpersoner til det enkelte barn', 'url': 'https://saml.borger.tabulex.dk/simplesaml/module.php/tabulexaulalogin/aula.php?appid=sfoadminforaeldre', 'type': 'sso'}, 'id': 49371, 'order': 3, 'institutionRole': 'guardian', 'scope': 'Institution', 'centralDisplayMode': 'ShownAsDefault', 'municipalityDisplayMode': 'ShownAsDefault', 'institutionDisplayMode': 'ShownAsDefault', 'aggregatedDisplayMode': 'Shown', 'restrictedGroups': []}, {'placement': 'RightOfOverview', 'widget': {'widgetId': '0047', 'isSecure': True, 'canAccessOnMobile': True, 'canBePlacedInsideModule': True, 'canBePlacedOnGroup': False, 'canBePlacedOnFullPage': True, 'supportsTestMode': True, 'widgetSupplier': 'IST', 'isPilot': False, 'widgetVersion': '0001', 'iconEmployee': '', 'iconHover': '', 'id': 39, 'name': 'Fravær - forældreindberetning', 'icon': 'static/widget/W0047V0001.svg', 'description': 'Fravær hjælper dig med at se dine børns fravær og giver dig mulighed for at melde dem syge.', 'url': 'https://saml.borger.tabulex.dk/simplesaml/module.php/tabulexaulalogin/aula.php?appid=fravaerforaeldre', 'type': 'sso'}, 'id': 86550, 'order': 4, 'institutionRole': 'guardian', 'scope': 'Institution', 'centralDisplayMode': 'ShownAsDefault', 'municipalityDisplayMode': 'ShownAsDefault', 'institutionDisplayMode': 'ShownAsDefault', 'aggregatedDisplayMode': 'Shown', 'restrictedGroups': []}, {'placement': 'BelowCalendar', 'widget': {'widgetId': '0004', 'isSecure': True, 'canAccessOnMobile': True, 'canBePlacedInsideModule': True, 'canBePlacedOnGroup': True, 'canBePlacedOnFullPage': True, 'supportsTestMode': True, 'widgetSupplier': 'Meebook', 'isPilot': False, 'widgetVersion': '0001', 'iconEmployee': '', 'iconHover': '', 'id': 4, 'name': 'Ugeplan - Meebook Forældre', 'icon': '', 'description': 'Parent widiget that shows a week plan for each student/child', 'url': '/widgets/W0004V0001', 'type': 'secure'}, 'id': 4868, 'order': 5, 'institutionRole': 'guardian', 'scope': 'Institution', 'centralDisplayMode': 'ShownAsDefault', 'municipalityDisplayMode': 'ShownAsDefault', 'institutionDisplayMode': 'ShownAsDefault', 'aggregatedDisplayMode': 'Shown', 'restrictedGroups': []}, {'placement': 'OwnPage', 'widget': {'widgetId': '0018', 'isSecure': True, 'canAccessOnMobile': True, 'canBePlacedInsideModule': True, 'canBePlacedOnGroup': True, 'canBePlacedOnFullPage': True, 'supportsTestMode': True, 'widgetSupplier': 'EasyIQ', 'isPilot': False, 'widgetVersion': '0001', 'iconEmployee': '', 'iconHover': '', 'id': 15, 'name': 'EasyIQ Links', 'icon': 'static/widget/W0018V0001.svg', 'description': 'Tilbyder linksamling til slutbrugere.', 'url': '/widgets/W0018V0001', 'type': 'secure'}, 'id': 10380, 'order': 6, 'institutionRole': 'guardian', 'scope': 'Institution', 'centralDisplayMode': 'ShownAsDefault', 'municipalityDisplayMode': 'ShownAsDefault', 'institutionDisplayMode': 'ShownAsDefault', 'aggregatedDisplayMode': 'Shown', 'restrictedGroups': []}] 2022-11-17 13:01:28.178 DEBUG (SyncWorker_6) [custom_components.aula.client] Widget 0003 Ugens forløb - Meebook Forældre 2022-11-17 13:01:28.178 DEBUG (SyncWorker_6) [custom_components.aula.client] Widget 0002 Elevplaner med nyt - Meebook Forældre 2022-11-17 13:01:28.178 DEBUG (SyncWorker_6) [custom_components.aula.client] Widget 0053 SFO Admin (forældre) 2022-11-17 13:01:28.178 DEBUG (SyncWorker_6) [custom_components.aula.client] Widget 0047 Fravær - forældreindberetning 2022-11-17 13:01:28.179 DEBUG (SyncWorker_6) [custom_components.aula.client] Widget 0004 Ugeplan - Meebook Forældre 2022-11-17 13:01:28.179 DEBUG (SyncWorker_6) [custom_components.aula.client] Setting meebook to 1 2022-11-17 13:01:28.179 DEBUG (SyncWorker_6) [custom_components.aula.client] In the Meebook flow... 2022-11-17 13:01:28.272 DEBUG (SyncWorker_6) [custom_components.aula.client] Token Bearer eyJ0...ZFvQ 2022-11-17 13:01:28.604 DEBUG (SyncWorker_6) [custom_components.aula.client] Meebook ugeplaner status_code 500 2022-11-17 13:01:28.605 DEBUG (SyncWorker_6) [custom_components.aula.client] Meebook ugeplaner response <!DOCTYPE html>

Hov, der opstod en fejl

Det kan der være forskellige grunde til.

Billeder
Hvis du prøvet at lægge et billede eller fil ind der mangler endelserne .jpg, .png eller .gif

Pdf
Du har lagt en pdf op uden endelsen .pdf

Aktivering
Du kan kun bruge dit aktiveringslink én gang. Log ind med din mail og password eller dit uni-login

2022-11-17 13:01:28.605 WARNING (SyncWorker_6) [custom_components.aula.client] Could not parse ugeplaner (Meebook) ...

scaarup commented 1 year ago

Gider du manuelt at tilføje/hardcode: '&institutionFilter=G18264' Til get_payload på linje 157 ?

get_payload = '/relatedweekplan/all?currentWeekNumber='+week+'&userProfile=guardian&childFilter='+childUserIds+'&institutionFilter=G18264'

JanHG commented 1 year ago

Done

/\ | | / \ | | / /\ | | | | |/ ` | / __ \ || | | (| | // __,||_,| Aula integration, version: 0.1.155 This is a custom integration If you have any issues with this you need to open an issue here: https://github.com/scaarup/aula/issues

2022-11-17 13:45:06.998 DEBUG (SyncWorker_3) [custom_components.aula.client] self._schoolschedule True 2022-11-17 13:45:06.998 DEBUG (SyncWorker_3) [custom_components.aula.client] self._ugeplan True 2022-11-17 13:45:06.998 DEBUG (SyncWorker_3) [custom_components.aula.client] is_logged_in? False 2022-11-17 13:45:06.998 DEBUG (SyncWorker_3) [custom_components.aula.client] Logging in 2022-11-17 13:45:07.771 DEBUG (MainThread) [custom_components.aula.calendar] 0 no client.children ... yet 2022-11-17 13:45:07.776 WARNING (MainThread) [homeassistant.util.async] Detected blocking call to sleep inside the event loop. This is causing stability issues. Please report issue to the custom integration author for aula doing blocking calls at custom_components/aula/calendar.py, line 38: time.sleep(0.400) 2022-11-17 13:45:08.183 DEBUG (MainThread) [custom_components.aula.calendar] 1 no client.children ... yet 2022-11-17 13:45:08.186 WARNING (MainThread) [homeassistant.util.async] Detected blocking call to sleep inside the event loop. This is causing stability issues. Please report issue to the custom integration author for aula doing blocking calls at custom_components/aula/calendar.py, line 38: time.sleep(0.400) 2022-11-17 13:45:08.590 DEBUG (MainThread) [custom_components.aula.calendar] 2 no client.children ... yet 2022-11-17 13:45:08.593 WARNING (MainThread) [homeassistant.util.async] Detected blocking call to sleep inside the event loop. This is causing stability issues. Please report issue to the custom integration author for aula doing blocking calls at custom_components/aula/calendar.py, line 38: time.sleep(0.400) 2022-11-17 13:45:09.016 DEBUG (MainThread) [custom_components.aula.calendar] 3 no client.children ... yet 2022-11-17 13:45:09.020 WARNING (MainThread) [homeassistant.util.async] Detected blocking call to sleep inside the event loop. This is causing stability issues. Please report issue to the custom integration author for aula doing blocking calls at custom_components/aula/calendar.py, line 38: time.sleep(0.400) 2022-11-17 13:45:09.425 DEBUG (MainThread) [custom_components.aula.calendar] 4 no client.children ... yet 2022-11-17 13:45:09.427 WARNING (MainThread) [homeassistant.util.async] Detected blocking call to sleep inside the event loop. This is causing stability issues. Please report issue to the custom integration author for aula doing blocking calls at custom_components/aula/calendar.py, line 38: time.sleep(0.400) 2022-11-17 13:45:09.831 DEBUG (MainThread) [custom_components.aula.calendar] 5 no client.children ... yet 2022-11-17 13:45:09.836 WARNING (MainThread) [homeassistant.util.async] Detected blocking call to sleep inside the event loop. This is causing stability issues. Please report issue to the custom integration author for aula doing blocking calls at custom_components/aula/calendar.py, line 38: time.sleep(0.400) 2022-11-17 13:45:10.192 DEBUG (SyncWorker_3) [custom_components.aula.client] LOGIN: True 2022-11-17 13:45:10.241 DEBUG (MainThread) [custom_components.aula.calendar] Got client._children, breaking 2022-11-17 13:45:10.970 DEBUG (SyncWorker_3) [custom_components.aula.client] Fetching calendars... 2022-11-17 13:45:10.970 DEBUG (SyncWorker_3) [custom_components.aula.client] Calendar post-data: {"instProfileIds":[1400000,3800000,3900000],"resourceIds":[],"start":"2022-11-17 00:00:00.0000+0000","end":"2022-12-01 00:00:00.0000+0000"} 2022-11-17 13:45:11.747 DEBUG (SyncWorker_3) [custom_components.aula.client] guardian :jan????? 2022-11-17 13:45:11.977 DEBUG (SyncWorker_3) [custom_components.aula.client] widgetId [{'placement': 'RightOfOverview', 'widget': {'widgetId': '0003', 'isSecure': True, 'canAccessOnMobile': True, 'canBePlacedInsideModule': False, 'canBePlacedOnGroup': False, 'canBePlacedOnFullPage': False, 'supportsTestMode': True, 'widgetSupplier': 'Meebook', 'isPilot': False, 'widgetVersion': '0001', 'iconEmployee': '', 'iconHover': '', 'id': 3, 'name': 'Ugens forløb - Meebook Forældre', 'icon': '', 'description': 'Parent widiget that shows the books the students/children will work with in the current week', 'url': '/widgets/W0003V0001', 'type': 'secure'}, 'id': 4867, 'order': 1, 'institutionRole': 'guardian', 'scope': 'Institution', 'centralDisplayMode': 'ShownAsDefault', 'municipalityDisplayMode': 'ShownAsDefault', 'institutionDisplayMode': 'ShownAsDefault', 'aggregatedDisplayMode': 'Shown', 'restrictedGroups': []}, {'placement': 'RightOfOverview', 'widget': {'widgetId': '0002', 'isSecure': True, 'canAccessOnMobile': True, 'canBePlacedInsideModule': False, 'canBePlacedOnGroup': False, 'canBePlacedOnFullPage': False, 'supportsTestMode': True, 'widgetSupplier': 'Meebook', 'isPilot': False, 'widgetVersion': '0001', 'iconEmployee': '', 'iconHover': '', 'id': 2, 'name': 'Elevplaner med nyt - Meebook Forældre', 'icon': '', 'description': 'Parent widiget that shows student plans with unseen events', 'url': '/widgets/W0002V0001', 'type': 'secure'}, 'id': 4866, 'order': 2, 'institutionRole': 'guardian', 'scope': 'Institution', 'centralDisplayMode': 'ShownAsDefault', 'municipalityDisplayMode': 'ShownAsDefault', 'institutionDisplayMode': 'ShownAsDefault', 'aggregatedDisplayMode': 'Shown', 'restrictedGroups': []}, {'placement': 'RightOfOverview', 'widget': {'widgetId': '0053', 'isSecure': True, 'canAccessOnMobile': True, 'canBePlacedInsideModule': True, 'canBePlacedOnGroup': False, 'canBePlacedOnFullPage': True, 'supportsTestMode': True, 'widgetSupplier': 'IST', 'isPilot': False, 'widgetVersion': '0001', 'iconEmployee': '', 'iconHover': '', 'id': 45, 'name': 'SFO Admin (forældre)', 'icon': 'static/widget/W0053V0001.svg', 'description': 'SFO Admin varetager tilknytning af yderligere kontaktpersoner til det enkelte barn', 'url': 'https://saml.borger.tabulex.dk/simplesaml/module.php/tabulexaulalogin/aula.php?appid=sfoadminforaeldre', 'type': 'sso'}, 'id': 49371, 'order': 3, 'institutionRole': 'guardian', 'scope': 'Institution', 'centralDisplayMode': 'ShownAsDefault', 'municipalityDisplayMode': 'ShownAsDefault', 'institutionDisplayMode': 'ShownAsDefault', 'aggregatedDisplayMode': 'Shown', 'restrictedGroups': []}, {'placement': 'RightOfOverview', 'widget': {'widgetId': '0047', 'isSecure': True, 'canAccessOnMobile': True, 'canBePlacedInsideModule': True, 'canBePlacedOnGroup': False, 'canBePlacedOnFullPage': True, 'supportsTestMode': True, 'widgetSupplier': 'IST', 'isPilot': False, 'widgetVersion': '0001', 'iconEmployee': '', 'iconHover': '', 'id': 39, 'name': 'Fravær - forældreindberetning', 'icon': 'static/widget/W0047V0001.svg', 'description': 'Fravær hjælper dig med at se dine børns fravær og giver dig mulighed for at melde dem syge.', 'url': 'https://saml.borger.tabulex.dk/simplesaml/module.php/tabulexaulalogin/aula.php?appid=fravaerforaeldre', 'type': 'sso'}, 'id': 86550, 'order': 4, 'institutionRole': 'guardian', 'scope': 'Institution', 'centralDisplayMode': 'ShownAsDefault', 'municipalityDisplayMode': 'ShownAsDefault', 'institutionDisplayMode': 'ShownAsDefault', 'aggregatedDisplayMode': 'Shown', 'restrictedGroups': []}, {'placement': 'BelowCalendar', 'widget': {'widgetId': '0004', 'isSecure': True, 'canAccessOnMobile': True, 'canBePlacedInsideModule': True, 'canBePlacedOnGroup': True, 'canBePlacedOnFullPage': True, 'supportsTestMode': True, 'widgetSupplier': 'Meebook', 'isPilot': False, 'widgetVersion': '0001', 'iconEmployee': '', 'iconHover': '', 'id': 4, 'name': 'Ugeplan - Meebook Forældre', 'icon': '', 'description': 'Parent widiget that shows a week plan for each student/child', 'url': '/widgets/W0004V0001', 'type': 'secure'}, 'id': 4868, 'order': 5, 'institutionRole': 'guardian', 'scope': 'Institution', 'centralDisplayMode': 'ShownAsDefault', 'municipalityDisplayMode': 'ShownAsDefault', 'institutionDisplayMode': 'ShownAsDefault', 'aggregatedDisplayMode': 'Shown', 'restrictedGroups': []}, {'placement': 'OwnPage', 'widget': {'widgetId': '0018', 'isSecure': True, 'canAccessOnMobile': True, 'canBePlacedInsideModule': True, 'canBePlacedOnGroup': True, 'canBePlacedOnFullPage': True, 'supportsTestMode': True, 'widgetSupplier': 'EasyIQ', 'isPilot': False, 'widgetVersion': '0001', 'iconEmployee': '', 'iconHover': '', 'id': 15, 'name': 'EasyIQ Links', 'icon': 'static/widget/W0018V0001.svg', 'description': 'Tilbyder linksamling til slutbrugere.', 'url': '/widgets/W0018V0001', 'type': 'secure'}, 'id': 10380, 'order': 6, 'institutionRole': 'guardian', 'scope': 'Institution', 'centralDisplayMode': 'ShownAsDefault', 'municipalityDisplayMode': 'ShownAsDefault', 'institutionDisplayMode': 'ShownAsDefault', 'aggregatedDisplayMode': 'Shown', 'restrictedGroups': []}] 2022-11-17 13:45:11.977 DEBUG (SyncWorker_3) [custom_components.aula.client] Widget 0003 Ugens forløb - Meebook Forældre 2022-11-17 13:45:11.977 DEBUG (SyncWorker_3) [custom_components.aula.client] Widget 0002 Elevplaner med nyt - Meebook Forældre 2022-11-17 13:45:11.978 DEBUG (SyncWorker_3) [custom_components.aula.client] Widget 0053 SFO Admin (forældre) 2022-11-17 13:45:11.978 DEBUG (SyncWorker_3) [custom_components.aula.client] Widget 0047 Fravær - forældreindberetning 2022-11-17 13:45:11.978 DEBUG (SyncWorker_3) [custom_components.aula.client] Widget 0004 Ugeplan - Meebook Forældre 2022-11-17 13:45:11.978 DEBUG (SyncWorker_3) [custom_components.aula.client] Setting meebook to 1 2022-11-17 13:45:11.978 DEBUG (SyncWorker_3) [custom_components.aula.client] In the Meebook flow... 2022-11-17 13:45:12.096 DEBUG (SyncWorker_3) [custom_components.aula.client] Token Bearer eyJ0...u8rA 2022-11-17 13:45:12.428 DEBUG (SyncWorker_3) [custom_components.aula.client] Meebook ugeplaner status_code 500 2022-11-17 13:45:12.428 DEBUG (SyncWorker_3) [custom_components.aula.client] Meebook ugeplaner response <!DOCTYPE html>

Hov, der opstod en fejl

Det kan der være forskellige grunde til.

Billeder
Hvis du prøvet at lægge et billede eller fil ind der mangler endelserne .jpg, .png eller .gif

Pdf
Du har lagt en pdf op uden endelsen .pdf

Aktivering
Du kan kun bruge dit aktiveringslink én gang. Log ind med din mail og password eller dit uni-login

2022-11-17 13:45:12.436 WARNING (SyncWorker_3) [custom_components.aula.client] Could not parse ugeplaner (Meebook) ...

scaarup commented 1 year ago

Prøv at ret linje 159 til: ugeplaner = requests.get(MEEBOOK_API + get_payload, headers=headers, verify=True)

Hvis det er samme fejl, behøver du ikke paste det hele ;)

JanHG commented 1 year ago

Jeg kan ikke helt gennemskue hvor meget info du skal bruge, så du fik bare det hele. :-)

Jeg har rettet, men umiddelbart samme fejl.

scaarup commented 1 year ago

https://app.meebook.com/aulaapi/relatedweekplan/all?currentWeekNumber=2022-W46&userProfile=guardian&childFilter^\[^\]=lud?????&childFilter^\[^\]=ann?????&childFilter^\[^\]=agn?????&institutionFilter^\[^\]=269007&institutionFilter^\[^\]=G18264

Tak :).

Prøv lige at hiv den seneste client.py ned fra branchen (https://github.com/scaarup/aula/tree/meebook-integration)

Hvis det fejler på samme måde, så vil jeg bare gerne se output fra

_LOGGER.debug("get_payload: "+get_payload)

JanHG commented 1 year ago

Nu kommer der noget retur, men det kan ikke parses.

2022-11-17 14:49:20.357 DEBUG (SyncWorker_5) [custom_components.aula.client] get_payload: /relatedweekplan/all?currentWeekNumber=2022-W46&userProfile=guardian&childFilter[]=lud?????&childFilter[]=ann?????&childFilter[]=agn?????&institutionFilter[]=269007&institutionFilter[]=269007&institutionFilter[]=G18264 2022-11-17 14:49:20.678 DEBUG (SyncWorker_5) [custom_components.aula.client] Meebook ugeplaner status_code 200 2022-11-17 14:49:20.679 DEBUG (SyncWorker_5) [custom_components.aula.client] Meebook ugeplaner response [{"id":497514,"name":"Lud...","unilogin":"lud?????","weekPlan":[{"date":"mandag 14. nov.","tasks":[{"id":3038052,"type":"comment","author":"Met...","group":"3.a - ugeplan","pill":"Ingen fag tilknyttet","content":"IDR\u00c6T:\nMusik og bev\u00e6gelse.\nVi er i hallen, hvor vi arbejder med rytme, bev\u00e6gelse og koordination.\nHUSK idr\u00e6tst\u00f8j og h\u00e5ndkl\u00e6de (evt. indend\u00f8rs kondisko).\n\nDANSK\n\nVi skal i denne uge:\n\nL\u00c6SE:\nI skolen skal vi arbejde i systemet Tid til l\u00e6seforst\u00e5else. Vi arbejder med at l\u00e6se og forst\u00e5 forskellige teksttyper ud fra nogle forskellige sp\u00f8rgsm\u00e5lstyper. Ligeledes har vi fokus p\u00e5 at holde orden i h\u00e6ftet og at formulere os i flotte s\u00e6tninger, n\u00e5r vi svarer p\u00e5 sp\u00f8rgsm\u00e5l. Dette m\u00e5 i meget gerne have fokus p\u00e5 mundtligt i den kommende periode. N\u00e5r I stiller b\u00f8rnene et sp\u00f8rgsm\u00e5l, s\u00e5 bed dem gerne svare med en fuld s\u00e6tning. Fx: Hvor mange appelsiner skal man bruge til frugtsalaten? Mange af b\u00f8rnene ville blot svare: 2. Men her vil det v\u00e6re fint at lade dem svare: Til frugtsalaten skal man bruge 2 appelsiner. \n\nVi gennemg\u00e5r opgaven fra sidste uge, hvor vi arbejdede med en opskrift p\u00e5 Frugtsalat. B\u00f8rnene f\u00e5r opskriften med hjem, da de meget gerne ville pr\u00f8ve at lave den. Vi skal bl.a. arbejde med digtet\/sangen \"Snemand Frost og Fr\u00f8ken T\u00f8 i denne uge. \n\nHusk fortsat at l\u00e6se hjemme i 20 min. og at skrive l\u00e6sekort.\n\nSTAVEVEJEN:\nVi arbejder med siderne 28-30. Der m\u00e5 gerne arbejdes med Stavevejen.dk derhjemme.\n\nDEN NATIONALE OVERGANGSTEST I L\u00c6SNING:\nVi laver demotesten i skolen og taler om testens opgavetyper. Det er ogs\u00e5 en god ide at lave den hjemme. Vi laver derefter selve testen.","editUrl":"https:\/\/app.meebook.com\/\/arsplaner\/dlap\/\/956783\/\/202246"}]},{"date":"tirsdag 15. nov.","tasks":[]},{"date":"onsdag 16. nov.","tasks":[{"id":3038052,"type":"comment","author":"Met...","group":"3.a - ugeplan","pill":"Ingen fag tilknyttet","content":"BIBLIOTEKET:\nVi skal have et lille opl\u00e6g af vores bibliotekar om gode b\u00f8ger. \n\nHusk b\u00f8ger s\u00e5 i kan l\u00e5ne nogle nye.","editUrl":"https:\/\/app.meebook.com\/\/arsplaner\/dlap\/\/956783\/\/202246"}]},{"date":"torsdag 17. nov.","tasks":[{"id":3038052,"type":"comment","author":"Met...","group":"3.a - ugeplan","pill":"Ingen fag tilknyttet","content":"Teknologiforst\u00e5else: Vi skal arbejde med Jamboard og lave en digital planche om internettet.\n\nHistorie:\nArbejde med vores opgaver i emnet om de f\u00f8rste mennesker og j\u00e6ger\/samler samfundet.","editUrl":"https:\/\/app.meebook.com\/\/arsplaner\/dlap\/\/956783\/\/202246"}]},{"date":"fredag 18. nov.","tasks":[]}]},{"id":633968,"name":"Ann...","unilogin":"ann?????","weekPlan":[{"date":"mandag 14. nov.","tasks":[{"id":3028973,"type":"comment","author":"May...","group":"0C (22\/23)","pill":"B\u00f8rnehaveklasse, B\u00f8rnehaveklassen, Dansk, Matematik","content":"Dansk: Vi starter med bogstavet k som lyd og form\nUSU\nMat: Godtfreds dyrehandel og \u00f8velse af talr\u00e6kken fra 10-20. \u00d8v gerne derhjemme.\nBiblioteket","editUrl":"https:\/\/app.meebook.com\/\/arsplaner\/dlap\/\/899210\/\/202246"}]},{"date":"tirsdag 15. nov.","tasks":[{"id":3028973,"type":"comment","author":"May...","group":"0C (22\/23)","pill":"B\u00f8rnehaveklasse, B\u00f8rnehaveklassen, Dansk, Matematik","content":"Mat: Vi arbejder fortsat i Kontext mat bog med geometri og brug af en lineal.\nMusik, leg og bev\u00e6gelse.\nDansk: Bogstavsbanko med pr\u00e6mier","editUrl":"https:\/\/app.meebook.com\/\/arsplaner\/dlap\/\/899210\/\/202246"}]},{"date":"onsdag 16. nov.","tasks":[{"id":3028973,"type":"comment","author":"May...","group":"0C (22\/23)","pill":"B\u00f8rnehaveklasse, B\u00f8rnehaveklassen, Dansk, Matematik","content":"Dansk: Bogstavet U \nsom lyd og bev\u00e6gelse.\nUSU\nMusik, leg og bev\u00e6gelse..","editUrl":"https:\/\/app.meebook.com\/\/arsplaner\/dlap\/\/899210\/\/202246"}]},{"date":"torsdag 17. nov.","tasks":[{"id":3028973,"type":"comment","author":"May...","group":"0C (22\/23)","pill":"B\u00f8rnehaveklasse, B\u00f8rnehaveklassen, Dansk, Matematik","content":"Dansk: \nRep side i Fandango mini af bogstaverne f,k og u\nKrea: Vi er s\u00e5 heldige at Katharinas mor har v\u00e6ret forbi med kalenderlys til dekorationer, s\u00e5 vi skal lave fine juledekorationer.\nMat: Figurer og \n sammensatte figurer.","editUrl":"https:\/\/app.meebook.com\/\/arsplaner\/dlap\/\/899210\/\/202246"}]},{"date":"fredag 18. nov.","tasks":[{"id":3028973,"type":"comment","author":"May...","group":"0C (22\/23)","pill":"B\u00f8rnehaveklasse, B\u00f8rnehaveklassen, Dansk, Matematik","content":"Dansk: L\u00e6seside i Fandango mini med huskeordene ER og IKKE. De m\u00e5 meget gerne \u00f8ves derhjemme.\nL\u00e6sesiden kommer med hjem til at l\u00e6se hjemme.\nI skal \u00f8ve huskeordene og l\u00e6se hvad der st\u00e5r i kasse nr 1. Resten af siden skal i ikke g\u00f8re mere ud af.\nVi repeterer p\u00e5 mandag \nIdr\u00e6t.\nEngelsk","editUrl":"https:\/\/app.meebook.com\/\/arsplaner\/dlap\/\/899210\/\/202246"}]}]}] 2022-11-17 14:49:20.680 WARNING (SyncWorker_5) [custom_components.aula.client] Could not parse ugeplaner (Meebook)

scaarup commented 1 year ago

Det var fedt 🙂

Jeg vender tilbage når jeg har rodet lidt med at parse det data.