Error while connecting to openHAB REST API


(Aaron) #1

Hi everyone

I have just moved OH from windows too RPI (I’m new to linux)

Im trying to get vs code back up and running i can edit the files but am not getting sugestions/help

I have mounted the openhabian SMB shares on my windows machine and changed vs code config file too point too the new server

VS CODE
USER SETTINGS

{
	"openhab.host": "192.168.0.94",
	"openhab.port": 8080,
	"git.ignoreMissingGitWarning": true
}

WORKSPACE SETTINGS

{
	"folders": [
		{
			"path": "."
		},
		{
			"path": "Z:\\"
		}
	],
	"settings": {}
}

Any help appreciated


(Vincent Regaud) #2

Try "openhab.port": 5007,
That’s the language server port


(Udo Hartmann) #3

Please, no :slight_smile:

{
    "openhab.host": "openhabianpi",
    "openhab.karafCommand": "ssh openhab@%openhabhost% -p 8101",
    "openhab.lspEnabled": true,
    "openhab.lspPort": 5007,
    "openhab.paperInBrowser": false,
    "openhab.paperPath": "paperui",
    "openhab.password": "",
    "openhab.port": 8080,
    "openhab.restCompletions": true,
    "openhab.sitemapPreviewUI": "basicui",
    "openhab.useRestApi": false,
    "openhab.username": ""
}

These are the default settings for the openHAB extension. You will have to switch openhab.useRestApi to true and of course change the openhab.host to the correct one.


(Aaron) #4

When I first setup my system on Windows the recommended settings were the ones I used and posted?


(Aaron) #5

should i also change the user name and password seems too work without


(Udo Hartmann) #6

I’m pretty sure that by default there is no username nor a password set in openHAB2


(Aaron) #7

Thanks for your help appreciate it