Perte de liens avec les équipements

Jai tout relancé de zéro afin de changer le port 80 en 443, même vider le cache. mais maintenant j’ai cette erreur :

[2025-01-26 14:38:13] DEBUG  : Étape 1
[2025-01-26 14:38:13] DEBUG  : sendRequest - URL : https://api.smartthings.com/v1/apps METHODE : GET
[2025-01-26 14:38:13] DEBUG  : checkAndCreateApp app already exists {"appName":"jeedom_plugin_smartthings1737893436","appId":"a5b34699-1cea-4e6c-959d-6f5dfdf2e368","appType":"API_ONLY","classifications":["CONNECTED_SERVICE","AUTOMATION"],"displayName":"jeedom_plugin_smartthings","description":"SmartApp API_ONLY for Jeedom plugin.","iconImage":{"url":"https:\/\/github.com\/Flobul\/Jeedom-SmartThings\/raw\/master\/plugin_info\/smartthings_icon.png"},"createdDate":"2025-01-26T12:10:36Z","lastUpdatedDate":"2025-01-26T12:10:37Z"}
[2025-01-26 14:38:13] DEBUG  : sendRequest - URL : https://api.smartthings.com/v1/apps/a5b34699-1cea-4e6c-959d-6f5dfdf2e368 METHODE : GET

Si je comprend bien, l’installation bug car l’app est existante et il n’est pas possible de la re-créer ?

Oui, le problème, c’est que le client id et secret ne peuvent être récupérés qu’à la création de la SmartApp.
Je code le moyen de supprimer la smartapp et la recréer pour ce cas de figure.

Edit : c’est sur le market

as tu fais des modifs vue l’update ?

Super !! pour ma part tout est OK.

Un grand merci pour votre disponibilité

image

Du mieux mais toujours pas fonctionnel :frowning:

Il me faut les log pour avancer stp.

[2025-01-26 16:01:39] DEBUG : Début checkAndCreateApp
[2025-01-26 16:01:39] DEBUG : Étape 1
[2025-01-26 16:01:39] DEBUG : sendRequest - URL : https://api.smartthings.com/v1/apps METHODE : GET
[2025-01-26 16:01:39] DEBUG : sendRequest - CODE : 200 RESPONSE : {« items »:[{« appName »:« jeedom_plugin_smartthings1737903672 »,« appId »:« 226bc95b-648d-4bd7-8277-c2d7964f1bd3 »,« appType »:« API_ONLY »,« classifications »:[« AUTOMATION »,« CONNECTED_SERVICE »],« displayName »:« jeedom_plugin_smartthings »,« description »:« SmartApp API_ONLY for Jeedom plugin. »,« iconImage »:{« url »:« https://github.com/Flobul/Jeedom-SmartThings/raw/master/plugin_info/smartthings_icon.png"},« createdDate »:« 2025-01-26T15:01:12Z »,« lastUpdatedDate »:« 2025-01-26T15:01:14Z »}],"_links »:{}}
[2025-01-26 16:01:39] DEBUG : checkAndCreateApp app already exists {« appName »:« jeedom_plugin_smartthings1737903672 »,« appId »:« 226bc95b-648d-4bd7-8277-c2d7964f1bd3 »,« appType »:« API_ONLY »,« classifications »:[« AUTOMATION »,« CONNECTED_SERVICE »],« displayName »:« jeedom_plugin_smartthings »,« description »:« SmartApp API_ONLY for Jeedom plugin. »,« iconImage »:{« url »:« https://github.com/Flobul/Jeedom-SmartThings/raw/master/plugin_info/smartthings_icon.png »},« createdDate »:« 2025-01-26T15:01:12Z »,« lastUpdatedDate »:« 2025-01-26T15:01:14Z »}
[2025-01-26 16:01:39] DEBUG : sendRequest - URL : https://api.smartthings.com/v1/apps/226bc95b-648d-4bd7-8277-c2d7964f1bd3 METHODE : GET
[2025-01-26 16:01:39] DEBUG : sendRequest - CODE : 200 RESPONSE : {« appName »:« jeedom_plugin_smartthings1737903672 »,« appId »:« 226bc95b-648d-4bd7-8277-c2d7964f1bd3 »,« appType »:« API_ONLY »,« principalType »:« LOCATION »,« classifications »:[« CONNECTED_SERVICE »,« AUTOMATION »],« displayName »:« jeedom_plugin_smartthings »,« description »:« SmartApp API_ONLY for Jeedom plugin. »,« singleInstance »:false,« iconImage »:{« url »:« https://github.com/Flobul/Jeedom-SmartThings/raw/master/plugin_info/smartthings_icon.png"},« installMetadata »:{},« owner »:{« ownerType »:« USER »,« ownerId »:« 23896a43-7c0c-8156-7bf0-445987a942e9 »},« createdDate »:« 2025-01-26T15:01:12Z »,« lastUpdatedDate »:« 2025-01-26T15:01:14Z »,« apiOnly »:{« subscription »:{« targetUrl »:« https://92ee096a.eu.jeedom.link:80/plugins/smartthings/core/php/callback.php?apikey=xNW2dFH08LR6pm50TxWWfrnu1LL1OjQiLVNZ28PNQwNGkxfuFNVVg7pYSAPHBZ9l »,« targetStatus »:« PENDING »}},« ui »:{« pluginUri »:«  »,« dashboardCardsEnabled »:false,"preInstallDashboardCardsEnabled »:false}}
[2025-01-26 16:01:39] DEBUG : checkAndCreateApp 1 $foundApp=226bc95b-648d-4bd7-8277-c2d7964f1bd3 $sameApp=1
[2025-01-26 16:01:39] DEBUG : checkAndCreateApp smartapp existe, mais différente
[2025-01-26 16:01:39] DEBUG : sendRequest - URL : https://api.smartthings.com/v1/apps/226bc95b-648d-4bd7-8277-c2d7964f1bd3 METHODE : DELETE
[2025-01-26 16:01:40] DEBUG : sendRequest - CODE : 200 RESPONSE : {}
[2025-01-26 16:01:40] DEBUG : checkAndCreateApp 2 $foundApp=
[2025-01-26 16:01:40] DEBUG : checkAndCreateApp smartapp n’existe pas
[2025-01-26 16:01:40] DEBUG : checkAndCreateApp body {« appName »:« jeedom_plugin_smartthings1737903700 »,« displayName »:« jeedom_plugin_smartthings »,« description »:« SmartApp API_ONLY for Jeedom plugin. »,« appType »:« API_ONLY »,« singleInstance »:false,« classifications »:[« CONNECTED_SERVICE »,« AUTOMATION »],« iconImage »:{« url »:« https://github.com/Flobul/Jeedom-SmartThings/raw/master/plugin_info/smartthings_icon.png"},« oauth »:{« clientName »:« my_jeedom »,« scope »:[« r:hubs:* »,« r:locations:* »,« r:rules:* »,« r:scenes:* »,« x:devices:* »,« w:rules:* »,« w:locations:* »,« w:devices:* »,« r:devices:* »,« x:locations:* »,« x:scenes:* »],« redirectUris »:[« https://92ee096a.eu.jeedom.link:80/plugins/smartthings/core/php/callback.php?apikey=xNW2dFH08LR6pm50TxWWfrnu1LL1OjQiLVNZ28PNQwNGkxfuFNVVg7pYSAPHBZ9l »]},« apiOnly »:{« targetUrl »:"https://92ee096a.eu.jeedom.link:80/plugins/smartthings/core/php/callback.php?apikey=xNW2dFH08LR6pm50TxWWfrnu1LL1OjQiLVNZ28PNQwNGkxfuFNVVg7pYSAPHBZ9l »}}
[2025-01-26 16:01:40] DEBUG : sendRequest - URL : https://api.smartthings.com/v1/apps METHODE : POST
[2025-01-26 16:01:41] DEBUG : sendRequest - CODE : 200 RESPONSE : {« app »:{« appName »:« jeedom_plugin_smartthings1737903700 »,« appId »:« 20531c36-2d06-460d-b456-378a86870048 »,« appType »:« API_ONLY »,« principalType »:« LOCATION »,« classifications »:[« CONNECTED_SERVICE »,« AUTOMATION »],« displayName »:« jeedom_plugin_smartthings »,« description »:« SmartApp API_ONLY for Jeedom plugin. »,« singleInstance »:false,« iconImage »:{« url »:« https://github.com/Flobul/Jeedom-SmartThings/raw/master/plugin_info/smartthings_icon.png"},« installMetadata »:{},« owner »:{« ownerType »:« USER »,« ownerId »:« 23896a43-7c0c-8156-7bf0-445987a942e9 »},« createdDate »:« 2025-01-26T15:01:40Z »,« lastUpdatedDate »:« 2025-01-26T15:01:40Z »,« apiOnly »:{« subscription »:{« targetUrl »:« https://92ee096a.eu.jeedom.link:80/plugins/smartthings/core/php/callback.php?apikey=xNW2dFH08LR6pm50TxWWfrnu1LL1OjQiLVNZ28PNQwNGkxfuFNVVg7pYSAPHBZ9l »,« targetStatus »:« PENDING »}}},« oauthClientId »:« c40a67a8-c202-4aec-99d4-4d81665013d2 »,« oauthClientSecret »:"12a182e3-43f4-4ce1-938e-9fcf07920778 »}
[2025-01-26 16:01:41] DEBUG : checkAndCreateApp $createApp {« app »:{« appName »:« jeedom_plugin_smartthings1737903700 »,« appId »:« 20531c36-2d06-460d-b456-378a86870048 »,« appType »:« API_ONLY »,« principalType »:« LOCATION »,« classifications »:[« CONNECTED_SERVICE »,« AUTOMATION »],« displayName »:« jeedom_plugin_smartthings »,« description »:« SmartApp API_ONLY for Jeedom plugin. »,« singleInstance »:false,« iconImage »:{« url »:« https://github.com/Flobul/Jeedom-SmartThings/raw/master/plugin_info/smartthings_icon.png »},« installMetadata »:,« owner »:{« ownerType »:« USER »,« ownerId »:« 23896a43-7c0c-8156-7bf0-445987a942e9 »},« createdDate »:« 2025-01-26T15:01:40Z »,« lastUpdatedDate »:« 2025-01-26T15:01:40Z »,« apiOnly »:{« subscription »:{« targetUrl »:« https://92ee096a.eu.jeedom.link:80/plugins/smartthings/core/php/callback.php?apikey=xNW2dFH08LR6pm50TxWWfrnu1LL1OjQiLVNZ28PNQwNGkxfuFNVVg7pYSAPHBZ9l »,« targetStatus »:« PENDING »}}},« oauthClientId »:« c40a67a8-c202-4aec-99d4-4d81665013d2 »,« oauthClientSecret »:« 12a182e3-43f4-4ce1-938e-9fcf07920778 »}
[2025-01-26 16:01:41] DEBUG : checkAndCreateApp 3 $foundApp=20531c36-2d06-460d-b456-378a86870048
[2025-01-26 16:01:41] DEBUG : checkAndCreateApp smartapp existe
[2025-01-26 16:01:41] DEBUG : sendRequest - URL : https://api.smartthings.com/v1/apps/20531c36-2d06-460d-b456-378a86870048 METHODE : GET
[2025-01-26 16:01:41] DEBUG : sendRequest - CODE : 200 RESPONSE : {« appName »:« jeedom_plugin_smartthings1737903700 »,« appId »:« 20531c36-2d06-460d-b456-378a86870048 »,« appType »:« API_ONLY »,« principalType »:« LOCATION »,« classifications »:[« AUTOMATION »,« CONNECTED_SERVICE »],« displayName »:« jeedom_plugin_smartthings »,« description »:« SmartApp API_ONLY for Jeedom plugin. »,« singleInstance »:false,« iconImage »:{« url »:« https://github.com/Flobul/Jeedom-SmartThings/raw/master/plugin_info/smartthings_icon.png"},« installMetadata »:{},« owner »:{« ownerType »:« USER »,« ownerId »:« 23896a43-7c0c-8156-7bf0-445987a942e9 »},« createdDate »:« 2025-01-26T15:01:40Z »,« lastUpdatedDate »:« 2025-01-26T15:01:41Z »,« apiOnly »:{« subscription »:{« targetUrl »:« https://92ee096a.eu.jeedom.link:80/plugins/smartthings/core/php/callback.php?apikey=xNW2dFH08LR6pm50TxWWfrnu1LL1OjQiLVNZ28PNQwNGkxfuFNVVg7pYSAPHBZ9l »,« targetStatus »:« PENDING »}},« ui »:{« pluginUri »:«  »,« dashboardCardsEnabled »:false,"preInstallDashboardCardsEnabled »:false}}
[2025-01-26 16:01:41] DEBUG : checkAndCreateApp checkApp {« appName »:« jeedom_plugin_smartthings1737903700 »,« appId »:« 20531c36-2d06-460d-b456-378a86870048 »,« appType »:« API_ONLY »,« principalType »:« LOCATION »,« classifications »:[« AUTOMATION »,« CONNECTED_SERVICE »],« displayName »:« jeedom_plugin_smartthings »,« description »:« SmartApp API_ONLY for Jeedom plugin. »,« singleInstance »:false,« iconImage »:{« url »:« https://github.com/Flobul/Jeedom-SmartThings/raw/master/plugin_info/smartthings_icon.png »},« installMetadata »:,« owner »:{« ownerType »:« USER »,« ownerId »:« 23896a43-7c0c-8156-7bf0-445987a942e9 »},« createdDate »:« 2025-01-26T15:01:40Z »,« lastUpdatedDate »:« 2025-01-26T15:01:41Z »,« apiOnly »:{« subscription »:{« targetUrl »:« https://92ee096a.eu.jeedom.link:80/plugins/smartthings/core/php/callback.php?apikey=xNW2dFH08LR6pm50TxWWfrnu1LL1OjQiLVNZ28PNQwNGkxfuFNVVg7pYSAPHBZ9l »,« targetStatus »:« PENDING »}},« ui »:{« pluginUri »:«  »,« dashboardCardsEnabled »:false,« preInstallDashboardCardsEnabled »:false}}
[2025-01-26 16:01:41] DEBUG : Étape 2
[2025-01-26 16:01:41] DEBUG : sendRequest - URL : https://api.smartthings.com/v1/apps/20531c36-2d06-460d-b456-378a86870048/register METHODE : PUT
[2025-01-26 16:01:41] DEBUG : sendRequest - CODE : 202 RESPONSE : {}
[2025-01-26 16:01:43] DEBUG : sendRequest - URL : https://api.smartthings.com/v1/apps/20531c36-2d06-460d-b456-378a86870048 METHODE : GET
[2025-01-26 16:01:43] DEBUG : sendRequest - CODE : 200 RESPONSE : {« appName »:« jeedom_plugin_smartthings1737903700 »,« appId »:« 20531c36-2d06-460d-b456-378a86870048 »,« appType »:« API_ONLY »,« principalType »:« LOCATION »,« classifications »:[« AUTOMATION »,« CONNECTED_SERVICE »],« displayName »:« jeedom_plugin_smartthings »,« description »:« SmartApp API_ONLY for Jeedom plugin. »,« singleInstance »:false,« iconImage »:{« url »:« https://github.com/Flobul/Jeedom-SmartThings/raw/master/plugin_info/smartthings_icon.png"},« installMetadata »:{},« owner »:{« ownerType »:« USER »,« ownerId »:« 23896a43-7c0c-8156-7bf0-445987a942e9 »},« createdDate »:« 2025-01-26T15:01:40Z »,« lastUpdatedDate »:« 2025-01-26T15:01:41Z »,« apiOnly »:{« subscription »:{« targetUrl »:« https://92ee096a.eu.jeedom.link:80/plugins/smartthings/core/php/callback.php?apikey=xNW2dFH08LR6pm50TxWWfrnu1LL1OjQiLVNZ28PNQwNGkxfuFNVVg7pYSAPHBZ9l »,« targetStatus »:« PENDING »}},« ui »:{« pluginUri »:«  »,« dashboardCardsEnabled »:false,"preInstallDashboardCardsEnabled »:false}}
[2025-01-26 16:01:43] DEBUG : authRequest registerApp null

Mauvais port configuré.

[2025-01-26 16:32:10] DEBUG : Début checkAndCreateApp
[2025-01-26 16:32:10] DEBUG : Étape 1
[2025-01-26 16:32:10] DEBUG : sendRequest - URL : https://api.smartthings.com/v1/apps METHODE : GET
[2025-01-26 16:32:10] DEBUG : sendRequest - CODE : 403 RESPONSE :
[2025-01-26 16:32:10] DEBUG : La requête vers https://api.smartthings.com/v1/apps a retourné un code d’erreur 403 résultat =
[2025-01-26 16:32:10] DEBUG : Accès à cette ressource non autorisé ou appareil non lié à cet utilisateur. L’authentification a été acceptée mais les droits d’accès ne permettent pas au client d’accéder à la ressource.
[2025-01-26 16:32:10] DEBUG : checkAndCreateApp 1 $foundApp= $sameApp=
[2025-01-26 16:32:10] DEBUG : checkAndCreateApp 2 $foundApp=
[2025-01-26 16:32:10] DEBUG : checkAndCreateApp smartapp n’existe pas
[2025-01-26 16:32:10] DEBUG : checkAndCreateApp body {« appName »:« jeedom_plugin_smartthings1737905530 »,« displayName »:« jeedom_plugin_smartthings »,« description »:« SmartApp API_ONLY for Jeedom plugin. »,« appType »:« API_ONLY »,« singleInstance »:false,« classifications »:[« CONNECTED_SERVICE »,« AUTOMATION »],« iconImage »:{« url »:« https://github.com/Flobul/Jeedom-SmartThings/raw/master/plugin_info/smartthings_icon.png"},« oauth »:{« clientName »:« my_jeedom »,« scope »:[« r:hubs:* »,« r:locations:* »,« r:rules:* »,« r:scenes:* »,« x:devices:* »,« w:rules:* »,« w:locations:* »,« w:devices:* »,« r:devices:* »,« x:locations:* »,« x:scenes:* »],« redirectUris »:[« https://92ee096a.eu.jeedom.link/plugins/smartthings/core/php/callback.php?apikey=xNW2dFH08LR6pm50TxWWfrnu1LL1OjQiLVNZ28PNQwNGkxfuFNVVg7pYSAPHBZ9l »]},« apiOnly »:{« targetUrl »:"https://92ee096a.eu.jeedom.link/plugins/smartthings/core/php/callback.php?apikey=xNW2dFH08LR6pm50TxWWfrnu1LL1OjQiLVNZ28PNQwNGkxfuFNVVg7pYSAPHBZ9l »}}
[2025-01-26 16:32:10] DEBUG : sendRequest - URL : https://api.smartthings.com/v1/apps METHODE : POST
[2025-01-26 16:32:11] DEBUG : sendRequest - CODE : 403 RESPONSE :
[2025-01-26 16:32:11] DEBUG : La requête vers https://api.smartthings.com/v1/apps a retourné un code d’erreur 403 résultat =
[2025-01-26 16:32:11] DEBUG : Accès à cette ressource non autorisé ou appareil non lié à cet utilisateur. L’authentification a été acceptée mais les droits d’accès ne permettent pas au client d’accéder à la ressource.
[2025-01-26 16:32:11] DEBUG : checkAndCreateApp $createApp false
[2025-01-26 16:32:11] DEBUG : checkAndCreateApp 3 $foundApp=

et la ?
Du mal avec cette histoire d’acces

Ton jeton PAT n’a pas des droits Application:

Recrée-le en ajoutant ces droits :

Top, réussi la connexion et récupérer les équipements
Reste a confirmer que ca tienne plus de 24h

Mais super boulot

Merci. Super.

Je vais faire la doc pour cette nouvelle connexion

Doc faite.

Si c’est bon pour toi, @christophe78, tu peux fermer ce sujet en le marquant résolu.

en cours une fois félicitations …