ical import hinter Login - WebUntis

Begonnen von Otto, 14 November 2018, 10:18:36

Vorheriges Thema - Nächstes Thema

Otto

Hi,

ich möchte jeden Tag eine ical Datei für einen Stundenplan importieren.

Die ical liegt in einem geschützten Bereich hinter dieser Seite https://kephiso.webuntis.com/WebUntis/?school=bbs-neustadt-adw

Wie komme ich an die Datei um diese zu verarbeiten? Das Login ist leider als PopUp und ich habe dazu keine http-Adresse

Wie stelle ich das an?
Gruss Otto

.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.

docker - homematic

rischbiter123

Moin,

schau Dir mal diesen Link an. Aber wie dort auch steht, muss dies (kostenpflichtig) von der Schule dazugebucht sein. Leider (wenn auch verständlich) machen das die wenigsten.
https://www.untis.at/HTML/WebHelp/de/untis/wu_ical_kalender_abonnement.htm

LG

Andreas
4*Raspi, Max Thermostate und Fensterkontakte, FB7590, Mysensors und NanoCUL, IT und Sonoff, zigbee2mqtt2

Otto

#2
Hi Andreas,
ja, das ist ja das Problem. Ein Abo gibt es nicht.

Nach dem Login kann man aber ein ical Datei herunterladen. An die will ich ran :)
Gruss Otto

.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.

docker - homematic

rischbiter123

Kannst Du ruhig. Mache ich jeden Sonntag und lese die dann täglich in Fhem ein. Hat allerdings den Nachteil, dass man aktuelle Änderungen so nicht mitbekommt. Einen anderen Weg habe ich leider auch noch nicht gefunden.

Falls also hier jemand eine Möglichkeit sieht, ich stelle auch gerne meine Logindaten per PM zur Verfügung.

LG

Andreas
4*Raspi, Max Thermostate und Fensterkontakte, FB7590, Mysensors und NanoCUL, IT und Sonoff, zigbee2mqtt2

betateilchen

Zitat von: Otto am 14 November 2018, 10:18:36
Das Login ist leider als PopUp und ich habe dazu keine http-Adresse

Ich sehe kein Popup.

Aber kann nicht HTTPMOD die unterschiedlichsten Anmeldeverfahren? Damit käme man vielleicht ein Stück weiter und hätte die ausgelesene Seite zumindest mal in FHEM in einem Buffer stehen. Diese Daten dann an ein Calendar-device zu übergeben, sollte keine schwierige Aufgabe mehr sein.

-----------------------
Formuliere die Aufgabe möglichst einfach und
setze die Lösung richtig um - dann wird es auch funktionieren.
-----------------------
Lesen gefährdet die Unwissenheit!

Otto

Moin,

HTTPMOD ist schwere Kost  :)

Hab mal schnell den Login mitgeschnitten.

Request

POST /WebUntis/j_spring_security_check HTTP/1.1
Host: xxx.webuntis.com
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:60.0) Gecko/20100101 Firefox/60.0
Accept: application/json
Accept-Language: de,en-US;q=0.7,en;q=0.3
Accept-Encoding: gzip, deflate
Referer: https://xxx.webuntis.com/WebUntis/?school=xxx
content-type: application/x-www-form-urlencoded
origin: https://xxx.webuntis.com
Content-Length: 70
Cookie: schoolname="_xxxxxxxxxxxx"; JSESSIONID=8D9CBB38DFAF68Exxxxxxxxxxx
Connection: close

school=xxx&j_username=mxx.xxxe&j_password=xxxxx&token=


Response

HTTP/1.1 200 200
Server: nginx
Date: Wed, 14 Nov 2018 13:08:55 GMT
Content-Type: application/json;charset=UTF-8
Content-Length: 34
Connection: close
Set-Cookie: JSESSIONID=7F786476B3F941BA8A4xxxxxxxxxxxx; Path=/WebUntis; HttpOnly
Set-Cookie: schoolname="_xxxxxxxxxxxx"; Expires=Wed, 28-Nov-2018 13:08:54 GMT
Set-Cookie: schoolname="_xxxxxxxxxxxx"; Expires=Wed, 28-Nov-2018 13:08:54 GMT
Set-Cookie: auth="_cxxxxx=="; Version=1; Max-Age=0; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-XSS-Protection: 1; mode=block
X-Content-Type-Options: nosniff
X-UA-Compatible: IE=edge

{"reload":false,"state":"SUCCESS"}


... und wie bekomme ich das jetzt in HTTPMOD ?
Wie und wo kommen die Login Daten hin.

Kann mir da einer helfen, das ist zu hoch für mich.
Gruss Otto

.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.

docker - homematic

amenomade

#6
Mit reAuthRegex Login
enableCookies 1
sid01URL xxx.webuntis.com/WebUntis/j_spring_security_check
und sid01Data school=xxx&j_username=mxx.xxxe&j_password=xxxxx&token=
solltest Du etwas anfangen können...

Gibt es nicht auch auf der Hauptseite die Möglichkeit, Login-data einzugeben? Wäre einfacher als mit dem Popup. Ich kann nicht weiter gucken, da
ZitatDer WebUntis Service steht zwischen 14.11.2018 22:00 Uhr und 15.11.2018 07:30 Uhr wegen einer Datenbankmigration nicht zur Verfügung!

Hinweis: Sie werden automatisch zu WebUntis weitergeleitet, sobald die Seite wieder verfügbar ist.
Pi 3B, Alexa, CUL868+Selbstbau 1/2λ-Dipol-Antenne, USB Optolink / Vitotronic, Debmatic und HM / HmIP Komponenten, Rademacher Duofern Jalousien, Fritz!Dect Thermostaten, Proteus

Otto

Hi,

naja die Logindaten werden schon auf der Hauptseite eingegeben aber mit Javascript? verarbeitet.
Gruss Otto

.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.

docker - homematic

amenomade

ZitatMit reAuthRegex Login
enableCookies 1
sid01URL xxx.webuntis.com/WebUntis/j_spring_security_check
und sid01Data school=xxx&j_username=mxx.xxxe&j_password=xxxxx&token=
solltest Du etwas anfangen können...
Hast Du es probiert?
Pi 3B, Alexa, CUL868+Selbstbau 1/2λ-Dipol-Antenne, USB Optolink / Vitotronic, Debmatic und HM / HmIP Komponenten, Rademacher Duofern Jalousien, Fritz!Dect Thermostaten, Proteus

Otto

Danke das du nachfragst.

Nee, geht nicht. Weiß aber nicht warum.

Hier der hoffentlich richtige Teil des logs


2018.11.17 13:51:03.778 5: BBS: GetCookies is looking for Cookies
2018.11.17 13:51:03.778 4: BBS: GetCookies parsed Cookie: JSESSIONID Wert 99BE664273E123D5E7DE72D93D36E682 Rest Path=/WebUntis; HttpOnly
2018.11.17 13:51:03.778 4: BBS: GetCookies parsed Cookie: schoolname Wert "_axxxxxxxxxxxxxx" Rest Expires=Sat, 01-Dec-2018 12:51:04 GMT
2018.11.17 13:51:03.778 5: BBS: ExtractSid called, context reading, num
2018.11.17 13:51:03.778 5: BBS: CheckAuth is checking buffer with ReAuthRegex Login
2018.11.17 13:51:03.778 4: BBS: CheckAuth decided new authentication required
2018.11.17 13:51:03.778 4: BBS: Auth called with Steps: 01
2018.11.17 13:51:03.779 4: BBS: AddToQueue adds auth01, initial queue len: 0, prio
2018.11.17 13:51:03.779 5: BBS: AddToQueue prepends type auth01 to URL kephiso.webuntis.com/WebUntis/j_spring_security_check, data school=bbs-neustadt-adw&j_username=mxxx.xxxxxe&j_password=secret&token=, no headers, retry 0
2018.11.17 13:51:03.779 5: BBS: HandleSendQueue called, qlen = 1
2018.11.17 13:51:03.779 5: BBS: HandleSendQueue is using Cookie JSESSIONID with path  and Value 99BE664273E123D5E7DE72D93D36E682 (key JSESSIONID;, destination path is )
2018.11.17 13:51:03.779 5: BBS: HandleSendQueue is using Cookie schoolname with path  and Value "_axxxxxxxxxxxxxx" (key schoolname;, destination path is )
2018.11.17 13:51:03.779 5: BBS: HandleSendQueue is adding Cookie header: JSESSIONID=99BE664273E123D5E7DE72D93D36E682; schoolname="_axxxxxxxxxxxxxx"
2018.11.17 13:51:03.779 4: BBS: HandleSendQueue sends request type auth01 to URL kephiso.webuntis.com/WebUntis/j_spring_security_check,
data: school=bbs-neustadt-adw&j_username=mxxx.xxxxxe&j_password=secret&token=,
header: Cookie: JSESSIONID=99BE664273E123D5E7DE72D93D36E682; schoolname="_axxxxxxxxxxxxxx"
timeout 2
2018.11.17 13:51:03.779 5: HttpUtils url=kephiso.webuntis.com/WebUntis/j_spring_security_check
2018.11.17 13:51:03.779 3: BBS: Read callback: Error: kephiso.webuntis.com/WebUntis/j_spring_security_check: malformed or unsupported URL
2018.11.17 13:51:03.779 4: BBS: Read callback: request type was auth01 retry 0, body empty
2018.11.17 13:51:03.779 5: BBS: GetCookies is looking for Cookies
2018.11.17 13:51:03.779 4: BBS: GetCookies parsed Cookie: JSESSIONID Wert 99BE664273E123D5E7DE72D93D36E682 Rest Path=/WebUntis; HttpOnly
2018.11.17 13:51:03.779 4: BBS: GetCookies parsed Cookie: schoolname Wert "_axxxxxxxxxxxxxx" Rest Expires=Sat, 01-Dec-2018 12:51:04 GMT
2018.11.17 13:51:03.779 5: BBS: ExtractSid called, context sid, num 01
2018.11.17 13:51:03.779 4: BBS: AddToQueue adds update, initial queue len: 0
2018.11.17 13:51:03.779 5: BBS: AddToQueue adds type update to URL https://kephiso.webuntis.com/WebUntis/?school=bbs-neustadt-adw, no data, no headers, retry 1
2018.11.17 13:51:03.779 5: BBS: HandleSendQueue called, qlen = 1
2018.11.17 13:51:03.779 5: BBS: HandleSendQueue - minSendDelay not over, rescheduling


Liegt wohl an der Zeile
2018.11.17 13:51:03.779 3: BBS: Read callback: Error: kephiso.webuntis.com/WebUntis/j_spring_security_check: malformed or unsupported URL

Aber welche URL nehme ich?
Gruss Otto

.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.

docker - homematic

amenomade

#10
sid01URL und Haupt-URL mit https:// vorne

Mach mal ein "list BBS" bitte (login data ausblenden)
Pi 3B, Alexa, CUL868+Selbstbau 1/2λ-Dipol-Antenne, USB Optolink / Vitotronic, Debmatic und HM / HmIP Komponenten, Rademacher Duofern Jalousien, Fritz!Dect Thermostaten, Proteus

Otto

Hier das list

Internals:
   BUSY       0
   CHANGED   
   DEF        https://kephiso.webuntis.com/WebUntis/?school=bbs-neustadt-adw 120
   Interval   120
   LASTSEND   1542530347.52698
   LastAuthTry 2018-11-18 09:39:05
   MainURL    https://kephiso.webuntis.com/WebUntis/?school=bbs-neustadt-adw
   ModuleVersion 3.5.1 - 5.7.2018
   NAME       BBS
   NR         30
   STATE      ???
   TRIGGERTIME 1542530465.13284
   TRIGGERTIME_FMT 2018-11-18 09:41:05
   TYPE       HTTPMOD
   addr       https://kephiso.webuntis.com:443
   auth       0
   buf       
   code       200
   compress   1
   conn       
   data       
   displayurl https://kephiso.webuntis.com/WebUntis/?school=bbs-neustadt-adw
   header     Cookie: JSESSIONID=C480322E2226618D74CCA8CEC4188AAE; schoolname="_axxxxxxxxxxxxxx"
   host       kephiso.webuntis.com
   httpheader HTTP/1.1 200 200
Server: nginx
Date: Sun, 18 Nov 2018 08:39:08 GMT
Content-Type: text/html;charset=UTF-8
Content-Length: 4083
Connection: close
Pragma: no-cache
Cache-Control: no-cache, no-store, must-revalidate, pre-check=0, post-check=0
X-XSS-Protection: 1; mode=block
X-Content-Type-Options: nosniff
Content-Language: de
Vary: Accept-Encoding
Content-Encoding: gzip
X-UA-Compatible: IE=edge
   httpversion 1.0
   hu_blocking 0
   hu_filecount 96
   hu_port    443
   hu_portSfx
   ignoreredirects 0
   loglevel   4
   path       /WebUntis/?school=bbs-neustadt-adw
   protocol   https
   redirects  0
   timeout    2
   url        https://kephiso.webuntis.com/WebUntis/?school=bbs-neustadt-adw
   value      0
   HTTPCookieHash:
     JSESSIONID;:
       Name       JSESSIONID
       Options    Path=/WebUntis; HttpOnly
       Path       
       Value      C480322E2226618D74CCA8CEC4188AAE
     schoolname;:
       Name       schoolname
       Options    Expires=Sun, 02-Dec-2018 08:39:05 GMT
       Path       
       Value      "_axxxxxxxxxxxxxx"
   QUEUE:
   READINGS:
   REQUEST:
     data       
     header     
     ignoreredirects 0
     retryCount 1
     type       update
     url        https://kephiso.webuntis.com/WebUntis/?school=bbs-neustadt-adw
     value      0
   sslargs:
Attributes:
   disable    0
   enableCookies 1
   reAuthRegex Login
   room       IGS
   sid01Data  school=bbs-neustadt-adw&j_username=mxxx.xxxxxe&j_password=secret&token=
   sid01URL   https://kephiso.webuntis.com/WebUntis/j_spring_security_check
   userattr   sid01Data sid01URL
   verbose    5


Im Log fällt mir noch ein "HTTP response code 302" auf


2018.11.18 09:43:05.338 5: BBS: GetCookies is looking for Cookies
2018.11.18 09:43:05.338 5: BBS: ExtractSid called, context reading, num
2018.11.18 09:43:05.338 5: BBS: CheckAuth is checking buffer with ReAuthRegex Login
2018.11.18 09:43:05.338 4: BBS: CheckAuth decided new authentication required
2018.11.18 09:43:05.338 4: BBS: Auth called with Steps: 01
2018.11.18 09:43:05.338 4: BBS: AddToQueue adds auth01, initial queue len: 0, prio
2018.11.18 09:43:05.338 5: BBS: AddToQueue prepends type auth01 to URL https://kephiso.webuntis.com/WebUntis/j_spring_security_check, data school=bbs-neustadt-adw&j_username=mxxx.xxxxxe&j_password=secret&token=, no headers, retry 0
2018.11.18 09:43:05.338 5: BBS: HandleSendQueue called, qlen = 1
2018.11.18 09:43:05.338 5: BBS: HandleSendQueue is using Cookie JSESSIONID with path  and Value C480322E2226618D74CCA8CEC4188AAE (key JSESSIONID;, destination path is /WebUntis/j_spring_security_check)
2018.11.18 09:43:05.338 5: BBS: HandleSendQueue is using Cookie schoolname with path  and Value "_axxxxxxxxxxxxxx" (key schoolname;, destination path is /WebUntis/j_spring_security_check)
2018.11.18 09:43:05.338 5: BBS: HandleSendQueue is adding Cookie header: JSESSIONID=C480322E2226618D74CCA8CEC4188AAE; schoolname="_axxxxxxxxxxxxxx"
2018.11.18 09:43:05.338 4: BBS: HandleSendQueue sends request type auth01 to URL https://kephiso.webuntis.com/WebUntis/j_spring_security_check,
data: school=bbs-neustadt-adw&j_username=mxxx.xxxxxe&j_password=secret&token=,
header: Cookie: JSESSIONID=C480322E2226618D74CCA8CEC4188AAE; schoolname="_axxxxxxxxxxxxxx"
timeout 2
2018.11.18 09:43:05.338 5: HttpUtils url=https://kephiso.webuntis.com/WebUntis/j_spring_security_check
2018.11.18 09:43:05.338 4: BBS: AddToQueue adds update, initial queue len: 0
2018.11.18 09:43:05.338 5: BBS: AddToQueue adds type update to URL https://kephiso.webuntis.com/WebUntis/?school=bbs-neustadt-adw, no data, no headers, retry 1
2018.11.18 09:43:05.339 5: BBS: HandleSendQueue called, qlen = 1
2018.11.18 09:43:05.339 5: BBS: HandleSendQueue - still waiting for reply to last request, delay sending from queue
2018.11.18 09:43:05.339 4: BBS: CheckAuth requeued request update after auth, retryCount 0 ...
2018.11.18 09:43:05.418 5: HttpUtils request header:
POST /WebUntis/j_spring_security_check HTTP/1.0
Host: kephiso.webuntis.com
User-Agent: fhem
Accept-Encoding: gzip,deflate
Cookie: JSESSIONID=C480322E2226618D74CCA8CEC4188AAE; schoolname="_axxxxxxxxxxxxxx"
Content-Length: 70
Content-Type: application/x-www-form-urlencoded

2018.11.18 09:43:05.555 4: https://kephiso.webuntis.com/WebUntis/j_spring_security_check: HTTP response code 302
2018.11.18 09:43:05.555 4: HttpUtils https://kephiso.webuntis.com/WebUntis/j_spring_security_check: Redirect to https://kephiso.webuntis.com:443/WebUntis/index.do
2018.11.18 09:43:05.555 5: HttpUtils url=https://kephiso.webuntis.com:443/WebUntis/index.do
2018.11.18 09:43:05.642 5: HttpUtils request header:
POST /WebUntis/index.do HTTP/1.0
Host: kephiso.webuntis.com
User-Agent: fhem
Accept-Encoding: gzip,deflate
Cookie: JSESSIONID=C480322E2226618D74CCA8CEC4188AAE; schoolname="_axxxxxxxxxxxxxx"
Content-Length: 70
Content-Type: application/x-www-form-urlencoded

2018.11.18 09:43:05.732 4: https://kephiso.webuntis.com:443/WebUntis/index.do: HTTP response code 200
2018.11.18 09:43:05.732 5: HttpUtils https://kephiso.webuntis.com:443/WebUntis/index.do: Got data, length: 12949
2018.11.18 09:43:05.732 5: HttpUtils response header:
HTTP/1.1 200 200
Server: nginx
Date: Sun, 18 Nov 2018 08:43:06 GMT
Content-Type: text/html;charset=UTF-8
Content-Length: 4083
Connection: close
Pragma: no-cache
Cache-Control: no-cache, no-store, must-revalidate, pre-check=0, post-check=0
X-XSS-Protection: 1; mode=block
X-Content-Type-Options: nosniff
Content-Language: de
Vary: Accept-Encoding
Content-Encoding: gzip
X-UA-Compatible: IE=edge
2018.11.18 09:43:05.732 4: BBS: Read callback: request type was auth01 retry 0,
Body:
Gruss Otto

.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.

docker - homematic

amenomade

HTTP 302 = redirect
Ihm fehlt wahrscheinlich etwas, um die Anmeldung zu erkennen. Da muss man mit Burp ein bisschen das Loginverfahren weiter analysieren.
Pi 3B, Alexa, CUL868+Selbstbau 1/2λ-Dipol-Antenne, USB Optolink / Vitotronic, Debmatic und HM / HmIP Komponenten, Rademacher Duofern Jalousien, Fritz!Dect Thermostaten, Proteus

rischbiter123

Moin,

versuch mal das als URL, natürlich für Deine Schule:
http://bbs1.bbs-wilhelmshaven.de/weitere-seiten/vertretungsplan.html

Ist auch WebUntis und zeigt mir nach dem Einloggen den Stunden- bzw. Vertretungsplan des Tages.

LG

Andreas
4*Raspi, Max Thermostate und Fensterkontakte, FB7590, Mysensors und NanoCUL, IT und Sonoff, zigbee2mqtt2

amenomade

Pi 3B, Alexa, CUL868+Selbstbau 1/2λ-Dipol-Antenne, USB Optolink / Vitotronic, Debmatic und HM / HmIP Komponenten, Rademacher Duofern Jalousien, Fritz!Dect Thermostaten, Proteus

Otto

ZitatEs gibt übrigens eine json API. Siehe https://github.com/fellwell5/webuntis-php

Hilft mir auch nicht weiter, da kenne ich mich noch weniger aus.

Dort wird ja die jsonrpc.do genutzt
https://thalia.webuntis.com/WebUntis/jsonrpc.do?school=bbs-neustadt-adw

Ist aber wohl nicht mehr aktuell
{"errorMessage":"SQL","requestURI":"/WebUntis/jsonrpc.do"}
Gruss Otto

.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.

docker - homematic

Otto

#16
Es gibt einen Demozugang, vielleicht kann mir damit einer helfen

https://demo.webuntis.com/WebUntis/index.do#/basic/main
User: Schueler
Passwort: Kein Passwort

Dort will ich die ICAL in fhem nutzen
https://demo.webuntis.com/WebUntis/index.do#/basic/timetable

edit: Schule = WebUntis Demo
Gruss Otto

.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.

docker - homematic

amenomade

Hab ein bisschen in der API geforscht.

Authentifizierung:
REQUEST:{"jsonrpc":"2.0","id":<uniqueID>,"method":"authenticate","params":{"user":"<username>","password":"<passwort>"}}
ANTWORT: {"jsonrpc":"2.0","id":<uniqueID>,"result":{"sessionId":<sessionID>,"personType":<personType>,"personId":<personID>,"klasseId":<klassenID>}}

Stundenplan der Woche:
REQUEST:{"jsonrpc":"2.0","id":<uniqueID>,"method":"getTimetable","params":{"id":<personID>,"type":<personType>,"startDate":"20181119","endDate":"20181119"}}
ANTWORT: {"jsonrpc":"2.0","id":<uniqueID>,"result":[{"<Viele Daten: hier kommt der gesamte Studenplan als json array zurück>"}]}

Jetzt muss ich noch ein bisschen gucken, wie es in HTTPMOD einzubauen, sollte aber nicht mehr schwierig sein
Pi 3B, Alexa, CUL868+Selbstbau 1/2λ-Dipol-Antenne, USB Optolink / Vitotronic, Debmatic und HM / HmIP Komponenten, Rademacher Duofern Jalousien, Fritz!Dect Thermostaten, Proteus

rischbiter123

Otto ist auf alle Fälle nicht der Einzige, der sich darüber freuen würde.

LG

Andreas
4*Raspi, Max Thermostate und Fensterkontakte, FB7590, Mysensors und NanoCUL, IT und Sonoff, zigbee2mqtt2

Otto

Super.

Und ja meine Frau würde sich auch freuen 😉
Gruss Otto

.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.

docker - homematic

amenomade

#20
Bin drin mit:
define BBS2 HTTPMOD https://<server>.webuntis.com/WebUntis/jsonrpc.do?school=<school> 86400
attr BBS2 enableControlSet 1
attr BBS2 enableCookies 1
attr BBS2 extractAllJSON 1
attr BBS2 reAuthRegex not.authenticated
attr BBS2 requestData01 {"jsonrpc":"2.0","id":"98b399d6045ac975a725c64d446da57b","method":"getTimetable","params":{"id":"<personId>","type":"<type>","startDate":"20181119","endDate":"20181119"}}
attr BBS2 requestHeader01 Content-Type: application/json
attr BBS2 requestHeader02 Accept: application/json
attr BBS2 requestHeader03 User-Agent: Mozilla/5.0 (Windows NT 10.0;; Win64;; x64;; rv:63.0) Gecko/20100101
attr BBS2 sid01Data {"jsonrpc":"2.0","id":"98b399d6045ac975a725c64d446da57b","method":"authenticate","params":{"user":"<User>","password":"<Passwort>"}}
attr BBS2 sidHeader01 Content-Type: application/json
attr BBS2 verbose 5


<server> : bei mir arche, bei euch kephiso o.ä. => Siehe wo ihr nach Auswahl der Schule weitergeleitet wird
<school> : eure Schule
<User > und <Passwort> natürlich eure
<personId> und <type> findet ihr in der Log in der Antwort zu Authentifizierung:
ZitatBody: {"jsonrpc":"2.0","id":"98b399d6045ac975a725c64d446da57b","result":{"sessionId":"2F829078 blabla2309BFF6","personType":<type>,"personId":<personId>,"klasseId":<klasseId>}}

Das ist sehr rudimentär, da die Ergebnisse noch zu interpretieren sind... und das Datum muss anpassbar sein, und, und und... ;)
Wahrscheinlich muss man noch einige "get" Requests programmieren: getTeachers, getRooms, usw. und abhängig davon ein bisschen Formatierung machen...
"id":"98b399d6045ac975a725c64d446da57b" sollte auch irgendwie kalkuliert werden statt fest gegeben (irgendwelche Zahl geht auch, am Anfang hatte ich 5456851. Das muss aber theoretisch "unique" sein... Das MD5 von Mailadresse könnte eine gute Lösung sein.

Also... noch bisschen zu tun. Aber die "raw" Daten sind da.

Pi 3B, Alexa, CUL868+Selbstbau 1/2λ-Dipol-Antenne, USB Optolink / Vitotronic, Debmatic und HM / HmIP Komponenten, Rademacher Duofern Jalousien, Fritz!Dect Thermostaten, Proteus

Otto

Hi amenomade,

vielen Dank.

Besteht die Möglichkeit die ical Datei zu ziehen?
Gruss Otto

.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.

docker - homematic

amenomade

Zitat von: Otto am 18 November 2018, 16:58:43
Hi amenomade,

vielen Dank.

Besteht die Möglichkeit die ical Datei zu ziehen?
Anscheinend ja. Wenn man über jsonrpc.do schon authentifiziert ist, kann man dann /WebUntis/Ical.do?elemType=1&elemId=<klassenID>&rpt_sd=2018-11-19 oder /WebUntis/Ical.do?elemType=<type>&elemId=<personID>&rpt_sd=2018-11-19aufrufen und somit kriegt man den Kalender in ics Format
Pi 3B, Alexa, CUL868+Selbstbau 1/2λ-Dipol-Antenne, USB Optolink / Vitotronic, Debmatic und HM / HmIP Komponenten, Rademacher Duofern Jalousien, Fritz!Dect Thermostaten, Proteus

amenomade

#23
Beispiel: Mit:
defmod BBS3 HTTPMOD https://<server>.webuntis.com/WebUntis/Ical.do?elemType=<type>&elemId=<personID>&rpt_sd=2018-11-19 1200
attr BBS3 enableControlSet 1
attr BBS3 enableCookies 1
attr BBS3 reAuthRegex not.authenticated|anonymous.user|nomandant|not.found
attr BBS3 reading01Name ICAL
attr BBS3 reading01Regex (?s)(BEGIN:VCALENDAR.*?END:VCALENDAR)
attr BBS3 requestHeader03 User-Agent: Mozilla/5.0 (Windows NT 10.0;; Win64;; x64;; rv:63.0) Gecko/20100101
attr BBS3 sid01Data {"jsonrpc":"2.0","id":545545648516851,"method":"authenticate","params":{"user":"<User>","password":"<Passwort>"}}
attr BBS3 sid01URL https://<server>.webuntis.com/WebUntis/jsonrpc.do?school=<school>
attr BBS3 sidHeader01 Content-Type: application/json
attr BBS3 verbose 5

bekomme ich ein Reading ICAL mit dem gesamten Kalender für Morgen ab BEGIN:VCALENDAR bis END:VCALDENDAR

EDIT: das ist sogar der Kalender für die ganze Woche!
Pi 3B, Alexa, CUL868+Selbstbau 1/2λ-Dipol-Antenne, USB Optolink / Vitotronic, Debmatic und HM / HmIP Komponenten, Rademacher Duofern Jalousien, Fritz!Dect Thermostaten, Proteus

amenomade

Dazu ein notify, um die .ics Datei zu speichern:
defmod BBS3_notify_1 notify BBS3:ICAL.* {\
open (DATEI, ">./log/untis.ics") or die $!;;\
print DATEI ReadingsVal("BBS3","ICAL","BEGIN:VCALENDAR\nEND:VCALENDAR");;\
close (DATEI);;\
}

Dann ein Calendar Device:
defmod UntisCal Calendar ical file ./log/untis.ics

und ein entspr. CALVIEW Device:
defmod UntisCalview CALVIEW UntisCal next
Pi 3B, Alexa, CUL868+Selbstbau 1/2λ-Dipol-Antenne, USB Optolink / Vitotronic, Debmatic und HM / HmIP Komponenten, Rademacher Duofern Jalousien, Fritz!Dect Thermostaten, Proteus

amenomade

Und jetzt eine kleine Anpassung, um das Datum nicht fest in der URL zu kodieren, sondern zu kalkulieren.
Da Ical.do immer die Woche von Montag vor bis Sonntag nach dem eingetragenen Datum liefert, muss man das Datum + 2 Tage (86400 * 2) nutzen, sonst kriegt man am Wochenende die vorgangene Woche, was wenig Sinn hat. Wer Samstags arbeitet, muss natürlich dann nur +1 Tag kalkulieren.

defmod BBS3 HTTPMOD none 43200
attr BBS3 enableControlSet 1
attr BBS3 enableCookies 1
attr BBS3 get01Header1 User-Agent: Mozilla/5.0 (Windows NT 10.0;; Win64;; x64;; rv:63.0) Gecko/20100101
attr BBS3 get01Name ICAL
attr BBS3 get01Poll 1
attr BBS3 get01Regex (?s)(BEGIN:VCALENDAR.*?END:VCALENDAR)
attr BBS3 get01URL https://<server>.webuntis.com/WebUntis/Ical.do?elemType=<type>&elemId=<personID>&rpt_sd=%%datum%%
attr BBS3 reAuthRegex not.authenticated|anonymous.user|nomandant|not.found
attr BBS3 replacement01Mode expression
attr BBS3 replacement01Regex %%datum%%
attr BBS3 replacement01Value {{POSIX::strftime("%Y-%m-%d",localtime(time + (86400 * 2)))}}
attr BBS3 sid01Data {"jsonrpc":"2.0","id":5468165156851,"method":"authenticate","params":{"user":"<User>","password":"<Passwort>"}}
attr BBS3 sid01URL https://<server>.webuntis.com/WebUntis/jsonrpc.do?school=<school>
attr BBS3 sidHeader01 Content-Type: application/json
attr BBS3 verbose 5

Pi 3B, Alexa, CUL868+Selbstbau 1/2λ-Dipol-Antenne, USB Optolink / Vitotronic, Debmatic und HM / HmIP Komponenten, Rademacher Duofern Jalousien, Fritz!Dect Thermostaten, Proteus

Otto

Der Hammer, ich komme gar nicht hinterher :)

Funktioniert super ! :)
Gruss Otto

.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.

docker - homematic

Otto

@amenomade

Wie hast du die API Zugriffsadressen herausgefunden.

Will das ganze ein wenig verstehen, damit ich bei einer Änderung halbwegs verstehe wo ich suchen muss  ;)
Gruss Otto

.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.

docker - homematic

rischbiter123

#28
Moin,
irgendwie scheine ich zu blöd zu sein. Kann sich mal jemand ansehen, wo mein Fehler liegt? Ich schicke auch gerne meine Logindaten zum Nachstellen per PN.

BBS2
defmod BBS2 HTTPMOD https://tipo.webuntis.com/WebUntis/jsonrpc.do?school=bbs-whv#/basic/main 86400
attr BBS2 userattr requestData01 requestHeader01 requestHeader02 requestHeader03 sid01Data sidHeader01
attr BBS2 enableControlSet 1
attr BBS2 enableCookies 1
attr BBS2 extractAllJSON 1
attr BBS2 reAuthRegex not.authenticated
attr BBS2 requestData01 {"jsonrpc":"2.0","id":"98b399d6045ac975a725c64d446da57b","method":"getTimetable","params":{"id":"4683","type":"5","startDate":"20181120","endDate":"20181120"}}
attr BBS2 requestHeader01 Content-Type: application/json
attr BBS2 requestHeader02 Accept: application/json
attr BBS2 requestHeader03 User-Agent: Mozilla/5.0 (Windows NT 10.0;; Win64;; x64;; rv:63.0) Gecko/20100101
attr BBS2 sid01Data {"jsonrpc":"2.0","id":"98b399d6045ac975a725c64d446da57b","method":"authenticate","params":{"user":"juxxxxxxxer","password":"Xxxxxxx0"}}
attr BBS2 sidHeader01 Content-Type: application/json
attr BBS2 verbose 5

setstate BBS2 2018-11-20 15:32:15 errorMessage SQL
setstate BBS2 2018-11-20 15:56:44 error_code -8509
setstate BBS2 2018-11-20 15:56:44 error_message no right for timetable
setstate BBS2 2018-11-20 15:56:44 id 98b399d6045ac975a725c64d446da57b
setstate BBS2 2018-11-20 15:56:44 jsonrpc 2.0
setstate BBS2 2018-11-20 15:32:15 requestURI /WebUntis/jsonrpc.do


BBS3
defmod BBS3 HTTPMOD none 43200
attr BBS3 userattr get01Header1 get01Name get01Poll:0,1 get01Regex get01URL replacement01Mode:reading,internal,text,expression,key replacement01Regex replacement01Value sid01Data sid01URL sidHeader01
attr BBS3 enableControlSet 1
attr BBS3 enableCookies 1
attr BBS3 get01Header1 User-Agent: Mozilla/5.0 (Windows NT 10.0;; Win64;; x64;; rv:63.0) Gecko/20100101
attr BBS3 get01Name ICAL
attr BBS3 get01Poll 1
attr BBS3 get01Regex (?s)(BEGIN:VCALENDAR.*?END:VCALENDAR)
attr BBS3 get01URL https://tipo.webuntis.com/WebUntis/Ical.do?elemType=x&elemId=xxxx&rpt_sd=%%datum%%
attr BBS3 reAuthRegex not.authenticated|anonymous.user|nomandant|not.found
attr BBS3 replacement01Mode expression
attr BBS3 replacement01Regex %%datum%%
attr BBS3 replacement01Value {{POSIX::strftime("%Y-%m-%d",localtime(time + (86400 * 2)))}}
attr BBS3 sid01Data {"jsonrpc":"2.0","id":5468165156851,"method":"authenticate","params":{"user":"juxxxxxxxer","password":"Xxxxxx0"}}
attr BBS3 sid01URL https://tipo.webuntis.com/WebUntis/jsonrpc.do?school=bbs-whv#/basic/main
attr BBS3 sidHeader01 Content-Type: application/json
attr BBS3 verbose 5

setstate BBS3 2018-11-20 15:56:44 ICAL BEGIN:VCALENDAR
\
BEGIN:VEVENT
\
DTSTAMP:20181120T145644Z
\
DTSTART:20181120T000000
\
DTEND:20181120T230000
\
SUMMARY:no right 4683
\
END:VEVENT
\
END:VCALENDAR


Logfile:
2018.11.20 15:56:39 3: BBS2: Defined with URL https://tipo.webuntis.com/WebUntis/jsonrpc.do?school=bbs-whv#/basic/main and interval 86400
2018.11.20 15:56:39 3: BBS3: URL is none, periodic updates will be limited to explicit GetXXPoll attribues (if defined)
2018.11.20 15:56:39 3: BBS3: Defined without URL and interval 43200
2018.11.20 15:56:39 1: Including ./log/fhem.save
2018.11.20 15:56:39 0: Featurelevel: 5.9
2018.11.20 15:56:39 0: Server started with 9 defined entities (fhem.pl:17779/2018-11-18 perl:5.024001 os:linux user:fhem pid:3711)
2018.11.20 15:56:39 3: FHEMWEB WEB CSRF error: csrf_104209738113007 ne csrf_285571357514195 for client WEB_192.168.178.36_54614 / command shutdown restart. For details see the csrfToken FHEMWEB attribute.
2018.11.20 15:56:39 0: Server shutdown
2018.11.20 15:56:40 1: Including fhem.cfg
2018.11.20 15:56:40 3: WEB: port 8083 opened
2018.11.20 15:56:40 2: eventTypes: loaded 8 events from ./log/eventTypes.txt
2018.11.20 15:56:40 3: BBS2: Defined with URL https://tipo.webuntis.com/WebUntis/jsonrpc.do?school=bbs-whv#/basic/main and interval 86400
2018.11.20 15:56:40 3: BBS3: URL is none, periodic updates will be limited to explicit GetXXPoll attribues (if defined)
2018.11.20 15:56:40 3: BBS3: Defined without URL and interval 43200
2018.11.20 15:56:40 1: Including ./log/fhem.save
2018.11.20 15:56:40 0: Featurelevel: 5.9
2018.11.20 15:56:40 0: Server started with 9 defined entities (fhem.pl:17779/2018-11-18 perl:5.024001 os:linux user:fhem pid:3717)
2018.11.20 15:56:40 3: FHEMWEB WEB CSRF error: csrf_285571357514195 ne csrf_366764278753982 for client WEB_192.168.178.36_54616 / command shutdown restart. For details see the csrfToken FHEMWEB attribute.
2018.11.20 15:56:42 4: BBS2: GetUpdate called (update)
2018.11.20 15:56:42 4: BBS2: update timer modified: will call GetUpdate in 86400.0 seconds at 2018-11-21 15:56:42
2018.11.20 15:56:42 4: BBS2: AddToQueue adds update, initial queue len: 0
2018.11.20 15:56:42 5: BBS2: AddToQueue adds type update to URL https://tipo.webuntis.com/WebUntis/jsonrpc.do?school=bbs-whv#/basic/main, data {"jsonrpc":"2.0","id":"98b399d6045ac975a725c64d446da57b","method":"getTimetable","params":{"id":"xxxx","type":"x","startDate":"20181120","endDate":"20181120"}}, header Content-Type: application/json
Accept: application/json
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:63.0) Gecko/20100101, retry 0
2018.11.20 15:56:42 5: BBS2: HandleSendQueue called, qlen = 1
2018.11.20 15:56:42 4: BBS2: HandleSendQueue sends request type update to URL https://tipo.webuntis.com/WebUntis/jsonrpc.do?school=bbs-whv#/basic/main,
data: {"jsonrpc":"2.0","id":"98b399d6045ac975a725c64d446da57b","method":"getTimetable","params":{"id":"xxxx","type":"x","startDate":"20181120","endDate":"20181120"}},
header: Content-Type: application/json
Accept: application/json
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:63.0) Gecko/20100101
timeout 2
2018.11.20 15:56:42 5: HttpUtils url=https://tipo.webuntis.com/WebUntis/jsonrpc.do?school=bbs-whv#/basic/main
2018.11.20 15:56:42 4: BBS3: GetUpdate called (update)
2018.11.20 15:56:42 4: BBS3: update timer modified: will call GetUpdate in 43200.0 seconds at 2018-11-21 03:56:42
2018.11.20 15:56:42 5: BBS3: GetUpdate checks if poll required for ICAL (01)
2018.11.20 15:56:42 4: BBS3: GetUpdate will request ICAL
2018.11.20 15:56:42 4: BBS3: AddToQueue adds get01, initial queue len: 0
2018.11.20 15:56:42 5: BBS3: AddToQueue adds type get01 to URL https://tipo.webuntis.com/WebUntis/Ical.do?elemType=x&elemId=xxxx&rpt_sd=%%datum%%, no data, header User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:63.0) Gecko/20100101, retry 0
2018.11.20 15:56:42 5: BBS3: HandleSendQueue called, qlen = 1
2018.11.20 15:56:42 5: BBS3: Replace called for type get01, regex %%datum%%, mode expression, value {{POSIX::strftime("%Y-%m-%d",localtime(time + (86400 * 2)))}} input: User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:63.0) Gecko/20100101
2018.11.20 15:56:42 5: BBS3: Replace called for type get01, regex %%datum%%, mode expression, value {{POSIX::strftime("%Y-%m-%d",localtime(time + (86400 * 2)))}} input:
2018.11.20 15:56:42 5: BBS3: Replace called for type get01, regex %%datum%%, mode expression, value {{POSIX::strftime("%Y-%m-%d",localtime(time + (86400 * 2)))}} input: https://tipo.webuntis.com/WebUntis/Ical.do?elemType=x&elemId=xxxx&rpt_sd=%%datum%%
2018.11.20 15:56:42 4: BBS3: Replace: match for type get01, regex %%datum%%, mode expression, value {{POSIX::strftime("%Y-%m-%d",localtime(time + (86400 * 2)))}}, input: https://tipo.webuntis.com/WebUntis/Ical.do?elemType=x&elemId=xxxx&rpt_sd=%%datum%%, result is https://tipo.webuntis.com/WebUntis/Ical.do?elemType=x&elemId=xxxx&rpt_sd=2018-11-22
2018.11.20 15:56:42 4: BBS3: HandleSendQueue sends request type get01 to URL https://tipo.webuntis.com/WebUntis/Ical.do?elemType=x&elemId=xxxx&rpt_sd=2018-11-22, No Data,
header: User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:63.0) Gecko/20100101
timeout 2
2018.11.20 15:56:42 5: HttpUtils url=https://tipo.webuntis.com/WebUntis/Ical.do?elemType=x&elemId=xxxx&rpt_sd=2018-11-22
2018.11.20 15:56:42 5: HttpUtils request header:
POST /WebUntis/jsonrpc.do?school=bbs-whv#/basic/main HTTP/1.0
Host: tipo.webuntis.com
Accept-Encoding: gzip,deflate
Content-Type: application/json
Accept: application/json
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:63.0) Gecko/20100101
Content-Length: 159

2018.11.20 15:56:42 5: HttpUtils request header:
GET /WebUntis/Ical.do?elemType=x&elemId=xxxx&rpt_sd=2018-11-22 HTTP/1.0
Host: tipo.webuntis.com
Accept-Encoding: gzip,deflate
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:63.0) Gecko/20100101
Content-Length: 0
Content-Type: application/x-www-form-urlencoded

2018.11.20 15:56:42 4: https://tipo.webuntis.com/WebUntis/Ical.do?elemType=x&elemId=xxxx&rpt_sd=2018-11-22: HTTP response code 302
2018.11.20 15:56:42 4: HttpUtils https://tipo.webuntis.com/WebUntis/Ical.do?elemType=x&elemId=xxxx&rpt_sd=2018-11-22: Redirect to https://tipo.webuntis.com:443/login.do?error=nomandant
2018.11.20 15:56:42 5: HttpUtils url=https://tipo.webuntis.com:443/login.do?error=nomandant
2018.11.20 15:56:42 5: HttpUtils request header:
GET /login.do?error=nomandant HTTP/1.0
Host: tipo.webuntis.com
Accept-Encoding: gzip,deflate
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:63.0) Gecko/20100101
Content-Length: 0
Content-Type: application/x-www-form-urlencoded

2018.11.20 15:56:42 4: https://tipo.webuntis.com/WebUntis/jsonrpc.do?school=bbs-whv#/basic/main: HTTP response code 200
2018.11.20 15:56:42 5: HttpUtils https://tipo.webuntis.com/WebUntis/jsonrpc.do?school=bbs-whv#/basic/main: Got data, length: 110
2018.11.20 15:56:42 5: HttpUtils response header:
HTTP/1.1 200 200
Server: nginx
Date: Tue, 20 Nov 2018 14:56:43 GMT
Content-Type: application/json-rpc;charset=UTF-8
Content-Length: 110
Connection: close
Set-Cookie: JSESSIONID=1CDF6CD878F442E4D54811FC35CEF378; Path=/WebUntis; HttpOnly
Set-Cookie: schoolname="_YmJzLXdodg=="; Version=1; Max-Age=1209600; Expires=Tue, 04-Dec-2018 14:56:43 GMT
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-XSS-Protection: 1; mode=block
X-Content-Type-Options: nosniff
Access-Control-Allow-Headers: Accept, Origin, X-Requested-With, Content-Type, Last-Modified
Access-Control-Allow-Origin: *
2018.11.20 15:56:42 4: BBS2: Read callback: request type was update retry 0,
Body: {"jsonrpc":"2.0","id":"98b399d6045ac975a725c64d446da57b","error":{"message":"not authenticated","code":-8520}}
2018.11.20 15:56:42 5: BBS2: JSON Flatter called : prefix , ref is HASH(0x592461a8)
2018.11.20 15:56:42 5: BBS2: JSON Flatter doing recursion because value is a HASH
2018.11.20 15:56:42 5: BBS2: JSON Flatter called : prefix error_, ref is HASH(0x592fa244)
2018.11.20 15:56:42 5: BBS2: JSON Flatter sets error_code to -8520
2018.11.20 15:56:42 5: BBS2: JSON Flatter sets error_message to not authenticated
2018.11.20 15:56:42 5: BBS2: JSON Flatter sets jsonrpc to 2.0
2018.11.20 15:56:42 5: BBS2: JSON Flatter sets id to 98b399d6045ac975a725c64d446da57b
2018.11.20 15:56:42 4: BBS2: extracted JSON values to internal
2018.11.20 15:56:42 5: BBS2: GetCookies is looking for Cookies
2018.11.20 15:56:42 4: BBS2: GetCookies parsed Cookie: JSESSIONID Wert 1CDF6CD878F442E4D54811FC35CEF378 Rest Path=/WebUntis; HttpOnly
2018.11.20 15:56:42 4: BBS2: GetCookies parsed Cookie: schoolname="_YmJzLXdodg= Wert " Rest Version=1; Max-Age=1209600; Expires=Tue, 04-Dec-2018 14:56:43 GMT
2018.11.20 15:56:42 5: BBS2: ExtractSid called, context reading, num
2018.11.20 15:56:42 5: BBS2: CheckAuth is checking buffer with ReAuthRegex not.authenticated
2018.11.20 15:56:42 4: BBS2: CheckAuth decided new authentication required
2018.11.20 15:56:42 4: BBS2: Auth called with Steps: 01
2018.11.20 15:56:42 4: BBS2: AddToQueue adds auth01, initial queue len: 0, prio
2018.11.20 15:56:42 5: BBS2: AddToQueue prepends type auth01 to URL https://tipo.webuntis.com/WebUntis/jsonrpc.do?school=bbs-whv#/basic/main, data {"jsonrpc":"2.0","id":"98b399d6045ac975a725c64d446da57b","method":"authenticate","params":{"user":"juxxxxxxxxxxxxxer","password":"Xxxxxxxx0"}}, header Content-Type: application/json, retry 0
2018.11.20 15:56:42 5: BBS2: HandleSendQueue called, qlen = 1
2018.11.20 15:56:42 5: BBS2: HandleSendQueue is using Cookie JSESSIONID with path  and Value 1CDF6CD878F442E4D54811FC35CEF378 (key JSESSIONID;, destination path is /WebUntis/jsonrpc.do?school=bbs-whv#/basic/main)
2018.11.20 15:56:42 5: BBS2: HandleSendQueue is using Cookie schoolname="_YmJzLXdodg= with path  and Value " (key schoolname="_YmJzLXdodg=;, destination path is /WebUntis/jsonrpc.do?school=bbs-whv#/basic/main)
2018.11.20 15:56:42 5: BBS2: HandleSendQueue is adding Cookie header: JSESSIONID=1CDF6CD878F442E4D54811FC35CEF378; schoolname="_YmJzLXdodg=="
2018.11.20 15:56:42 4: BBS2: HandleSendQueue sends request type auth01 to URL https://tipo.webuntis.com/WebUntis/jsonrpc.do?school=bbs-whv#/basic/main,
data: {"jsonrpc":"2.0","id":"98b399d6045ac975a725c64d446da57b","method":"authenticate","params":{"user":"juxxxxxxxx","password":"Xxxxxx0"}},
header: Content-Type: application/json
Cookie: JSESSIONID=1CDF6CD878F442E4D54811FC35CEF378; schoolname="_YmJzLXdodg=="
timeout 2
2018.11.20 15:56:42 5: HttpUtils url=https://tipo.webuntis.com/WebUntis/jsonrpc.do?school=bbs-whv#/basic/main
2018.11.20 15:56:42 4: BBS2: AddToQueue adds update, initial queue len: 0
2018.11.20 15:56:42 5: BBS2: AddToQueue adds type update to URL https://tipo.webuntis.com/WebUntis/jsonrpc.do?school=bbs-whv#/basic/main, data {"jsonrpc":"2.0","id":"98b399d6045ac975a725c64d446da57b","method":"getTimetable","params":{"id":"4683","type":"5","startDate":"20181120","endDate":"20181120"}}, header Content-Type: application/json
Accept: application/json
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:63.0) Gecko/20100101, retry 1
2018.11.20 15:56:42 5: BBS2: HandleSendQueue called, qlen = 1
2018.11.20 15:56:42 5: BBS2: HandleSendQueue - still waiting for reply to last request, delay sending from queue
2018.11.20 15:56:42 4: BBS2: CheckAuth requeued request update after auth, retryCount 0 ...
2018.11.20 15:56:43 5: HttpUtils request header:
POST /WebUntis/jsonrpc.do?school=bbs-whv#/basic/main HTTP/1.0
Host: tipo.webuntis.com
User-Agent: fhem
Accept-Encoding: gzip,deflate
Content-Type: application/json
Cookie: JSESSIONID=1CDF6CD878F442E4D54811FC35CEF378; schoolname="_YmJzLXdodg=="
Content-Length: 148

2018.11.20 15:56:43 4: https://tipo.webuntis.com:443/login.do?error=nomandant: HTTP response code 404
2018.11.20 15:56:43 5: HttpUtils https://tipo.webuntis.com:443/login.do?error=nomandant: Got data, length: 206
2018.11.20 15:56:43 5: HttpUtils response header:
HTTP/1.1 404 Not Found
Server: nginx
Date: Tue, 20 Nov 2018 14:56:43 GMT
Content-Type: text/html; charset=iso-8859-1
Content-Length: 206
Connection: close
2018.11.20 15:56:43 4: BBS3: Read callback: request type was get01 retry 0,
Body: <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>404 Not Found</title>
</head><body>
<h1>Not Found</h1>
<p>The requested URL /login.do was not found on this server.</p>
</body></html>

2018.11.20 15:56:43 5: BBS3: GetCookies is looking for Cookies
2018.11.20 15:56:43 5: BBS3: ExtractSid called, context get, num 01
2018.11.20 15:56:43 5: BBS3: CheckAuth is checking buffer with ReAuthRegex not.authenticated|anonymous.user|nomandant|not.found
2018.11.20 15:56:43 4: BBS3: CheckAuth decided new authentication required
2018.11.20 15:56:43 4: BBS3: Auth called with Steps: 01
2018.11.20 15:56:43 4: BBS3: AddToQueue adds auth01, initial queue len: 0, prio
2018.11.20 15:56:43 5: BBS3: AddToQueue prepends type auth01 to URL https://tipo.webuntis.com/WebUntis/jsonrpc.do?school=bbs-whv#/basic/main, data {"jsonrpc":"2.0","id":5468165156851,"method":"authenticate","params":{"user":"juxxxxxxxxxer","password":"Xxxxxxxx0"}}, header Content-Type: application/json, retry 0
2018.11.20 15:56:43 5: BBS3: HandleSendQueue called, qlen = 1
2018.11.20 15:56:43 5: BBS3: Replace called for type auth01, regex %%datum%%, mode expression, value {{POSIX::strftime("%Y-%m-%d",localtime(time + (86400 * 2)))}} input: Content-Type: application/json
2018.11.20 15:56:43 5: BBS3: Replace called for type auth01, regex %%datum%%, mode expression, value {{POSIX::strftime("%Y-%m-%d",localtime(time + (86400 * 2)))}} input: {"jsonrpc":"2.0","id":5468165156851,"method":"authenticate","params":{"user":"juxxxxxxxxxer","password":"Xxxxxxxx0"}}
2018.11.20 15:56:43 5: BBS3: Replace called for type auth01, regex %%datum%%, mode expression, value {{POSIX::strftime("%Y-%m-%d",localtime(time + (86400 * 2)))}} input: https://tipo.webuntis.com/WebUntis/jsonrpc.do?school=bbs-whv#/basic/main
2018.11.20 15:56:43 4: BBS3: HandleSendQueue sends request type auth01 to URL https://tipo.webuntis.com/WebUntis/jsonrpc.do?school=bbs-whv#/basic/main,
data: {"jsonrpc":"2.0","id":5468165156851,"method":"authenticate","params":{"user":"juxxxxxxxxxxer","password":"Xxxxxxx0"}},
header: Content-Type: application/json
timeout 2
2018.11.20 15:56:43 5: HttpUtils url=https://tipo.webuntis.com/WebUntis/jsonrpc.do?school=bbs-whv#/basic/main
2018.11.20 15:56:43 4: BBS3: AddToQueue adds get01, initial queue len: 0
2018.11.20 15:56:43 5: BBS3: AddToQueue adds type get01 to URL https://tipo.webuntis.com/WebUntis/Ical.do?elemType=5&elemId=4683&rpt_sd=%%datum%%, no data, header User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:63.0) Gecko/20100101, retry 1
2018.11.20 15:56:43 5: BBS3: HandleSendQueue called, qlen = 1
2018.11.20 15:56:43 5: BBS3: HandleSendQueue - still waiting for reply to last request, delay sending from queue
2018.11.20 15:56:43 4: BBS3: CheckAuth requeued request get01 after auth, retryCount 0 ...
2018.11.20 15:56:43 5: HttpUtils request header:
POST /WebUntis/jsonrpc.do?school=bbs-whv#/basic/main HTTP/1.0
Host: tipo.webuntis.com
User-Agent: fhem
Accept-Encoding: gzip,deflate
Content-Type: application/json
Content-Length: 127

2018.11.20 15:56:43 4: https://tipo.webuntis.com/WebUntis/jsonrpc.do?school=bbs-whv#/basic/main: HTTP response code 200
2018.11.20 15:56:43 5: HttpUtils https://tipo.webuntis.com/WebUntis/jsonrpc.do?school=bbs-whv#/basic/main: Got data, length: 161
2018.11.20 15:56:43 5: HttpUtils response header:
HTTP/1.1 200 200
Server: nginx
Date: Tue, 20 Nov 2018 14:56:43 GMT
Content-Type: application/json-rpc;charset=UTF-8
Content-Length: 161
Connection: close
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-XSS-Protection: 1; mode=block
X-Content-Type-Options: nosniff
Access-Control-Allow-Headers: Accept, Origin, X-Requested-With, Content-Type, Last-Modified
Access-Control-Allow-Origin: *
2018.11.20 15:56:43 4: BBS2: Read callback: request type was auth01 retry 0,
Body: {"jsonrpc":"2.0","id":"98b399d6045ac975a725c64d446da57b","result":{"sessionId":"1CDF6CD878F442E4D54811FC35CEF378","personType":x,"personId":xxxx,"klasseId":615}}
2018.11.20 15:56:43 5: BBS2: JSON Flatter called : prefix , ref is HASH(0x593a0ec4)
2018.11.20 15:56:43 5: BBS2: JSON Flatter sets jsonrpc to 2.0
2018.11.20 15:56:43 5: BBS2: JSON Flatter sets id to 98b399d6045ac975a725c64d446da57b
2018.11.20 15:56:43 5: BBS2: JSON Flatter doing recursion because value is a HASH
2018.11.20 15:56:43 5: BBS2: JSON Flatter called : prefix result_, ref is HASH(0x594596d4)
2018.11.20 15:56:43 5: BBS2: JSON Flatter sets result_sessionId to 1CDF6CD878F442E4D54811FC35CEF378
2018.11.20 15:56:43 5: BBS2: JSON Flatter sets result_klasseId to 615
2018.11.20 15:56:43 5: BBS2: JSON Flatter sets result_personType to x
2018.11.20 15:56:43 5: BBS2: JSON Flatter sets result_personId to xxxx
2018.11.20 15:56:43 4: BBS2: extracted JSON values to internal
2018.11.20 15:56:43 5: BBS2: GetCookies is looking for Cookies
2018.11.20 15:56:43 5: BBS2: ExtractSid called, context sid, num 01
2018.11.20 15:56:43 4: https://tipo.webuntis.com/WebUntis/jsonrpc.do?school=bbs-whv#/basic/main: HTTP response code 200
2018.11.20 15:56:43 5: HttpUtils https://tipo.webuntis.com/WebUntis/jsonrpc.do?school=bbs-whv#/basic/main: Got data, length: 142
2018.11.20 15:56:43 5: HttpUtils response header:
HTTP/1.1 200 200
Server: nginx
Date: Tue, 20 Nov 2018 14:56:43 GMT
Content-Type: application/json-rpc;charset=UTF-8
Content-Length: 142
Connection: close
Set-Cookie: JSESSIONID=D5147B6CEF32065751B709016EED4AD2; Path=/WebUntis; HttpOnly
Set-Cookie: schoolname="_YmJzLXdodg=="; Version=1; Max-Age=1209600; Expires=Tue, 04-Dec-2018 14:56:43 GMT
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-XSS-Protection: 1; mode=block
X-Content-Type-Options: nosniff
Access-Control-Allow-Headers: Accept, Origin, X-Requested-With, Content-Type, Last-Modified
Access-Control-Allow-Origin: *
2018.11.20 15:56:43 4: BBS3: Read callback: request type was auth01 retry 0,
Body: {"jsonrpc":"2.0","id":"5468165156851","result":{"sessionId":"D5147B6CEF32065751B709016EED4AD2","personType":x,"personId":xxxx,"klasseId":615}}
2018.11.20 15:56:43 5: BBS3: GetCookies is looking for Cookies
2018.11.20 15:56:43 4: BBS3: GetCookies parsed Cookie: JSESSIONID Wert D5147B6CEF32065751B709016EED4AD2 Rest Path=/WebUntis; HttpOnly
2018.11.20 15:56:43 4: BBS3: GetCookies parsed Cookie: schoolname="_YmJzLXdodg= Wert " Rest Version=1; Max-Age=1209600; Expires=Tue, 04-Dec-2018 14:56:43 GMT
2018.11.20 15:56:43 5: BBS3: ExtractSid called, context sid, num 01
2018.11.20 15:56:43 5: BBS2: HandleSendQueue called, qlen = 1
2018.11.20 15:56:43 5: BBS2: HandleSendQueue is using Cookie JSESSIONID with path  and Value 1CDF6CD878F442E4D54811FC35CEF378 (key JSESSIONID;, destination path is /WebUntis/jsonrpc.do?school=bbs-whv#/basic/main)
2018.11.20 15:56:43 5: BBS2: HandleSendQueue is using Cookie schoolname="_YmJzLXdodg= with path  and Value " (key schoolname="_YmJzLXdodg=;, destination path is /WebUntis/jsonrpc.do?school=bbs-whv#/basic/main)
2018.11.20 15:56:43 5: BBS2: HandleSendQueue is adding Cookie header: JSESSIONID=1CDF6CD878F442E4D54811FC35CEF378; schoolname="_YmJzLXdodg=="
2018.11.20 15:56:43 4: BBS2: HandleSendQueue sends request type update to URL https://tipo.webuntis.com/WebUntis/jsonrpc.do?school=bbs-whv#/basic/main,
data: {"jsonrpc":"2.0","id":"98b399d6045ac975a725c64d446da57b","method":"getTimetable","params":{"id":"xxxx","type":"x","startDate":"20181120","endDate":"20181120"}},
header: Content-Type: application/json
Accept: application/json
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:63.0) Gecko/20100101
Cookie: JSESSIONID=1CDF6CD878F442E4D54811FC35CEF378; schoolname="_YmJzLXdodg=="
timeout 2
2018.11.20 15:56:43 5: HttpUtils url=https://tipo.webuntis.com/WebUntis/jsonrpc.do?school=bbs-whv#/basic/main
2018.11.20 15:56:44 5: HttpUtils request header:
POST /WebUntis/jsonrpc.do?school=bbs-whv#/basic/main HTTP/1.0
Host: tipo.webuntis.com
Accept-Encoding: gzip,deflate
Content-Type: application/json
Accept: application/json
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:63.0) Gecko/20100101
Cookie: JSESSIONID=1CDF6CD878F442E4D54811FC35CEF378; schoolname="_YmJzLXdodg=="
Content-Length: 159

2018.11.20 15:56:44 5: BBS3: HandleSendQueue called, qlen = 1
2018.11.20 15:56:44 5: BBS3: Replace called for type get01, regex %%datum%%, mode expression, value {{POSIX::strftime("%Y-%m-%d",localtime(time + (86400 * 2)))}} input: User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:63.0) Gecko/20100101
2018.11.20 15:56:44 5: BBS3: Replace called for type get01, regex %%datum%%, mode expression, value {{POSIX::strftime("%Y-%m-%d",localtime(time + (86400 * 2)))}} input:
2018.11.20 15:56:44 5: BBS3: Replace called for type get01, regex %%datum%%, mode expression, value {{POSIX::strftime("%Y-%m-%d",localtime(time + (86400 * 2)))}} input: https://tipo.webuntis.com/WebUntis/Ical.do?elemType=x&elemId=xxxx&rpt_sd=%%datum%%
2018.11.20 15:56:44 4: BBS3: Replace: match for type get01, regex %%datum%%, mode expression, value {{POSIX::strftime("%Y-%m-%d",localtime(time + (86400 * 2)))}}, input: https://tipo.webuntis.com/WebUntis/Ical.do?elemType=x&elemId=xxxx&rpt_sd=%%datum%%, result is https://tipo.webuntis.com/WebUntis/Ical.do?elemType=5&elemId=4683&rpt_sd=2018-11-22
2018.11.20 15:56:44 5: BBS3: HandleSendQueue is using Cookie JSESSIONID with path  and Value D5147B6CEF32065751B709016EED4AD2 (key JSESSIONID;, destination path is /WebUntis/Ical.do?elemType=x&elemId=xxxx&rpt_sd=2018-11-22)
2018.11.20 15:56:44 5: BBS3: HandleSendQueue is using Cookie schoolname="_YmJzLXdodg= with path  and Value " (key schoolname="_YmJzLXdodg=;, destination path is /WebUntis/Ical.do?elemType=x&elemId=xxxx&rpt_sd=2018-11-22)
2018.11.20 15:56:44 5: BBS3: HandleSendQueue is adding Cookie header: JSESSIONID=D5147B6CEF32065751B709016EED4AD2; schoolname="_YmJzLXdodg=="
2018.11.20 15:56:44 4: BBS3: HandleSendQueue sends request type get01 to URL https://tipo.webuntis.com/WebUntis/Ical.do?elemType=x&elemId=xxxx&rpt_sd=2018-11-22, No Data,
header: User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:63.0) Gecko/20100101
Cookie: JSESSIONID=D5147B6CEF32065751B709016EED4AD2; schoolname="_YmJzLXdodg=="
timeout 2
2018.11.20 15:56:44 5: HttpUtils url=https://tipo.webuntis.com/WebUntis/Ical.do?elemType=x&elemId=xxxx&rpt_sd=2018-11-22
2018.11.20 15:56:44 4: https://tipo.webuntis.com/WebUntis/jsonrpc.do?school=bbs-whv#/basic/main: HTTP response code 200
2018.11.20 15:56:44 5: HttpUtils https://tipo.webuntis.com/WebUntis/jsonrpc.do?school=bbs-whv#/basic/main: Got data, length: 115
2018.11.20 15:56:44 5: HttpUtils response header:
HTTP/1.1 200 200
Server: nginx
Date: Tue, 20 Nov 2018 14:56:44 GMT
Content-Type: application/json-rpc;charset=UTF-8
Content-Length: 115
Connection: close
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-XSS-Protection: 1; mode=block
X-Content-Type-Options: nosniff
Access-Control-Allow-Headers: Accept, Origin, X-Requested-With, Content-Type, Last-Modified
Access-Control-Allow-Origin: *
2018.11.20 15:56:44 4: BBS2: Read callback: request type was update retry 1,
Body: {"jsonrpc":"2.0","id":"98b399d6045ac975a725c64d446da57b","error":{"message":"no right for timetable","code":-8509}}
2018.11.20 15:56:44 5: BBS2: JSON Flatter called : prefix , ref is HASH(0x59296df0)
2018.11.20 15:56:44 5: BBS2: JSON Flatter doing recursion because value is a HASH
2018.11.20 15:56:44 5: BBS2: JSON Flatter called : prefix error_, ref is HASH(0x594591d4)
2018.11.20 15:56:44 5: BBS2: JSON Flatter sets error_code to -8509
2018.11.20 15:56:44 5: BBS2: JSON Flatter sets error_message to no right for timetable
2018.11.20 15:56:44 5: BBS2: JSON Flatter sets jsonrpc to 2.0
2018.11.20 15:56:44 5: BBS2: JSON Flatter sets id to 98b399d6045ac975a725c64d446da57b
2018.11.20 15:56:44 4: BBS2: extracted JSON values to internal
2018.11.20 15:56:44 5: BBS2: GetCookies is looking for Cookies
2018.11.20 15:56:44 5: BBS2: ExtractSid called, context reading, num
2018.11.20 15:56:44 5: BBS2: CheckAuth is checking buffer with ReAuthRegex not.authenticated
2018.11.20 15:56:44 4: BBS2: CheckAuth decided no authentication required
2018.11.20 15:56:44 5: BBS2: Read set JSON jsonrpc as reading jsonrpc to value 2.0
2018.11.20 15:56:44 5: BBS2: Read set JSON id as reading id to value 98b399d6045ac975a725c64d446da57b
2018.11.20 15:56:44 5: BBS2: Read set JSON error_message as reading error_message to value no right for timetable
2018.11.20 15:56:44 5: BBS2: Read set JSON error_code as reading error_code to value -8509
2018.11.20 15:56:44 5: BBS2: UpdateReadingList created list of reading.* nums to parse during getUpdate as
2018.11.20 15:56:44 5: BBS2: Read starts parsing response to update with defined readings:
2018.11.20 15:56:44 4: BBS2: Read response to update matched Reading(s) jsonrpc id error_message error_code
2018.11.20 15:56:44 5: BBS2: HandleSendQueue called, qlen = 0
2018.11.20 15:56:44 5: HttpUtils request header:
GET /WebUntis/Ical.do?elemType=5&elemId=4683&rpt_sd=2018-11-22 HTTP/1.0
Host: tipo.webuntis.com
Accept-Encoding: gzip,deflate
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:63.0) Gecko/20100101
Cookie: JSESSIONID=D5147B6CEF32065751B709016EED4AD2; schoolname="_YmJzLXdodg=="
Content-Length: 0
Content-Type: application/x-www-form-urlencoded

2018.11.20 15:56:44 4: https://tipo.webuntis.com/WebUntis/Ical.do?elemType=x&elemId=xxxx&rpt_sd=2018-11-22: HTTP response code 200
2018.11.20 15:56:44 5: HttpUtils https://tipo.webuntis.com/WebUntis/Ical.do?elemType=x&elemId=xxxx&rpt_sd=2018-11-22: Got data, length: 155
2018.11.20 15:56:44 5: HttpUtils response header:
HTTP/1.1 200 200
Server: nginx
Date: Tue, 20 Nov 2018 14:56:44 GMT
Content-Type: text/calendar;charset=UTF-8
Content-Length: 155
Connection: close
Content-Disposition: attachment; filename="error.ics"
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-XSS-Protection: 1; mode=block
X-Content-Type-Options: nosniff
X-UA-Compatible: IE=edge
2018.11.20 15:56:44 4: BBS3: Read callback: request type was get01 retry 1,
Body: BEGIN:VCALENDAR
BEGIN:VEVENT
DTSTAMP:20181120T145644Z
DTSTART:20181120T000000
DTEND:20181120T230000
SUMMARY:no right 4683
END:VEVENT
END:VCALENDAR

2018.11.20 15:56:44 5: BBS3: GetCookies is looking for Cookies
2018.11.20 15:56:44 5: BBS3: ExtractSid called, context get, num 01
2018.11.20 15:56:44 5: BBS3: CheckAuth is checking buffer with ReAuthRegex not.authenticated|anonymous.user|nomandant|not.found
2018.11.20 15:56:44 4: BBS3: CheckAuth decided no authentication required
2018.11.20 15:56:44 5: BBS3: ExtractReading ICAL with regex /(?s)(BEGIN:VCALENDAR.*?END:VCALENDAR)/...
2018.11.20 15:56:44 5: BBS3: 1 capture group(s), matchlist = BEGIN:VCALENDAR
BEGIN:VEVENT
DTSTAMP:20181120T145644Z
DTSTART:20181120T000000
DTEND:20181120T230000
SUMMARY:no right 4683
END:VEVENT
END:VCALENDAR
2018.11.20 15:56:44 4: BBS3: ExtractReading for get01-1 sets ICAL to BEGIN:VCALENDAR
BEGIN:VEVENT
DTSTAMP:20181120T145644Z
DTSTART:20181120T000000
DTEND:20181120T230000
SUMMARY:no right 4683
END:VEVENT
END:VCALENDAR
2018.11.20 15:56:44 5: BBS3: UpdateReadingList created list of reading.* nums to parse during getUpdate as
2018.11.20 15:56:44 4: BBS3: Read response to get01 matched Reading(s) ICAL
2018.11.20 15:56:44 5: BBS3: UpdateHintList called
2018.11.20 15:56:44 5: BBS3: UpdateHintList: setlist = interval reread:noArg stop:noArg start:noArg upgradeAttributes:noArg storeKeyValue
2018.11.20 15:56:44 5: BBS3: UpdateHintList: getlist = ICAL:noArg
2018.11.20 15:56:44 5: BBS3: HandleSendQueue called, qlen = 0


LG

Andreas
4*Raspi, Max Thermostate und Fensterkontakte, FB7590, Mysensors und NanoCUL, IT und Sonoff, zigbee2mqtt2

Otto

Hi Andreas,

nutze BBS2 und BBS3 nicht gleichzeitig, das könnte Zugriffsprobleme geben.

Teste erstmal mit BBS2 und lasse bei school=bbs-whv#/basic/main  #/basic/main weg

defmod BBS2 HTTPMOD https://tipo.webuntis.com/WebUntis/jsonrpc.do?school=bbs-whv 86400

Dann muss du jedemenge Readings bekommen mit result_....
Gruss Otto

.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.

docker - homematic

rischbiter123

Schön wärs. Ich bekomme leider das hier im Log:
Body: {"jsonrpc":"2.0","id":"98b399d6045ac975a725c64d446da57b","error":{"message":"no right for timetable","code":-8509}}

Die Zugangsdaten habe ich schon mehrfach geprüft.

LG

Andreas
4*Raspi, Max Thermostate und Fensterkontakte, FB7590, Mysensors und NanoCUL, IT und Sonoff, zigbee2mqtt2

amenomade

#31
@rischbiter123: deine Schule stellt kein iCal pro Person, sondern nur ein iCal für die Klasse zur Verfügung. Deswegen musst Du die Klasse abfragen. Und wie Otto gesagt hat, BB2 löschen und kein #/mail in der sid URL. Also, 4 Kommandos sollten reichen, wenn Du noch BBS3 wie oben schon hast:
delete BBS2
attr BBS3 get01URL https://tipo.webuntis.com/WebUntis/Ical.do?elemType=1&elemId=615&rpt_sd=%%datum%%
attr BBS3 sid01URL https://tipo.webuntis.com/WebUntis/jsonrpc.do?school=bbs-whv
set BBS3 reread

Und lies bitte deine PM

Zitat von: OttoWie hast du die API Zugriffsadressen herausgefunden.
Google :)

Aber, um wirklich forschen zu können, muss man BurpSuite nutzen. Nur so sieht man genau, welche Abfrage mit welchen Parametern geschickt werden, und was zurück kommt.

Pi 3B, Alexa, CUL868+Selbstbau 1/2λ-Dipol-Antenne, USB Optolink / Vitotronic, Debmatic und HM / HmIP Komponenten, Rademacher Duofern Jalousien, Fritz!Dect Thermostaten, Proteus

rischbiter123

@amenomade
Werde ich morgen gleich ausprobieren. THX fürs drüberschauen und den Hinweis. Habe jetzt hoffentlich alle erwischt.

LG

Andreas
4*Raspi, Max Thermostate und Fensterkontakte, FB7590, Mysensors und NanoCUL, IT und Sonoff, zigbee2mqtt2

rischbiter123

Hat geklappt. Nochmal ganz herzlichen Dank für die Hilfe.

LG

Andreas
4*Raspi, Max Thermostate und Fensterkontakte, FB7590, Mysensors und NanoCUL, IT und Sonoff, zigbee2mqtt2

Otto

@Andreas
Habe jetzt hoffentlich alle erwischt. Ja hast du  ;)

@all
und nun etwas Offtopic:
Wir kann man die Änderungen, die sich in der Woche ergeben können triggern?
Möchte gerne eine Pushnachricht wenn sich Termine ändern
Gruss Otto

.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.

docker - homematic

rischbiter123

#35
Moin,

Falls Interesse besteht, hier mal eine Darstellungsmöglichkeit des Stundenplanes im Floorplan:

99_myUtils
sub Plananzeige() {
####################################
### Vorbelegung der Variablen ######
####################################
my $cal = "StundenPlan"; #### Name des Calview-Device
my $term = (ReadingsVal($cal,"c-term",0));
my $j = "";
my $i = "";
my $timeshort = "";
my $location = "";
my $summary = "";
my $weekdayname = "";
my $wdn = "";
my $amon = $cal;
my $amon1 = "";
my $bmon = "";
my $cmon = "";
my $dmon = "";
my $adie = "";
my $bdie = "";
my $cdie = "";
my $ddie = "";
my $amit = "";
my $bmit = "";
my $cmit = "";
my $dmit = "";
my $adon = "";
my $bdon = "";
my $cdon = "";
my $ddon = "";
my $afre = "";
my $bfre = "";
my $cfre = "";
my $dfre = "";

###################################
### Schleife für die Anzahl der Termine
###################################

for ($j =1; $j <=$term; $j++)
### 3stellige Formatierung für t_ ###
{
if
($j <=9)
{$i = "00".$j}
else
{$i = "0".$j};
$wdn = "t_".$i."_weekdayname";
$weekdayname = (ReadingsVal($cal,$wdn,0));
$timeshort = "t_".$i."_timeshort";
$summary = "t_".$i."_summary";
$location = "t_".$i."_location";
### Zuordnung zu den Wochentagen und Erstellung der Anzeigezeilen ###
if
($weekdayname eq "Montag")
{$amon1 = $amon.":".$wdn.",";
$bmon = $bmon.$timeshort.",";
$cmon = $cmon.$summary.",";
$dmon = $dmon.$location.",";
}
elsif
($weekdayname eq "Dienstag")
{$adie = $cal.":".$wdn.",";
$bdie = $bdie.$timeshort.",";
$cdie = $cdie.$summary.",";
$ddie = $ddie.$location.",";
}
elsif
($weekdayname eq "Mittwoch")
{$amit = $cal.":".$wdn.",";
$bmit = $bmit.$timeshort.",";
$cmit = $cmit.$summary.",";
$dmit = $dmit.$location.",";
}
elsif
($weekdayname eq "Donnerstag")
{$adon = $cal.":".$wdn.",";
$bdon = $bdon.$timeshort.",";
$cdon = $cdon.$summary.",";
$ddon = $ddon.$location.",";
}
elsif
($weekdayname eq "Freitag")
{$afre = $cal.":".$wdn.",";
$bfre = $bfre.$timeshort.",";
$cfre = $cfre.$summary.",";
$dfre = $dfre.$location.",";
}
else
{};

};

### Fertigstellung der Anzeigezeilen ###
$bmon = $cal.":".$bmon;
$cmon = $cal.":".$cmon;
$dmon = $cal.":".$dmon
$bdie = $cal.":".$bdie;
$cdie = $cal.":".$cdie;
$ddie = $cal.":".$ddie;
$bmit = $cal.":".$bmit;
$cmit = $cal.":".$cmit;
$dmit = $cal.":".$dmit;
$bdon = $cal.":".$bdon;
$cdon = $cal.":".$cdon;
$ddon = $cal.":".$ddon;
$bfre = $cal.":".$bfre;
$cfre = $cal.":".$cfre;
$dfre = $cal.":".$dfre;
my $dfre1 = chop $dfre;
$dfre1 = $cal.":".$dfre;

#########################################
### Definieren der ReadingsGroup ########
#########################################

fhem( "defmod JustinPlan readingsGroup $amon1\ $bmon\ $cmon\ $dmon\ $adie\ $bdie\ $cdie\ $ddie\ $amit\ $bmit\ $cmit\ $dmit\
$adon\ $bdon\ $cdon\ $ddon\ $afre\ $bfre\ $cfre\ $dfre" );
}


Notify
mod Plan notify Stundenplan:.* {Plananzeige()}
wobei Stundenplan der Name des Calendar ist.

In der Readingsgroup noch
attr JustinPlan nonames 1
attr JustinPlan notime 1

setzen.

LG

Andreas
4*Raspi, Max Thermostate und Fensterkontakte, FB7590, Mysensors und NanoCUL, IT und Sonoff, zigbee2mqtt2

andies

#36
Ich habe da auch ein wenig weiter gemacht (bin allerdings kein Perl-Programmierer). Ich wollte eine andere Anordnung haben, bei der die Tage in der Zeile und die Zeiten in der Spalte stehen, so wie unten. Das habe ich dann nach langem würgen so hinbekommen:
####################################
# vorab eine sub, um jede Zeile zu schreiben (auch wenn kein Unterricht da ist)
####################################
sub Einzelzeileholen($$$$){
my @daten = @{$_[0]};
my $cal = $_[1];
my $vollezeit = $_[2];
my $zeile = $_[3];
my $neuezeile = " ".$cal.$vollezeit;
for (my $weekday =1; $weekday <=5; $weekday++)
{
my $i = $daten[$weekday][$zeile];
if ($i == undef)
{
$neuezeile = $neuezeile.",<>";
}
else
{
$neuezeile = $neuezeile.",\<".ReadingsVal($cal, "t_".$i."_summary","")."/".ReadingsVal($cal, "t_".$i."_location","")."\>";
}
}
return $neuezeile;
}


sub Plananzeige() {
my $cal = "UntisCalview"; #### Name des Calview-Device
my @daten; ### Hash, speichert Eintraege aus Calview (aber dort nur Index, nicht ganzen Inhalt)
my $anzahl = (ReadingsVal($cal,"c-term",0)); ### Anzahl der Eintraege
my $timeshort = ""; ### Zeiten von '08:00 - 08:45' bis '13:55 - 14:40'
my $btime = ""; ### Startzeit
my $weekday = ""; ### 1 (Montag) bis 5 (Freitag)
my $j = ""; ### Laufindizes
my $jlang = "";
my $zeile = ""; ### Laufindex

### Schleife ueber alle Termine, um sie angerdnet in den zweidimensionalen hash zu schreiben
for ($j =1; $j <=$anzahl; $j++)
### 3stellige Formatierung für t_ ###
{
if
($j <=9)
{$jlang = "00".$j}
else
{$jlang = "0".$j};

$weekday = ReadingsVal($cal,"t_".$jlang."_weekday",0);
$btime = ReadingsVal($cal,"t_".$jlang."_btime",0);


### Zuordnung der Anzeigezeilen ###
### Beispiel Dienstag = Spalte 2 / 13:05 = Zeile 6
if ($btime eq "08:00")
{
$zeile = 1;
}
elsif ($btime eq "08:50")
{
$zeile = 2;
}
elsif ($btime eq "09:40")
{
$zeile = 3;
}
elsif ($btime eq "10:40")
{
$zeile = 4;
}
elsif ($btime eq "12:15")
{
$zeile = 5;
}
elsif ($btime eq "13:05")
{
$zeile = 6;
}
elsif ($btime eq "13:55")
{
$zeile = 7;
}
else
{
$zeile = 0;
}
$daten[$weekday][$zeile]= $jlang;
};

### Zeilen aufbauen, beginnen mit Ueberschrift
my $zeilen = $cal.":<Zeit>,<Montag>,<Dienstag>,<Mittwoch>,<Donnerstag>,<Freitag>";
$zeilen = $zeilen.Einzelzeileholen(\@daten, $cal, ":\<8:00-8:45\>", 1);
$zeilen = $zeilen.Einzelzeileholen(\@daten, $cal, ":\<8:50-9:35\>", 2);
$zeilen = $zeilen.Einzelzeileholen(\@daten, $cal, ":\<9:40-10:25\>", 3);
$zeilen = $zeilen.Einzelzeileholen(\@daten, $cal, ":\<10:40-11:25\>", 4);
$zeilen = $zeilen.Einzelzeileholen(\@daten, $cal, ":\<12:15-13:00\>", 5);
$zeilen = $zeilen.Einzelzeileholen(\@daten, $cal, ":\<13:05-13:50\>", 6);
$zeilen = $zeilen.Einzelzeileholen(\@daten, $cal, ":\<13:55-14:40\>", 7);

### Definieren der ReadingsGroup ########
#Log 1, $zeilen;
fhem( "defmod Plan readingsGroup ".$zeilen);
}


Der Code hat mehrere Nachteile:

  • Die Zeiten sind derzeit hardcodiert. Da sie sich nicht ändern, ist mir das schnuppe. Aber jeder, der das für sich nutzen will, muss das anpassen. Besser wäre es, wenn die Zeiten aus dem Calview selbst ausgelesen würden. (Wie gesagt: Ich bin trial-and-error-Programmierer.)
  • Mir gefällt die Anzeige noch nicht. Ich will insbesondere, dass da Farben hineinkommen. Es ist aber das erste Mal, dass ich eine ReadingsGroup nutze.
  • Am meisten stört mich, dass ich nach jeder Änderung "save config" drücken muss. Ich habe das nicht automatisiert hinbekommen.https://forum.fhem.de/index.php/topic,93682.0.html
  • Ich lese die ReadingsVal händisch aus und setze sie ein, da ist kein Verweis.
  • Und noch etwas habe ich bemerkt: Wenn verschiedener Unterricht mehrfach auf eine Stunde fällt (anscheinend geht das?), wird das aufgrund der Programmierung natürlich überschrieben.
Vielleicht hat da ja noch jemand eine Idee.
FHEM 6.1 auf RaspPi3 (Raspbian:  6.1.21-v8+; Perl: v5.32.1)
SIGNALduino (433 MHz) und HM-UART (868 MHz), Sonoff, Blitzwolf, Somfy RTS, CAME-Gartentor, Volkszähler, Keyence-Sensor, Homematic-Sensoren und -thermostat, Ferraris-Zähler für Wasseruhr, Openlink-Nachbau Viessmann

rischbiter123

#37
Moin,

mit der Farbe schau mal hier,
https://forum.fhem.de/index.php/topic,84301.0.html
vielleicht hilft das ein wenig. Und um die Saveanforderungen auch zu minimieren, müsste eventuell ein eventOnChangeReading beim Kalenderdevice helfen.

@Otto
Vielleicht könnte man dann auch ein notify für Änderungsanzeigen triggern.

LG

Andreas

Edit: Funktioniert so leider nicht
4*Raspi, Max Thermostate und Fensterkontakte, FB7590, Mysensors und NanoCUL, IT und Sonoff, zigbee2mqtt2

amenomade

Pi 3B, Alexa, CUL868+Selbstbau 1/2λ-Dipol-Antenne, USB Optolink / Vitotronic, Debmatic und HM / HmIP Komponenten, Rademacher Duofern Jalousien, Fritz!Dect Thermostaten, Proteus

andies

Die App hat einen viel umfangreicheren Kalender als die Desktop-Variante: zB sind da Farben drin, Ausfall wird angezeigt usw (siehe Anhang). Weiß jemand, wie man das aus dem Desktop auslesen kann?
FHEM 6.1 auf RaspPi3 (Raspbian:  6.1.21-v8+; Perl: v5.32.1)
SIGNALduino (433 MHz) und HM-UART (868 MHz), Sonoff, Blitzwolf, Somfy RTS, CAME-Gartentor, Volkszähler, Keyence-Sensor, Homematic-Sensoren und -thermostat, Ferraris-Zähler für Wasseruhr, Openlink-Nachbau Viessmann

amenomade

Es kann sein, dass die Farben auch im ical sind. Dann ist es nur eine Formatierungsgeschichte
Wenn nicht, muss man vermutlich über "raw" Request gehen wie hier: https://forum.fhem.de/index.php/topic,93217.msg860265.html#msg860265

Ansonsten ist vielleicht das Reverse-Engineering von der APP möglich, höchstwahrscheinlich aber illegal... Wenn man die http Requests von der APP sehen könnte... wäre vielleicht dann etwas möglich
Pi 3B, Alexa, CUL868+Selbstbau 1/2λ-Dipol-Antenne, USB Optolink / Vitotronic, Debmatic und HM / HmIP Komponenten, Rademacher Duofern Jalousien, Fritz!Dect Thermostaten, Proteus

amenomade

Hmmm. Ne. Anscheinend sind die Farben direkt in der App konfiguriert. In den Einstellungen kannst Du die sogar ändern. Sowie die Ausfälle auch
Pi 3B, Alexa, CUL868+Selbstbau 1/2λ-Dipol-Antenne, USB Optolink / Vitotronic, Debmatic und HM / HmIP Komponenten, Rademacher Duofern Jalousien, Fritz!Dect Thermostaten, Proteus

andies

Gibt es (legale) Tools, mit denen man den request der App mitlesen kann?
FHEM 6.1 auf RaspPi3 (Raspbian:  6.1.21-v8+; Perl: v5.32.1)
SIGNALduino (433 MHz) und HM-UART (868 MHz), Sonoff, Blitzwolf, Somfy RTS, CAME-Gartentor, Volkszähler, Keyence-Sensor, Homematic-Sensoren und -thermostat, Ferraris-Zähler für Wasseruhr, Openlink-Nachbau Viessmann

Wuehler

Moin, hat noch jemand daran Interesse? Die haben sich weiterentwickelt und man kann im Browser einiges an REST-API-Calls sehen. Habe mir für den Vertretungsplan ein kleines Modul geschrieben.

andies

Ja, ich habe daran nach wie vor Interesse.
FHEM 6.1 auf RaspPi3 (Raspbian:  6.1.21-v8+; Perl: v5.32.1)
SIGNALduino (433 MHz) und HM-UART (868 MHz), Sonoff, Blitzwolf, Somfy RTS, CAME-Gartentor, Volkszähler, Keyence-Sensor, Homematic-Sensoren und -thermostat, Ferraris-Zähler für Wasseruhr, Openlink-Nachbau Viessmann

rischbiter123

4*Raspi, Max Thermostate und Fensterkontakte, FB7590, Mysensors und NanoCUL, IT und Sonoff, zigbee2mqtt2

Wuehler

Probier mal den Anhang. Ist alles natürlich nicht fertig für den allgemeinen Gebrauch, aber vielleicht steigst du ja durch. Um den Namen der Schule herauszubekommen habe ich mich an der Schulwebseite angemeldet und mir im Browser angesehen, was passiert.

Noch sind 3 Variablen drin, die man nicht mit im Define angeben kann (Zeile 66-68). Den Schulnamen doppelt, da in der URL ein %20 für Leerzeichen drin sein muss, im JSON-Payload allerdings nicht.
Die formate habe ich in den Entwicklertools des Browsers aus den REST-Calls rausgelesen.

Define geht folgendermaßen:

define <name> HGW_Vertreter <url> <school>


url ist bei mir: cissa.webuntis.com

Falls das läuft kann ich dir noch ein wenig Infrastruktur-Devices (notify, telegram, ats) dazu geben.

rischbiter123

Moin,

habe es mir schon mal runtergeladen, komme aber erst am WE zum Testen. Schonmal Danke im Vorraus.

LG

Andreas
4*Raspi, Max Thermostate und Fensterkontakte, FB7590, Mysensors und NanoCUL, IT und Sonoff, zigbee2mqtt2

andies

Mir fehlt anscheinend die Klasseninformation, wo gebe ich die ein:
Internals:
   CFGFN     
   DEF        klio.webuntis.com HansCarossa
   FUUID      5dd79b1b-f33f-1115-cb0e-1fd7c966f0e76689
   NAME       HCG
   NOTIFYDEV  global
   NR         502755
   NTFY_ORDER 50-HCG
   STATE      ?
   TYPE       HGW_Vertreter
   VERSION    0.1.0
   HGW_Vertreter:
     data       /data?school=HansCarossa
     eventPeriod 24
     interval   60
     updateStartTime 1574411035.06973
     url        https://klio.webuntis.com/WebUntis/monitor/
     activeDates:
       20191122   1
     klassen:
     messages:
   READINGS:
     2019-11-22 09:23:56   lastUpdate      22.11.2019 09:23:56
   httpParams:
     ignoreredirects 1
     loglevel   5
     method     POST
     noshutdown 0
     timeout    5
     hash:
     sslargs:
       SSL_verify_mode 0
   updateDispatch:
Attributes:
   stateFormat {return ReadingsVal($name,"vertreter_stand","?");}

Und gibt es da nicht auch ein Passwort und so?

Sonst ist der Aufruf beispielsweise
https://klio.webuntis.com/WebUntis/Ical.do?elemType=5&elemId=3139&rpt_sd=2019-11-24
FHEM 6.1 auf RaspPi3 (Raspbian:  6.1.21-v8+; Perl: v5.32.1)
SIGNALduino (433 MHz) und HM-UART (868 MHz), Sonoff, Blitzwolf, Somfy RTS, CAME-Gartentor, Volkszähler, Keyence-Sensor, Homematic-Sensoren und -thermostat, Ferraris-Zähler für Wasseruhr, Openlink-Nachbau Viessmann

Wuehler

scheint bei eurer Schule irgendwie anders zu sein. Versuches mal mit dem zweiten Parameter:
Hans-Carossa-%20OS

Google-Suche nach "webuntis Hans Carossa" gab folgenden Treffer:
https://klio.webuntis.com/WebUntis/?school=Hans-Carossa-%20OS#/basic/main

Bei uns sieht die Seite anders aus. Wenn man sich angemeldet hat kann man auff den Vertrutungsplan-Monitor kommen. Da habe ich in iFrames URLs gefunden, die sich auch ohne Login aufrufen ließen und so den Vertretungsplan ohne Login anzeigten. Diese URLs riefen dann REST-APIs auf. Den Payload den man mitschicken musste habe ich aus den Entwicklertools von Chrome kopiert (Zeilen 394 und 452).
Bei uns kommt dann kein iCal zurück sondern ein JSON-File. Das parse ich und stelle die Inhalte in FHEM zur Verfügung (nicht als Reading sondern als get ...).

andies

Da muss ich noch nacharbeiten:

2019.11.22 19:04:58 5: HCG (HGW_Vertreter_Notify) - executed.
2019.11.22 19:04:58 5: HCG: get called with ?.
2019.11.22 19:05:00 5: HCG (HGW_Vertreter_Notify) - executed.
2019.11.22 19:05:02 5: HCG: set called with update
2019.11.22 19:05:02 4: HCG: set update
2019.11.22 19:05:02 5: HCG (HGW_Vertreter_DoUpdate) - executed.
2019.11.22 19:05:02 5: HCG (HGW_Vertreter_GetClasses_Send) - executed.
2019.11.22 19:05:02 5: HCG (HGW_Vertreter_GetClasses_Send) - url: https://klio.webuntis.com/WebUntis/monitor/substitution/data?school=Hans-Carossa-%20OS
2019.11.22 19:05:02 5: HCG: get called with ?.
2019.11.22 19:05:03 5: HCG (HGW_Vertreter_GetClasses_Receive) - executed. data:{"error":{"data":null,"code":-8520,"message":"access not allowed"}}
2019.11.22 19:05:03 5: HCG (HGW_Vertreter_GetClasses_Receive) - Failed (without message)! - state:''
2019.11.22 19:05:03 5: HCG (HGW_Vertreter_GetTickets_Send) - executed.
2019.11.22 19:05:03 5: HCG (HGW_Vertreter_GetTickets_Send) - url: https://klio.webuntis.com/WebUntis/monitor/ticker/data?school=Hans-Carossa-%20OS
2019.11.22 19:05:03 5: HCG (HGW_Vertreter_GetTickets_Receive) - executed. data:{"error":{"data":null,"code":-8520,"message":"access not allowed"}}
2019.11.22 19:05:03 5: HCG (HGW_Vertreter_GetTickets_Receive) - Failed (without message)! - state:''
2019.11.22 19:05:03 5: HCG (HGW_Vertreter_ProcessUpdate) - executed after 0.3974 seconds.
2019.11.22 19:05:03 5: HCG (HGW_Vertreter_VertreterReadings) - executed.
2019.11.22 19:05:03 5: HCG (HGW_Vertreter_SetHealthReadings) - executed.
2019.11.22 19:05:03 5: HCG (HGW_Vertreter_ProcessUpdate) - finished after 0.4302 seconds.
FHEM 6.1 auf RaspPi3 (Raspbian:  6.1.21-v8+; Perl: v5.32.1)
SIGNALduino (433 MHz) und HM-UART (868 MHz), Sonoff, Blitzwolf, Somfy RTS, CAME-Gartentor, Volkszähler, Keyence-Sensor, Homematic-Sensoren und -thermostat, Ferraris-Zähler für Wasseruhr, Openlink-Nachbau Viessmann

Wuehler

Scheinbar geht es bei euch nicht ohne Login. Die Webseite sieht auch komplett anders aus als bei uns. Vielleicht gibt es bei euch keinen Monitor.

Ich bin bis Sonntag unterwegs, dann sende ich dir mal ein paar Links zu.

Otto

Hi,

ich hätte auch Interesse und so wie es aussieht gibt es bei unserer Schule auch keinen Monitor.
Gruss Otto

.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.

docker - homematic

andies

Zitat von: Wuehler am 22 November 2019, 19:39:58
Scheinbar geht es bei euch nicht ohne Login.
Wäre nicht HTTPMOD ein geeignetes Device? Ich will mir das mal anschauen.
FHEM 6.1 auf RaspPi3 (Raspbian:  6.1.21-v8+; Perl: v5.32.1)
SIGNALduino (433 MHz) und HM-UART (868 MHz), Sonoff, Blitzwolf, Somfy RTS, CAME-Gartentor, Volkszähler, Keyence-Sensor, Homematic-Sensoren und -thermostat, Ferraris-Zähler für Wasseruhr, Openlink-Nachbau Viessmann

amenomade

#54
Da waren schon erfolgreiche Einsetzungen mit HTTPMOD hier im Forum, sogar in diesem Thread https://forum.fhem.de/index.php/topic,93217.msg860265.html#msg860265
Pi 3B, Alexa, CUL868+Selbstbau 1/2λ-Dipol-Antenne, USB Optolink / Vitotronic, Debmatic und HM / HmIP Komponenten, Rademacher Duofern Jalousien, Fritz!Dect Thermostaten, Proteus

andies

Anscheinend wurde da wieder was geändert. Jetzt muss ich zuerst POSTen
POST /WebUntis/j_spring_security_check HTTP/1.1
Host: klio.webuntis.com
Connection: close
Content-Length: 76
Accept: application/json
X-CSRF-TOKEN: 54a22889-38bd-429b-ad88-b7fc15ea6610
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36
Content-Type: application/x-www-form-urlencoded
Origin: https://klio.webuntis.com
Sec-Fetch-Site: same-origin
Sec-Fetch-Mode: cors
Sec-Fetch-Dest: empty
Referer: https://klio.webuntis.com/WebUntis/?school=Hans-Carossa-+OS
Accept-Encoding: gzip, deflate
Accept-Language: de-DE,de;q=0.9,en-US;q=0.8,en;q=0.7
Cookie: JSESSIONID=117F21227BED4A73F907831FE68776A8; schoolname="_aGFucy1jYXJvc3NhLSBvcw=="

school=Hans-Carossa-%20OS&j_username=XXXXX&j_password=YYYYYY&token=

wobei Schulname fest kodiert ist, JSESSIONIS sollte immer jeweils anders sein. Die Antwort ist dann
...
{"switchUI":false,"state":"SUCCESS","switchLocale":false}
und dann kommen so etwa 15 responses, aber die Inhalte der nächste Schulstunden sind nicht darunter. Der notwendige Aufruf scheint zu sein
GET /WebUntis/api/public/timetable/weekly/data?elementType=5&elementId=3139&date=2020-10-04&formatId=3
Erst sehr weit unten stehen dann die Daten.
FHEM 6.1 auf RaspPi3 (Raspbian:  6.1.21-v8+; Perl: v5.32.1)
SIGNALduino (433 MHz) und HM-UART (868 MHz), Sonoff, Blitzwolf, Somfy RTS, CAME-Gartentor, Volkszähler, Keyence-Sensor, Homematic-Sensoren und -thermostat, Ferraris-Zähler für Wasseruhr, Openlink-Nachbau Viessmann

Otto

Bei mir läuft die Sache schon länger nicht mehr.

Ist alles zu hoch für mich, ich verfolge es trotzdem  ;)
Gruss Otto

.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.

docker - homematic

enno

Moin zusammen,

hat das hier noch jemand im Betrieb? Ich wollte es bei mir einbauen aber das Rad nicht unbedingt neu erfinden.

Gruss
  Enno
Einfacher FHEM Anwender auf Intel®NUC