I could not locate any peculiar symlinks etc, though given I am not a Linux expert I am not sure I would spot them.
Adding /root/config to the config_path entry did not yield a change for me either.
Memory consumption grows over time, and eventually the whole system becomes slow and unstable. As a temporary declaration of defeat, I added a restart automation based on addon memory consumption.
Given I am developing more and more UI in YAML and custom JINJA templates, I do need a solid solution. So at this stage I am seeking alternatives that can help maintain a similar level of productivity to what VSCode provides (when it’s up and running). The simple file editor does not cut it for me, any other options folks here have considered or may be looking into?
Use samba share and put VSCode on a separate system. I have the vscode addon, however I only turn it on when I’m remoting into the system from outside my house. When inside my house, I always use a different computer to run vscode on and the addon stays off. In general, if you aren’t using vscode, you should leave it off.
Thanks! I deleted the symlink to homeassistant and config, and also downgraded, cpu is back to normal.
ls -FA | sed -ne 's/@//p'
config
homeassistant
➜ /config git:(master) ✗ rm config
➜ /config git:(master) ✗
ls -FA | sed -ne 's/@//p'
homeassistant
➜ /config git:(master) ✗ rm homeassistant
before, I had an automation to just stop the addon every30m.
alias: Stop VS Code every 30 minutes
description: ""
triggers:
- trigger: time_pattern
minutes: /30
conditions: []
actions:
- data:
addon: a0d7b954_vscode
action: hassio.addon_stop
Where is the Visual Studio config file located?
Or is it a setting in VS?
To change the config file path for studio code server:
Goto settings-> add-ons-> studio code server
select configuration, set config path to /root/config
Thanks for the pointer, this is definitely the way to go!
Thanks everyone for the advice on why it’s using so much CPU. Since I still occasionally need access to the root folder, this will likely happen again at some point. So, based on the earlier suggestion to use automation, I created a more subtle restart mechanism for the addon.
Note: To use this automation, you first need to enable the CPU sensor of the addon.
Go to Settings → Devices & Services → Integrations → Home Assistant Supervisor → Studio Code Server → Disabled Entities and enable the relevant CPU usage sensor.
Here’s the automation:
alias: HA Addon Restart VSCode when it's CPU hog
description: ""
triggers:
- type: value
device_id: 7ec982dcb7155d140f4edbfac79a31aa
entity_id: 5287512712bfaf99ac797747dc673a49
domain: sensor
above: 70
for:
hours: 0
minutes: 15
seconds: 0
conditions: []
actions:
- service: notify.owner_phone
data:
message: VSCode is using too much CPU, restarting it in 2 minutes
title: CPU Hog Detected
- delay:
minutes: 2
- service: hassio.addon_restart
data:
addon: a0d7b954_vscode
mode: single