Code Monkey home page Code Monkey logo

Comments (7)

lexfrei avatar lexfrei commented on May 30, 2024 1

@xeor now you can set any envs you need (at least, for appdaemon)

from charts.

billimek avatar billimek commented on May 30, 2024

Hi @rwlove, I didn't add this feature but believe that there are a couple of possible problems:

  1. It looks like the DASH_URL environment variable (required by appDaemon?) isn't being set unless ingress is enabled.
  2. Similarly, the TOKEN environment variable is not set due to the haToken value not being set with the helm chart configuration and thus the appDaemon doesn't have a token to reference at runtime.

Can you try enabling appDaemon ingress and/or setting a token value in the helm configuration to see if this helps?

from charts.

rwlove avatar rwlove commented on May 30, 2024

The below changes to my values.yaml seems to allow it to work.

@@ -278,7 +281,7 @@
     # nodePort: 30000
 
 appdaemon:
-  enabled: false
+  enabled: true
 
   ## code-server container image
   ##
@@ -288,7 +291,7 @@
     pullPolicy: IfNotPresent
 
   ## Home Assistant API token
-  # haToken:
+  haToken: <MY_TOKEN_FROM_WEBUI>
 
   ## Additional hass-vscode container environment variable
   ## For instance to add a http_proxy
@@ -296,7 +299,7 @@
   extraEnv: {}
 
   ingress:
-    enabled: false
+    enabled: true
     annotations: {}
       # kubernetes.io/ingress.class: nginx
       # kubernetes.io/tls-acme: "true"

It generates the following appdaemon.yaml file:

log:
  logfile: STDOUT
  errorfile: STDERR
appdaemon:
  threads: 10
  plugins:
    HASS:
      type: hass
      ha_url: http://localhost:8123
      token: <MY_TOKEN_FROM_WEBUI>
hadashboard:
  dash_url: http://0.0.0.0:5050

Can you help me understand how the appdaemon.yaml file gets generated? For example when I grep for “errorfile” which is in the resultant appdaemon.yaml, I don’t get any hits in your repository.

I’d love to upgrade this chart to make use of appdaemon 4.0.3 (currently using 3.0.5). I got it to work by manually updating the appdaemon.yaml file on my persistent storage and rebooting, but if I understood how the appdaemon.yaml file is being generated I could probably provide a patch to update the appdaemon version. Here’s an example of how the resultant appdaemon.yaml file should look when using 4.0.3.

appdaemon:
  threads: 10
  latitude: 15
  longitude: 31
  elevation: 45
  time_zone: 'America/Los_Angeles'
  plugins:
    HASS:
      type: hass
      ha_url: http://localhost:8123
      token: <MY_TOKEN_FROM_WEBUI>
hadashboard:
http:
  url: http://0.0.0.0:5050
admin:
api:

Do you know where the user is supposed to provide the appdaemon.cfg file?

Lastly, I’m a bit confused about where to get the token from. I did this last weekend, but I believe I started Home Assistant once, went to the webui, generated the token, added that token to the helm chart values.yaml and restarted Home Assistant. Do you know if this is the right procedure?

from charts.

alexdor avatar alexdor commented on May 30, 2024

@rwlove the appdaemon.yaml file is generated by the appdeamon image (specifically from this script https://github.com/AppDaemon/appdaemon/blob/dev/dockerStart.sh , which is the first script that is executed once the appdeamon pod starts )

I've already opened a pull request AppDaemon/appdaemon#1002 to allow these options to be configured via env variables

from charts.

xeor avatar xeor commented on May 30, 2024

I don't use ingress, and is hitting this same problem. However, it looks like https://github.com/k8s-at-home/charts/blob/master/charts/home-assistant/values.yaml#L300 the appdaemon.extraEnv is never used..? Is it being used somewhere else? It is missing from https://github.com/k8s-at-home/charts/blob/master/charts/home-assistant/templates/deployment.yaml

from charts.

lexfrei avatar lexfrei commented on May 30, 2024

Welp, here is a typo

{{- range $key, $value := .Values.vscode.extraEnv }}

I'm working on PR with a fix for this issue and some other improvements.

from charts.

onedr0p avatar onedr0p commented on May 30, 2024

Looks like this issue can be closed because the environment variables should be working for appdaemon :D

Thanks @lexfrei

from charts.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.