openHAB VS Code Extension 0.3.5


(Matthias) #42

Thank you! So I will just wait for a solution …


(dbadia) #43

Thanks @kubawolanin Getting there, I did a complete uninstall/reinstall of VSC and I am able to see the proper options after Cntl +Shift + P for karaf, Search in Community… and Search in Docs.
Few more issues to work through though:

  1. Nothing happens after I choose either of the Search options. I got an hourglass for a second the first time. Should this open something inside of VS Code or an external browser?

  2. Alt + Shift + O still does not work for me, it brings up an @ in the top bar which below it says “No symbol information for the file”. Is there an equivalent menu option? Or provide the name of the command so I can look it up in my keybindings?

  3. how does one generate those gifs?
    https://github.com/openhab/openhab-vscode/raw/master/images/openhab-sitemap.gif
    Would like to add a few to the readme

For what it’s worth, other functions of the extension are working for me (karaf, code snippets, basic ui) so it seems like, in general, the extension is installed properly.

Thanks
Dave


(C R) #44

VS Code Extension is still not working for me and other users (see here) - is there anyone who can fix this issue? It’s blocking me to migrate to openhab2, since there is no working rule editor.

[Error - 23:25:47] Request textDocument/documentHighlight failed.
Message: Internal error, please look at the server’s logs.
Code: -32603
[Error - 23:25:48] Request textDocument/hover failed.
Message: Internal error, please look at the server’s logs.
Code: -32603


(Udo Hartmann) #45

Are you sure you did the correct configuration for both openHAB and VS Code (openHAB Plugin)?

VS Code works reliable to me (and others… :wink: ) since OH2.2 (nightly Version ~ #1183, don’t know the exact number), but I had to do the correct settings in VS Code (for the plugin).

I’m using openHAB2.3 at a vm, VS Code is installed on my Windows10 machine (but worked also under Windows 7) - I’m using a simple samba share to connect to openHAB, either unc or through the bound letter, makes no difference.


(Hallo Ween) #46

For me vs code works not always. After some time I get the error messages, too. There are also log entrys in oh log.

It works and a few minutes later no more validation. After restart of vs code, same as before.

So I think there is no misconfiguration, because at start it works some time.


(C R) #47

Hi,

I think the configuration is OK, in VS Code I have configured:
{
“openhab.host”: “192.168.1.102”,
“openhab.port”: 8080,
“openhab.sitemapPreviewUI”: “classicui”,
“openhab.lspEnabled”: true,
}

I am editing a rules file locally on my Win7 PC. openhab is running on my Raspberry Pi 3 (IP as shown above) with the LSP module enabled:

openhab> bundle:list | grep Language
138 â Active â 80 â 0.10.0.b1 â Eclipse SmartHome Language Server

VS Code seems to connect properly to openhab, since I can see error messages in openhab.log.

Is there anything else I should check?


(John Doe) #48

I am getting the same error message

[Error - 16:43:06] Request textDocument/hover failed.
Message: Internal error, please look at the server’s logs.
Code: -32603


(WJ) #49

I just started with VS code + OpenHAB extention 0.3.5
When I tried to access on my Windows 10 desktop config location:

\OPENHABIANPI\openHAB-share\openhab2-conf

it asked for a password (so far so good!).
To my surprise the required password was the default openHABIAN password “openhabian” and not “MySecretPW” password used.changed in all entries of openhabian-config :face_with_raised_eyebrow:

I am a bit worried! How to change this password also into something less obvious?


(SiHui) #50

(WJ) #51

Hi Sihui thanks for your reaction
I changed all default passwords in the OpenHabian menu, this is including samba.
I also just now tried with “sudo smbpasswd” and this is for some reason failing in the retype.

[12:05:47] openhabian@openHABianPi:~$ sudo smbpasswd
[sudo] password for openhabian:
New SMB password:
Retype new SMB password:
Failed to find entry for user root.

Just working with cut&paste :wink: any ideas?


(SiHui) #52

You are running your setup with root user instead of openhab user. Very bad idea regarding security.


(Udo Hartmann) #53

to change the smb password of user openhabian, you must not use sudo, but only
smbpasswd. This will change the samba password for the user, which did the command.


(WJ) #54

Hi @Udo_Hartmann, thanks, without the suggested sudo-command I was able to change the samba password and in the windows explorer this new password was required.

BTW still have the impression (but some beers could be confussing me) that inside the OpenHABian config tool a change off all passwords is not updating the samba password.