My.openhab not working

Hi there,

I’m a newbie to all this, so please pardon in case I’ve made some stupid mistake :).

I have installed my.openhab on my home server and accessing it via the iOS and android application when having Wifi enabled is working just fine.
However, when trying to access it remotely via my.openhab, I’m always receiving some “Error - Request timed out” message instead of the frontend. It had been working before, so I have absolutely no clue what might be the problem right now.
What has never been working though is lining up the items in my.openhab. When setting up openhab, I’ve had the default persistence set to mysql in openhab.cfg and have also placed a mysql.persist in the persistence folder. After realizing my items weren’t shown after logging into my.openhab, I’ve moved the mysql.persistence out of the persistence configurations folder and only kept the myopenhab.persist in there. I’ve also switched back the default persistence to rrd4j in openhab.cfg. I’ve not had any success though as my items are still not shown after logging into my.openhab - regardless of if I’m trying to access them via IFTTT or logging into my.openhab on my laptop - Nothing.
security:option=EXTERNAL in openhab.cfg is still set. I’ve used “https://my.openhab.org” as remote address in the iOS openhab application and entered username and password correctly - I’m sure about that as this login data is also working well when accessing via the website. I also have some items defined already and (as written above) I can access them when Wifi is activated via the openhab app - It just doesn’t work from remote and my items aren’t shown when logging in on the website.

Do some of you guys happen to have any idea what to look into in order to get this solved?

Any help would be really appreciated as I’d like to check out IFTTT with openhab and would therefore really like to have this working. in case you need any more information from my end, please let me know.

thanks a lot in advance!

best regards

If you haven’t already, upgrade your Java to the latest Oracle Java 1.8.0_101.

Without the correct cert trust relationship which is why you need to upgrade your Java, your openHAB instance cannot talk with the my.openhab servers so none of your Items will show up.

You can have multiple .persist files and use multiple .persist strategies. See:

The big question is what is in your myopenhab.persist file? You have to define which Items get shared with my.openhab in there.

It’s the same issue. Without the trusted cert which comes with the new Java your openHAB instance cannot talk to my.openhab.

Many thanks, rlkoshak!
I’ve not had a look into the email account for a couple of days, but now found a message from my.openhab suggesting this approach for having the service working properly also with their new letsencrypt certificates. upgrading java did indeed do the trick here and I’m now able to access my openhab via remote URL again. When checking my.openhab in the web browser, I can also see that my openhab instance is confirmed online. Unfortunately, there’re still no items shown though :frowning:

As requested, this is the content of my myopenhab.persist file:

 Strategies {
     default = everyChange
 }
 Items {
     gEG* : strategy = everyChange
 }

As far as I understand, there’re no exlusions of items of any kind, so there should be something shown up? I’ve also initiated a couple of state changes for my Hue- and Sonos items, but those also aren’t logged in my.openhab.
Furthermore, I’ve now set “myopenhab” as default persistence in openhab.cfg and myopenhab.persist is the only persistence file present in the persistence folder.
This is the relevant part in my openhab.cfg:

folder:items=10,items
folder:sitemaps=10,sitemap
folder:rules=10,rules
folder:scripts=10,script
folder:persistence=10,persist
# configures the security options. The following values are valid:
# ON = security is switched on generally
# OFF = security is switched off generally
# EXTERNAL = security is switched on for external requests
#            (e.g. originating from the Internet) only
# (optional, defaults to 'OFF')
security:option=EXTERNAL
# the Netmask to define a range of internal IP-Addresses which doesn't require
# authorization (optional, defaults to '192.168.1.0/24')
security:netmask=192.168.178.0/24
# The name of the default persistence service to use
persistence:default=myopenhab

Many thanks again!!

Only if you have Items that are members of the gEG group.

Yes, I do. This has been one of my attempts to get something to see (trying to specify a group). I’ve now reverted this to

Strategies {
default = everyChange
}
Items {
* : strategy = everyChange
}

I’ve then restarted the openhab service, switched a hue lamp on and off and changed the dimmer a bit and then re-loaded my.openhab. it tells me about openhab having been offline and that it’s now back up again, but still no items are lined up. Actually, the items are indeed shown up when visiting https://my.openhab.org/rest/items, so I cannot imagine what might be the problem in also showing them on the website and why I still cannot select them via IFTTT. Do you happen to have any further ideas about where to dig?

Many thanks again for your support - That’s highly appreciated.

Best regards

The way my.openhab exposes your Items in that list is separate from how it exposes the REST stuff (i.e. sitemap and /rest/items). To get your Items up to my.openhab so they can be commanded to/from IFTTT one must add those Items to the myopenhab.persist file and the my.openhab binding sends the commands and updates to the server. To access your Items over the REST API, including the sitemap works by the my.openhab binding talking to openHAB through the REST API. This is why you need to set your security to EXTERNAL. the my.openhab binding doesn’t have a way to supply a username and password to your openHAB REST API.

So it not only makes sense that this sort of error could occur (i.e. you can access the REST stuff but not see the Items in my.openhab) but it is enlightening because it means that the connection between your OH server and my.openhab is working. The problem lies with the persistence part.

I’ve been trying to help others with this problem and am starting to wonder if there might be a bug somewhere.

Thanks! I’ve now updated my myopenhab.persist as following:

Strategies {
    default = everyChange
}
Items {
    Sonos_Bathroom_Power : strategy = everyChange
    Licht_EG_Wohnzimmer_IrisRe_RGB : strategy = everyChange
}

As a precaution, here’s also the corresponding items:

Switch Sonos_Bathroom_Power             "Ein/Aus"                             <power>            {sonos="[ON:bathroom:play], [OFF:bathroom:stop]" }
Color Licht_EG_Wohnzimmer_IrisRe_RGB            "Farbe"                                    (Licht_EG_Wohnzimmer_IrisRe) { hue="2" }

I’ve then restarted the OH service, activated and deactivated my Hue lamp, changed the color, etc… Still, nothing shows up in the list when checking on https://my.openhab.org/items.

I can confirm the connection between OH and my.openhab working fine after having upgraded my JDK. I can now control OH via my.openhab also when using a mobile connection rather than Wifi and on ttps://my.openhab.org my OH instance is reported online. So, I’d agree that the connection is working fine, but the problem resides somewhere in the persistence part. Now I’m wondering what to do in order to get this running…

Hey rich,
I am facing a problem.
I am running openhab on my raspberry pi 3.
I have set it up to auto start after reboot.
When I access it through my browser it is working perfectly, it is showing error on my ios app.

It shows ‘connecting to discoverd URL’ and then shows
’could not connect to the server’.

And also unable to get online on my openhab
Many thnx in advance for your help.

It would be better to post this as a new thread rather than hijacking this one.

The quick things to check are that you are using the proper URL in your iOS app.