Home Assistant Community Add-on: Visual Studio Code

:tada: Release v1.2.3

Full Changelog

This is a general maintenance release.

:hammer: Changes

  • :hammer:Disable update notification (#75)
  • :arrow_up: Upgrades code-server to 2.1698

Questions? Join our Discord server! https://discord.me/hassioaddons
Enjoying my add-ons? Consider supporting my work:
https://github.com/sponsors/frenck or https://patreon.com/frenck

Hi, I have a question. I recently (yesterday) started to use a nginx reversed proxy following this guide: https://selfhostedhome.com/reverse-proxy-with-https-without-opening-ports/. Everything seems to work fine, only the vscode plugin is not working when using my secure home url. When accessing it via Nabu Casa everything is oke. This is what te logs show:

[21:24:26] INFO: Starting NGinx...
[02/Feb/2020:21:24:29 +0100] 101 127.0.0.1, 172.23.64.1(172.23.64.2) GET /?reconnectionToken=xxxxxxxxxxxxxxxxxxxxxxx&reconnection=true&skipWebSocketFrames=false HTTP/1.1 (Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.130 Safari/537.36)
[02/Feb/2020:21:32:17 +0100] 200 127.0.0.1, 172.23.64.1.1(172.23.64.2) GET / HTTP/1.1 (Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.130 Safari/537.36)
[02/Feb/2020:21:32:18 +0100] 200 127.0.0.1, 172.23.64.1172.23.64.2) GET /vscode-remote-resource?path=/drone/src/build/code-server2.1698-vsc1.41.1-linux-x86_64-built/extensions/theme-defaults/themes/dark_plus.json&tkn= HTTP/1.1 (Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.130 Safari/537.36)

Any ideas how to fix it?

You need to follow these instructions: https://www.home-assistant.io/docs/ecosystem/nginx_subdomain/

Just to let you know, the last configuration snippet contains a mistake. I opened a PR here: https://github.com/home-assistant/home-assistant.io/pull/11974 -> It has been merged!

Hi folks
I am currently in the process of moving to an new installation of Home Assistant (old Hass.io) from an installation of Core on docker. (Hope I got the new term right) . and I am having some issue with this add-on

In my Supervisor (Hass.io) System Log i have multiple instances of this error message:
20-02-05 19:54:30 INFO (MainThread) [hassio.api.proxy] Home Assistant WebSocket API request initialize
20-02-05 19:54:30 INFO (MainThread) [hassio.api.proxy] WebSocket access from a0d7b954_vscode
20-02-05 19:54:30 ERROR (MainThread) [hassio.api.proxy] Client error on WebSocket API Cannot connect to host 172.30.32.1:8123 ssl:False [Connection refused].

My configuration looks like this:

ssl: false
certfile: fullchain.pem
keyfile: privkey.pem
packages: []
init_commands: []
disable_telemetry: false

I donā€™t have any SSL certificates installed and not knowing exactly where to start, I would almost prefer not to use them unless there is a compelling case for it. I will plan to use the Remote UI to connect, so ports would not be exposed. Thanks

@frenck Hi and thanks for the great addon, I love it! But Iā€™m having some strange problems with extensions in VScode and hope you or someone can help me out.

First: when I click on any extension nothing shows up in the ā€œDetailsā€:

Itā€™s the same for all extensions, installed or not.

Second: I need an extension called ā€œVimā€ which emulates the Vim editor in VSCode. I really need this extension, and it used to work perfectly in the VSCode addon. But then, Iā€™m not sure when exactly, might have been around v1.0 or v1.2 of the addon, at some point the extension basically just stopped working. Well, that is, if I disable the extension, and re-enable it, and reload VSCode, it works. But the next time I load VSCode it stops working. In the VSCode status bar at the bottom it says ā€œActivating Extensionsā€, but after a few seconds the message disapppears, and the extension isnā€™t working. No error messages, no nothing.

I havenā€™t been able to figure out why this happens.
Iā€™ve ran the ā€˜reset-settingsā€™ script in the container, Iā€™ve uninstalled and installed a fresh copy of the addon (most recently today) but no luck.

Thanks for any help in solving this!

1 Like

:tada: Release v2.0.0

Full Changelog

Major release time! :tada:

This is an exciting release, as this release adds support for aarch64 based systems.
E.g., running the 64 bits Home Assistant Operating System on a Raspberry Pi 4 or Hardkernel ODROID-N2! :astonished:

:warning: Please be aware, this add-on can be pretty heavy. On low memory devices (e.g., Raspberry Pi 4 with 1Gb of memory), I would still not recommend using this add-on.

Another visible thing is the rebranding of Home Assistant, which has been reflected on the add-on. The hassio command-line tool has been replaced by the newer and updated ha version. (Donā€™t worry, Iā€™ve added a backward-compatible layer with a warning if you still use the old command).

All extensions provided by the add-on, are now marked as ā€œbuiltinā€. This means they no longer show up in the extensions list. Other than that, it doesnā€™t change a thing. It makes future updates to the add-on easier.

Also added in this release: Hooking up with the official Mosquitto and MariaDB add-ons (if installed).

If you use the MQTT tools (mosquitto_pub or mosquitto_sub) from the terminal inside VSCode, they will automatically connect, authenticate and work with the Mosquitto core add-on. Allowing for easy debugging :+1:

For the mysql command-line tool, the same has been done. If you have installed the MariaDB add-on, running mysql from the command-line, drops you straight in!

:warning: Breaking change: Direct access to the add-on has been removed in favor of easier maintenance and Ingress. With Home Assistant now having Safe Mode, direct access has lost its importance.

:hammer: Changes

  • :arrow_up: Upgrades add-on base image to v5.0.0
  • :books: Update add-on documentation to use new YAML configuration format
  • :hammer: Re-branding
  • :hammer: Update add-on config with new password & list features
  • :hammer: Updates for upstream Supervisor changes
  • :books: Update add-on documentation to use new YAML configuration format
  • :fire: Remove direct access support
  • :arrow_up: Updates the Home Assistant CLI to v4.0.1
  • :pencil2: Fixes some typos
  • :fire: Remove unused dependencies
  • :ambulance: Fix broken semver link
  • :hammer: Install extensions from Marketplace, removes a stage layer
  • :sparkles: Adds aarch64 support
  • :rocket: Add aarch64 CI/build
  • :hammer: Mark delivered extensions as builtin
  • :hammer: Improve download if extensions during build
  • :shirt: Fixes linter warnings
  • :sparkles: Add hassio fallback command for backward compatibility
  • :sparkles: Add hook up with the MQTT service
  • :sparkles: Add hook up with the MySQL service
  • :shirt: Remove log spam about extensions during add-on start
  • :ambulance: Fix old extension cleanup
  • :pencil2: Corrects forum URL links

Questions? Join our Discord server! https://discord.me/hassioaddons
Enjoying my add-ons? Consider supporting my work:
https://github.com/sponsors/frenck or https://patreon.com/frenck

2 Likes

Thatā€™s awesome! Iā€™ve been hoping that ARM systems would eventually be added to this.

Now I just need to figure out how to switch my 32-bit Raspberry Pi install to 64-bit. (Iā€™m running on a Raspberry Pi 4 with 4GB of RAM using the Hass.IO Docker install). Anyone know if thereā€™s an easier way to switch than deleting everything under Docker and re-installing from scratch? (assuming I can restore a snapshot if I go that route)

Awesome thanks Frenck.

Is there away to stop the

ā€˜code-server is being accessed over an insecure domain. Some functionality may not work as expected.ā€™

dialog box coming up each time VSC starts?

Im using Nabu Casa and my config is

packages: []
init_commands: []
disable_telemetry: false
ssl: false
certfile: fullchain.pem
keyfile: privkey.pem
log_level: info
1 Like

Hi

Would a Raspberry Pi 4 with 4GB RAM be good enough to run this? Iā€™m more than prepared to upgrade just to get this plugin!

Iā€™m running it on a pi4 (4gb) and itā€™s working absolutely fine.

:tada: Release v2.1.0

Full Changelog

Relatively small update today, but with a major impact!

As it turned out, the nice little icons shown in the file tree (by the vscode-icons extension), is quite hard on memory and CPU usage and even has issues reported on memory leaks. These little icons cause major CPU spikes and make the add-on consume almost double the amount of memory. That is not nice, so for now, the icons are removed.

You can still install the vscode-icons extension yourself if you like :+1:

Furthermore, some other tweaks have been made, to improve performance and experience. For new installations (or if you reset your configuration), more folders and files are hidden by default and excluded from the search index of the add-on.

Finally, auto-completion for the Home Assistant CLI was missing in the previous release, which is now added back in. So if you type ha in the terminal and hit the TAB key twice, it will show you a selection of possibilities, including descriptions.

:hammer: Changes

  • :pencil2: Correct typo in README (#80)
  • :fire: Remove telemetry setting, disable by default
  • :sparkles: Adds Home Assistant CLI auto completion
  • :fire: Remove vscode icons extension, for memory & cpu issues
  • :hammer: Tune configuration for lower memory & CPU
  • :hammer: Reset icon set to vscode default

Questions? Join our Discord server! https://discord.me/hassioaddons
Enjoying my add-ons? Consider supporting my work:
https://github.com/sponsors/frenck or https://patreon.com/frenck

1 Like

The big thing this week, is btw the VSCode for ARM devices :grinning:

Youā€™ve made my day! Thanks @frenck !!!

1 Like

Has someone high CPU load when running this addon?

Could you provide some more extensive descriptions of your question and problem @joselito1?

Only way I can answer your question is: yes. Vscode is heavy,

From 7% to 40-50% on NUC. Just opened visual code, see a file and that was. But still after few hours same CPU load. When I stop addon, goes back to normal.
But before last few updates, CPU gone always to 100%.

Hi Franck

I am running Home Assistant beta 0.106, and my VSCode addon shows as up to date on version 1.2.3? Why wouldnā€™t it be showing version 2.1.0 as available?

Thanks Greg

Have you tried refreshing the store? I have 2.1.0

Yes I have tried refreshing the store, still showing 1.2.3. Thanks

refresh the store, and next check the supervisor logs for hints (supervisor -> system tab -> logs)

I am getting the following ERROR and WARNING in the log after rebooting.

20-02-24 09:30:59 ERROR (MainThread) [hassio.utils.json] Canā€™t read json from /data/addons/git/a0d7b954/home-panel/config.json: Expecting value: line 1 column 1 (char 0)
20-02-24 09:30:59 WARNING (MainThread) [hassio.store.data] Canā€™t read /data/addons/git/a0d7b954/home-panel/config.json from repository a0d7b954