i am running Home assistant in Virtual machine in my synology NAS and have Visual Studio Code add on installed in my supervised Home assistant instance. Auto complete of entities is not working for my configuration. kindly guide on what settings should be done and kindly share your own snapshots.
packages: []
init_commands: []
log_level: info
following is the log when i start the add-on:
Please, share the above information when looking for help
or support in, e.g., GitHub, forums or the Discord chat.
-----------------------------------------------------------
[cont-init.d] 00-banner.sh: exited 0.
[cont-init.d] 01-log-level.sh: executing...
Log level is set to INFO
[cont-init.d] 01-log-level.sh: exited 0.
[cont-init.d] code-server.sh: executing...
[cont-init.d] code-server.sh: exited 0.
[cont-init.d] mosquitto.sh: executing...
[cont-init.d] mosquitto.sh: exited 0.
[cont-init.d] mysql.sh: executing...
[cont-init.d] mysql.sh: exited 0.
[cont-init.d] user.sh: executing...
[cont-init.d] user.sh: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
[11:15:59] INFO: Starting the code server...
[2021-09-07T07:16:05.204Z] info Wrote default config file to ~/.config/code-server/config.yaml
[2021-09-07T07:16:10.357Z] info code-server 3.11.1 c680aae973d83583e4a73dc0c422f44021f0140e
[2021-09-07T07:16:10.370Z] info Using user-data-dir /data/vscode
[2021-09-07T07:16:10.599Z] info Using config file ~/.config/code-server/config.yaml
[2021-09-07T07:16:10.602Z] info HTTP server listening on http://0.0.0.0:1337
[2021-09-07T07:16:10.603Z] info - Authentication is disabled
[2021-09-07T07:16:10.606Z] info - Not serving HTTPS
WARN No ptyHost heartbeat after 6 seconds
WARN [File Watcher (chokidar)] Error: Circular symlink detected: "/config/config" points to "/config"
Updated, cleared cache again, restarted… still not working…
[06:28:55] INFO: Starting the code server...
[2022-05-30T10:28:56.005Z] info Wrote default config file to ~/.config/code-server/config.yaml
[2022-05-30T10:28:56.313Z] info code-server 4.4.0 b088ec7adf9e17bc75215f79e21498eb40da03ed
[2022-05-30T10:28:56.314Z] info Using user-data-dir /data/vscode
[2022-05-30T10:28:56.323Z] info Using config file ~/.config/code-server/config.yaml
[2022-05-30T10:28:56.323Z] info HTTP server listening on http://0.0.0.0:1337/
[2022-05-30T10:28:56.323Z] info - Authentication is disabled
[2022-05-30T10:28:56.324Z] info - Not serving HTTPS
[06:29:05] Extension host agent started.
[06:29:05] [172.30.32.2][d69e1f78][ManagementConnection] Unknown reconnection token (never seen).
[06:29:25] [172.30.32.2][c3b5d7bc][ManagementConnection] New connection established.
[06:29:26] [172.30.32.2][38047a19][ExtensionHostConnection] New connection established.
[06:29:26] [172.30.32.2][38047a19][ExtensionHostConnection] <572> Launched Extension Host Process.
Error: Unexpected SIGPIPE
at process.<anonymous> (/usr/local/lib/code-server/lib/vscode/out/bootstrap.js:1:370)
at process.emit (node:events:527:28)
[06:30:41] [172.30.32.2][c3b5d7bc][ManagementConnection] The client has disconnected, will wait for reconnection 3h before disposing...
[06:30:51] [172.30.32.2][c3b5d7bc][ManagementConnection] Another client has connected, will shorten the wait for reconnection 5m before disposing...
[06:30:51] [172.30.32.2][c3b5d7bc][ManagementConnection] The client has reconnected.
[06:30:51] [172.30.32.2][38047a19][ExtensionHostConnection] The client has reconnected.
[06:33:26] [172.30.32.2][c3b5d7bc][ManagementConnection] The client has disconnected gracefully, so the connection will be disposed.
[06:33:26] [172.30.32.2][38047a19][ExtensionHostConnection] <572> Extension Host Process exited with code: 0, signal: null.
[06:33:28] [172.30.32.2][d9f545df][ManagementConnection] New connection established.
[06:33:29] [172.30.32.2][0c3ca09b][ExtensionHostConnection] New connection established.
[06:33:29] [172.30.32.2][0c3ca09b][ExtensionHostConnection] <644> Launched Extension Host Process.
Error: Unexpected SIGPIPE
at process.<anonymous> (/usr/local/lib/code-server/lib/vscode/out/bootstrap.js:1:370)
at process.emit (node:events:527:28)
[06:36:46] [172.30.32.2][d9f545df][ManagementConnection] The client has disconnected, will wait for reconnection 3h before disposing...
[06:36:57] [172.30.32.2][d9f545df][ManagementConnection] Another client has connected, will shorten the wait for reconnection 5m before disposing...
[06:36:57] [172.30.32.2][0c3ca09b][ExtensionHostConnection] The client has reconnected.
[06:36:58] [172.30.32.2][d9f545df][ManagementConnection] The client has reconnected.
[06:37:02] [172.30.32.2][d9f545df][ManagementConnection] The client has disconnected gracefully, so the connection will be disposed.
[06:37:02] [172.30.32.2][0c3ca09b][ExtensionHostConnection] <644> Extension Host Process exited with code: 0, signal: null.
[06:37:05] [172.30.32.2][ee7c2093][ManagementConnection] New connection established.
[06:37:06] [172.30.32.2][b6d55eb7][ExtensionHostConnection] New connection established.
[06:37:06] [172.30.32.2][b6d55eb7][ExtensionHostConnection] <722> Launched Extension Host Process.
[06:38:22] [172.30.32.2][ee7c2093][ManagementConnection] The client has disconnected gracefully, so the connection will be disposed.
[06:38:22] [172.30.32.2][b6d55eb7][ExtensionHostConnection] <722> Extension Host Process exited with code: 0, signal: null.
[06:39:19] [172.30.32.2][7809f71e][ManagementConnection] New connection established.
[06:39:20] Using the in-memory credential store as the operating system's credential store could not be accessed. Please see https://aka.ms/vscode-server-keyring on how to set this up. Details: Cannot find module '../build/Release/keytar.node'
Require stack:
- /usr/local/lib/code-server/lib/vscode/node_modules/keytar/lib/keytar.js
- /usr/local/lib/code-server/lib/vscode/out/bootstrap-amd.js
- /usr/local/lib/code-server/out/node/util.js
- /usr/local/lib/code-server/out/node/cli.js
- /usr/local/lib/code-server/out/node/entry.js
[06:39:21] [172.30.32.2][3fb0ec6a][ExtensionHostConnection] New connection established.
[06:39:21] [172.30.32.2][3fb0ec6a][ExtensionHostConnection] <790> Launched Extension Host Process.
[06:39:44] [172.30.32.2][7809f71e][ManagementConnection] The client has disconnected gracefully, so the connection will be disposed.
[06:39:44] [172.30.32.2][3fb0ec6a][ExtensionHostConnection] <790> Extension Host Process exited with code: 0, signal: null.
[06:39:48] [172.30.32.2][60ff2c59][ManagementConnection] New connection established.
[06:39:49] [172.30.32.2][0d2d3d58][ExtensionHostConnection] New connection established.
[06:39:49] [172.30.32.2][0d2d3d58][ExtensionHostConnection] <848> Launched Extension Host Process.
I’m having the same issue. I just did the Reset settings but it did not do it for me.
I uninstalled and installed it again. No auto complete and getting this warning:
Logger: homeassistant.components.http.ban
Source: components/http/ban.py:82
Integration: HTTP (documentation, issues)
First occurred: 9:02:00 AM (3 occurrences)
Last logged: 9:16:20 AM
Login attempt or request with invalid authentication from a0d7b954-vscode.local.hass.io (xxx.xxx.xx.xx). Requested URL: '/api/websocket'. (None)
Never used to get this. I re-read the installation, and states it should work out of box.
I went ahead and added the host url and token for my home assistant in the settings for Studio Code but still did not do it.
Now I have a fresh installation, a reset-settings done, and wanted to get some guidance before I keep messing with settings.
Another thing I noticed after updating Home Assistant also, is that my Studio code is very slow when I create new files, delete files, even rename files. When I make edits in files for the Frontend, it takes a while to get reflected in the UI, even when I save. I have to keep refreshing and after a while, I see the changes.
Not sure if all this is related, but it happened after I upgraded my installations.
Edit: The solution I mentioned below seems to enable the “normal” auto-complete feature from Visual Studio Code. However, you will lose a lot of useful features from the Home Assistant Extension. I eventually managed to make the extension work by configuring it manually (this shouldn’t be necessary, but it worked for me). Maybe this will also work for you @Haze?
Create a long-lived access token in Home Assistant and copy this token.
Open the Home Assistant Config Helper extension in the marketplace.
Click on the settings cog/wheel.
Click on “Extension Settings”.
Perform the following steps for the User, Remote, and Workspace tabs
Enter the “Host URL”.
Enable or Disable “Ignore Certificates” depending on your setup.
Enter the “Long Lived Access Token” created in step 1.
I also experienced issues with autocomplete, even though I didn’t have the exact same error code. I tried reinstalling the addon and resetting it in the terminal, but the autocomplete function still didn’t work after that. However, I did find a solution that fixed the autocomplete issue for me which I haven’t seen mentioned anywhere else, so maybe this will help someone else.
Open the Visual Studio Code editor.
Click on Extensions on the left menu bar (Ctrl + Shift + X).
Search for the “Home Assistant Config Helper” extension.
Disable the extension if it’s installed and press the button “Reload Required”.
The solution seems counterintuitive but when I re-enable the Home Assistant Config Helper extension the autocomplete immediately stops working again. I’m not sure if I’ve tried installing the Home Assistant Config Helper extension manually in the past and this caused a clash with the Visual Studio Code Add-on, as this seems to use a built in version of the extension.