Can't connect to myOpenHab (OH2) - socket not authorized

Hello,

I am trying to connect my PINE64 with openHab 2.0 to the myOpenHab for whole day and no luck - always getting error of “Socket.IO error: not authorize”.

Read multiple blogs about it, but there was no exact guide for OH2. Therefore I put the EXTERNAL security option and the netmask in runtime.cfg, pasted below.

More information below

Thank you for the help!


Installed myOpenHab via HABmin.

ifconfig
eth0 Link encap:Ethernet HWaddr 36:c9:e3:f1:b8:05
inet addr:192.168.1.201 Bcast:192.168.1.255 Mask:255.255.255.0

Java version:
Java™ SE Runtime Environment (build 1.8.0_101-b13)

Openhab UUID:
21a188e8-b904-4d5e-93cd-1408ac0c76e7

Error:

/opt/openhab/userdata/logs/openhab.log:2017-01-02 16:04:15.541 [ERROR] [o.myopenhab.internal.MyOpenHABClient] - Socket.IO error: not authorized

conf/services/runtime.cfg

org.eclipse.smarthome.security:option=EXTERNAL
org.eclipse.smarthome.security:netmask=192.168.1.0/24

Did you enter the correct UUID and secret no myOpenHAB? This message normally appears if at least one of these information does not fit.

I rechecked that many times, so it should be correct ones.

http://docs.openhab.org/addons/io/openhabcloud/readme.html

Not needed … you should remove it.

So do I need to install openHAB Cloud Connector manually? I thought installing myOpenHub bundle should do the trick :confused:

OK, removed the options.

DebugLog and settings in the myOpenHab

GNWPIJxoAAia HTTP/1.1: null}{myohversion: 2.0.0.b4}{openhabversion: 2.0.0}{secret: nTbx4jrjtH690BH3v0jG}{uuid: d2860c61-8e5f-4b83-8fc3-d83166392a3c}{User-Agent: Java/1.8.0_101}{Host: my.openhab.org}{Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2}{Connection: keep-alive}
2017-01-02 17:23:52.710 [DEBUG] [org.apache.http.wire                ] - << "        <modelURL>http://www.wdc.com/wdmycloud</modelURL>[\n]"
2017-01-02 17:23:52.728 [DEBUG] [org.apache.http.wire                ] - << "        <friendlyName>WDMyCloud</friendlyName>[\n]"
2017-01-02 17:23:52.729 [DEBUG] [org.apache.http.wire                ] - << "        <modelDescription>WD My Cloud</modelDescription>[\n]"
2017-01-02 17:23:52.731 [DEBUG] [org.apache.http.wire                ] - << "        <modelName>WDMyCloud</modelName>[\n]"
2017-01-02 17:23:53.016 [DEBUG] [org.apache.http.wire                ] - << "[0x9][0x9]<friendlyName>WDMyCloud</friendlyName>[\n]"
2017-01-02 17:23:53.039 [DEBUG] [org.apache.http.wire                ] - << "[0x9][0x9]<modelName>WDMyCloud</modelName>[\n]"
2017-01-02 17:23:53.040 [DEBUG] [org.apache.http.wire                ] - << "[0x9][0x9]<modelURL>http://www.wdc.com/wdmycloud</modelURL>[\n]"
2017-01-02 17:23:53.047 [DEBUG] [org.apache.http.wire                ] - << "[0x9][0x9]<modelDescription>WD My Cloud</modelDescription>[\n]"
2017-01-02 17:24:01.527 [DEBUG] [mpl.info.InfoBundleTrackerCustomizer] - Ignore incorrect info null provided by bundle org.openhab.io.myopenhab
2017-01-02 17:24:01.528 [INFO ] [g.apache.aries.spifly.dynamic.bundle] - Bundle Considered for SPI providers: org.openhab.io.myopenhab
2017-01-02 17:24:01.529 [INFO ] [g.apache.aries.spifly.dynamic.bundle] - No 'SPI-Provider' Manifest header. Skipping bundle: org.openhab.io.myopenhab
2017-01-02 17:24:01.622 [DEBUG] [io.socket.client.IO                 ] - new io instance for https://my.openhab.org:443/
2017-01-02 17:24:01.725 [DEBUG] [io.socket.client.Manager            ] - opening https://my.openhab.org:443/
2017-01-02 17:24:01.807 [DEBUG] [ngineio.client.transports.PollingXHR] - xhr open GET: https://my.openhab.org/socket.io/?EIO=3&transport=polling
2017-01-02 17:24:01.844 [DEBUG] [ngineio.client.transports.PollingXHR] - sending xhr with url https://my.openhab.org/socket.io/?EIO=3&transport=polling | data null
2017-01-02 17:24:02.443 [DEBUG] [.www.protocol.http.HttpURLConnection] - sun.net.www.MessageHeader@1052cad9 pairs: {GET /socket.io/?EIO=3&transport=polling HTTP/1.1: null}{myohversion: 2.0.0.b4}{openhabversion: 2.0.0}{secret: nTbx4jrjtH690BH3v0jG}{uuid: d2860c61-8e5f-4b83-8fc3-d83166392a3c}{User-Agent: Java/1.8.0_101}{Host: my.openhab.org}{Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2}{Connection: keep-alive}
2017-01-02 17:24:02.721 [DEBUG] [ngineio.client.transports.PollingXHR] - xhr open GET: https://my.openhab.org/socket.io/?EIO=3&transport=polling&sid=BCbA7cBjS868SoMHAAih
2017-01-02 17:24:02.724 [DEBUG] [ngineio.client.transports.PollingXHR] - sending xhr with url https://my.openhab.org/socket.io/?EIO=3&transport=polling&sid=BCbA7cBjS868SoMHAAih | data null
2017-01-02 17:24:02.967 [DEBUG] [.www.protocol.http.HttpURLConnection] - sun.net.www.MessageHeader@17b7ac19 pairs: {GET /socket.io/?EIO=3&transport=polling&sid=BCbA7cBjS868SoMHAAih HTTP/1.1: null}{myohversion: 2.0.0.b4}{openhabversion: 2.0.0}{secret: nTbx4jrjtH690BH3v0jG}{uuid: d2860c61-8e5f-4b83-8fc3-d83166392a3c}{User-Agent: Java/1.8.0_101}{Host: my.openhab.org}{Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2}{Connection: keep-alive}
2017-01-02 17:24:03.022 [ERROR] [o.myopenhab.internal.MyOpenHABClient] - Socket.IO error: not authorized
2017-01-02 17:24:03.025 [DEBUG] [ngineio.client.transports.PollingXHR] - xhr open GET: https://my.openhab.org/socket.io/?EIO=3&transport=polling&sid=BCbA7cBjS868SoMHAAih
2017-01-02 17:24:03.026 [DEBUG] [ngineio.client.transports.PollingXHR] - sending xhr with url https://my.openhab.org/socket.io/?EIO=3&transport=polling&sid=BCbA7cBjS868SoMHAAih | data null
2017-01-02 17:24:03.204 [DEBUG] [.www.protocol.http.HttpURLConnection] - sun.net.www.MessageHeader@9bbeef9 pairs: {GET /socket.io/?EIO=3&transport=polling&sid=BCbA7cBjS868SoMHAAih HTTP/1.1: null}{myohversion: 2.0.0.b4}{openhabversion: 2.0.0}{secret: nTbx4jrjtH690BH3v0jG}{uuid: d2860c61-8e5f-4b83-8fc3-d83166392a3c}{User-Agent: Java/1.8.0_101}{Host: my.openhab.org}{Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2}{Connection: keep-alive}

http://imgur.com/Ia3sxwj

No, you should install the cloud connector via PaperUI, if you are on openHAB2.
Don’t put anything in your addons folder, won’t work …

AND: remove the screenshot with your UUID and SECRET: all users are able to create an account and use your openHAB …

Catch is I don’t see cloud connection (under misc tab) so I can’t install it :confused: I have enabled to get list from remote repo.

And about the UUID and secret I posted deliberately just to show that they are correct - i will change them when everything will start working

You will need a newer snapshot build, does not work with older ones.

If you ARE on a recent snapshot try

misc = openhabcloud

in your addons.cfg

OK, i managed to get little bit further. Now I have the newest snapshot, and openhabcloud addon installed.

But my device is still offline with following log

2017-01-15 16:17:13.371 [DEBUG] [ngineio.client.transports.PollingXHR] - xhr poll
2017-01-15 16:17:13.372 [DEBUG] [ngineio.client.transports.PollingXHR] - xhr open GET: https://myopenhab.org/socket.io/?EIO=3&transport=polling
2017-01-15 16:17:13.373 [DEBUG] [ngineio.client.transports.PollingXHR] - sending xhr with url https://myopenhab.org/socket.io/?EIO=3&transport=polling | data null
2017-01-15 16:17:13.387 [DEBUG] [io.socket.engineio.client.Socket    ] - socket error io.socket.engineio.client.EngineIOException: xhr poll error
2017-01-15 16:17:13.388 [DEBUG] [io.socket.client.Manager            ] - connect_error
2017-01-15 16:17:13.388 [DEBUG] [io.socket.client.Manager            ] - cleanup
2017-01-15 16:17:13.393 [DEBUG] [io.socket.client.Manager            ] - reconnect attempt error
2017-01-15 16:17:13.395 [DEBUG] [io.socket.client.Manager            ] - will wait 2182ms before reconnect attempt
2017-01-15 16:17:13.396 [DEBUG] [io.socket.engineio.client.Socket    ] - socket close with reason: transport error
2017-01-15 16:17:13.397 [DEBUG] [t.engineio.client.transports.Polling] - transport not open - deferring close
2017-01-15 16:17:15.578 [DEBUG] [io.socket.client.Manager            ] - attempting reconnect
2017-01-15 16:17:15.579 [DEBUG] [io.socket.client.Manager            ] - readyState CLOSED
2017-01-15 16:17:15.580 [DEBUG] [io.socket.client.Manager            ] - opening https://myopenhab.org:443/
2017-01-15 16:17:15.581 [DEBUG] [io.socket.client.Manager            ] - connection attempt will timeout after 20000
2017-01-15 16:17:15.585 [DEBUG] [io.socket.engineio.client.Socket    ] - creating transport 'polling'
2017-01-15 16:17:15.586 [DEBUG] [io.socket.engineio.client.Socket    ] - setting transport polling
2017-01-15 16:17:15.587 [DEBUG] [t.engineio.client.transports.Polling] - polling
2017-01-15 16:17:15.588 [DEBUG] [ngineio.client.transports.PollingXHR] - xhr poll
2017-01-15 16:17:15.589 [DEBUG] [ngineio.client.transports.PollingXHR] - xhr open GET: https://myopenhab.org/socket.io/?EIO=3&transport=polling
2017-01-15 16:17:15.591 [DEBUG] [ngineio.client.transports.PollingXHR] - sending xhr with url https://myopenhab.org/socket.io/?EIO=3&transport=polling | data null
2017-01-15 16:17:15.606 [DEBUG] [io.socket.engineio.client.Socket    ] - socket error io.socket.engineio.client.EngineIOException: xhr poll error
2017-01-15 16:17:15.607 [DEBUG] [io.socket.client.Manager            ] - connect_error
2017-01-15 16:17:15.607 [DEBUG] [io.socket.client.Manager            ] - cleanup
2017-01-15 16:17:15.612 [DEBUG] [io.socket.client.Manager            ] - reconnect attempt error
2017-01-15 16:17:15.613 [DEBUG] [io.socket.client.Manager            ] - will wait 4794ms before reconnect attempt
2017-01-15 16:17:15.620 [DEBUG] [io.socket.engineio.client.Socket    ] - socket close with reason: transport error
2017-01-15 16:17:15.621 [DEBUG] [t.engineio.client.transports.Polling] - transport not open - deferring close

My java version is

openjdk version “1.8.0_111”
OpenJDK Runtime Environment (build 1.8.0_111-8u111-b14-2ubuntu0.16.04.2-b14)
OpenJDK 64-Bit Server VM (build 25.111-b14, mixed mode)

And UUID and secret are correct. Any idea what could be wrong?

Your device or your myopenhab cloud?
If your device is offline: you need to connect at least once remotely (f.e. turn off wifi) to have your device showing up in your cloud account.
If your cloud is still offline (no green “online” tab after logging in) there maybe something wrong with your config or install.

Please change to Oracle Java and try again.