openHAB Cloud Private server and Alexa App - not finding devices

Hi All,

It all started when i tried to integrate IFTT to my openhab installation, however after an afternoon trying to understand why i am not managing to expose my items, i finally found an article saying that exposing items was disabled a while ago…

I then decided to setup my own openHAB Cloud server and that was fine… Its online and i can log in, check events, access rest (once authenticated) etc… so i know that is fine (well… i hope it is)

Then hurdle no2 came - trying to get alexa to work, I semi managed and i can login using OAuth2 with the below settings:

Auth uri: https://openhab.*************.com/oauth2/authorize/
Access Token URI: https://openhab.*************.com/oauth2/token
Client ID: myown
Redirect URL: https://openhab.*************.com/oauth2/token

OAuth was enabled by using Pedro Garcia’s script below:

Once i Enable and link the skill
I get the below and allow it.

Alexa then confims that openHAB has been successfully linked!

The issue is that it doesnt find anything!!

I am still using the V2 tags but the same tags work fine when i use the official alexa app with

sample of item file below:

I have checked that the config.js is configured correctly and pointing to my rest url etc…

I am honestly lost, so any help would be greatly appreciated!

Have you gone through the troubleshooting guide?

You can also checked the Lambda function logs, by setting the environment variable LOG_LEVEL = info on that function, to see what the skill is doing when you are making discovery requests.

Yes i did check the troubleshooting guide but didn’t help :frowning:

Could very well be something from lambda as that bit i was not sure of while setting up!
I tried following THIS guide but seems to be outdated as it was referring to an env file and also to “node_modules/node-lambda/bin/node-lambda deploy” but both are not available on the latest version.

Then I just followed the official one on the github page

Will check how to enable Log_level = Info and check it out

Thanks :slight_smile:

The only guide to follow in order to properly deploy the latest Alexa skill is the official one. Any previous guides, unless updated recently, should be discarded. Hopefully, you cleaned up your environment after following the outdated guidelines.

Stupid question… from where does one enable to Log_level=Info ?

Some more info regarding my setup:

  • OpenhabCloud is behind a nginx reverse proxy (not sure if it makes any kind of difference)

  • Currently my config.js only has the baseURL configured. I am assuming that i do not need the user/pass as i am using oAuth. correct?

answered my own

I must be missing something very obvious.

I have now tried linking the skill with the official
Managed to enable the skill, however it still does not find any devices. When i tried the official app, everything works fine!

Super confused and I really wish to run my own cloud so that i can expose items to IFTT.

ANY pointers would be greatly apriciated.


Final update for today… a step in the right direction but even more confusing!

Please excuse me for the amount of posts but i am trying to be a precise as possible with the info and troubleshooting.

I created a DiscoverDeviceTest on the Lambda function and realized that it was failing and marking it as unauthenticated! Following this, i then enabled basic authentication that seemed to have connected and is now seeing rest. The confusing bit is that the test is successful as per below:

  "header": {
    "messageId": "F8752B11-69BB-4246-B923-3BFB27C06C7D",
    "name": "DiscoverAppliancesResponse",
    "namespace": "Alexa.ConnectedHome.Discovery",
    "payloadVersion": "2"
  "payload": {
    "discoveredAppliances": [
        "actions": [
        "applianceTypes": [
        "applianceId": "Study_Balcony_Lights",
        "manufacturerName": "openHAB",
        "modelName": "Switchable",
        "version": "2",
        "friendlyName": "Balcony",
        "friendlyDescription": "Switch Study_Balcony_Lights Switchable via openHAB",
        "isReachable": true,
        "additionalApplianceDetails": {
          "itemType": "Switch",
          "itemTag": "Switchable",
          "openhabVersion": "2"
        "actions": [
        "applianceTypes": [
        "applianceId": "Study_Bathroom_Lights",
        "manufacturerName": "openHAB",
        "modelName": "Lighting",
        "version": "2",
        "friendlyName": "Bathroom",
        "friendlyDescription": "Switch Study_Bathroom_Lights Lighting via openHAB",
        "isReachable": true,
        "additionalApplianceDetails": {
          "itemType": "Switch",
          "itemTag": "Lighting",
          "openhabVersion": "2"

and below LOG:

START RequestId: 8d0e542d-d9a0-4c45-b932-cf10b1cef36c Version: $LATEST
2020-04-16T00:15:54.383Z	8d0e542d-d9a0-4c45-b932-cf10b1cef36c	INFO	INFO: Input: {"header":{"messageId":"F8752B11-69BB-4246-B923-3BFB27C06C7D","name":"DiscoverAppliancesRequest","namespace":"Alexa.ConnectedHome.Discovery","payloadVersion":"2"},"payload":{"accessToken":"1"}}
2020-04-16T00:15:55.030Z	8d0e542d-d9a0-4c45-b932-cf10b1cef36c	INFO	DEBUG: Data: {"items":[{"editable":false,"type":"Switch","name":"Study_Balcony_Lights","label":"Balcony","tags":["Switchable"],"groupNames":["gStudy"]},{"editable":false,"type":"Switch","name":"Study_Main_Lights","label":"Study","tags":["LightSwitch"],"groupNames":["gStudy"]},{"editable":false,"type":"Switch","name":"Study_Bathroom_Lights","label":"Bathroom","tags":["Lighting"],"groupNames":["gStudy"]}]}
2020-04-16T00:15:55.030Z	8d0e542d-d9a0-4c45-b932-cf10b1cef36c	INFO	DEBUG: Discovery adding Study_Balcony_Lights with tag: Switchable
2020-04-16T00:15:55.030Z	8d0e542d-d9a0-4c45-b932-cf10b1cef36c	INFO	DEBUG: Discovery adding Study_Bathroom_Lights with tag: Lighting
2020-04-16T00:15:55.030Z	8d0e542d-d9a0-4c45-b932-cf10b1cef36c	INFO	INFO: Response: {"header":{"messageId":"F8752B11-69BB-4246-B923-3BFB27C06C7D","name":"DiscoverAppliancesResponse","namespace":"Alexa.ConnectedHome.Discovery","payloadVersion":"2"},"payload":{"discoveredAppliances":[{"actions":["turnOn","turnOff"],"applianceTypes":["SWITCH"],"applianceId":"Study_Balcony_Lights","manufacturerName":"openHAB","modelName":"Switchable","version":"2","friendlyName":"Balcony","friendlyDescription":"Switch Study_Balcony_Lights Switchable via openHAB","isReachable":true,"additionalApplianceDetails":{"itemType":"Switch","itemTag":"Switchable","openhabVersion":"2"}},{"actions":["turnOn","turnOff"],"applianceTypes":["LIGHT"],"applianceId":"Study_Bathroom_Lights","manufacturerName":"openHAB","modelName":"Lighting","version":"2","friendlyName":"Bathroom","friendlyDescription":"Switch Study_Bathroom_Lights Lighting via openHAB","isReachable":true,"additionalApplianceDetails":{"itemType":"Switch","itemTag":"Lighting","openhabVersion":"2"}}]}}
END RequestId: 8d0e542d-d9a0-4c45-b932-cf10b1cef36c
REPORT RequestId: 8d0e542d-d9a0-4c45-b932-cf10b1cef36c	Duration: 648.61 ms	Billed Duration: 700 ms	Memory Size: 128 MB	Max Memory Used: 95 MB	

i have removed all my items, just in case any one of them is stopping the alexa scan to pick them up and only left the 3 below (with experimental tags)

Switch	Study_Main_Lights		"Study"		<light>		(gStudy)	[ "LightSwitch" ]	{channel="openwebnet:bus_on_off_switch:71e7c0bd:Study_Main_Lights:switch"}
Switch	Study_Balcony_Lights	"Balcony"	<light>		(gStudy)	[ "Switchable" ]	{channel="openwebnet:bus_on_off_switch:71e7c0bd:Study_Balcony_Lights:switch"}
Switch	Study_Bathroom_Lights	"Bathroom"	<switch>	(gStudy)	[ "Lighting" ]		{channel="openwebnet:bus_on_off_switch:71e7c0bd:Study_Bathroom_Lights:switch"}

Having said that, i never had an issue finding devices with the official alexa app and

Any pointers as there to where i should look?

Was that in the documentation? I thought it needed a direct connection.

I followed this:

There is no mention of a reverse proxy there. Just using Nginx as a web server.

Those instructions are 3 years old, prior to the current version. Did you check to see if changes to the process were needed?

true its just acting as a proxy as its exposing 443 not 3000.

I did check but the only change was this bit:

location /staff/js-plugin {
    alias /home/ubuntu/openhabcloud/public/js-plugin;

and this

#error_page 404 /404.html;

# redirect server error pages to the static page /50x.html
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;

Can you see discovery requests coming in your Lambda function from the skill?

Not sure how to check that, but as soon as I run a discovery, my web server is not being hit. No logs on firewall and/or web server
When I run a lambda discovery test I can see the request and packets come in.

the trigger on the lambda is pointing to the correct skill/app

Your local test is showing that the communication between the function and your server is working. I am asking you to confirm that the communication between the skill and the Lambda function. It should show the same way in your Lambda logs however not triggered by your local test.

If you don’t see these requests, this means that the skill isn’t pointing to your Lambda function, probably because you have multiple skills created on your account from the previous setup you did.

Hi Jeremy,

I had absolutely no remaining skill or lambda functions as i cleared them several times. I confirmed that all links where fine etc…


I just tried deploying it on nvirginia instead of Ireland and its working PERFECTLY!!! :slight_smile: :slight_smile:

I still have no clue why, but as long as its working fine im happy :slight_smile:

I forgot that part. I assumed you were located in the US.

The region restriction is actually documented.

That is exactly why i got confused, as i am in Europe (Malta) and therefore i chose the eu-west-1 initially as per documentation.

Initially i was using En UK as a language, now using US

I see I somehow read the opposite. Most likely your Amazon account language is English (US).

Going back to the local testing you did previously, it is normal that authentication doesn’t work since the skill provides the auth token. You shouldn’t need to enable basic authentication if you setup your cloud connector properly.