Hi all
I have been making extensive use of the new-ish VS code feature remote development. TLDR it allows you to develop on a remote pi over SSH using VS code. This is useful both for editing config, but also if you are doing development which requires a physical pi, such as working with GPIO/I2C etc. A couple of gotchas, you need to install VS code Insiders addition, then install the Remote addon. You will then Remote: Connect to host
and enter pi@ip and select the directory you wish to work in (.homeassistant
).
Cheers
It doesnāt work on Hassio, which is a custom OS. Iām running Hassbian
it also works great on HA in Docker on Ubuntuā¦ thanks for the tip!!!
The VSCode addon isnāt available for RPiāsā¦ (or it wasnāt last time I checked)
Oops! Sorry, didnāt know that.
With Pi/Hassio you can still use VSCode and setup SFTP to automatically upload/download changes to files on your Pi.
So you both have a backup on your laptop/dev machine and can easily make changes to the files on the Pi.
Thanks for this tip, Iām trialing that now, using docker-compose and starting home assistant with
CMD [ "python3", "-m", "homeassistant", "--config", "/config" ]
in the docker-compose file.
I can connect to the folder ok but how do you restart home-assistant to show the latest changes? Any way to do automatic reloading?
Well now i am trying to develop on my windows pc with docker. There is still a lot to learn but the way looks right.
I am also using the VSCODE remote dev a lot. But I have issues to use it on HomeAssistent. I am getting the follwowing error message, when I try to connect:
The remote host may not meet VS Code Server's prerequisites for glibc and libstdc++
any ideas how to fix this?
I tried everything possible for the past few days and realized that on HassOS, neither the SSH add-on nor direct SSH to the host will work via remote SSH on a local VS Code install on your desktop/laptop.
The add-on fails as Alpine Linux, which it is based on, does not support the required libraries that @Geraldf mentioned, in order to run remote SSH.
The HassOS host fails because it starts without a TTY and offers one only after the user types in āloginā.
Accessing the folder via a Samba mount works, but is much slower than SSH during git operations and often gives phantom file changes in git, probably due to permissions changes owing to Sambaās default mask settings.
I wish there was a way to get SSH remote development to work. Leaving this comment here, in case anyone posts an approach that I might have missed.
@ajayjohn thanks for dissecting the issue, suggest raising it in the dev discord forums to ensure it isnāt missed (core devs not on this forum much)
Just did that. Thanks!
It is avaible on 64bit OS Version on the Pi 3 and 4.
Still using this addon?
I try to connect to HA but get error message āError while connecting to SSH FS homeassistant: Handshake failed: no matching client->server HMACā
Everything works when I ssh to HA with terminal with the same credentials
There is an add-on that provides VSCode Remote in Hassioās edge repository . Iāve been using it for the past week and it works well.
Sorry no, havnāt used this exept some testing about a year ago.