Hi everyone.
First of all, a took a litlle delay to think about a problem. There are some results.
This question hit the bulls eye. I will explain below.
I suppose this post was a result of my bad knowledge of documentation and HA arhitecture and a lot of information about addons installation from HA OS or supervised version directly. So i tried to install something as example. I chose simple vscode and postgresql to try. And i did it with my core installation.
So, the answer for a Burningstone question is:
i tried to find an official documetation that describe instructions for a different software settings around HA and HA Core settings for it. Without docker/VM/Supervisor and so on.
Result system load here (yes, in total there are no integrations and automations, but you may see a basic system load):
System runs Postgresql, HA in venv, VS code in iframe, nginx as a proxy for HA and VS Code (code-server).
Each experiens have to be transformed into illation to allow development process be more productive.
So what we shall to do for another people like me to prevent this questions.
The answer is - improve documentation. I understand that HA developers canāt and dont have to write all instructions for every program or library, but we need some start point in this direction.
First of all, HA Core documentation at installation point have to contain some text to explain new users how to integrate very popular addons (yes, in common, itās not a addon, but let me call it here like that) for DB (psql, mysql), VS code as example, nginx and link to configuration.yaml description. Also there have to be some words about addons in common. People who install core version know what to do. They already have an experiense to install another software and configure it. So this information will give them the bridge from they existing knowledge and new knowledge about HA.
Why i chose these popular addons? Because of that:
- Installation of nginx give a basic usage improvements, allow add letsencrypt in many different ways, and give some knowledge about minimal nginx config (minimal official config have to be in documentation!)ā¦ Thats my (very basic, from this forum,ssl later)
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
server {
listen 80 default_server;
server_name <YOUR_SERVER_NAME> <YOUR_IP> _;
proxy_buffering off;
location / {
proxy_pass http://127.0.0.1:8123;
proxy_set_header Host $host;
proxy_redirect http:// https://;
proxy_http_version 1.1;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
}
}
- Installation of any DB improve HA speed, explain a original DB location and structure (migration description), but not only! Core installation does not install packages in venv for postgresql connection. So this basic thing will explain users to not forget install dependencies there. You need to do it in your venv (login as HA user in venv folder and run):
python3 -m pip install psycopg2-binary
- VS code is not needed for every one, but its give another thing. First, itās give a understanding how to install (or integrate existing) things in HA iframe.
So we install code-server as official manual (do not forget add hashed-password in config), add nginx config for usability and put some lines in HA configuration.yaml. Thatās all. My very simple nginx config:
server {
listen 81;
server_name <YOUR_SERVER_NAME> <YOUR_IP> _;
proxy_buffering off;
location / {
proxy_pass http://127.0.0.1:8080;
proxy_set_header Host $host;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection upgrade;
proxy_set_header Accept-Encoding gzip;
}
}
And very simple configuration.yaml part:
panel_iframe:
vscode:
title: "VS Code"
url: "http://<your_ha_dns_name_or_ip>:81"
icon: mdi:microsoft-visual-studio-code
require_admin: true
Also, here have to be a link to official documentation, describing this section.
Why i wrote this long read text ?) Because i think someone like me will read it at once and make a bridge a little bit faster. Also i hope someone will improve documentation (possibly, i will after a couple of months of usage).
Thanks everyone! ![:crazy_face: :crazy_face:](https://community.home-assistant.io/images/emoji/twitter/crazy_face.png?v=12)