https://github.com/flobz/psa_car_controller
Je vois qu'il y a plusieurs modèles pris en charge, dont l'Opel Corsa-e. Quand j'aurais réceptionné ma voiture j'essaierai de l'intégrer et je reviendrai "témoigner"
Code : Tout sélectionner
sudo python3 /home/pi/domoticz/scripts/python/MyRenault.py /home/pi/domoticz/scripts/python/credentials.json /var/tmp/zoe.txt
Traceback (most recent call last):
File "/home/pi/domoticz/scripts/python/MyRenault.py", line 459, in <module>
loop.run_until_complete(main())
File "/usr/lib/python3.7/asyncio/base_events.py", line 584, in run_until_complete
return future.result()
File "/home/pi/domoticz/scripts/python/MyRenault.py", line 351, in main
await mainwithsession(session)
File "/home/pi/domoticz/scripts/python/MyRenault.py", line 399, in mainwithsession
if kamereon_person['accounts'][0]['accountType']== 'MYRENAULT':
KeyError: 'accounts'
Code : Tout sélectionner
2023-04-20 15:48:00.286 Status: dzVents: Info: Zoe 1.2: ------ Start external script: zoe.lua:, trigger: "every 2 minutes"
2023-04-20 15:48:00.335 Status: dzVents: Info: Zoe 1.2: ------ Finished zoe.lua
2023-04-20 15:48:00.337 Status: EventSystem: Script event triggered: /home/pi/domoticz/dzVents/runtime/dzVents.lua
2023-04-20 15:48:30.560 Status: dzVents: Info: Handling Domoticz custom event for: "delayed"
2023-04-20 15:48:30.560 Status: dzVents: Info: ZoeLocalisation 1.1: ------ Start external script: zoeLocalisation.lua: Custom event: "delayed"
2023-04-20 15:48:30.563 Status: dzVents: Info: ZoeLocalisation 1.1: ------ Finished zoeLocalisation.lua
2023-04-20 15:48:30.563 Status: dzVents: Info: Zoe 1.2: ------ Start external script: zoe.lua: Custom event: "delayed"
2023-04-20 15:48:30.568 Status: dzVents: Info: Zoe 1.2: ------ Finished zoe.lua NB : j'utilise Python 3.11.2pi@raspberrypi400:~ $ python3 '/home/pi/domoticz/scripts/python/MyRenault.py'
/home/pi/domoticz/scripts/python/credentials.json' '/var/tmp/megane.txt' &
[1] 62137
pi@raspberrypi400:~ $ Traceback (most recent call last):
File "/home/pi/domoticz/scripts/python/MyRenault.py", line 475, in <module>
loop.run_until_complete(main())
File "/usr/lib/python3.11/asyncio/base_events.py", line 653, in run_until_complete
return future.result()
^^^^^^^^^^^^^^^
File "/home/pi/domoticz/scripts/python/MyRenault.py", line 359, in main
await mainwithsession(session)
File "/home/pi/domoticz/scripts/python/MyRenault.py", line 430, in mainwithsession
kamereon_cockpit = str( await get_cockpit(session, kamereonrooturl, kamereonapikey, gigya_jwttoken, kamereonaccountid, credentials['VIN']))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/pi/domoticz/scripts/python/MyRenault.py", line 156, in get_cockpit
self.tokenData = None
^^^^
NameError: name 'self' is not defined