Dropbox configuration with OH2

Thanks look like it worked after a lot of trial.
I also needed to go through paper UI also to uninstall it at one point in time.

Now next problem is that it looks like my application is disabled :frowning:

2017-07-22 16:33:00.362 [WARN ] [dropbox.internal.DropboxSynchronizer] - Synchronizing data with Dropbox threw an exception
com.dropbox.core.DbxException$BadResponseCode: unexpected HTTP status code: 403: {“api_error”: true, “user_error”: “This app is currently disabled.”, “error”: “This app is currently disabled.”}
at com.dropbox.core.DbxRequestUtil.unexpectedStatus(DbxRequestUtil.java:211)[220:org.openhab.io.dropbox:1.11.0.201707140139]

Any idea how I cam check which accessToken the bundle really use?
Or anything else I can do to check if my application is running on dropbox side?

Thnaks
OvO

Hi,

i am also trying to set the right filters in combination with the contentdir. I have tried a few things but it always finds only “0” files to be synct. I am using the debian installations via paketmanager and in that case the config is in /etc/openhab2.

I tried

contentdir=/
uploadfilter=etc/openhab2/*

but it is not working.

What am i doing wrong?

Jens

ps: I am using 1.11 and also found out that if i comment an former set parameter out again it does not goes back to default value.

I’m having troubles as well. I installed DropBox using Paper UI and no luck. I downloaded and put the 1.11 into the addons folder after removing 1.10 and I still get the following message:

2017-08-02 20:42:08.252 [ERROR] [org.openhab.io.dropbox              ] - FrameworkEvent ERROR - org.openhab.io.dropbox
org.osgi.framework.BundleException: Could not resolve module: org.openhab.io.dropbox [195]

I’m using the personalAccessToken. Does that need to be in quotes or not in quote in the dropbox.cfg file?

@Jensen is describing a different issue than what this thread is about. Sounds, though, like it’s related to an open issue in the OH1-addons repo.

@B34N, you probably need to uninstall the default and the 1.11 versions. Once they’re no longer starting when OH starts, grab the latest snapshot build of the Dropbox plugin from Cloudbees and install that.

I must not be understanding the steps I need to take. I uninstalled Dropbox using paper UI. When I restarted I checked my log viewer and I no longer saw any reference to dropbox. I didn’t yet have anything in the add-ons folder but dropbox.cfg remained in the services folder. I then put the fresh D/L of the 1.11.0 snapshot from the latest snapshot link you sent me into the add-on folder and then restarted Openhab. I saw nothing in the logs about dropbox. I assumed that I didn’t need to do anything other than put the .jar into the add-ons folder to install but I checked the add-ons part of PaperUI and it still listed misc-dropbox1 - 1.10.0 as an option to install
(not installed). I restarted openhab again and I get the message:

2017-08-03 20:50:38.818 [ERROR] [org.openhab.io.dropbox              ] - FrameworkEvent ERROR - org.openhab.io.dropbox
org.osgi.framework.BundleException: Could not resolve module: org.openhab.io.dropbox [203]

What am I doing wrong?

i took a look at the open issues but i was not able to find some solution or configuration example that made the binding find the config files…

I’m in a similar position to @B34N - could someone please post instructions?

cant get it working either

Is anyone make binding 1.11 working on OH2.1?

Here is the current error I got on every sync:

2017-10-14 13:00:00.565 [WARN ] [al.DropboxService$SynchronizationJob] - Synchronizing data with Dropbox threw an exception
com.dropbox.core.DbxException$BadRequest: {“error”: “v1_retired”}
at com.dropbox.core.DbxRequestUtil.unexpectedStatus(DbxRequestUtil.java:206) [222:org.openhab.io.dropbox:1.11.0.201710140109]
at com.dropbox.core.DbxClient$6.handle(DbxClient.java:1343) [222:org.openhab.io.dropbox:1.11.0.201710140109]
at com.dropbox.core.DbxClient$6.handle(DbxClient.java:1340) [222:org.openhab.io.dropbox:1.11.0.201710140109]
at com.dropbox.core.DbxRequestUtil.finishResponse(DbxRequestUtil.java:300) [222:org.openhab.io.dropbox:1.11.0.201710140109]
at com.dropbox.core.DbxRequestUtil.doPostNoAuth(DbxRequestUtil.java:293) [222:org.openhab.io.dropbox:1.11.0.201710140109]
at com.dropbox.core.DbxRequestUtil.doPost(DbxRequestUtil.java:286) [222:org.openhab.io.dropbox:1.11.0.201710140109]
at com.dropbox.core.DbxClient.doPost(DbxClient.java:1833) [222:org.openhab.io.dropbox:1.11.0.201710140109]
at com.dropbox.core.DbxClient.getDelta(DbxClient.java:1340) [222:org.openhab.io.dropbox:1.11.0.201710140109]
at org.openhab.io.dropbox.internal.DropboxSynchronizer.syncDropboxToLocal(DropboxSynchronizer.java:154) [222:org.openhab.io.dropbox:1.11.0.201710140109]
at org.openhab.io.dropbox.internal.DropboxService$SynchronizationJob.execute(DropboxService.java:459) [222:org.openhab.io.dropbox:1.11.0.201710140109]
at org.quartz.core.JobRunShell.run(JobRunShell.java:202) [107:org.eclipse.smarthome.core.scheduler:0.9.0.201709260841]
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:573) [107:org.eclipse.smarthome.core.scheduler:0.9.0.201709260841]

I red something about a new API on some blog. Is this something I can do to fix that {“error”: “v1_retired”}?

Nope. As stated, the v1 api is retired. As in defunct, dead.

Changes will have to be made to the binding to make it work with the new api.

Thanks @namraccr, do you know what link we should follow to know when the new binding will be available? Is it you who maintain this binding?

Here’s the repository ticket to use to track the issue.

To the best of my knowledge, there’s no official “maintainer” of the binding.

Is the Dropbox binding usable, or retired. As in defunct, dead?

I also do not know what to put in contentdir and would appreciate a working example (minus the personalAccessToken).

Like already mentioned, it is due to the usage of the outdated API v1.

Today I quickly fixed this for my needs and compiled it into a new jar file. Thought I could share it here, if someone else wants to reuse it.

I only refactored LOCAL_TO_DROPBOX way and removed the bidirectional part, e.g. I dont ever wanted the binding to delete stuff on dropbox. Authentication was only tested with a personalAccessToken.

Furthermore I added the following option in the config file, because the binding could only import into the base directory of dropbox:

# The dropbox base directory for uploading the contentdir matches
dropboxdir=/openhab2

ah, and I also hardcoded to ignore *.sgv files because I got a lot of them flying around.

Have fun,

Regards

@Bernhard_Boser: contentdir points to the path, where the regexp should match. Default for openhabian is /etc/openhab2/

1 Like

@bennYx0x
Hi Benjamin,

it doesn´t work for me :frowning:
I used the personalAccessToken and i see that the authenticate-process ends successfully with written the personalAccessToken to authfile.dbx, but as soon the sync process starts it throws an error message
Error in call to API function "files/list_folder": This app is currently disabled.

Any idea?

Hey,

there seems to be a problem with your Dropbox developer app. That’s why your token is not valid.

Check your Dropbox app you created for this or just create a new one!

Cheers

I created two new apps but still same issue…

Sadly I can’t help you further, since it’s related to Dropbox…

The answer here (https://stackoverflow.com/questions/45275961/error-in-call-to-api-function-files-list-folder-this-app-is-currently-disa) states:

“In your case, this access token was no longer valid because the app that it is for is disabled. (That is, the developer either disabled the Dropbox API app from the Dropbox App Console, or the account that owns the app itself was disabled.)”

This is not so. Modifying the code appropriately would avoid this problem.

1 Like