[SOLVED] Trying to make the "Two OpenHAB instances, one Cloud account" exploit work

Hi, I’ve been using the Cloud Connector along with a couple of OpenHAB servers (mounted on RaspberryPis 4, os Openhabian) for the last couple of months, and I had no issues with it; recently, I decided to experiment with an exploit I found documented on some threads, such as: Expose items to cloud from 2 properties
Now I know that this is basically a Connector bug, and all users advice to use an MQTT satellite bus to join multiple OpenHAB instances. That’s besides the point: I want to explore the limitations of cloning UUIDs and Secrets and joining servers on the same OpenHAB Cloud account.
My experiments went fine, BUT I acknowledged this: every time I queried for, let’s say, Items through Cloud REST APIs, I would only get one set of Items from either OpenHAB server A or OpenHAB server B. This got me thinking that myOpenHAB does not actually store data, it just redirects REST API calls to its linked OpenHAB instance, and since I have two instances connected to the Cloud those calls were redirected to A or B randomically.
I also found threads talking about “exposing Items to Cloud” and “Cloud persistence”, though; they are a bit dated and links often result in 404 errors, but still they point to a solution where OpenHAB instances data are pushed and stored to the Cloud: if this is the case, the before-mentioned limitation could theoretically be overcome, granted you only query for Items and you don’t send commands. I did not undestand, however, if this function has been disabled for stability reasons.
So, which is it? Has anyone had experience with this exploit? Is the Cloud still able to store Items or is it a feature that was abandoned along the way?

Exposing Items to myopenhab was disabled months ago due to abuse overloading the servers. The solution is to use the code to set up your own server instance.

1 Like

@Bruce_Osborne ok, so, if I deploy my instance of the Cloud, Items will be queried from the Cloud directly and not from the single OpenHAB servers?

That is my understanding.

Thank you Bruce, I’ll try it and if I get results I’ll update this thread.

1 Like

It has been disabled because it was only ever intended to be used for IFTTT integration but far too many users erroneously, or in your case semi-maliciously (I’m not saying what you are talking about is bad, but it definitely has a negative effect for the rest of us), expose all of their Items which overloaded the servers resulting in lots and lots of downtime for all users.

I’m not sure if the feature is permanently turned off or if we are just waiting for the devs to find a solution to the problem.

But it’s also worth noting that there is no API exposed to you where you can access those Item events from the Cloud Servers. That API, as far as I know, is only accessible by IFTTT and the web service itself. So you would probably have to resort to web scraping to access the data.

I don’t think so unless you modify the cloud server software to but reenable the Item sharing and modify the API or create a new API that allows that sort of query. Ultimately it will require significant additions and changes to cloud server to enable this use case. It’s all open source so not impossible, but it’s not going to work out of the box.

1 Like

I understand @rlkoshak, thank you. I don’t think I’m skilled enough to pull off those kind of changes you mentioned, so I believe I reached a dead-end! It was fun to speculate though :slight_smile:

1 Like