Plugin PeugeotCars - mqtt_submit: Erreur

Bonjour,

Depuis quelques jours j’ai une erreur qui apparait toute les minutes :
mqtt_submit: Erreur lors de l’envoi de la commande vers le serveur local

J’ai tenté de réinstaller les dépendances et de faire une nouvelle requette SMS.
Après ces opérations, j’ai toujours le problème.

Je pense comprendre que c’est Python qui pose problème mais ça dépasse mes connaissances.

J’ai vu dans le community un problème similaire qui s’est arrangé grace à une MaJ du plugin.

Jeedom version 4.3.14
Plugin peugeotcars master dernière version disponible
Voiture : Citroen ë-C4

Je met les logs qui me semblent importants.

Merci pour l’aide.

log peugeotcars :

[2023-01-19 09:10:04]ERROR : mqtt_submit: Erreur lors de l'envoi de la commande vers le serveur local
[2023-01-19 09:10:05]DEBUG : MAJ statut du véhicule:VR7BCZKX*************
[2023-01-19 09:10:05]DEBUG : Refresh->recording Gps_dt=*****805,*****03,3.1262,47,59,17117.1,0
[2023-01-19 09:10:06]DEBUG : charging_state:2/ new_charging_state:2
[2023-01-19 09:11:03]DEBUG : Mise à jour périodique
[2023-01-19 09:11:03]DEBUG : mqtt_submit: Envoi de la commmande (42) vers le serveur local
[2023-01-19 09:11:03]ERROR : mqtt_submit: Erreur lors de l'envoi de la commande vers le serveur local
[2023-01-19 09:12:02]DEBUG : Mise à jour périodique
[2023-01-19 09:12:03]DEBUG : mqtt_submit: Envoi de la commmande (42) vers le serveur local
[2023-01-19 09:12:03]ERROR : mqtt_submit: Erreur lors de l'envoi de la commande vers le serveur local
[2023-01-19 09:13:03]DEBUG : Mise à jour périodique
[2023-01-19 09:13:03]DEBUG : mqtt_submit: Envoi de la commmande (42) vers le serveur local
[2023-01-19 09:13:03]ERROR : mqtt_submit: Erreur lors de l'envoi de la commande vers le serveur local
[2023-01-19 09:14:03]DEBUG : Mise à jour périodique
[2023-01-19 09:14:03]DEBUG : mqtt_submit: Envoi de la commmande (42) vers le serveur local
[2023-01-19 09:14:03]ERROR : mqtt_submit: Erreur lors de l'envoi de la commande vers le serveur local

Log Peugeotcars_update :

WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
=======================================
Installation des dépendances terminée !
=======================================
sys.path = [
'/var/www/html/core/ajax',
'/usr/lib/python37.zip',
'/usr/lib/python3.7',
'/usr/lib/python3.7/lib-dynload',
'/usr/local/lib/python3.7/dist-packages',
'/usr/lib/python3/dist-packages',
]
USER_BASE: '/root/.local' (exists)
USER_SITE: '/root/.local/lib/python3.7/site-packages' (doesn't exist)
ENABLE_USER_SITE: True

Hello,

J’ai un comportement qui me semble identique. je me permet d’ajouter des infos

Jeedom version 4.2.21
Plugin peugeotcars master dernière version disponible
Voiture : e208

Dernier exemple ce jour. Activation de la climatisation depuis le plugin.
Et à partir de ce moment, toutes les minutes, il y a l’erreur

mqtt_submit: Erreur lors de l'envoi de la commande vers le serveur local
Au même moment donc, voilà l’erreur de la log peugeotcars_remote :

2023-01-19 13:03:24,392 :: INFO :: Activation préconditionnement
2023-01-19 13:03:24,399 :: INFO :: Preconditioning: topic: psa/RemoteServices/from/cid/AP-ACNT200007156752/ThermalPrecond: {'asap': 'activate', 'programs': {'program1': {'day': [0, 0, 0, 0, 0, 0, 0], 'hour': 34, 'minute': 7, 'on': 0}, 'program2': {'day': [0, 0, 0, 0, 0, 0, 0], 'hour': 34, 'minute': 7, 'on': 0}, 'program3': {'day': [0, 0, 0, 0, 0, 0, 0], 'hour': 34, 'minute': 7, 'on': 0}, 'program4': {'day': [0, 0, 0, 0, 0, 0, 0], 'hour': 34, 'minute': 7, 'on': 0}}}
2023-01-19 13:03:25,235 :: ERROR :: can't refresh_remote_token: {'error': 'invalid_grant', 'error_description': 'grant is invalid', 'refresh_token': '**********'}
Create a new one
2023-01-19 13:03:25,680 :: ERROR :: Error during activation: {'err': 'NOK:FORBIDDEN'}
2023-01-19 13:03:25,681 :: ERROR :: get_otp_code:
Traceback (most recent call last):
File "/var/www/html/plugins/peugeotcars/3rdparty/psa_jeedom_daemon/psa_car_controller/psa/RemoteClient.py", line 210, in get_otp_code
otp_code = self.otp.get_otp_code()
File "/var/www/html/plugins/peugeotcars/3rdparty/psa_jeedom_daemon/psa_car_controller/psa/otp/otp.py", line 276, in get_otp_code
raise ConfigException("Can't get otp code")
psa_car_controller.psa.otp.otp.ConfigException: Can't get otp code
2023-01-19 13:03:25,719 :: ERROR :: Please redo otp config
2023-01-19 13:03:26,123 :: ERROR :: Error during activation: {'err': 'NOK:FORBIDDEN'}
Exception in thread Thread-5:
Traceback (most recent call last):
File "/var/www/html/plugins/peugeotcars/3rdparty/psa_jeedom_daemon/psa_car_controller/psa/RemoteClient.py", line 210, in get_otp_code
otp_code = self.otp.get_otp_code()
File "/var/www/html/plugins/peugeotcars/3rdparty/psa_jeedom_daemon/psa_car_controller/psa/otp/otp.py", line 276, in get_otp_code
raise ConfigException("Can't get otp code")
psa_car_controller.psa.otp.otp.ConfigException: Can't get otp code
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.7/threading.py", line 917, in _bootstrap_inner
self.run()
File "/usr/lib/python3.7/threading.py", line 865, in run
self._target(*self._args, **self._kwargs)
File "/var/www/html/plugins/peugeotcars/3rdparty/psa_jeedom_daemon/jeedom_server.py", line 68, in server_loop
ctr_pro = self.msg_execute_cmd(self.cmd, self.cmd_nbp, self.cmd_params)
File "/var/www/html/plugins/peugeotcars/3rdparty/psa_jeedom_daemon/jeedom_server.py", line 118, in msg_execute_cmd
self.rc.preconditioning(self.vin, precond)
File "/var/www/html/plugins/peugeotcars/3rdparty/psa_jeedom_daemon/psa_car_controller/psa/RemoteClient.py", line 272, in preconditioning
self.publish(msg)
File "/var/www/html/plugins/peugeotcars/3rdparty/psa_jeedom_daemon/psa_car_controller/psa/RemoteClient.py", line 155, in publish
self._refresh_remote_token()
File "/var/www/html/plugins/peugeotcars/3rdparty/psa_jeedom_daemon/psa_car_controller/psa/RemoteClient.py", line 190, in _refresh_remote_token
otp_code = self.get_otp_code()
File "/var/www/html/plugins/peugeotcars/3rdparty/psa_jeedom_daemon/psa_car_controller/common/utils.py", line 16, in wrapper
return func(*args, **kwargs)
File "/var/www/html/plugins/peugeotcars/3rdparty/psa_jeedom_daemon/psa_car_controller/psa/RemoteClient.py", line 214, in get_otp_code
otp_code = self.otp.get_otp_code()
File "/var/www/html/plugins/peugeotcars/3rdparty/psa_jeedom_daemon/psa_car_controller/psa/otp/otp.py", line 276, in get_otp_code
raise ConfigException("Can't get otp code")
psa_car_controller.psa.otp.otp.ConfigException: Can't get otp code
2023-01-19 13:03:47,544 :: INFO :: save config change

Après redémarrage du daemon, plus d’erreur.
Les infos redescendent bien sur le plugin.
Pas sûr que les commandes en revanchent partent vers la voiture.
Il me semble que c’est aussi en branchant la charge de la voiture que ça provoque le même souci.

Salut @lelas, si tu passes dans le coin :slight_smile: tu as une idée ?

Bonsoir @chtouffu

Tu pourrais ajouter le log peugeotcars_remote ?

Lelas

Bonsoir @mikeul ,

Il semble d’après le log remote que la phase d’authentification avec le code OTP ne se sois pas bien passée.
Tu pourrais mettre le log OTP ?

Lelas

Bonsoir :slight_smile:

Voilà pour ma part :


2023-01-10 12:25:31,057 :: INFO :: Connected with result code {'session present': 0}
2023-01-10 12:25:31,060 :: INFO :: subscribe to psa/RemoteServices/to/cid/AP-ACNT200007156752/#
2023-01-10 12:25:31,061 :: INFO :: subscribe to psa/RemoteServices/events/MPHRTServices/VRXXXXXXXXXXXXXXX
2023-01-10 12:25:31,064 :: WARNING :: Disconnected with result code 5
2023-01-10 12:25:31,065 :: WARNING :: The connection was refused.
2023-01-10 12:27:31,131 :: INFO :: Connected with result code {'session present': 0}
2023-01-10 12:27:31,132 :: INFO :: subscribe to psa/RemoteServices/to/cid/AP-ACNT200007156752/#
2023-01-10 12:27:31,133 :: INFO :: subscribe to psa/RemoteServices/events/MPHRTServices/VRXXXXXXXXXXXXXXX
2023-01-10 12:27:31,134 :: WARNING :: Disconnected with result code 5
2023-01-10 12:27:31,134 :: WARNING :: The connection was refused.
Requested API level 31 is larger than maximum we have, returning API level 28 instead.
2023-01-10 12:29:49,939 :: INFO :: ["{'vin': 'VRXXXXXXXXXXXXXXX', 'vehicle_id': 'XXXXXXXXXXX', 'label': 'e-208', 'brand': 'Peugeot', 'abrp_name': 'peugeot:e208:20:50', 'battery_power': 46, 'fuel_capacity': 0, 'max_elec_consumption': 70, 'max_fuel_consumption': 0}"]
2023-01-10 12:29:50,145 :: ERROR :: remote_refresh_token isn't defined
2023-01-10 12:29:51,637 :: INFO :: save config change
2023-01-10 12:29:51,696 :: INFO :: ask wakeup to VRXXXXXXXXXXXXXXX
2023-01-10 12:29:51,697 :: INFO :: topic: psa/RemoteServices/from/cid/AP-ACNT200007156752/VehCharge/state: {'action': 'state'}
2023-01-10 12:29:51,701 :: INFO :: OTP_Config:Step1 => Prepare OTP code generation
2023-01-10 12:29:51,703 :: WARNING :: Disconnected with result code 0
2023-01-10 12:29:51,704 :: WARNING :: No error.
2023-01-10 12:29:51,760 :: INFO :: ask wakeup to VRXXXXXXXXXXXXXXX
2023-01-10 12:29:51,761 :: INFO :: topic: psa/RemoteServices/from/cid/AP-ACNT200007156752/VehCharge/state: {'action': 'state'}
2023-01-10 12:29:51,763 :: INFO :: OTP_Config:Step1 => success
2023-01-10 12:29:51,840 :: INFO :: Connected with result code {'session present': 0}
2023-01-10 12:29:51,841 :: INFO :: subscribe to psa/RemoteServices/to/cid/AP-ACNT200007156752/#
2023-01-10 12:29:51,842 :: INFO :: subscribe to psa/RemoteServices/events/MPHRTServices/VRXXXXXXXXXXXXXXX
2023-01-10 12:29:51,843 :: WARNING :: Disconnected with result code 5
2023-01-10 12:29:51,844 :: WARNING :: The connection was refused.
2023-01-10 12:29:52,908 :: INFO :: Connected with result code {'session present': 0}
2023-01-10 12:29:52,909 :: INFO :: subscribe to psa/RemoteServices/to/cid/AP-ACNT200007156752/#
2023-01-10 12:29:52,910 :: INFO :: subscribe to psa/RemoteServices/events/MPHRTServices/VRXXXXXXXXXXXXXXX
2023-01-10 12:29:52,911 :: WARNING :: Disconnected with result code 5
2023-01-10 12:29:52,911 :: WARNING :: The connection was refused.
2023-01-10 12:29:54,978 :: INFO :: Connected with result code {'session present': 0}
2023-01-10 12:29:54,979 :: INFO :: subscribe to psa/RemoteServices/to/cid/AP-ACNT200007156752/#
2023-01-10 12:29:54,980 :: INFO :: subscribe to psa/RemoteServices/events/MPHRTServices/VRXXXXXXXXXXXXXXX
2023-01-10 12:29:54,981 :: WARNING :: Disconnected with result code 5
2023-01-10 12:29:54,982 :: WARNING :: The connection was refused.
2023-01-10 12:29:59,063 :: INFO :: Connected with result code {'session present': 0}
2023-01-10 12:29:59,064 :: INFO :: subscribe to psa/RemoteServices/to/cid/AP-ACNT200007156752/#
2023-01-10 12:29:59,066 :: INFO :: subscribe to psa/RemoteServices/events/MPHRTServices/VRXXXXXXXXXXXXXXX
2023-01-10 12:29:59,067 :: WARNING :: Disconnected with result code 5
2023-01-10 12:29:59,068 :: WARNING :: The connection was refused.
2023-01-10 12:30:03,566 :: INFO :: OTP_Config:message received: b'\xff\xf0\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
2023-01-10 12:30:03,567 :: INFO :: OTP_Config:message params: []
2023-01-10 12:30:03,568 :: INFO :: OTP_Config:Step1 =>Sync for preparation of OTP code generation
2023-01-10 12:30:07,144 :: INFO :: Connected with result code {'session present': 0}
2023-01-10 12:30:07,146 :: INFO :: subscribe to psa/RemoteServices/to/cid/AP-ACNT200007156752/#
2023-01-10 12:30:07,147 :: INFO :: subscribe to psa/RemoteServices/events/MPHRTServices/VRXXXXXXXXXXXXXXX
2023-01-10 12:30:07,149 :: WARNING :: Disconnected with result code 5
2023-01-10 12:30:07,150 :: WARNING :: The connection was refused.
2023-01-10 12:30:18,565 :: INFO :: OTP_Config:message received: b'\xff\xf0\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
2023-01-10 12:30:18,566 :: INFO :: OTP_Config:message params: []
2023-01-10 12:30:18,566 :: INFO :: OTP_Config:Step2 => Request SMS to Stellantis
2023-01-10 12:30:19,292 :: INFO :: OTP_Config:Step2 => SMS sent
2023-01-10 12:30:23,221 :: INFO :: Connected with result code {'session present': 0}
2023-01-10 12:30:23,223 :: INFO :: subscribe to psa/RemoteServices/to/cid/AP-ACNT200007156752/#
2023-01-10 12:30:23,224 :: INFO :: subscribe to psa/RemoteServices/events/MPHRTServices/VRXXXXXXXXXXXXXXX
2023-01-10 12:30:23,225 :: WARNING :: Disconnected with result code 5
2023-01-10 12:30:23,225 :: WARNING :: The connection was refused.
2023-01-10 12:30:55,301 :: INFO :: Connected with result code {'session present': 0}
2023-01-10 12:30:55,303 :: INFO :: subscribe to psa/RemoteServices/to/cid/AP-ACNT200007156752/#
2023-01-10 12:30:55,304 :: INFO :: subscribe to psa/RemoteServices/events/MPHRTServices/VRXXXXXXXXXXXXXXX
2023-01-10 12:30:55,306 :: WARNING :: Disconnected with result code 5
2023-01-10 12:30:55,308 :: WARNING :: The connection was refused.
2023-01-10 12:30:58,437 :: INFO :: OTP_Config:message received: b'\xff\xf0\x00\x03*{"code_pin":"XXXX","code_sms":"XXXXXXXXX"}\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
2023-01-10 12:30:58,438 :: INFO :: OTP_Config:message params: {'code_pin': 'XXXX', 'code_sms': 'XXXXXXXXX'}
2023-01-10 12:30:58,439 :: INFO :: OTP_Config:Step3 => Finalize OTP code generation
2023-01-10 12:30:58,881 :: ERROR :: Error during activation: {'newversion': '2.0.0', 'newversionurl': 'http://m.inwebo.com/', 'err': 'NOK:CODE'}
2023-01-10 12:30:58,949 :: INFO :: ask wakeup to VRXXXXXXXXXXXXXXX
2023-01-10 12:30:58,950 :: INFO :: topic: psa/RemoteServices/from/cid/AP-ACNT200007156752/VehCharge/state: {'action': 'state'}
2023-01-10 12:30:58,953 :: INFO :: OTP_Config:Step3 => OTP config correctly finished !!!
2023-01-10 12:30:59,031 :: INFO :: Connected with result code {'session present': 0}
2023-01-10 12:30:59,032 :: INFO :: subscribe to psa/RemoteServices/to/cid/AP-ACNT200007156752/#
2023-01-10 12:30:59,033 :: INFO :: subscribe to psa/RemoteServices/events/MPHRTServices/VRXXXXXXXXXXXXXXX
2023-01-10 12:30:59,034 :: WARNING :: Disconnected with result code 5
2023-01-10 12:30:59,035 :: WARNING :: The connection was refused.

Je viens de le refaire (étape 1 à 4) à l’instant comme l’autre jour et voilà ce que ça donne :
Le resultat est différent du précédent, je ne sais pas vraiment l’expliquer.

Requested API level 31 is larger than maximum we have, returning API level 28 instead.
2023-01-20 23:06:49,892 :: INFO :: ["{'vin': 'VRXXXXXXXXXXXXXXX', 'vehicle_id': 'XXXXXXXXX', 'label': 'e-208', 'brand': 'Peugeot', 'abrp_name': 'peugeot:e208:20:50', 'battery_power': 46, 'fuel_capacity': 0, 'max_elec_consumption': 70, 'max_fuel_consumption': 0}"]
2023-01-20 23:06:50,112 :: ERROR :: remote_refresh_token isn't defined
2023-01-20 23:06:50,560 :: ERROR :: Error during activation: {'err': 'NOK:FORBIDDEN'}
2023-01-20 23:06:50,561 :: ERROR :: get_otp_code:
Traceback (most recent call last):
File "/var/www/html/plugins/peugeotcars/3rdparty/psa_jeedom_daemon/psa_car_controller/psa/RemoteClient.py", line 210, in get_otp_code
otp_code = self.otp.get_otp_code()
File "/var/www/html/plugins/peugeotcars/3rdparty/psa_jeedom_daemon/psa_car_controller/psa/otp/otp.py", line 276, in get_otp_code
raise ConfigException("Can't get otp code")
psa_car_controller.psa.otp.otp.ConfigException: Can't get otp code
2023-01-20 23:06:50,568 :: ERROR :: Please redo otp config
2023-01-20 23:06:51,090 :: ERROR :: Error during activation: {'err': 'NOK:FORBIDDEN'}
2023-01-20 23:06:51,101 :: ERROR :: start_remote_control failed redo otp config
2023-01-20 23:06:51,113 :: INFO :: save config change
2023-01-20 23:06:51,115 :: INFO :: OTP_Config:Step1 => Prepare OTP code generation
2023-01-20 23:06:51,342 :: ERROR :: remote_refresh_token isn't defined
2023-01-20 23:06:51,707 :: ERROR :: Error during activation: {'err': 'NOK:FORBIDDEN'}
2023-01-20 23:06:51,708 :: ERROR :: get_otp_code:
Traceback (most recent call last):
File "/var/www/html/plugins/peugeotcars/3rdparty/psa_jeedom_daemon/psa_car_controller/psa/RemoteClient.py", line 210, in get_otp_code
otp_code = self.otp.get_otp_code()
File "/var/www/html/plugins/peugeotcars/3rdparty/psa_jeedom_daemon/psa_car_controller/psa/otp/otp.py", line 276, in get_otp_code
raise ConfigException("Can't get otp code")
psa_car_controller.psa.otp.otp.ConfigException: Can't get otp code
2023-01-20 23:06:51,711 :: ERROR :: Please redo otp config
2023-01-20 23:06:52,187 :: ERROR :: Error during activation: {'err': 'NOK:FORBIDDEN'}
2023-01-20 23:06:52,191 :: ERROR :: start_remote_control failed redo otp config
2023-01-20 23:06:52,192 :: INFO :: OTP_Config:Step1 => success
2023-01-20 23:07:04,106 :: INFO :: OTP_Config:message received: b'\xff\xf0\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
2023-01-20 23:07:04,107 :: INFO :: OTP_Config:message params: []
2023-01-20 23:07:04,109 :: INFO :: OTP_Config:Step1 =>Sync for preparation of OTP code generation
2023-01-20 23:07:17,676 :: INFO :: OTP_Config:message received: b'\xff\xf0\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
2023-01-20 23:07:17,677 :: INFO :: OTP_Config:message params: []
2023-01-20 23:07:17,677 :: INFO :: OTP_Config:Step2 => Request SMS to Stellantis
2023-01-20 23:07:19,394 :: INFO :: OTP_Config:Step2 => SMS sent
2023-01-20 23:07:21,110 :: INFO :: save config change
2023-01-20 23:07:46,548 :: INFO :: OTP_Config:message received: b'\xff\xf0\x00\x03*{"code_pin":"XXXX","code_sms":"XXXXXX"}\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
2023-01-20 23:07:46,549 :: INFO :: OTP_Config:message params: {'code_pin': 'XXXXXX', 'code_sms': 'XXXXXX'}
2023-01-20 23:07:46,550 :: INFO :: OTP_Config:Step3 => Finalize OTP code generation
2023-01-20 23:07:47,658 :: ERROR :: remote_refresh_token isn't defined
2023-01-20 23:07:49,791 :: INFO :: save config change
2023-01-20 23:07:49,871 :: INFO :: ask wakeup to VRXXXXXXXXXXXXXXX
2023-01-20 23:07:49,872 :: INFO :: topic: psa/RemoteServices/from/cid/AP-ACNT200007156752/VehCharge/state: {'action': 'state'}
2023-01-20 23:07:49,878 :: INFO :: OTP_Config:Step3 => OTP config correctly finished !!!
2023-01-20 23:07:50,009 :: INFO :: Connected with result code {'session present': 0}
2023-01-20 23:07:50,011 :: INFO :: subscribe to psa/RemoteServices/to/cid/AP-ACNT200007156752/#
2023-01-20 23:07:50,012 :: INFO :: subscribe to psa/RemoteServices/events/MPHRTServices/VRXXXXXXXXXXXXXXX

je vais voir ce que ça donne les prochains jours. j’ai lancé 2 ou 3 commandes qui n’ont pas provoqué l’erreur cette fois ci … peut être bon signe ?


[2023-01-20 23:16:03]DEBUG : mqtt_submit: Envoi de la commmande (42) vers le serveur local
[2023-01-20 23:16:03]DEBUG : Retour mqtt:{"trip_in_progress": 0, "signal_quality": 4, "reason": 4, "sev_state": 0}
[2023-01-20 23:17:03]DEBUG : Mise à jour périodique
[2023-01-20 23:17:03]DEBUG : mqtt_submit: Envoi de la commmande (42) vers le serveur local
[2023-01-20 23:17:03]DEBUG : Retour mqtt:{"trip_in_progress": 0, "signal_quality": 4, "reason": 4, "sev_state": 0}
[2023-01-20 23:17:09]DEBUG : mqtt_submit: Envoi de la commmande (10) vers le serveur local
[2023-01-20 23:17:09]DEBUG : Retour mqtt:{}
[2023-01-20 23:17:27]DEBUG : mqtt_submit: Envoi de la commmande (10) vers le serveur local
[2023-01-20 23:17:27]DEBUG : Retour mqtt:{}
[2023-01-20 23:18:03]DEBUG : Mise à jour périodique
[2023-01-20 23:18:03]DEBUG : mqtt_submit: Envoi de la commmande (42) vers le serveur local
[2023-01-20 23:18:03]DEBUG : Retour mqtt:{"trip_in_progress": 0, "signal_quality": 4, "reason": 3, "sev_state": 0}
[2023-01-20 23:18:11]DEBUG : mqtt_submit: Envoi de la commmande (10) vers le serveur local
[2023-01-20 23:18:11]DEBUG : Retour mqtt:{}
[2023-01-20 23:19:03]DEBUG : Mise à jour périodique
[2023-01-20 23:19:03]DEBUG : mqtt_submit: Envoi de la commmande (42) vers le serveur local
[2023-01-20 23:19:03]DEBUG : Retour mqtt:{"trip_in_progress": 0, "signal_quality": 4, "reason": 3, "sev_state": 0}
[2023-01-20 23:20:05]DEBUG : Mise à jour périodique
[2023-01-20 23:20:06]DEBUG : mqtt_submit: Envoi de la commmande (42) vers le serveur local
[2023-01-20 23:20:06]DEBUG : Retour mqtt:{"trip_in_progress": 0, "signal_quality": 4, "reason": 3, "sev_state": 0}
[2023-01-20 23:20:06]DEBUG : MAJ statut du véhicule:VRXXXXX
[2023-01-20 23:20:07]DEBUG : charging_state:1/ new_charging_state:1

J’ai l’impression que le démon est actif quand tu fais la demandé de code OTP.

Il faut bien le stopper, puis lancer la demande du code OTP, puis ensuite lorsque le code est OK, il faut lancer le démon.

Lelas

Bonjour @lelas,

Désolé pour la réponse tardive.

Comme demandé, les log « remote »

2023-01-19 07:32:28,465 :: INFO :: Message analysis: End of trip detection, at:01/19/2023, 07:32:22
2023-01-19 07:32:28,915 :: INFO :: mqtt msg received: psa/RemoteServices/events/MPHRTServices/VR7BCZKXCNE b'{"date":"2023-01-19T06:32:23Z","etat_res_elec":0,"precond_state":{"available":1,"programs":{"program1":{"hour":15,"minute":35,"on":1,"day":[1,1,1,1,0,0,0]},"program2":{"hour":6,"minute":43,"on":1,"day":[1,1,1,1,0,0,0]},"program3":{"hour":21,"minute":0,"on":0,"day":[0,1,0,0,0,0,0]},"program4":{"hour":4,"minute":55,"on":1,"day":[0,0,0,0,1,0,0]}},"asap":0,"status":0,"aff":1},"charging_state":{"program":{"hour":15,"minute":45},"available":1,"remaining_time":635,"rate":0,"cable_detected":1,"soc_batt":61,"autonomy_zev":150,"type":0,"aff":1,"hmi_state":0,"mode":2},"stolen_state":0,"vin":"VR7BCZKX","reason":6,"signal_quality":3,"sev_stop_date":"2023-01-19T06:32:22Z","fds":["NDR01","NAE01","NBM01","NCG01","NAO01","NAS01"],"sev_state":0,"obj_counter":12,"privacy_customer":0,"privacy_applicable":0,"privacy_applicable_max":2,"superlock_state":0}'
2023-01-19 07:33:29,923 :: INFO :: mqtt msg received: psa/RemoteServices/events/MPHRTServices/VR7BCZKXCNE b'{"date":"2023-01-19T06:33:24Z","etat_res_elec":0,"precond_state":{"available":1,"programs":{"program1":{"hour":15,"minute":35,"on":1,"day":[1,1,1,1,0,0,0]},"program2":{"hour":6,"minute":43,"on":1,"day":[1,1,1,1,0,0,0]},"program3":{"hour":21,"minute":0,"on":0,"day":[0,1,0,0,0,0,0]},"program4":{"hour":4,"minute":55,"on":1,"day":[0,0,0,0,1,0,0]}},"asap":0,"status":0,"aff":1},"charging_state":{"program":{"hour":15,"minute":45},"available":1,"remaining_time":0,"rate":0,"cable_detected":0,"soc_batt":61,"autonomy_zev":150,"type":0,"aff":1,"hmi_state":1,"mode":0},"stolen_state":0,"vin":"VR7BCZKXCN","reason":4,"signal_quality":3,"sev_stop_date":"2023-01-19T06:32:22Z","fds":["NDR01","NAE01","NBM01","NCG01","NAO01","NAS01"],"sev_state":0,"obj_counter":13,"privacy_customer":0,"privacy_applicable":0,"privacy_applicable_max":2,"superlock_state":0}'
2023-01-19 07:58:40,570 :: INFO :: ["{'vin': 'VR7BCZKX', 'vehicle_id': '1566c4933516b4e6153316844546b55774d6a45344d44496a49324a684f5441324f4759794e7a5933596a5a685a4459794e544d784e7a5132595464694f47597a4d6a4d334e4', 'label': 'E-C4', 'brand': 'Citroën', 'abrp_name': 'citroen:ec4:21:50', 'battery_power': 46, 'fuel_capacity': 0, 'max_elec_consumption': 70, 'max_fuel_consumption': 0}"]
2023-01-19 07:58:41,470 :: ERROR :: can't refresh_remote_token: {'error': 'invalid_grant', 'error_description': 'grant is invalid', 'refresh_token': 'a9809bc7-2a31-40ee-be58-6ce3a4c98e91'}
Create a new one
2023-01-19 07:58:42,304 :: ERROR :: Error during activation: {'err': 'NOK:FORBIDDEN'}
2023-01-19 07:58:42,305 :: ERROR :: get_otp_code:
Traceback (most recent call last):
File "/var/www/html/plugins/peugeotcars/3rdparty/psa_jeedom_daemon/psa_car_controller/psa/RemoteClient.py", line 210, in get_otp_code
otp_code = self.otp.get_otp_code()
File "/var/www/html/plugins/peugeotcars/3rdparty/psa_jeedom_daemon/psa_car_controller/psa/otp/otp.py", line 276, in get_otp_code
raise ConfigException("Can't get otp code")
psa_car_controller.psa.otp.otp.ConfigException: Can't get otp code
2023-01-19 07:58:42,307 :: ERROR :: Please redo otp config
2023-01-19 07:58:42,950 :: ERROR :: Error during activation: {'err': 'NOK:FORBIDDEN'}
2023-01-19 07:58:42,951 :: ERROR :: start_remote_control failed redo otp config
2023-01-19 07:58:42,953 :: INFO :: save config change
2023-01-19 07:59:02,973 :: INFO :: Request vehicle info
2023-01-19 07:59:03,498 :: INFO :: ["{'vin': 'VR7BCZKX', 'vehicle_id': '1566c4933516b4e6153316844546b55774d6a45344d44496a49324a684f5441324f4759794e7a5933596a5a685a4459794e544d784e7a5132595464694f4', 'label': 'E-C4', 'brand': 'Citroën', 'abrp_name': 'citroen:ec4:21:50', 'battery_power': 46, 'fuel_capacity': 0, 'max_elec_consumption': 70, 'max_fuel_consumption': 0}"]
2023-01-19 07:59:03,498 :: INFO :: Jeedom link start, with VIN=VR7B
Running path:/var/www/html/plugins/peugeotcars/3rdparty/psa_jeedom_daemon
2023-01-19 08:08:02,254 :: INFO :: ask wakeup to VR
2023-01-19 08:08:02,255 :: INFO :: topic: psa/RemoteServices/from/cid/AC-ACNT200005800676/VehCharge/state: {'action': 'state'}
2023-01-19 08:08:03,234 :: ERROR :: can't refresh_remote_token: {'error': 'invalid_grant', 'error_description': 'grant is invalid', 'refresh_token': 'a9809bc7-2a31-40ee-be58-6ce3a4c98e91
2023-01-19 08:08:12,983 :: INFO :: save config change
2023-01-19 08:08:25,536 :: ERROR :: Error during activation: {'err': 'NOK:FORBIDDEN'}
2023-01-19 08:08:25,537 :: ERROR :: get_otp_code:
Traceback (most recent call last):
File "/var/www/html/plugins/peugeotcars/3rdparty/psa_jeedom_daemon/psa_car_controller/psa/RemoteClient.py", line 210, in get_otp_code
otp_code = self.otp.get_otp_code()
File "/var/www/html/plugins/peugeotcars/3rdparty/psa_jeedom_daemon/psa_car_controller/psa/otp/otp.py", line 276, in get_otp_code
raise ConfigException("Can't get otp code")
psa_car_controller.psa.otp.otp.ConfigException: Can't get otp code
2023-01-19 08:08:25,538 :: ERROR :: Please redo otp config
2023-01-19 08:08:35,670 :: ERROR :: Error during activation: {'err': 'NOK:FORBIDDEN'}

Et les log OPT si c’est utile :

otp_code = self.otp.get_otp_code()
File "/var/www/html/plugins/peugeotcars/3rdparty/psa_jeedom_daemon/psa_car_controller/psa/otp/otp.py", line 276, in get_otp_code
raise ConfigException("Can't get otp code")
psa_car_controller.psa.otp.otp.ConfigException: Can't get otp code
2023-01-19 08:12:38,330 :: ERROR :: Please redo otp config
2023-01-19 08:12:54,288 :: ERROR :: Error during activation: {'err': 'NOK:FORBIDDEN'}
2023-01-19 08:12:54,289 :: ERROR :: start_remote_control failed redo otp config
2023-01-19 08:12:54,291 :: INFO :: save config change
2023-01-19 08:12:54,291 :: INFO :: OTP_Config:Step1 => Prepare OTP code generation
2023-01-19 08:12:54,450 :: ERROR :: remote_refresh_token isn't defined
2023-01-19 08:13:16,686 :: ERROR :: Error during activation: {'err': 'NOK:FORBIDDEN'}
2023-01-19 08:13:16,687 :: ERROR :: get_otp_code:
Traceback (most recent call last):
File "/var/www/html/plugins/peugeotcars/3rdparty/psa_jeedom_daemon/psa_car_controller/psa/RemoteClient.py", line 210, in get_otp_code
otp_code = self.otp.get_otp_code()
File "/var/www/html/plugins/peugeotcars/3rdparty/psa_jeedom_daemon/psa_car_controller/psa/otp/otp.py", line 276, in get_otp_code
raise ConfigException("Can't get otp code")
psa_car_controller.psa.otp.otp.ConfigException: Can't get otp code
2023-01-19 08:13:16,689 :: ERROR :: Please redo otp config
2023-01-19 08:13:24,291 :: INFO :: save config change
2023-01-19 08:13:37,106 :: ERROR :: Error during activation: {'err': 'NOK:FORBIDDEN'}
2023-01-19 08:13:37,107 :: ERROR :: start_remote_control failed redo otp config
2023-01-19 08:13:37,108 :: INFO :: OTP_Config:Step1 => success
Requested API level 31 is larger than maximum we have, returning API level 28 instead.
2023-01-19 08:47:42,646 :: INFO :: ["{'vin': 'VR7BCZK', 'vehicle_id': '1566c4933516b4e6153316844546b55774d6a45344d44496a49324a684f5441324f4759794e7a5933596a5a685a4459794e544d784e7a5132595464694f47597a4d6a4d334e4', 'label': 'E-C4', 'brand': 'Citroën', 'abrp_name': 'citroen:ec4:21:50', 'battery_power': 46, 'fuel_capacity': 0, 'max_elec_consumption': 70, 'max_fuel_consumption': 0}"]
2023-01-19 08:47:42,802 :: ERROR :: remote_refresh_token isn't defined
2023-01-19 08:47:43,209 :: ERROR :: Error during activation: {'err': 'NOK:FORBIDDEN'}
2023-01-19 08:47:43,209 :: ERROR :: get_otp_code:
Traceback (most recent call last):
File "/var/www/html/plugins/peugeotcars/3rdparty/psa_jeedom_daemon/psa_car_controller/psa/RemoteClient.py", line 210, in get_otp_code
otp_code = self.otp.get_otp_code()
File "/var/www/html/plugins/peugeotcars/3rdparty/psa_jeedom_daemon/psa_car_controller/psa/otp/otp.py", line 276, in get_otp_code
raise ConfigException("Can't get otp code")
psa_car_controller.psa.otp.otp.ConfigException: Can't get otp code
2023-01-19 08:47:43,213 :: ERROR :: Please redo otp config
2023-01-19 08:47:43,492 :: ERROR :: Error during activation: {'err': 'NOK:FORBIDDEN'}
2023-01-19 08:47:43,495 :: ERROR :: start_remote_control failed redo otp config
2023-01-19 08:47:43,497 :: INFO :: save config change
2023-01-19 08:47:43,498 :: INFO :: OTP_Config:Step1 => Prepare OTP code generation
2023-01-19 08:47:43,723 :: ERROR :: remote_refresh_token isn't defined
2023-01-19 08:47:44,166 :: ERROR :: Error during activation: {'err': 'NOK:FORBIDDEN'}
2023-01-19 08:47:44,167 :: ERROR :: get_otp_code:
Traceback (most recent call last):
File "/var/www/html/plugins/peugeotcars/3rdparty/psa_jeedom_daemon/psa_car_controller/psa/RemoteClient.py", line 210, in get_otp_code
otp_code = self.otp.get_otp_code()
File "/var/www/html/plugins/peugeotcars/3rdparty/psa_jeedom_daemon/psa_car_controller/psa/otp/otp.py", line 276, in get_otp_code
raise ConfigException("Can't get otp code")
psa_car_controller.psa.otp.otp.ConfigException: Can't get otp code
2023-01-19 08:47:44,168 :: ERROR :: Please redo otp config
2023-01-19 08:47:44,582 :: ERROR :: Error during activation: {'err': 'NOK:FORBIDDEN'}
2023-01-19 08:47:44,583 :: ERROR :: start_remote_control failed redo otp config
2023-01-19 08:47:44,584 :: INFO :: OTP_Config:Step1 => success
2023-01-19 08:48:13,499 :: INFO :: save config change
2023-01-19 08:48:17,147 :: INFO :: OTP_Config:message received: b'\xff\xf0\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
2023-01-19 08:48:17,149 :: INFO :: OTP_Config:message params: []
2023-01-19 08:48:17,149 :: INFO :: OTP_Config:Step1 =>Sync for preparation of OTP code generation
2023-01-19 08:49:38,418 :: INFO :: OTP_Config:message received: b'\xff\xf0\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
2023-01-19 08:49:38,419 :: INFO :: OTP_Config:message params: []
2023-01-19 08:49:38,419 :: INFO :: OTP_Config:Step2 => Request SMS to Stellantis
2023-01-19 08:49:39,472 :: INFO :: OTP_Config:Step2 => SMS sent
2023-01-19 08:50:01,792 :: INFO :: OTP_Config:message received: b'\xff\xf0\x00\x03){"code_pin":"2236","code_sms":"36125782"}\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
2023-01-19 08:50:01,793 :: INFO :: OTP_Config:message params: {'code_pin': 'XXXX, 'code_sms': '361'}
2023-01-19 08:50:01,793 :: INFO :: OTP_Config:Step3 => Finalize OTP code generation
2023-01-19 08:50:02,164 :: ERROR :: Error during activation: {'newversion': '2.0.0', 'newversionurl': 'http://m.inwebo.com/', 'err': 'NOK:CODE'}
2023-01-19 08:50:02,355 :: ERROR :: remote_refresh_token isn't defined
2023-01-19 08:50:02,684 :: ERROR :: Error during activation: {'err': 'NOK:FORBIDDEN'}
2023-01-19 08:50:02,685 :: ERROR :: get_otp_code:
Traceback (most recent call last):
File "/var/www/html/plugins/peugeotcars/3rdparty/psa_jeedom_daemon/psa_car_controller/psa/RemoteClient.py", line 210, in get_otp_code
otp_code = self.otp.get_otp_code()
File "/var/www/html/plugins/peugeotcars/3rdparty/psa_jeedom_daemon/psa_car_controller/psa/otp/otp.py", line 276, in get_otp_code
raise ConfigException("Can't get otp code")
psa_car_controller.psa.otp.otp.ConfigException: Can't get otp code
2023-01-19 08:50:02,686 :: ERROR :: Please redo otp config
2023-01-19 08:50:03,100 :: ERROR :: Error during activation: {'err': 'NOK:FORBIDDEN'}
2023-01-19 08:50:03,106 :: ERROR :: start_remote_control failed redo otp config
2023-01-19 08:50:03,107 :: INFO :: OTP_Config:Step3 => OTP config correctly finished !!!

Je n’avais pas stoppé le démon avant de faire la demande de code OTP.
J’ai recommencé l’opération avec le démon arrêté.
A voir si ça corrige le problème.

Hello à tous,

Pour ma part. En reesayant de faire les 4 étapes avec le Daemon bien arrêté, tout est OK. Plus d’erreur mqtt. Et lancement d’Action vers la voiture OK (clim).

Malheureusement toujours des erreurs chez moi.

Malgré tout, les infos de la voiture remontent bien quand les serveurs PSA veulent bien fonctionner.

Hey,
faut avouer que les serveurs PSA… De mon côté, aujourd’hui rien est à jour sur l’appli (et jeedom aussi). C’est vraiment pas la panacée leurs appli niveau perf, dispo, etc.

Bonsoir @chtouffu ,

Tu pourrais regarder dans ton fichier « config.json »
(dans le dossier « plugins\peugeotcars\3rdparty\psa_jeedom_daemon »)

Tu devrais avoir une ligne du genre:
« remote_refresh_token »: « xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx »,

Si le code est vide, c’est que la phase de code OTP n’est pas allée correctement au bout.
Cela pourrait être un dépassement des 20 tentatives de SMS.

Lelas

Bonjour @lelas,

Dans le fichier, j’ai :
« realm »: « clientsB2CCitroen »,
« refresh_token »: « bbfac1e5-04d4-4119-bfd5-XXXXXXXXXXXX »,
« remote_refresh_token »: null,

C’est possible que ce soit le dépassement de SMS.

Je ne sais pas trop comment faire.
Je vais faire une recherche sur le dépassement de SMS sur le community si il y a une solution.

J’ai tenté la procedure ou il faut désinstaller l’app etc…
Je n’ai pas eu à réinitialiser mon compte.
Toujours au même point pour le moment.

Dois-je refaire la procedure pour le code OTP ?

La procédure est décrite ici pour le dépassement de 20 sms.
psa_car_controller/FAQ.md at master · flobz/psa_car_controller · GitHub (point 2)

Ensuite, il faut en effet refaire la procédure complète d’obtention du code OTP.

Efface les logs avant l’opération, et envoi moi les 2 logs (remote et plugin) en cas de problème.

Lelas

Merci pour ton aide @lelas
Malheureusement, après la procédure d’obtention du code OTP j’ai toujours les erreurs.

log remote :

2023-01-24 12:57:34,394 :: INFO :: ["{'vin': 'VR7BCZKxxxxxxxxxx', 'vehicle_id': '1566c4933516b4e6153316844546b55774d6a45344d44496a49324a684f5441324f4759794e7a5933596a5a685a4459794e544d784e7a5132595464694f47597a4d6a4d334e444e6c4d6a4', 'label': 'E-C4', 'brand': 'Citroën', 'abrp_name': 'citroen:ec4:21:50', 'battery_power': 46, 'fuel_capacity': 0, 'max_elec_consumption': 70, 'max_fuel_consumption': 0}"]
2023-01-24 12:57:34,602 :: ERROR :: remote_refresh_token isn't defined
2023-01-24 12:57:34,906 :: ERROR :: Error during activation: {'err': 'NOK:FORBIDDEN'}
2023-01-24 12:57:34,907 :: ERROR :: get_otp_code:
Traceback (most recent call last):
File "/var/www/html/plugins/peugeotcars/3rdparty/psa_jeedom_daemon/psa_car_controller/psa/RemoteClient.py", line 210, in get_otp_code
otp_code = self.otp.get_otp_code()
File "/var/www/html/plugins/peugeotcars/3rdparty/psa_jeedom_daemon/psa_car_controller/psa/otp/otp.py", line 276, in get_otp_code
raise ConfigException("Can't get otp code")
psa_car_controller.psa.otp.otp.ConfigException: Can't get otp code
2023-01-24 12:57:34,911 :: ERROR :: Please redo otp config
2023-01-24 12:57:35,260 :: ERROR :: Error during activation: {'err': 'NOK:FORBIDDEN'}
2023-01-24 12:57:35,262 :: ERROR :: start_remote_control failed redo otp config
2023-01-24 12:57:35,263 :: INFO :: save config change
2023-01-24 12:57:55,284 :: INFO :: Request vehicle info
2023-01-24 12:57:55,845 :: INFO :: ["{'vin': 'VR7BCZKXxxxxxxx', 'vehicle_id': '1566c4933516b4e6153316844546b55774d6a45344d44496a49324a684f5441324f4759794e7a5933596a5a685a4459794e544d784e7a5132595464694f47597a4d6a4d334e444e6c4d6a453559', 'label': 'E-C4', 'brand': 'Citroën', 'abrp_name': 'citroen:ec4:21:50', 'battery_power': 46, 'fuel_capacity': 0, 'max_elec_consumption': 70, 'max_fuel_consumption': 0}"]
2023-01-24 12:57:55,846 :: INFO :: Jeedom link start, with VIN=VR7BCZKXxxxxxxxx
Running path:/var/www/html/plugins/peugeotcars/3rdparty/psa_jeedom_daemon
2023-01-24 13:08:03,210 :: INFO :: ask wakeup to VR7BCZKXxxxxxxxx
2023-01-24 13:08:03,211 :: INFO :: topic: psa/RemoteServices/from/cid/AC-ACNT200005800676/VehCharge/state: {'action': 'state'}
2023-01-24 13:08:03,498 :: ERROR :: remote_refresh_token isn't defined
2023-01-24 13:08:03,907 :: ERROR :: Error during activation: {'err': 'NOK:FORBIDDEN'}
2023-01-24 13:08:03,907 :: ERROR :: get_otp_code:
Traceback (most recent call last):
File "/var/www/html/plugins/peugeotcars/3rdparty/psa_jeedom_daemon/psa_car_controller/psa/RemoteClient.py", line 210, in get_otp_code
otp_code = self.otp.get_otp_code()
File "/var/www/html/plugins/peugeotcars/3rdparty/psa_jeedom_daemon/psa_car_controller/psa/otp/otp.py", line 276, in get_otp_code
raise ConfigException("Can't get otp code")
psa_car_controller.psa.otp.otp.ConfigException: Can't get otp code
2023-01-24 13:08:03,909 :: ERROR :: Please redo otp config
2023-01-24 13:08:04,164 :: ERROR :: Error during activation: {'err': 'NOK:FORBIDDEN'}
Exception in thread Thread-5:
Traceback (most recent call last):
File "/var/www/html/plugins/peugeotcars/3rdparty/psa_jeedom_daemon/psa_car_controller/psa/RemoteClient.py", line 210, in get_otp_code
otp_code = self.otp.get_otp_code()
File "/var/www/html/plugins/peugeotcars/3rdparty/psa_jeedom_daemon/psa_car_controller/psa/otp/otp.py", line 276, in get_otp_code
raise ConfigException("Can't get otp code")
psa_car_controller.psa.otp.otp.ConfigException: Can't get otp code
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.7/threading.py", line 917, in _bootstrap_inner
self.run()
File "/usr/lib/python3.7/threading.py", line 865, in run
self._target(*self._args, **self._kwargs)
File "/var/www/html/plugins/peugeotcars/3rdparty/psa_jeedom_daemon/jeedom_server.py", line 68, in server_loop
ctr_pro = self.msg_execute_cmd(self.cmd, self.cmd_nbp, self.cmd_params)
File "/var/www/html/plugins/peugeotcars/3rdparty/psa_jeedom_daemon/jeedom_server.py", line 131, in msg_execute_cmd
self.rc.wakeup(self.vin)
File "/var/www/html/plugins/peugeotcars/3rdparty/psa_jeedom_daemon/psa_car_controller/common/utils.py", line 16, in wrapper
return func(*args, **kwargs)
File "/var/www/html/plugins/peugeotcars/3rdparty/psa_jeedom_daemon/psa_car_controller/psa/RemoteClient.py", line 247, in wakeup
self.publish(msg)
File "/var/www/html/plugins/peugeotcars/3rdparty/psa_jeedom_daemon/psa_car_controller/psa/RemoteClient.py", line 155, in publish
self._refresh_remote_token()
File "/var/www/html/plugins/peugeotcars/3rdparty/psa_jeedom_daemon/psa_car_controller/psa/RemoteClient.py", line 190, in _refresh_remote_token
otp_code = self.get_otp_code()
File "/var/www/html/plugins/peugeotcars/3rdparty/psa_jeedom_daemon/psa_car_controller/common/utils.py", line 16, in wrapper
return func(*args, **kwargs)
File "/var/www/html/plugins/peugeotcars/3rdparty/psa_jeedom_daemon/psa_car_controller/psa/RemoteClient.py", line 214, in get_otp_code
otp_code = self.otp.get_otp_code()
File "/var/www/html/plugins/peugeotcars/3rdparty/psa_jeedom_daemon/psa_car_controller/psa/otp/otp.py", line 276, in get_otp_code
raise ConfigException("Can't get otp code")
psa_car_controller.psa.otp.otp.ConfigException: Can't get otp code
2023-01-24 13:08:05,285 :: INFO :: save config change

log PeugeotCars :

[2023-01-24 12:55:36]INFO : Ajax:OTP_Prepare
[2023-01-24 12:55:36]DEBUG : Ajax:Params:xxxxxxx@gmail.com/xxxxxxxxx/AC/FR
[2023-01-24 12:55:36]INFO : Stopping OTP manager
[2023-01-24 12:55:46]INFO : Starting OTP manager
[2023-01-24 12:55:46]DEBUG : sudo /usr/bin/python3 /var/www/html/plugins/peugeotcars/core/ajax/../../3rdparty/psa_jeedom_daemon/jeedom_otp.py --web-conf  -m xxxxxxxx@gmail.com -P xxxxxxxxx -B AC -C FR >> /var/www/html/core/class/../../log/peugeotcars_otp 2>&1 &
[2023-01-24 12:55:46]INFO : Attente 60 s
[2023-01-24 12:56:03]DEBUG : Mise à jour périodique
[2023-01-24 12:56:03]INFO : Le démon de gestion des commandes vers le véhicule est arrêté: Commande annulée
[2023-01-24 12:56:46]INFO : Envoi commande de synchro
[2023-01-24 12:56:46]DEBUG : MSG envoyé: lg_param=0
[2023-01-24 12:56:46]DEBUG : MSG Recu:255-15-0-1
[2023-01-24 12:56:53]INFO : Ajax:OTP_ReqSMS
[2023-01-24 12:56:53]INFO : Envoi message: Requete SMS
[2023-01-24 12:56:53]DEBUG : MSG envoyé: lg_param=0
[2023-01-24 12:56:53]DEBUG : MSG Recu:255-15-0-1
[2023-01-24 12:57:02]DEBUG : Mise à jour périodique
[2023-01-24 12:57:02]INFO : Le démon de gestion des commandes vers le véhicule est arrêté: Commande annulée
[2023-01-24 12:57:11]INFO : Ajax:OTP_Finalize
[2023-01-24 12:57:11]INFO : Envoi message: finalise code OTP
[2023-01-24 12:57:11]DEBUG : MSG envoyé: lg_param=42
[2023-01-24 12:57:13]DEBUG : MSG Recu:255-15-0-1
[2023-01-24 12:57:13]INFO : Stopping OTP manager
[2023-01-24 12:57:31]INFO : Stopping daemon
[2023-01-24 12:57:31]INFO : Starting daemon
[2023-01-24 12:57:31]INFO : sudo /usr/bin/python3 /var/www/html/plugins/peugeotcars/core/class/../../3rdparty/psa_jeedom_daemon/jeedom_gateway.py -m xxxxxxxxxx@gmail.com -P xxxxxxxx >> /var/www/html/core/class/../../log/peugeotcars_remote 2>&1 &
[2023-01-24 12:58:02]DEBUG : Mise à jour périodique
[2023-01-24 12:58:02]DEBUG : mqtt_submit: Envoi de la commmande (42) vers le serveur local
[2023-01-24 12:58:02]DEBUG : Retour mqtt:{"trip_in_progress": 0, "signal_quality": 0, "reason": 0, "sev_state": 0}
[2023-01-24 12:59:02]DEBUG : Mise à jour périodique
[2023-01-24 12:59:02]DEBUG : mqtt_submit: Envoi de la commmande (42) vers le serveur local
[2023-01-24 12:59:02]DEBUG : Retour mqtt:{"trip_in_progress": 0, "signal_quality": 0, "reason": 0, "sev_state": 0}
[2023-01-24 13:00:05]DEBUG : Mise à jour périodique
[2023-01-24 13:00:06]DEBUG : mqtt_submit: Envoi de la commmande (42) vers le serveur local
[2023-01-24 13:00:06]DEBUG : Retour mqtt:{"trip_in_progress": 0, "signal_quality": 0, "reason": 0, "sev_state": 0}
[2023-01-24 13:00:06]DEBUG : Session expirée => New login
[2023-01-24 13:00:07]DEBUG : MAJ statut du véhicule:VR7BCZxxxxxxxxx
[2023-01-24 13:00:07]DEBUG : Refresh->recording Gps_dt=1674561607,xxxxxxxx,xxxxxxx,55,90,17383.2,0
[2023-01-24 13:00:07]DEBUG : charging_state:3/ new_charging_state:3
[2023-01-24 13:01:03]DEBUG : Mise à jour périodique
[2023-01-24 13:01:03]DEBUG : mqtt_submit: Envoi de la commmande (42) vers le serveur local
[2023-01-24 13:01:03]DEBUG : Retour mqtt:{"trip_in_progress": 0, "signal_quality": 0, "reason": 0, "sev_state": 0}
[2023-01-24 13:02:02]DEBUG : Mise à jour périodique
[2023-01-24 13:02:02]DEBUG : mqtt_submit: Envoi de la commmande (42) vers le serveur local
[2023-01-24 13:02:02]DEBUG : Retour mqtt:{"trip_in_progress": 0, "signal_quality": 0, "reason": 0, "sev_state": 0}
[2023-01-24 13:03:02]DEBUG : Mise à jour périodique
[2023-01-24 13:03:03]DEBUG : mqtt_submit: Envoi de la commmande (42) vers le serveur local
[2023-01-24 13:03:03]DEBUG : Retour mqtt:{"trip_in_progress": 0, "signal_quality": 0, "reason": 0, "sev_state": 0}
[2023-01-24 13:04:03]DEBUG : Mise à jour périodique
[2023-01-24 13:04:03]DEBUG : mqtt_submit: Envoi de la commmande (42) vers le serveur local
[2023-01-24 13:04:03]DEBUG : Retour mqtt:{"trip_in_progress": 0, "signal_quality": 0, "reason": 0, "sev_state": 0}
[2023-01-24 13:05:03]DEBUG : Mise à jour périodique
[2023-01-24 13:05:03]DEBUG : mqtt_submit: Envoi de la commmande (42) vers le serveur local
[2023-01-24 13:05:03]DEBUG : Retour mqtt:{"trip_in_progress": 0, "signal_quality": 0, "reason": 0, "sev_state": 0}
[2023-01-24 13:05:05]DEBUG : MAJ statut du véhicule:VR7BCZKXxxxxxxxx
[2023-01-24 13:05:05]DEBUG : Refresh->recording Gps_dt=1674561905,xxxxxxx,xxxxxxx,55,90,17383.2,0
[2023-01-24 13:05:05]INFO : Reprise de la charge
[2023-01-24 13:05:05]DEBUG : charging_state:3/ new_charging_state:2
[2023-01-24 13:06:02]DEBUG : Mise à jour périodique
[2023-01-24 13:06:02]DEBUG : mqtt_submit: Envoi de la commmande (42) vers le serveur local
[2023-01-24 13:06:02]DEBUG : Retour mqtt:{"trip_in_progress": 0, "signal_quality": 0, "reason": 0, "sev_state": 0}
[2023-01-24 13:07:02]DEBUG : Mise à jour périodique
[2023-01-24 13:07:02]DEBUG : mqtt_submit: Envoi de la commmande (42) vers le serveur local
[2023-01-24 13:07:02]DEBUG : Retour mqtt:{"trip_in_progress": 0, "signal_quality": 0, "reason": 0, "sev_state": 0}
[2023-01-24 13:08:03]DEBUG : Mise à jour périodique
[2023-01-24 13:08:03]DEBUG : periodic_state-> Send wakeup
[2023-01-24 13:08:03]DEBUG : mqtt_submit: Envoi de la commmande (30) vers le serveur local
[2023-01-24 13:08:04]ERROR : mqtt_submit: Erreur lors de l'envoi de la commande vers le serveur local
[2023-01-24 13:08:04]DEBUG : mqtt_submit: Envoi de la commmande (42) vers le serveur local
[2023-01-24 13:08:04]ERROR : mqtt_submit: Erreur lors de l'envoi de la commande vers le serveur local
[2023-01-24 13:09:03]DEBUG : Mise à jour périodique
[2023-01-24 13:09:03]DEBUG : mqtt_submit: Envoi de la commmande (42) vers le serveur local
[2023-01-24 13:09:03]ERROR : mqtt_submit: Erreur lors de l'envoi de la commande vers le serveur local
[2023-01-24 13:10:04]DEBUG : Mise à jour périodique
[2023-01-24 13:10:04]DEBUG : mqtt_submit: Envoi de la commmande (42) vers le serveur local
[2023-01-24 13:10:04]ERROR : mqtt_submit: Erreur lors de l'envoi de la commande vers le serveur local
[2023-01-24 13:10:05]DEBUG : MAJ statut du véhicule:VR7BCZKXxxxxxxxxx
[2023-01-24 13:10:06]DEBUG : Refresh->recording Gps_dt=1674562206,xxxxxxx,xxxxxxxx7,55,90,17383.2,0
[2023-01-24 13:10:06]DEBUG : charging_state:2/ new_charging_state:2
[2023-01-24 13:11:02]DEBUG : Mise à jour périodique
[2023-01-24 13:11:02]DEBUG : mqtt_submit: Envoi de la commmande (42) vers le serveur local
[2023-01-24 13:11:02]ERROR : mqtt_submit: Erreur lors de l'envoi de la commande vers le serveur local
[2023-01-24 13:12:02]DEBUG : Mise à jour périodique
[2023-01-24 13:12:02]DEBUG : mqtt_submit: Envoi de la commmande (42) vers le serveur local
[2023-01-24 13:12:02]ERROR : mqtt_submit: Erreur lors de l'envoi de la commande vers le serveur local
[2023-01-24 13:13:02]DEBUG : Mise à jour périodique
[2023-01-24 13:13:02]DEBUG : mqtt_submit: Envoi de la commmande (42) vers le serveur local
[2023-01-24 13:13:02]ERROR : mqtt_submit: Erreur lors de l'envoi de la commande vers le serveur local

Salut !
Je me permet un petit up.
Bon dimanche

Salut,

As-tu toujours tes problème ?
Moi, j’ai toutes les informations sauf la géolocalisation (localisé au boulot de ma femme) et toujours :

Merci et bonne soirée.

Salut
J’ai tout désinstallé, réinstallé puis fait une procédure complète de code OTP.
Depuis ça fonctionne pas mal pour le suivit de charge et plus d’erreur mqtt.
La géolocalisation ne fonctionne pas sur le plugin mais peut importe pour moi, j’ai maintenant un compte Tronity dans lequel je retrouve ces infos.

Hello @lelas
je suis bien la procédure d’activation mais j’a un souci à l’étape 1…

Dans les logs otp, j’ai ça :
Requested API level 31 is larger than maximum we have, returning API level 28 instead.
2023-06-15 11:52:46,877 :: INFO :: ["{‹ vin ›: ‹ VR3UHZKXZNT125995 ›, ‹ vehicle_id ›: ‹ 1cfdd66f96cfbc73c95ec78d55deb67f77413354ed808f936b5220d744b324ecf3f9abd885dd5d7c13d8cd5b1787f852c45f1f8b819fb25fb4e78e2ea783dcc156e900b5e1ada9616895a59536b8047c859ebfce59d1720b1e07c3437d81d5bfb ›, ‹ label ›: ‹ e-208 ›, ‹ brand ›: ‹ Peugeot ›, ‹ abrp_name ›: ‹ peugeot:e208:20:50 ›, ‹ battery_power ›: 46, ‹ fuel_capacity ›: 0, ‹ max_elec_consumption ›: 70, ‹ max_fuel_consumption ›: 0}"]
2023-06-15 11:52:47,155 :: ERROR :: remote_refresh_token isn’t defined
2023-06-15 11:52:47,605 :: ERROR :: Error during activation: {‹ err ›: ‹ NOK:FORBIDDEN ›}
2023-06-15 11:52:47,606 :: ERROR :: get_otp_code:
Traceback (most recent call last):
File « /var/www/html/plugins/peugeotcars/3rdparty/psa_jeedom_daemon/psa_car_controller/psa/RemoteClient.py », line 210, in get_otp_code
otp_code = self.otp.get_otp_code()
File « /var/www/html/plugins/peugeotcars/3rdparty/psa_jeedom_daemon/psa_car_controller/psa/otp/otp.py », line 276, in get_otp_code
raise ConfigException(« Can’t get otp code »)
psa_car_controller.psa.otp.otp.ConfigException: Can’t get otp code
2023-06-15 11:52:47,607 :: ERROR :: Please redo otp config
2023-06-15 11:52:48,003 :: ERROR :: Error during activation: {‹ err ›: ‹ NOK:FORBIDDEN ›}
2023-06-15 11:52:48,004 :: ERROR :: start_remote_control failed redo otp config
2023-06-15 11:52:48,005 :: INFO :: save config change
2023-06-15 11:52:48,005 :: INFO :: OTP_Config:Step1 => Prepare OTP code generation
2023-06-15 11:52:48,226 :: ERROR :: remote_refresh_token isn’t defined
2023-06-15 11:52:48,537 :: ERROR :: Error during activation: {‹ err ›: ‹ NOK:FORBIDDEN ›}
2023-06-15 11:52:48,538 :: ERROR :: get_otp_code:
Traceback (most recent call last):
File « /var/www/html/plugins/peugeotcars/3rdparty/psa_jeedom_daemon/psa_car_controller/psa/RemoteClient.py », line 210, in get_otp_code
otp_code = self.otp.get_otp_code()
File « /var/www/html/plugins/peugeotcars/3rdparty/psa_jeedom_daemon/psa_car_controller/psa/otp/otp.py », line 276, in get_otp_code
raise ConfigException(« Can’t get otp code »)
psa_car_controller.psa.otp.otp.ConfigException: Can’t get otp code
2023-06-15 11:52:48,539 :: ERROR :: Please redo otp config
2023-06-15 11:52:48,847 :: ERROR :: Error during activation: {‹ err ›: ‹ NOK:FORBIDDEN ›}
2023-06-15 11:52:48,848 :: ERROR :: start_remote_control failed redo otp config
2023-06-15 11:52:48,848 :: INFO :: OTP_Config:Step1 => success
2023-06-15 11:53:18,005 :: INFO :: save config change
2023-06-15 11:53:33,654 :: INFO :: OTP_Config:message received: b’\xff\xf0\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00’
2023-06-15 11:53:33,655 :: INFO :: OTP_Config:message params: []
2023-06-15 11:53:33,655 :: INFO :: OTP_Config:Step1 =>Sync for preparation of OTP code generation

du coup, même si je finis la procédure, le champ remote_refresh_token reste à null dans le config.json…

J’avoue que je ne sais plus quoi faire…