joBr99 / nspanel-lovelace-ui

Custom Firmware for NsPanel with the design of HomeAssistant's lovelace UI in mind, works with Tasmota.
GNU General Public License v3.0
882 stars 191 forks source link

Cant find how to install Babel #887

Closed pbranly closed 1 year ago

pbranly commented 1 year ago

I must be noob necause I dont find any menu for installing Babel; I have the HACS add-on installed but cant find how to use it

2023-05-07_20-17

Thank you by advance Phil

joBr99 commented 1 year ago

https://appdaemon.readthedocs.io/en/latest/DOCKER_TUTORIAL.html#runtime-dependencies

For plain docker installations check appdaemon configuration, babel is a python package that needs to be present in the appdaemon container.

joBr99 commented 1 year ago

for the app to work, the crucial part is that the appdaemon container is able to access the files downloaded by hacs

see the folder relationship between the appdaemon container and homeassistant

version: "3.5"
services:
  homeassistant:
    image: ghcr.io/home-assistant/home-assistant:stable
    container_name: homeassistant
    network_mode: host
    volumes:
      - ./docker-data/homeassistant/:/config
      - /etc/localtime:/etc/localtime:ro
    environment:
      - TZ=Europe/Berlin
    privileged: true
    restart: unless-stopped

  appdaemon:
    container_name: appdaemon
    image: acockburn/appdaemon:4.2.3
    environment:
      - HA_URL=http://your-homeassistant-url:8123
      - TOKEN="xxxxxx"
    volumes:
      - /etc/localtime:/etc/localtime:ro
      - ./docker-data/homeassistant/appdaemon:/conf
    depends_on:
      - homeassistant
    restart: unless-stopped
pbranly commented 1 year ago

Hi My installation of those 2 containers is correct . As I use docker and not HASS, I don’t have the menu you make reference of in the documentation So I don’t have any explanations how adding this babel package in the docker compose or anywhere else So please a little help for me ! Thanks Phil

joBr99 commented 1 year ago

https://appdaemon.readthedocs.io/en/latest/DOCKER_TUTORIAL.html#runtime-dependencies

Take a look at the Appdaemon documentation, you need to add the python package to the requirements.txt

pbranly commented 1 year ago

And where is or where do I have to create such file ?

joBr99 commented 1 year ago

The Docker entrypoint script recursively searches inside the CONF directory for any files named requirements.txt.

Somewhere in the Appdaemon folder. Alongside appdamon.yaml is probably fine.

pbranly commented 1 year ago

Ok step per step … sorry if this is obvious for you but not for me … I just put babel in this file ?

joBr99 commented 1 year ago

Yep

pbranly commented 1 year ago

Ok I have now such file image I will see tomorrow if météo is in French Thanks and good night

joBr99 commented 1 year ago

You need to restart the docker container and it should install babel on startup

pbranly commented 1 year ago

I did but I am not sure it worked as I don’t see additional package image

joBr99 commented 1 year ago

It's not an AppDeamon App, it's a system dependency and not going to appear there. Check the AppDeamon log / the date on the panel to see if it worked.

pbranly commented 1 year ago

It seems ok 07/05/2023 22:43:43 2023-05-07 22:43:43.299149 INFO AppDaemon: AppDaemon is stopped. 07/05/2023 22:43:46 Collecting babel 07/05/2023 22:43:46 Downloading Babel-2.12.1-py3-none-any.whl (10.1 MB) 07/05/2023 22:43:46 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 10.1/10.1 MB 20.9 MB/s eta 0:00:00 07/05/2023 22:43:47 Installing collected packages: babel 07/05/2023 22:43:48 Successfully installed babel-2.12.1 07/05/2023 22:43:48 WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv

I will have a look to my Nspanel tomorrow Thank you for your patience Phil