Closed monocycler closed 2 years ago
yep.. error in entrypoint.sh... typo...fixed and tested on my machine now (did not do that before...sigh) you need to re-download a fresh image
some explanations on the other questions. I myself do not (!) use docker compose .. never needed it So, the only thing you need is to know where your volume goes to and if therer is write-access, the docker run script will create the pronote2mqtt folder and app underneath I have a single folder for all my docker container volume mappings, it is on a ssd so it can grow wihtout affecting the OS if that becomes full. So, [path to folder] for me is /home/docker and I have full read/write access to that (/home/docker is virtual as it is actually mapped/mount to my ssd) With that you can then run
docker run --name pronote2mqtt -v [path to your folder]/pronote2mqtt/app:/app -v [path to folder]/docker/pronote2mqtt:/data --tty vingerha/pronote2mqtt:latest
If you get stuck, then please let me know and possibly I have time tomorrow ...then continue using chat on discord (vingerha)
Thanks! That helped. I was able to connect to the demo account, and publish to my mqtt broker. but when I put in my parent credentials, I get this:
2022-05-06 21:22:58,164 INFO Student 1-----------------------------------------------------
2022-05-06 21:22:58,164 INFO INIT
2022-05-06 21:22:58,165 DEBUG Requesing html: https://00****2t.index-education.net/pronote/eleve.html
2022-05-06 21:22:58,555 DEBUG [_Communication.post] decryption change
2022-05-06 21:22:58,600 DEBUG indentification
...line removed just in case it encodes my username/password...
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/pronotepy/pronoteAPI.py", line 265, in aes_decrypt
return Padding.unpad(cipher.decrypt(data), 16)
File "/usr/local/lib/python3.9/site-packages/Crypto/Util/Padding.py", line 92, in unpad
raise ValueError("Padding is incorrect.")
ValueError: Padding is incorrect.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/app/pronote2mqtt.py", line 548, in <module>
run(myParams)
File "/app/pronote2mqtt.py", line 125, in run
myPronote.getData(myParams.pronotePrefixUrl_1,myParams.pronoteUsername_1,myParams.pronotePassword_1,myParams.pronoteCas_1,myParams.pronoteGradesAverages_1)
File "/app/pronote.py", line 42, in getData
client = pronotepy.Client('https://'+prefix_url+'.index-education.net/pronote/eleve.html', username, password, _ent)
File "/usr/local/lib/python3.9/site-packages/pronotepy/clients.py", line 290, in __init__
super().__init__(pronote_url, username, password, ent)
File "/usr/local/lib/python3.9/site-packages/pronotepy/clients.py", line 80, in __init__
self.logged_in = self._login()
File "/usr/local/lib/python3.9/site-packages/pronotepy/clients.py", line 133, in _login
dec = e.aes_decrypt(bytes.fromhex(challenge))
File "/usr/local/lib/python3.9/site-packages/pronotepy/pronoteAPI.py", line 267, in aes_decrypt
raise CryptoError('Decryption failed while trying to un pad. (probably bad decryption key/iv)')
pronotepy.exceptions.CryptoError: ('Decryption failed while trying to un pad. (probably bad decryption key/iv)', 'exception happened during login -> probably bad username/password')
I am confident my username, password, and URL are good - I tried twice. But this is a parent's account.
The solution I provided does not take into account parent access, I tried to add this option for my situation and CAS (atrium_sud) and this works. However(!) it only works with a indirect access, if you have been given/using a url which ends with
...parent.html?login=true
then for me I could not get this to work, it crashes in the underlying software pronotepy and this I can/will not change.
Before I start loading more stuff can you please send url and cas? If you donot want to post this here on the more public site then use discord...there is little risk in sharing url+cas and I will not (!) ask you for name/pwd.
It would be good if you have access to the app folder so that I can try to give some instructions to test instead of continuously load to git :)
Hi vingernha. All is well now (thanks for the parent access)
Hi I got this problem:
Note lack of hass.py
Is it due to entrypoint.sh lines 32-34 ?
database.py should be hass.py?
As a beginner in Docker I am not sure how to "get into" the image to change that entrypoint.sh:
I want to map /app so I can easily set my own pronote and mqtt parameters.
Thanks