Home Assistant Community Add-on: Visual Studio Code

VSC is not really well documented :frowning:

OK, it seems I am ages behind the newest version
still I don’t know why it never got updated itself :wink:
now it is ok

Same issue here. No updates done. I did uninstall it to reinstall it afterwards hoping to get new version. Now VSCode plugin is no longer there. Any help appretiated. What am I missing?

Home Assistant Core 2022.6.1
Home Assistant Supervisor 2022.05.3
Home Assistant OS 8.1

Note to future self. I added " Home Assistant Community Add-ons" via the git link.

:wave:t3: I work for Coder (code-server) and am starting to get more serious about my homelab and home-assistant setup. Very exciting to see the usage here :slight_smile:

@frenck and others - are features you’d like to see provided by a “code-server v2”? For example:

  • connect from local VS Code over SSH tunnel
  • full Desktop environment and VNC
  • connect with web/local JetBrains over SSH tunnel
  • support for port proxy
  • armv7 support (Raspberry Pi OS)

We are working on a new open source project, and I want to make sure it works well with homelab/home-assistant environments. I see many questions were around extension support. We recently migrated to open-vsx.org which should have fixed many issues, but I can help if there is anything serious you are still running into.

1 Like

I thought I was going nuts with this too; however, the fix is easy. You have to add the GitHub - hassio-addons/repository: Home Assistant Community Add-ons to your repository list. click the … at the upper right and click repository. then add the above link.

How do i fix the “is accessed over an insecure domain” problem? I’m using NabuCasa, never had this problem when using my on external access.
I also get this error when working on my local lan.

Hi, I’ve got an issue with Studio Code Server, it works fine using internal IP, but once accessing it from the outside world via reverse proxy, I get this error :
“An unexpected error occurred that requires a reload of this page.
The workbench failed to connect to the server (Error: Time limit reached)”

My setup is a Home Assistant OS running as a VM in Hyper-V (downloaded the official image from the official HA website).
Configured my reverse proxy server (Apache2) to route requests to home.mydomain.fr port 443 to myhaserver.localdomain.fr:8123.
My reverse proxy server is another VM, it doesn’t run on the same VM than HA.

From the outside world, I can access my HA setup using https:// home .mydomain .fr, everything is working fine except Studio Code Server.

I have read this read and searched for reverse proxy, but each time it seems the issue is not answered.

What am I missing to get it working ? Thanks

2 Likes

is there a way to install platformio extension? in the marketplace extension is not visible, maybe not compatible?

Hi guys, I have an error message in Visual Studio Server Adon. I use it for esphome. When I embed images or fonts, then there is an error message.

image:
    ## header
    # Line 1
  - file: "images/36/powerplug.png"
    id: im_powerplug
    type: TRANSPARENT_BINARY

Error:
Please install the pillow python package to use this feature. (pip install pillow).

  • file: images/warning.png
    id: im_warning
    type: TRANSPARENT_BINARY

Any idea?

Cheers Gabriel

Hi,

after updating to HA to 2022.8.0 VSC doesn’t work anymore for me. If I select VSC from the side panel it doesn’t open anymore. I have uninstalled it and tried to install it again and now I get

Any idea what I can do about this?

Thank you!

I’m running HA OS 2022.8.0 and I just installed and could open the web browser.
Are you also run HA OS?

Hi,
yes. I am on HA OS 2022.8.0. After several retries it started now… strange… Maybe something got wrong with my setup because in other add-ons if I try to same the config of that add-on I get a message that it couldn’t be saved and I have to look into supervisor log…

Back to VSC it starts, alt least almost every time

Thank you!

Using this add-on for a while but one issue at the moment, i always had colors in the code for good readability but that is not working any more.

The file is recognised as homeassistant so thans good, but all code is black. Only indents have colors.
Is there a way to get this back? I already removed the add-on and reinstalled it but that didn’t solve it.

I too am having an issue launching/running VSC after upgraded my HA install to 2022.8.7 (Supervisor 2022.8.5, OS 8.5) - I am running in a VM if it makes a difference.

After HA update VSC wouldn’t load after selecting from the side bar. I uninstalled via HACS and attempted a reinstall via HACS and received the following message.Capture

I have attempted a reboot and still no luck?

It appears you are using docker (as am I). As I am using a docker on RPI, that is completely unsupported for the add-on if used on the rpi, in that case it needs to be the ha os. In your case since you HA is running on a vm, I would think the docker situation in your case would not be a roadblock. Ugh!

It is puzzling as I have been using VSC for over a year and it just now broke with the latest HA update? Maybe the next update will allow it to work again?

i only had 1gb allocated to my VM when i was testing a few things and this addon would cause HA to lock up within a minute or two. i bumped it to 2gb and haven’t had an issue again.

It seems that there is currently a memory leak. It seems to start when I switch to the VSCode tab, and it continues until HA locks up.
I have to reboot to prevent HA totally locking up.

Here is a graph of memory use after opening VSCode.
CPU use graph is similar to memory.
image

The add-on worked before for me. It has been some time since I last used it.
Some update to HA or HA OS must have broken it?

EDIT: I found the cause for this. I had opened the root directory / in VSCode. And I just realised all my problems started after doing that.

So I opened the VSCode tab and opened the /config folder. I checked the memory and CPU and they were racing up again like I expected. I then quickly rebooted HA before it locked up.

After reboot, I tried the VSCode tab again, and it opened in the /config directory now by default. I switched back and forth on the tabs, and checked memory use. This time, It stays under 20% at all times.

So, TLDR: don’t open the root folder / with this add-on for now, or you get a real hot and unresponsive Raspberry Pi. If you use an SD card, all that swapping can destroy it as well.

2 Likes

Hm…Not here…
Running latest HA on Synology’s VM, 4GB of RAM assigned, 20-30% used. Running VSC makes no difference.
How on earth did you manage to open root? My “root” (that is highest ) folder is /config. I can’t go any higher than that (don’t need to also…).