Cloudsync pro et Microsoft OneDrive

Aucun souci pour moi. Tout est fonctionnel !! :+1:t2::+1:t2:

Xav

Bonsoir,

J’ai suivis ton tuto @Xav-74,

Mais cela ne fonctionne pas…

J’ai fait en fonction de t’es remarque

Merci de mettre les logs en mode DEBUG puis refaire une association avec ton compte OneDrive. Même si tout est ok, merci d’upload le fichier pour voir les logs…
Je te propose de me les envoyer en MP

La lecture de logs depuis une capture d’écran n’est pas très efficace :wink:

Bonjour,

Le sujet n’est pas clos alors j’y vais de mon soucis personnel de configuration.
Je n’arrive pas a obtenir la liste de destination

0000|[2023-04-19 14:23:43]DEBUG : postSave:: this:cloudsyncpro::__set_state(array(    'id' => '318',    'name' => 'OneDrive',    'logicalId' => '',    'generic_type' => NULL,    'object_id' => NULL,    'eqType_name' => 'cloudsyncpro',    'isVisible' => '0',    'isEnable' => '1',    'configuration' =>    array (     'createtime' => '2023-03-14 05:50:05',     'comment' => '',     'type' => 'onedrive',     'client_id' => '***',     'client_secret' => '***',     'cid' => '***@outlook.fr',     'updatetime' => '2023-04-19 09:02:25',   ),    'timeout' => NULL,    'category' =>    array (     'heating' => '0',     'security' => '0',     'energy' => '0',     'light' => '0',     'opening' => '0',     'automatism' => '0',     'multimedia' => '0',     'default' => '0',   ),    'display' => '{"backGraph::info":0}',    'order' => '9999',    'comment' => NULL,    'tags' => NULL,    '_debug' => false,    '_object' => NULL,    '_needRefreshWidget' => false,    '_timeoutUpdated' => false,    '_batteryUpdated' => false,    '_changed' => false, ))
0001|[2023-04-19 14:23:43]DEBUG : loadConfigFile::
0002|[2023-04-19 14:23:43]DEBUG : loadConfigFile:: rclone.conf:array (   318 =>    array (     'type' => 'onedrive',     'client_id' => '***',     'client_secret' => '***',     'token' => '{"access_token":"*********"}',     'drive_id' => '***@outlook.fr',     'drive_type' => 'personal',   ), )
0003|[2023-04-19 14:23:45]DEBUG : execute:: options:array (   'user_login' => 'mika-nt28',   'user_id' => '2', )
0004|[2023-04-19 14:23:45]DEBUG : execute:: this:cloudsyncproCmd::__set_state(array(    'id' => '5773',    'logicalId' => NULL,    'generic_type' => NULL,    'eqType' => 'cloudsyncpro',    'name' => 'Sauvgardes',    'order' => '0',    'type' => 'action',    'subType' => 'other',    'eqLogic_id' => '318',    'isHistorized' => '0',    'unite' => '',    'configuration' =>    array (     'command' => 'lsl',     'source' => '/var/www/html/backup',     'destination' => '/',     'include' => '*.gz',     'exclude' => '',     'minage' => '',     'maxage' => '',   ),    'template' => '{"dashboard":"default","mobile":"default"}',    'display' => '{"showStatsOnmobile":0,"showStatsOndashboard":0}',    'value' => NULL,    'isVisible' => '1',    'alert' => '[]',    '_collectDate' => '',    '_valueDate' => '',    '_eqLogic' =>    cloudsyncpro::__set_state(array(      'id' => '318',      'name' => 'OneDrive',      'logicalId' => '',      'generic_type' => NULL,      'object_id' => NULL,      'eqType_name' => 'cloudsyncpro',      'isVisible' => '0',      'isEnable' => '1',      'configuration' => '{"createtime":"2023-03-14 05:50:05","comment":"","type":"onedrive","client_id":"**","client_secret":"***","cid":"***@outlook.fr","updatetime":"2023-04-19 09:02:25"}',      'timeout' => NULL,      'category' => '{"heating":"0","security":"0","energy":"0","light":"0","opening":"0","automatism":"0","multimedia":"0","default":"0"}',      'display' => '{"backGraph::info":0}',      'order' => '9999',      'comment' => NULL,      'tags' => NULL,      '_debug' => false,      '_object' => NULL,      '_needRefreshWidget' => false,      '_timeoutUpdated' => false,      '_batteryUpdated' => false,      '_changed' => false,   )),    '_needRefreshWidget' => NULL,    '_needRefreshAlert' => NULL,    '_changed' => false, ))
0005|[2023-04-19 14:23:45]DEBUG : execute:: this:array (   'command' => 'lsl',   'source' => '/var/www/html/backup',   'destination' => '/',   'include' => '*.gz',   'exclude' => '',   'minage' => '',   'maxage' => '', )
0006|[2023-04-19 14:23:45]ALERT : Starting task (OneDrive/Sauvgardes #5773)
0007|[2023-04-19 14:23:46]DEBUG : execute:: pid:'25587' rclone:'/var/www/html/plugins/cloudsyncpro/3rparty/rclone-v1.57.0-linux-arm64/rclone -v --log-file /var/www/html/core/class/../../log/cloudsyncpro.#5773 --config /var/www/html/plugins/cloudsyncpro/data/rclone.conf --filter \'+ *.gz\' --filter \'- *\' lsl 318:\'/backup\''
0000|2023/04/19 14:23:46 Failed to create file system for "318:/": failed to get root: invalidRequest: ObjectHandle is Invalid

Par quelle méthode as-tu trouvé l’identifiant du OneDrive que tu dois indiquer dans la fiche de l’équipement ?

De cette méthode

As-tu bien suivi cette procédure pour créer ton application ?
Est-ce bien un compte de type OneDrive Personnal ?

OneDrive

Bonjour,

oui et la connexion se fait correctement a priorie

0000|[2023-04-20 13:36:35]DEBUG : ajax:: redirectURI:'https://login.microsoftonline.com/common/oauth2/v2.0/authorize?access_type=offline&client_id=****&response_type=code&redirect_uri=https://bouledecoton.eu.jeedom.link/plugins/cloudsyncpro/core/php/CSRedirectURI.php&scope=Files.Read+Files.ReadWrite+Files.Read.All+Files.ReadWrite.All+Sites.Read.All+offline_access&state=eyJ0eXBlIjoib25lZHJpdmUiLCJsb2dpY2FsSWQiOjMxOH0='
0001|[2023-04-20 13:36:36]DEBUG : redirectURI:: QUERY_STRING:'code=M.C107_BL2.2.2ac9fb8e-2e07-01f6-6cb0-37efdf03e001&state=eyJ0eXBlIjoib25lZHJpdmUiLCJsb2dpY2FsSWQiOjMxOH0%3d'
0002|[2023-04-20 13:36:36]DEBUG : redirectURI:: output:array (   'code' => 'M.C107_BL2.2.2ac9fb8e-2e07-01f6-6cb0-37efdf03e001',   'state' => 'eyJ0eXBlIjoib25lZHJpdmUiLCJsb2dpY2FsSWQiOjMxOH0=', )
0003|[2023-04-20 13:36:36]DEBUG : redirectURI:: data:array (   'type' => 'onedrive',   'logicalId' => 318, )
0004|[2023-04-20 13:36:37]DEBUG : redirectURI:: response:GuzzleHttp\Psr7\Response::__set_state(array(    'reasonPhrase' => 'OK',    'statusCode' => 200,    'headers' =>    array (     'Cache-Control' =>      array (       0 => 'no-store, no-cache',     ),     'Pragma' =>      array (       0 => 'no-cache',     ),     'Content-Type' =>      array (       0 => 'application/json; charset=utf-8',     ),     'Expires' =>      array (       0 => '-1',     ),     'Strict-Transport-Security' =>      array (       0 => 'max-age=31536000; includeSubDomains',     ),     'X-Content-Type-Options' =>      array (       0 => 'nosniff',     ),     'P3P' =>      array (       0 => 'CP="DSP CUR OTPi IND OTRi ONL FIN"',     ),     'x-ms-request-id' =>      array (       0 => 'dae7b238-2ba6-40b8-82b7-bbec18d92c00',     ),     'x-ms-ests-server' =>      array (       0 => '2.1.15049.5 - NEULR2 ProdSlices',     ),     'X-XSS-Protection' =>      array (       0 => '0',     ),     'Set-Cookie' =>      array (       0 => 'fpc=Aj3OIYAqwf1LoHyZknuCX4wYmD5OAQAAAMQa09sOAAAA; expires=Sat, 20-May-2023 11:36:37 GMT; path=/; secure; HttpOnly; SameSite=None',       1 => 'x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly',       2 => 'stsservicecookie=estsfd; path=/; secure; samesite=none; httponly',     ),     'Date' =>      array (       0 => 'Thu, 20 Apr 2023 11:36:37 GMT',     ),     'Content-Length' =>      array (       0 => '1788',     ),   ),    'headerNames' =>    array (     'cache-control' => 'Cache-Control',     'pragma' => 'Pragma',     'content-type' => 'Content-Type',     'expires' => 'Expires',     'strict-transport-security' => 'Strict-Transport-Security',     'x-content-type-options' => 'X-Content-Type-Options',     'p3p' => 'P3P',     'x-ms-request-id' => 'x-ms-request-id',     'x-ms-ests-server' => 'x-ms-ests-server',     'x-xss-protection' => 'X-XSS-Protection',     'set-cookie' => 'Set-Cookie',     'date' => 'Date',     'content-length' => 'Content-Length',   ),    'protocol' => '1.1',    'stream' =>    GuzzleHttp\Psr7\Stream::__set_state(array(      'stream' => NULL,      'size' => NULL,      'seekable' => true,      'readable' => true,      'writable' => true,      'uri' => 'php://temp',      'customMetadata' =>      array (     ),   )), ))
0005|[2023-04-20 13:36:37]INFO : redirectURI:: body:array (   'token_type' => 'Bearer',   'scope' => 'Files.Read Files.ReadWrite Files.Read.All Files.ReadWrite.All',   'expires_in' => 3600,   'ext_expires_in' => 3600,   'access_token' => '****/****/****/+****/****/****/P/****+vhyBSNLptPie+****/****+dCso5sQBpBJibaAwC0PAgiwbHqGW5lFbNXS+****/****/****+8iSLx/n+****/j1B1nzeuHJEw8kIlJjx2/****+Mb6GR+****+****/****/eKioYbTb+****+DgSZ/OlWCrTCliNiy9JSDQG/****+WqevTYBIgsBFT4eEuf012fjxUmk2DwpWl4ou47jmVyccrFe+s5yf4b6uDdE5TLSWAsastHgYYe6j88qUxSOUmFcAHZMBlT1jvptfu6jspaqXBPUyRzU52IOFfJYshvwRuDA734/atLrmOuwm/W2G90D4kIzj3Ul/XGTYf2st0MwWHaG7dosf4wvd+W+SBZEchWtnKAABOMFN6+TY5s2NVo2mZec3WJXG2NvklfQnWJmTmlVSyW9hOf6tC5XM08lnRkspHAM5IC',   'refresh_token' => 'M.C107_BL2.-CTFVb5UVU9LLLGZKVBocuZKnBRl2pzpI1rN3xHTOG5O8O1*****!****!geNNoiIknnAkfnfnb!*****N6j3a9xNa9ca******P1!****!X42BPB8NekuV*tuluOlTxuA$$', )
0006|[2023-04-20 13:36:37]DEBUG : loadConfigFile::
0007|[2023-04-20 13:36:37]DEBUG : loadConfigFile:: rclone.conf:array (   318 =>    array (     'type' => 'onedrive',     'client_id' => '****',     'client_secret' => '****',     'token' => '{"access_token":"****/aZxHVvL+yeUjUOtQUYOV8DrWkoxkFtL2FPmspkar3lJfqqnye+YZkZmyGPBv954ocF4CNxDX4amS/NiO9cgEAm9FlfAchK3gigCB0ex32jse/k479Pd6muq2DaeZ9W6YIddOXZb89m3Urh+dxKanZAF3JEmOoizURXEDM5YJigh8GHG0WfBSIJxZDXfFdYTtKEfI1P+ZWi6oRTkszsvfGkZ8BseLuPWanyeED7XK75sSd+rnhP6tdRNfRWplM5yKAe4mjiB2qWXeqSYMTW7kMErjHGJLVoOlYUNKOBckeVFA8zS3FlMne6z8RosxyXAzxtmmtKrGbcDZgAACEJ76oqDjb7Z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3Qp7oY0!fkFwm9!wJV7AX4IgJjoF68yfLEaWfjY9vBC6xXDH4KP8pJmRdQ8WKc4pqtmBbcB!6QVvFs49svVx6s5HhAJCQHyQmItttim66pfCCDQ$$","expiry":"2023-04-20T12:28:28.4204099+02:00"}',     'drive_id' => '****@outlook.fr',     'drive_type' => 'personal',   ), )
0008|[2023-04-20 13:36:37]DEBUG : saveConfigFile:: array:array (   318 =>    array (     'type' => 'onedrive',     'client_id' => '****',     'client_secret' => '****',     'token' => '{"access_token":"****/****/****/+****/****/****/P/****+vhyBSNLptPie+****/****+dCso5sQBpBJibaAwC0PAgiwbHqGW5lFbNXS+****/****/****+8iSLx/n+****/j1B1nzeuHJEw8kIlJjx2/****+Mb6GR+****+****/****/eKioYbTb+****+DgSZ/OlWCrTCliNiy9JSDQG/****+WqevTYBIgsBFT4eEuf012fjxUmk2DwpWl4ou47jmVyccrFe+s5yf4b6uDdE5TLSWAsastHgYYe6j88qUxSOUmFcAHZMBlT1jvptfu6jspaqXBPUyRzU52IOFfJYshvwRuDA734/atLrmOuwm/W2G90D4kIzj3Ul/XGTYf2st0MwWHaG7dosf4wvd+W+SBZEchWtnKAABOMFN6+TY5s2NVo2mZec3WJXG2NvklfQnWJmTmlVSyW9hOf6tC5XM08lnRkspHAM5IC","token_type":"Bearer","refresh_token":"M.C107_BL2.-CTFVb5UVU9LLLGZKVBocuZKnBRl2pzpI1rN3xHTOG5O8O1*****!****!geNNoiIknnAkfnfnb!*****N6j3a9xNa9ca******P1!****!X42BPB8NekuV*tuluOlTxuA$$","expiry":"2023-04-20T14:36:37+02:00"}',     'drive_id' => '****@outlook.fr',     'drive_type' => 'personal',   ), )
0009|[2023-04-20 13:36:37]DEBUG : saveConfigFile:: content:'[318] type = onedrive client_id = **** client_secret = **** token = {"access_token":"****/****/****/+****/****/****/P/****+vhyBSNLptPie+****/****+dCso5sQBpBJibaAwC0PAgiwbHqGW5lFbNXS+****/****/****+8iSLx/n+****/j1B1nzeuHJEw8kIlJjx2/****+Mb6GR+****+****/****/eKioYbTb+****+DgSZ/OlWCrTCliNiy9JSDQG/****+WqevTYBIgsBFT4eEuf012fjxUmk2DwpWl4ou47jmVyccrFe+s5yf4b6uDdE5TLSWAsastHgYYe6j88qUxSOUmFcAHZMBlT1jvptfu6jspaqXBPUyRzU52IOFfJYshvwRuDA734/atLrmOuwm/W2G90D4kIzj3Ul/XGTYf2st0MwWHaG7dosf4wvd+W+SBZEchWtnKAABOMFN6+TY5s2NVo2mZec3WJXG2NvklfQnWJmTmlVSyW9hOf6tC5XM08lnRkspHAM5IC","token_type":"Bearer","refresh_token":"M.C107_BL2.-f*****!****!geNNoiIknnAkfnfnb!*****N6j3a9xNa9ca******P1!****!X42BPB8NekuV*tuluOlTxuA$$","expiry":"2023-04-20T14:36:37+02:00"} drive_id = ****@outlook.fr drive_type = personal  '

Il s’agit bien d’un compte personel

L’identfiant du OneDrive n’est pas ton adresse email mais une série de lettres/chiffres

Merci de cliquer sur l’URL suivante :
https://onedrive.live.com/

Tu devrais visualiser le contenu de ton OneDrive. L’URL dans ton navigateur devrait alors avoir le format suivant :
https://onedrive.live.com/?id=root&cid=xxxxxxxxxxxxxxx

Il faut recopier xxxxxxxxxxxxxxx dans l’interface graphique

Effectivement ça fonctionne beaucoup mieux

Bonjour.
Mon compte onedrive n’est pas un compte personnel mais un compte faisant partie d’un domaine.
La méthode pour récupérer le CID ne fonctionne pas, j’obtiens l’url suivante:
image
Connaissez vous une autre méthode pour récupérer son driveid ?
Merci

J’ai fini par le trouver en faisant une requête dans Graph
https://graph.microsoft.com/v1.0/me/drive
Je retrouve bien l’ID
image
Malheureusement l’association ne fonctionne pas: HTTP ERROR 500
Pas certain que le plugins fonctionne avec un compte business

Compte tenu du debug le requête d’authent n’est pas compatible:

(cloudsyncpro) is not configured as a multi-tenant application. Usage of the /common endpoint is not supported for such applications created after \'10/15/2018\'. Use a tenant-specific endpoint or configure the application to be multi-tenant.

Un peu lecture qui explique comment corriger ce point.

J’ai passé l’authent de l’app en multitenant

Et la demande d’association fonctionne.
Si ca peut aider son prochain :slight_smile:

1 « J'aime »

@henribi : possible de clôturer le topic ?
Je pense que tout fonctionne maintenant et que tu as pu connecter ton compte Microsoft avec Jeedom :wink:

@iPapy : possible de clôturer ce topic ?
Il n’y a aucun retour depuis plusieurs mois et il me semble ne pas avoir d’autres sujets sur ce type de stockage.

Ce sujet a été automatiquement fermé après 24 heures suivant le dernier commentaire. Aucune réponse n’est permise dorénavant.