Home assistant i dziennik szkolny LIBRUS

Czas szkolny obecnie może nie służy za mocno takiemu mocniejszemu wglądowi w dziennik dziecka ale jednak przydałby się szczególnie zadawane zadania domowe.
Czy ktoś ma jakieś gotowe rozwiązania do wyświetlanie wiadomości z dziennika librus?

Jest do tego LIBRUS API ?

po wpisaniu do gooogla otrzymałem to:

ale jeśli chodzi o mnie i moje umiejętności to niestety na nie wiele mi się to zda

gdzieś wyczytałem, że tu coś jest: https://api.librus.pl
tu coś było - GitHub - shymmq/librus-client-kotlin: Android client for Librus/ Librus Synergia using Rest API and Kotlin

Dostęp do API wymaga zgody producenta, czytaj https://www.librus.pl/wp-content/uploads/2020/08/API_Librus.pdf. Chodzi oczywiście o kasę bo za dużo producent tracił przez takie aplikacje jak https://szkolny.eu, polecam przeczytać wyjaśnienie sytuacji: Szkolny.eu bez Librusa. E-dzienniki to zmora nie tylko dla uczniów.
Wniosek: każda integracja HA z Librusem będzie mocno kombinowana bez dostępu do API a scraping strony to ciągłe dostosowywanie się do zmian.

1 polubienie

Zgadzam się - mam opłaconą aplikację i dla takich osób powinni udostępniać. Ich aplikacja to dramat a dostęp do danych za darmo jest za pomocą ich strony. Może to można jakoś użyć.

Temat ogólnopolski a sytuacja dziwaczna. Dziennik elektroniczny publicznej szkoły z płatnym dostępem dla rodzica/podatnika.

1 polubienie

Troszke minęło od ostatniego wpisu ale ma ktoś pomysł jak wyjąć chociaż godzine rozpoczęcia zajęć z librusa?
Nosz q…a co dzień jest inna godzina i tydzień do tygodnia nie równy, kiedyś chodziło się cały czas tak samo a teraz co dzień inaczej.


UWAGA
Pojawiło się!
https://paste.sobczyk.in/?e8b18b9c433d2216&fbclid=IwAR0wy5SafGf5vbzl5hTl3uj9ZsZI7lkBMXh8Z04fC5WK341vNpDSIXUUMx8#7Mq1VSoxWaFJvBxzxehG9vP5iLihFph1a2zBS1GarpAu

Koleś na FB https://www.facebook.com/groups/130013164361315/user/100000777274040 zmontowal integrację.


ponieważ link z góry wygasa wklejam zawartość:

[{"id":"f96c7af29b68e5ef","type":"tab","label":"Librus","disabled":false,"info":"","env":[]},{"id":"1c34540c151ded5c","type":"catch","z":"f96c7af29b68e5ef","name":"","scope":null,"uncaught":false,"x":120,"y":40,"wires":[["331557b7d1a6050e"]]},{"id":"331557b7d1a6050e","type":"debug","z":"f96c7af29b68e5ef","name":"","active":true,"tosidebar":true,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","statusVal":"data","statusType":"auto","x":350,"y":40,"wires":[]},{"id":"4251ae6cd2c3263d","type":"http request","z":"f96c7af29b68e5ef","name":"Zadania domowe","method":"GET","ret":"obj","paytoqs":"ignore","url":"https://api.librus.pl/2.0/HomeWorkAssignments","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":false,"headers":[{"keyType":"Authorization","keyValue":"","valueType":"msg","valueValue":"auth"}],"x":210,"y":1960,"wires":[["300433f258f5c2d4"]]},{"id":"3d03b1bffce37eba","type":"http request","z":"f96c7af29b68e5ef","name":"Ogłoszenia","method":"GET","ret":"obj","paytoqs":"ignore","url":"https://api.librus.pl/2.0/SchoolNotices","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":false,"headers":[{"keyType":"Authorization","keyValue":"","valueType":"msg","valueValue":"auth"}],"x":190,"y":1360,"wires":[["ca30ee0a5eabb308"]]},{"id":"cce4608b77516378","type":"http request","z":"f96c7af29b68e5ef","name":"Użytkownicy","method":"GET","ret":"obj","paytoqs":"ignore","url":"https://api.librus.pl/2.0/Users","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":false,"headers":[{"keyType":"Authorization","keyValue":"","valueType":"msg","valueValue":"auth"}],"x":190,"y":820,"wires":[["dae642ef511e9f85"]]},{"id":"478013e9bbc8dc41","type":"http request","z":"f96c7af29b68e5ef","name":"Oceny","method":"GET","ret":"obj","paytoqs":"ignore","url":"https://api.librus.pl/2.0/Grades","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":false,"headers":[{"keyType":"Authorization","keyValue":"","valueType":"msg","valueValue":"auth"}],"x":170,"y":940,"wires":[["7ae436af25390de0"]]},{"id":"300433f258f5c2d4","type":"http request","z":"f96c7af29b68e5ef","name":"Nieobecności nauczycieli","method":"GET","ret":"obj","paytoqs":"ignore","url":"https://api.librus.pl/2.0/TeacherFreeDays","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":false,"headers":[{"keyType":"Authorization","keyValue":"","valueType":"msg","valueValue":"auth"}],"x":240,"y":2020,"wires":[["fbf1610643f09cb3"]]},{"id":"d6c5c896414576fa","type":"http request","z":"f96c7af29b68e5ef","name":"Uwagi","method":"GET","ret":"obj","paytoqs":"ignore","url":"https://api.librus.pl/2.0/Notes","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":false,"headers":[{"keyType":"Authorization","keyValue":"","valueType":"msg","valueValue":"auth"}],"x":170,"y":1900,"wires":[["4251ae6cd2c3263d"]]},{"id":"6b6207a2c70a4f33","type":"http request","z":"f96c7af29b68e5ef","name":"Kategorie uwag","method":"GET","ret":"obj","paytoqs":"ignore","url":"https://api.librus.pl/2.0/Notes/Categories","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":false,"headers":[{"keyType":"Authorization","keyValue":"","valueType":"msg","valueValue":"auth"}],"x":200,"y":1840,"wires":[["d6c5c896414576fa"]]},{"id":"e4cc040ba1885dd9","type":"http request","z":"f96c7af29b68e5ef","name":"Listowanie API","method":"GET","ret":"obj","paytoqs":"ignore","url":"https://api.librus.pl/2.0/","tls":"","persist":true,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":false,"headers":[{"keyType":"Authorization","keyValue":"","valueType":"msg","valueValue":"auth"}],"x":800,"y":340,"wires":[["4660f71a90d93f22","ae97734f14c2870b"]]},{"id":"af700ee9c298d0e7","type":"http request","z":"f96c7af29b68e5ef","name":"Szczęśliwy numerek","method":"GET","ret":"obj","paytoqs":"ignore","url":"https://api.librus.pl/2.0/LuckyNumbers","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":false,"headers":[{"keyType":"Authorization","keyValue":"","valueType":"msg","valueValue":"auth"}],"x":220,"y":700,"wires":[["5a710ff409230d2c","a6b7d07aef9550ef"]]},{"id":"bc700405de081e41","type":"http request","z":"f96c7af29b68e5ef","name":"Komentarze ocen","method":"GET","ret":"obj","paytoqs":"ignore","url":"https://api.librus.pl/2.0/Grades/Comments","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":false,"headers":[{"keyType":"Authorization","keyValue":"","valueType":"msg","valueValue":"auth"}],"x":210,"y":1180,"wires":[["ba0cd507e4ed733d"]]},{"id":"a6b7d07aef9550ef","type":"http request","z":"f96c7af29b68e5ef","name":"Kategorie ocen","method":"GET","ret":"obj","paytoqs":"ignore","url":"https://api.librus.pl/2.0/Grades/Categories","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":false,"headers":[{"keyType":"Authorization","keyValue":"","valueType":"msg","valueValue":"auth"}],"x":200,"y":760,"wires":[["afcd0876ef0cd4a2"]]},{"id":"aa3914c01dafd9ae","type":"http request","z":"f96c7af29b68e5ef","name":"Wydarzenia","method":"GET","ret":"obj","paytoqs":"ignore","url":"https://api.librus.pl/2.0/HomeWorks","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":false,"headers":[{"keyType":"Authorization","keyValue":"","valueType":"msg","valueValue":"auth"}],"x":190,"y":1780,"wires":[["6b6207a2c70a4f33"]]},{"id":"e370cad43541d51c","type":"http request","z":"f96c7af29b68e5ef","name":"Pobieranie tokena","method":"use","ret":"txt","paytoqs":"ignore","url":"","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":false,"headers":[],"x":190,"y":520,"wires":[["c5f9ae48e8d0f34d"]]},{"id":"4339b29fc7f365d1","type":"inject","z":"f96c7af29b68e5ef","name":"Librus","props":[{"p":"x","v":"","vt":"date"}],"repeat":"3600","crontab":"","once":true,"onceDelay":0.1,"topic":"","x":200,"y":200,"wires":[["2206745a79b06a45"]]},{"id":"b32f3cb32fc72b93","type":"file in","z":"f96c7af29b68e5ef","name":"Odczytaj token","filename":"/share/librus.token","filenameType":"str","format":"utf8","chunk":false,"sendError":false,"encoding":"none","allProps":false,"x":480,"y":300,"wires":[["c2e5582aa10530e0"]]},{"id":"fb25374493d08f89","type":"change","z":"f96c7af29b68e5ef","name":"","rules":[{"t":"set","p":"method","pt":"msg","to":"post","tot":"str"},{"t":"set","p":"headers['Authorization']","pt":"msg","to":"Basic Mjg6ODRmZGQzYTg3YjAzZDNlYTZmZmU3NzdiNThiMzMyYjE=","tot":"str"},{"t":"set","p":"url","pt":"msg","to":"https://api.librus.pl/OAuth/Token","tot":"str"},{"t":"set","p":"headers['userAgent']","pt":"msg","to":"Dalvik/2.1.0 Android LibrusMobileApp","tot":"str"},{"t":"set","p":"headers['content-type']","pt":"msg","to":"application/x-www-form-urlencoded","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":180,"y":460,"wires":[["e370cad43541d51c"]]},{"id":"fd7b9775daab9cea","type":"file","z":"f96c7af29b68e5ef","name":"Zapisz token","filename":"/share/librus.token","filenameType":"str","appendNewline":false,"createDir":false,"overwriteFile":"true","encoding":"none","x":420,"y":380,"wires":[["b32f3cb32fc72b93"]]},{"id":"c5f9ae48e8d0f34d","type":"json","z":"f96c7af29b68e5ef","name":"","property":"payload","action":"","pretty":false,"x":470,"y":520,"wires":[["6d8713c29504d503"]]},{"id":"6d8713c29504d503","type":"change","z":"f96c7af29b68e5ef","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.access_token","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":450,"y":460,"wires":[["fd7b9775daab9cea"]]},{"id":"c2e5582aa10530e0","type":"string","z":"f96c7af29b68e5ef","name":"","methods":[{"name":"prepend","params":[{"type":"str","value":"Bearer "}]}],"prop":"payload","propout":"auth","object":"msg","objectout":"msg","x":610,"y":360,"wires":[["3e20d36bad82eac2"]]},{"id":"edcf99859f5d0378","type":"function","z":"f96c7af29b68e5ef","name":"Headers","func":"msg.payload = {\"username\":msg.login,\"password\":msg.haslo,\"librus_long_term_token\":\"1\",\"grant_type\":\"password\"}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":180,"y":400,"wires":[["fb25374493d08f89"]]},{"id":"2206745a79b06a45","type":"fs-access","z":"f96c7af29b68e5ef","name":"","path":"/share/","pathType":"str","filename":"librus.token","filenameType":"str","accessRead":false,"accessWrite":false,"x":170,"y":320,"wires":[["b32f3cb32fc72b93"],["a2782aa57ec64f0b"]]},{"id":"3e20d36bad82eac2","type":"change","z":"f96c7af29b68e5ef","name":"","rules":[{"t":"delete","p":"payload","pt":"msg"},{"t":"delete","p":"responseCookies","pt":"msg"},{"t":"delete","p":"filename","pt":"msg"},{"t":"delete","p":"headers","pt":"msg"},{"t":"delete","p":"method","pt":"msg"},{"t":"delete","p":"responseUrl","pt":"msg"},{"t":"delete","p":"url","pt":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":680,"y":440,"wires":[["e4cc040ba1885dd9"]]},{"id":"4660f71a90d93f22","type":"switch","z":"f96c7af29b68e5ef","name":"","property":"payload.Message","propertyType":"msg","rules":[{"t":"eq","v":"Request is denied","vt":"str"},{"t":"else"}],"checkall":"true","repair":false,"outputs":2,"x":890,"y":440,"wires":[["81efb10bbebc6e06"],["57438817440454a5"]]},{"id":"7cd4ddf20587ff1a","type":"change","z":"f96c7af29b68e5ef","name":"Dane logowania","rules":[{"t":"set","p":"login","pt":"msg","to":"12345678","tot":"str"},{"t":"set","p":"haslo","pt":"msg","to":"xxxxxxxxxxxxxxxx","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":200,"y":120,"wires":[["916b8b8a925dccdf"]]},{"id":"81efb10bbebc6e06","type":"change","z":"f96c7af29b68e5ef","name":"","rules":[{"t":"delete","p":"payload","pt":"msg"},{"t":"delete","p":"responseCookies","pt":"msg"},{"t":"delete","p":"filename","pt":"msg"},{"t":"delete","p":"headers","pt":"msg"},{"t":"delete","p":"method","pt":"msg"},{"t":"delete","p":"responseUrl","pt":"msg"},{"t":"delete","p":"url","pt":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":740,"y":520,"wires":[["d1e992c8c57f8933"]]},{"id":"aa971a20bdb73980","type":"http request","z":"f96c7af29b68e5ef","name":"Info o koncie","method":"GET","ret":"obj","paytoqs":"ignore","url":"https://api.librus.pl/2.0/Me","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":false,"headers":[{"keyType":"Authorization","keyValue":"","valueType":"msg","valueValue":"auth"}],"x":200,"y":640,"wires":[["d161bbd1b372631d"]]},{"id":"57438817440454a5","type":"change","z":"f96c7af29b68e5ef","name":"","rules":[{"t":"set","p":"api","pt":"msg","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1070,"y":500,"wires":[["8a1b70f931b86c37"]]},{"id":"8a1b70f931b86c37","type":"http request","z":"f96c7af29b68e5ef","name":"Klasa","method":"GET","ret":"obj","paytoqs":"ignore","url":"https://api.librus.pl/2.0/Classes","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":false,"headers":[{"keyType":"Authorization","keyValue":"","valueType":"msg","valueValue":"auth"}],"x":190,"y":580,"wires":[["360c9870bd01c5ce"]]},{"id":"b33a8b07e49cacb1","type":"link in","z":"f96c7af29b68e5ef","name":"link in 1","links":["d1e992c8c57f8933","a2782aa57ec64f0b","5dbc67111d560d16"],"x":85,"y":120,"wires":[["7cd4ddf20587ff1a"]]},{"id":"d1e992c8c57f8933","type":"link out","z":"f96c7af29b68e5ef","name":"link out 1","mode":"link","links":["b33a8b07e49cacb1"],"x":865,"y":520,"wires":[]},{"id":"a2782aa57ec64f0b","type":"link out","z":"f96c7af29b68e5ef","name":"link out 2","mode":"link","links":["b33a8b07e49cacb1"],"x":295,"y":340,"wires":[]},{"id":"a351381f763bde8c","type":"link in","z":"f96c7af29b68e5ef","name":"link in 2","links":["916b8b8a925dccdf"],"x":85,"y":400,"wires":[["edcf99859f5d0378"]]},{"id":"916b8b8a925dccdf","type":"link out","z":"f96c7af29b68e5ef","name":"link out 3","mode":"link","links":["a351381f763bde8c"],"x":325,"y":120,"wires":[]},{"id":"360c9870bd01c5ce","type":"function","z":"f96c7af29b68e5ef","name":"function 1","func":"msg.klasa = msg.payload.Class.Number + msg.payload.Class.Symbol\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":430,"y":580,"wires":[["a77efd660b558f81","aa971a20bdb73980"]]},{"id":"a77efd660b558f81","type":"ha-entity","z":"f96c7af29b68e5ef","name":"Klasa","server":"935df828.6f77d8","version":2,"debugenabled":false,"outputs":1,"entityType":"sensor","config":[{"property":"name","value":"Librus - klasa"},{"property":"device_class","value":""},{"property":"icon","value":"mdi:google-classroom"},{"property":"unit_of_measurement","value":""},{"property":"state_class","value":""},{"property":"last_reset","value":""}],"state":"klasa","stateType":"msg","attributes":[{"property":"Początek roku szkolnego","value":"payload.Class.BeginSchoolYear","valueType":"msg"},{"property":"Koniec pierwszego semsetru","value":"payload.Class.EndFirstSemester","valueType":"msg"},{"property":"Koniec roku szkolnego","value":"payload.Class.EndSchoolYear","valueType":"msg"}],"resend":true,"outputLocation":"payload","outputLocationType":"none","inputOverride":"allow","outputOnStateChange":false,"outputPayload":"","outputPayloadType":"str","x":590,"y":580,"wires":[[]]},{"id":"d161bbd1b372631d","type":"function","z":"f96c7af29b68e5ef","name":"function 2","func":"msg.uczen = msg.payload.Me.User.FirstName+ \" \" + msg.payload.Me.User.LastName\nmsg.rodzic = msg.payload.Me.Account.FirstName+ \" \" + msg.payload.Me.Account.LastName\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":430,"y":640,"wires":[["0e50175dffa8fee1","af700ee9c298d0e7"]]},{"id":"187ab1f4ee249afe","type":"ha-entity","z":"f96c7af29b68e5ef","name":"Uczeń","server":"935df828.6f77d8","version":2,"debugenabled":false,"outputs":1,"entityType":"sensor","config":[{"property":"name","value":"Librus - uczeń"},{"property":"device_class","value":""},{"property":"icon","value":"mdi:account-school"},{"property":"unit_of_measurement","value":""},{"property":"state_class","value":""},{"property":"last_reset","value":""}],"state":"uczen","stateType":"msg","attributes":[{"property":"Klasa","value":"klasa","valueType":"msg"}],"resend":true,"outputLocation":"payload","outputLocationType":"none","inputOverride":"allow","outputOnStateChange":false,"outputPayload":"","outputPayloadType":"str","x":750,"y":640,"wires":[[]]},{"id":"0e50175dffa8fee1","type":"ha-entity","z":"f96c7af29b68e5ef","name":"Konto","server":"935df828.6f77d8","version":2,"debugenabled":false,"outputs":1,"entityType":"sensor","config":[{"property":"name","value":"Librus - konto"},{"property":"device_class","value":""},{"property":"icon","value":"mdi:account"},{"property":"unit_of_measurement","value":""},{"property":"state_class","value":""},{"property":"last_reset","value":""}],"state":"payload.Me.Account.Email","stateType":"msg","attributes":[{"property":"Rodzic","value":"rodzic","valueType":"msg"},{"property":"Login","value":"payload.Me.Account.Login","valueType":"msg"},{"property":"Premium","value":"payload.Me.Account.IsPremium","valueType":"msg"},{"property":"Okres testowy premium","value":"payload.Me.Account.IsPremiumDemo","valueType":"msg"}],"resend":true,"outputLocation":"payload","outputLocationType":"none","inputOverride":"allow","outputOnStateChange":false,"outputPayload":"","outputPayloadType":"str","x":590,"y":640,"wires":[["187ab1f4ee249afe"]]},{"id":"5a710ff409230d2c","type":"ha-entity","z":"f96c7af29b68e5ef","name":"Szczęśliwy numerek","server":"935df828.6f77d8","version":2,"debugenabled":false,"outputs":1,"entityType":"sensor","config":[{"property":"name","value":"Librus - szczęśliwy numerek"},{"property":"device_class","value":""},{"property":"icon","value":"mdi:clover"},{"property":"unit_of_measurement","value":""},{"property":"state_class","value":""},{"property":"last_reset","value":""}],"state":"payload.LuckyNumber.LuckyNumber","stateType":"msg","attributes":[{"property":"Data","value":"payload.LuckyNumber.LuckyNumberDay","valueType":"msg"}],"resend":true,"outputLocation":"payload","outputLocationType":"none","inputOverride":"allow","outputOnStateChange":false,"outputPayload":"","outputPayloadType":"str","x":480,"y":700,"wires":[[]]},{"id":"afcd0876ef0cd4a2","type":"change","z":"f96c7af29b68e5ef","name":"","rules":[{"t":"set","p":"kategorie_ocen","pt":"msg","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":430,"y":760,"wires":[["cce4608b77516378"]]},{"id":"ba0cd507e4ed733d","type":"http request","z":"f96c7af29b68e5ef","name":"Sale","method":"GET","ret":"obj","paytoqs":"ignore","url":"https://api.librus.pl/2.0/Classrooms","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":false,"headers":[{"keyType":"Authorization","keyValue":"","valueType":"msg","valueValue":"auth"}],"x":170,"y":1240,"wires":[["0dc09b454bd61cc3"]]},{"id":"0dc09b454bd61cc3","type":"change","z":"f96c7af29b68e5ef","name":"","rules":[{"t":"set","p":"sale","pt":"msg","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":340,"y":1240,"wires":[["049fa4a20d121fa7"]]},{"id":"049fa4a20d121fa7","type":"http request","z":"f96c7af29b68e5ef","name":"Zebrania","method":"GET","ret":"obj","paytoqs":"ignore","url":"https://api.librus.pl/2.0/ParentTeacherConferences","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":false,"headers":[{"keyType":"Authorization","keyValue":"","valueType":"msg","valueValue":"auth"}],"x":180,"y":1300,"wires":[["61e41c43ca40ceca"]]},{"id":"61e41c43ca40ceca","type":"function","z":"f96c7af29b68e5ef","name":"function 3","func":"msg.data_zebrania = msg.payload.ParentTeacherConferences[msg.payload.ParentTeacherConferences.length-1].Date\nmsg.godzina_zebrania = msg.payload.ParentTeacherConferences[msg.payload.ParentTeacherConferences.length - 1].Time\nmsg.nazwa_zebrania = msg.payload.ParentTeacherConferences[msg.payload.ParentTeacherConferences.length - 1].Name\nmsg.temat_zebrania = msg.payload.ParentTeacherConferences[msg.payload.ParentTeacherConferences.length - 1].Topic\nmsg.miejsce_zebrania = msg.payload.ParentTeacherConferences[msg.payload.ParentTeacherConferences.length - 1].Room\n\nvar i;\n\nfor (i=0; i< msg.users.length; i++){\n    if (msg.payload.ParentTeacherConferences[msg.payload.ParentTeacherConferences.length - 1].Teacher.Id == msg.users[i].Id)\n            msg.username = msg.users[i].FirstName + \" \" + msg.users[i].LastName\n\n}\n\n\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":390,"y":1300,"wires":[["815152fbdcf7ce3a","3d03b1bffce37eba"]]},{"id":"815152fbdcf7ce3a","type":"ha-entity","z":"f96c7af29b68e5ef","name":"Zebranie","server":"935df828.6f77d8","version":2,"debugenabled":false,"outputs":1,"entityType":"sensor","config":[{"property":"name","value":"Librus - zebranie"},{"property":"device_class","value":""},{"property":"icon","value":"mdi:account-group"},{"property":"unit_of_measurement","value":""},{"property":"state_class","value":""},{"property":"last_reset","value":""}],"state":"data_zebrania","stateType":"msg","attributes":[{"property":"Godzina","value":"godzina_zebrania","valueType":"msg"},{"property":"Sala","value":"miejsce_zebrania","valueType":"msg"},{"property":"Tytuł","value":"tytul_zebrania","valueType":"msg"},{"property":"Temat","value":"temat_zebrania","valueType":"msg"},{"property":"Nauczyciel","value":"username","valueType":"msg"}],"resend":true,"outputLocation":"payload","outputLocationType":"none","inputOverride":"allow","outputOnStateChange":false,"outputPayload":"","outputPayloadType":"str","x":580,"y":1300,"wires":[[]]},{"id":"ca30ee0a5eabb308","type":"function","z":"f96c7af29b68e5ef","name":"function 4","func":"msg.temat_ogloszenia = msg.payload.SchoolNotices[msg.payload.SchoolNotices.length-1].Subject\nmsg.data_ogloszenia = msg.payload.SchoolNotices[msg.payload.SchoolNotices.length - 1].CreationDate\nmsg.tresc_ogloszenia = msg.payload.SchoolNotices[msg.payload.SchoolNotices.length - 1].Content\nmsg.poczatek_ogloszenia = msg.payload.SchoolNotices[msg.payload.SchoolNotices.length - 1].StartDate\nmsg.koniec_ogloszenia = msg.payload.SchoolNotices[msg.payload.SchoolNotices.length - 1].EndDate\n\nvar i;\n\nfor (i = 0; i < msg.users.length; i++) {\n    if (msg.payload.SchoolNotices[msg.payload.SchoolNotices.length -1].AddedBy.Id == msg.users[i].Id)\n        msg.username = msg.users[i].FirstName + \" \" + msg.users[i].LastName\n\n}\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":390,"y":1360,"wires":[["7ebf490d6cd6aef7","e382836bf7a4aace"]]},{"id":"7ebf490d6cd6aef7","type":"ha-entity","z":"f96c7af29b68e5ef","name":"Ogłoszenie","server":"935df828.6f77d8","version":2,"debugenabled":false,"outputs":1,"entityType":"sensor","config":[{"property":"name","value":"Librus - ogłoszenie"},{"property":"device_class","value":""},{"property":"icon","value":"mdi:bullhorn-variant"},{"property":"unit_of_measurement","value":""},{"property":"state_class","value":""},{"property":"last_reset","value":""}],"state":"temat_ogloszenia","stateType":"msg","attributes":[{"property":"Treść","value":"tresc_ogloszenia","valueType":"msg"},{"property":"Data publikacji","value":"data_ogloszenia","valueType":"msg"},{"property":"Początek","value":"poczatek_ogloszenia","valueType":"msg"},{"property":"Koniec","value":"koniec_ogloszenia","valueType":"msg"},{"property":"Dodane przez","value":"username","valueType":"msg"}],"resend":true,"outputLocation":"payload","outputLocationType":"none","inputOverride":"allow","outputOnStateChange":false,"outputPayload":"","outputPayloadType":"str","x":590,"y":1360,"wires":[[]]},{"id":"e382836bf7a4aace","type":"http request","z":"f96c7af29b68e5ef","name":"Przedmioty","method":"GET","ret":"obj","paytoqs":"ignore","url":"https://api.librus.pl/2.0/Subjects","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":false,"headers":[{"keyType":"Authorization","keyValue":"","valueType":"msg","valueValue":"auth"}],"x":190,"y":1420,"wires":[["121ce0fca6d88c4f"]]},{"id":"ae966bead503acac","type":"http request","z":"f96c7af29b68e5ef","name":"Kategorie ocen punktowych","method":"GET","ret":"obj","paytoqs":"ignore","url":"https://api.librus.pl/2.0/PointGrades/Categories","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":false,"headers":[{"keyType":"Authorization","keyValue":"","valueType":"msg","valueValue":"auth"}],"x":240,"y":1480,"wires":[["d9e954bda6b2c032"]]},{"id":"996fe7a906e96a49","type":"http request","z":"f96c7af29b68e5ef","name":"Kategorie wydarzeń","method":"GET","ret":"obj","paytoqs":"ignore","url":"https://api.librus.pl/2.0/HomeWorks/Categories","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":false,"headers":[{"keyType":"Authorization","keyValue":"","valueType":"msg","valueValue":"auth"}],"x":220,"y":1540,"wires":[["83e02ba0cd39f104"]]},{"id":"d9e954bda6b2c032","type":"change","z":"f96c7af29b68e5ef","name":"","rules":[{"t":"set","p":"kategorie_ocen_punktowych","pt":"msg","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":550,"y":1480,"wires":[["996fe7a906e96a49"]]},{"id":"121ce0fca6d88c4f","type":"change","z":"f96c7af29b68e5ef","name":"","rules":[{"t":"set","p":"przedmioty","pt":"msg","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":400,"y":1420,"wires":[["ae966bead503acac"]]},{"id":"ed57b955e21effa0","type":"http request","z":"f96c7af29b68e5ef","name":"Oceny opisowe","method":"GET","ret":"obj","paytoqs":"ignore","url":"https://api.librus.pl/2.0/BaseTextGrades","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":false,"headers":[{"keyType":"Authorization","keyValue":"","valueType":"msg","valueValue":"auth"}],"x":200,"y":1060,"wires":[["cb26ab06c5381773"]]},{"id":"cb26ab06c5381773","type":"http request","z":"f96c7af29b68e5ef","name":"Oceny punktowe","method":"GET","ret":"obj","paytoqs":"ignore","url":"https://api.librus.pl/2.0/PointGrades","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":false,"headers":[{"keyType":"Authorization","keyValue":"","valueType":"msg","valueValue":"auth"}],"x":210,"y":1120,"wires":[["bc700405de081e41"]]},{"id":"c26926a7978f2575","type":"http request","z":"f96c7af29b68e5ef","name":"Lista obecności","method":"GET","ret":"obj","paytoqs":"ignore","url":"https://api.librus.pl/2.0/Attendances","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":false,"headers":[{"keyType":"Authorization","keyValue":"","valueType":"msg","valueValue":"auth"}],"x":200,"y":1660,"wires":[["19b8e809cb7496d1"]]},{"id":"83e02ba0cd39f104","type":"http request","z":"f96c7af29b68e5ef","name":"Kategorie listy obecności","method":"GET","ret":"obj","paytoqs":"ignore","url":"https://api.librus.pl/2.0/Attendances/Types","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":false,"headers":[{"keyType":"Authorization","keyValue":"","valueType":"msg","valueValue":"auth"}],"x":230,"y":1600,"wires":[["c26926a7978f2575"]]},{"id":"19b8e809cb7496d1","type":"http request","z":"f96c7af29b68e5ef","name":"Lekcje","method":"GET","ret":"obj","paytoqs":"ignore","url":"https://api.librus.pl/2.0/Lessons","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":false,"headers":[{"keyType":"Authorization","keyValue":"","valueType":"msg","valueValue":"auth"}],"x":170,"y":1720,"wires":[["aa3914c01dafd9ae"]]},{"id":"fbf1610643f09cb3","type":"http request","z":"f96c7af29b68e5ef","name":"Nieprzeczytane wiadomości","method":"GET","ret":"obj","paytoqs":"ignore","url":"https://api.librus.pl/2.0/Messages/Unread","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":false,"headers":[{"keyType":"Authorization","keyValue":"","valueType":"msg","valueValue":"auth"}],"x":240,"y":2080,"wires":[["42d8ec31e78ded5c"]]},{"id":"42d8ec31e78ded5c","type":"ha-entity","z":"f96c7af29b68e5ef","name":"Nieprzeczytane wiadomości","server":"935df828.6f77d8","version":2,"debugenabled":false,"outputs":1,"entityType":"sensor","config":[{"property":"name","value":"Librus - nieprzeczytane wiadomości"},{"property":"device_class","value":""},{"property":"icon","value":"mdi:message-alert"},{"property":"unit_of_measurement","value":""},{"property":"state_class","value":""},{"property":"last_reset","value":""}],"state":"payload.UnreadMessages","stateType":"msg","attributes":[],"resend":true,"outputLocation":"payload","outputLocationType":"none","inputOverride":"allow","outputOnStateChange":false,"outputPayload":"","outputPayloadType":"str","x":560,"y":2080,"wires":[[]]},{"id":"b5de05d35969921e","type":"http request","z":"f96c7af29b68e5ef","name":"Pracownicy","method":"GET","ret":"obj","paytoqs":"ignore","url":"https://api.librus.pl/2.0/Employees","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":false,"headers":[{"keyType":"Authorization","keyValue":"","valueType":"msg","valueValue":"auth"}],"x":190,"y":880,"wires":[["478013e9bbc8dc41"]]},{"id":"dae642ef511e9f85","type":"change","z":"f96c7af29b68e5ef","name":"","rules":[{"t":"set","p":"users","pt":"msg","to":"payload.Users","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":400,"y":820,"wires":[["b5de05d35969921e"]]},{"id":"ae97734f14c2870b","type":"debug","z":"f96c7af29b68e5ef","name":"","active":true,"tosidebar":true,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","statusVal":"data","statusType":"auto","x":1030,"y":340,"wires":[]},{"id":"7ae436af25390de0","type":"http request","z":"f96c7af29b68e5ef","name":"Oceny tekstowe","method":"GET","ret":"obj","paytoqs":"ignore","url":"https://api.librus.pl/2.0/TextGrades","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":false,"headers":[{"keyType":"Authorization","keyValue":"","valueType":"msg","valueValue":"auth"}],"x":210,"y":1000,"wires":[["ed57b955e21effa0"]]},{"id":"935df828.6f77d8","type":"server","name":"Home Assistant","version":2,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":false,"cacheJson":true,"heartbeat":false,"heartbeatInterval":"30"}]

Dodałem całą integrację. Mam 7 encji z librusa w HA, jednak wpisując dane logowania w NR encje te nie są aktywne. Co robię nie tak?

a doinstalowałeś chyba 2 dodatkowe nody?

Tak doinstalowałem wszystko co potrzeba. Tak jak pisałem wcześniej: w HA pojawiły mi się nowe encje dot. librusa ( ich stan to aktualnie “nieznane” , jednak nie wiem do końca jak teraz to wewnątrz NR skonfigurować. W nodzie dot. danych logowanie wpisałem login i hasło i myślę, że coś musiałem pominąć w innych nodach. Jak mógłbyś mnie naprowadzić, byłoby super.

wiem, że mi nie działało ale jak dałem login cyferkami i odpaliłem go wszystko ruszyło.

Wypełniałeś jakieś inne nody oprócz “dane logowania” czy tylko ten jeden?

tylko ten jeden - no i wszedzie zmienielem na swoj serwer HA

Ja zrobiłem to samo, jednak encje mam dalej niedostępne. Dziwne, że nie działa. Login wpisałem numerkami zgodnie z loginem na Librus, a hasło normalnie takie jakie tam mam.
Dobra. Ruszyło - okazało się, że hasło było zmienione przez małżonkę.

Edit:

@marcinwojciesz Mam jeszcze pytanie do Ciebie. Jak wykorzystujesz tę integrację w powiadomieniach? Masz może jakieś przepływy NR do tego i jesteś w stanie się podzielić?

Jeszcze nic nie robie - czekam na oceny i prace domowe. To mnie najbardziej interesuje. A będzie to tak, że jak wrócimy do domu to ma gadać co zadane a oceny, plan lekcji i wiadomości na wyswietlaczu w zakładce dzieciaków chce żeby były.

OK. Tak na marginesie: nie wiem dla czego mam nieznaną encję “sensor.librus_nieprzeczytane_wiadomosci”. Tez tak jest u Ciebie? Reszta działa i wyświetla dane.

Tak, też. Ja nawet reset NR zrobiłem.

Rozumiem. Ja szukałem jakiś informacji na ten temat w internetach, jednak pustka. Jak się cos dowiesz daj proszę info tutaj.

Które dokładnie dodatki trzeba zainstalować?