Home Assistant Community Add-on: Visual Studio Code

If you’re using the native client on your machine, you wouldn’t need this add-on. You would want to use the Samba add-on to access your files instead.

Okay, I generally use VSC but I run it on a workstation accessing by HA config (via Samba) on an RPi 4 (4GB) it is set up with Rasbian Buster with an SSD

To use this addon - I apparently I need a 64bit OS (Raspbian Buster is only 32bit) what OS should I be using ?

Preferably one I can write to SD, boot, access via ssh (ie run headless) to copy the files system to the SSD and mount the SSD as root as per the recommended method until RPF can sort the EFT out and get a 64bit OS booting from USB

Any ideas anyone ?

If you are already running VSC on a workstation then you don’t need this add-on… I’m a little confused by your post to be honest

I get you but if I can run this (like it says in the thread (and I’ve heard you say also)) on an arm processor but only if running a 64 bit OS, then ‘someone must have’ or am I missing something.?
If I can run it on the pi then I can access it remotely and edit/adapt/code from a remote interface.
Everyone is able to run samba even if you connect via a nfs so what is the point generally with this addon ? It must be because a) it couples to an instance b) you can use remote access

Again, I may be missing something :man_shrugging:

I haven’t run HA on a RPi for a while now but I would have thought that using the 64 bit version listed here would work.

Having VSC on the HA system is great because of Ingress. You then have the code editor on the side menu and as you said, can access it remotely to play with your config. ie: at work during lunch breaks :wink:

1 Like

You need to use HassOS not Raspbian as the underlying O/S. There is no 64 bit Raspbian as you said.

That’s what kinda what I’m doing at the moment, but with a growing config and versioning, it starts to be reeeeeeeally slow when not at home, like at work during lunch breaks for instance. I’m not using Samba but SSHFS instead (slower) and over my crappy WAN uplink (even slower) to be able work remotely.

While it’s cool to have VSC via Ingress for remote “on the spot” quick fixes, I’m not a big fan of having it run in my browser, as I’d prefer to use my already configured and synced config in native VSC.

I don’t imply the addon is useless for me at all, it’s actually quite cool. I was just wondering if it was possible to re-enable the remote access in any way ? :slight_smile:

Thanks all for your answers !

@sparkydave & @DavidFW1960 , but running hassos (even the 64 bit version) would negate the use of the ssd. So … ???

The remote access for the add-on still runs in the browser, it’s just that it was mapped to a certain port on your Home Assistant server rather than being able to access it directly through the Home Assistant frontend (Ingress).

Aside from a VPN, there isn’t really a good and secure way that I know of to be able to remotely access your files while using the desktop version of VS Code.

I’ve tried to install Visual Studio Code, but it won’t work. I get the following in the system log:
‘20-03-12 12:51:19 ERROR (MainThread) [supervisor.addons] Add-on a0d7b954_vscode not supported on that platform’

Welcome to the community. Just a quick mention, please read the pinned post at the top of the screen RE: how to post.

What platform have you tried to install on? (Hardware, OS) This add-on will only work with a 64 bit system

Thank you for the clarification, is there tribal knowledge on re-enabling the port / not using ingress ?

I don’t believe a VPN is needed, my point is to use the “Remote-SSH” functionality, which actually tunnels a random port when establishing the remote session for the local VSCode to communicate with the server.

It could actually be worth looking into adding the functionality to the SSH addon ?

Cheers !

Hi there!
Question: is it possible to run this addon without hass.io? Since this is a docker image I hope this should be possible. I downloaded the image, run it but I don’t know what to do next. There must be some link between the addon docker and HA Core allowing authorization in HA etc.
And at the end there must be some URL provided by the add-on to display vscode-server in browser.

Any ideas?
EDIT: for those, who seek answer for this question in the future. Seems it isn’t possible to run the addon, but it is possible to run VS Code, which is basis for this add-on.
I used this one: https://github.com/linuxserver/docker-code-server

1 Like

Interesting, can you add any important steps to the install, config requirements.
What do you get when you finish, what benefits
Is there anything you can’t do (rather than running it on a standalone workstation)

Having an issue where when I open visual studio code addon, it goes into a loop. “Cannot Connect. Please Reload the window” and is then unuseable.

Home Assistant on Proxmox, latest version (.107.7).

Any suggestions?
Thanks
image

1 Like

Also Having the same issue as @gregcsw for the last 2 days.
Getting the error:
“code-server is being accessed over an insecure domain. Some functionality may not work as expected.”
after a few seconds of operation.
Spitting out notification “code-server is being accessed over an insecure domain. Some functionality may not work as expected.” The logs in superviser>system says: API is closed and then I need to reload window for it to work for 5 seconds again.
VSCode 2.1 and HA 0.107.7

1 Like

Same happens here since the last update. Reinstalling the addon didnt help
grafik

1 Like

Hello ,

VS studio says I have a update. I try to download it says file error can’t read header. Anyone help with this?

Hey, I see exactly the same, running on Ubuntu 18.04.4 - docker and HA 0.107.7
the error i get is Unable to write file (Error: incorrect header check)
if anyone else can verify exact same behaviour.
thanks.

theres a new update for VS Code, but you wont be able to install it because it’s integrated in HA a different way. Someone would need to update the addon to use the latest VS Code :slight_smile: