xaviml / controllerx

Create controller-based automations with ease to control your home devices and scenes.
https://xaviml.github.io/controllerx/
MIT License
334 stars 67 forks source link

[BUG] config folder AppDaemon moved #875

Closed treb33 closed 6 months ago

treb33 commented 10 months ago

Bug report

Description

After updating AppDaemon to 0.15.2 the data folder is migrate/move out of the Home Assistant configuration folder into a dedicated folder for this add-on; addon_configs folder/share. Controllerx installs still in the homeassistant config/appdaeom.

Additional information

AppDaemon app configuration

`
ground_floor_lights:
  module: controllerx
  class: E1810Controller
  controller: sensor.remote_e1524_action
  integration: z2m
  light: light.speelkamer_lights
  mapping:
    brightness_down_click: toggle
    brightness_down_hold:
      service: input_boolean.toggle
      data:
        entity_id: input_boolean.party
....
`

Logs

`
2023-11-19 18:36:24.852619 INFO HASS: Connected to Home Assistant 2023.11.2
2023-11-19 18:36:26.144770 INFO HASS: Evaluating startup conditions
2023-11-19 18:36:26.154457 INFO HASS: Startup condition met: hass state=RUNNING
2023-11-19 18:36:26.154640 INFO HASS: All startup conditions met
2023-11-19 18:36:26.241784 INFO AppDaemon: Processing restart for HASS
2023-11-19 18:36:26.242032 INFO AppDaemon: Terminating hello_world
2023-11-19 18:36:26.242460 INFO AppDaemon: Reloading Module: /config/apps/hello.py
2023-11-19 18:36:26.244114 INFO AppDaemon: Loading app hello_world using class HelloWorld from module hello
2023-11-19 18:36:26.245295 INFO AppDaemon: Calling initialize() for hello_world
2023-11-19 18:36:26.246229 INFO hello_world: Hello from AppDaemon
2023-11-19 18:36:26.246866 INFO hello_world: You are now ready to run Apps!
`

After moving the controllerx folder to the new appdaemon location (addon_configs\a0d7b954_appdaemon\apps) this is the a few rules of the log:

`
2023-11-20 20:55:38.993897 INFO AppDaemon: Removing module /config/apps/controllerx/cx_devices/prolight.py
2023-11-20 20:55:38.994030 INFO AppDaemon: Removing module /config/apps/controllerx/cx_devices/smartkontakten.py
2023-11-20 20:55:38.994130 INFO AppDaemon: Removing module /config/apps/controllerx/cx_devices/lutron.py
2023-11-20 20:55:38.994244 INFO AppDaemon: Removing module /config/apps/controllerx/cx_devices/__init__.py
2023-11-20 20:55:38.994737 WARNING AppDaemon: No app description found for: /config/apps/cx_const.py - ignoring
2023-11-20 20:55:38.997559 WARNING AppDaemon: No app description found for: /config/apps/controllerx.py - ignoring
2023-11-20 20:55:38.998482 WARNING AppDaemon: No app description found for: /config/apps/cx_version.py - ignoring
2023-11-20 20:55:38.999121 WARNING AppDaemon: No app description found for: /config/apps/cx_helper.py - ignoring
`
yvos commented 10 months ago

Same here also after reinstalling both Appdeamon and ControllerX. Copying over the folder to the new folder solves the problem but I assume that updates of ControllerX won't happen in the new location

treb33 commented 10 months ago

Yes fixed also for me, still a workarround. Backup before update new to a new AppDaemon version.

bobmorane06 commented 10 months ago

Same issue faced today. I removed the apps folder from /root/addon_configs/a0d7b954_appdaemon and created a simlink: ln -s /homeassistant/appdaemon/apps /addon_configs/a0d7b954_appdaemon

overas commented 8 months ago

I solve it following this post: https://community.home-assistant.io/t/appdaemon-new-config-location-issue/674558/4

I use the Appdaemon addon version 0.16.3 on Haos and the app folder are now moved to /root/addon_configs/a0d7b954_appdaemon/apps image

When installing ControllerX app it is installed to /root/config/appdaemon/apps (symlinked to /homeassistant/appdaemon/apps).

To use the new app location /homeassistant/appdaemon/apps you need to edit /root/addon_configs/a0d7b954_appdaemon/appdaemon.yaml and include app_dir: /homeassistant/appdaemon/apps/ like this:

appdaemon:
  latitude: 58.33533
  longitude: 8.53705
  elevation: 2
  time_zone: Europe/Oslo
  app_dir: /homeassistant/appdaemon/apps/
  plugins:
    HASS:
      type: hass
http:
  url: http://127.0.0.1:5050
admin:
api:
hadashboard:

Then you must copy your other .py and .yaml files which is placed in /root/addon_configs/a0d7b954_appdaemon/apps to /homeassistant/appdaemon/apps/

Read more here Appdaemon configuration https://appdaemon.readthedocs.io/en/latest/CONFIGURE.html: image

xaviml commented 6 months ago

Hi all, I have added new installation steps to the preview documentation:

https://controllerx.netlify.app/controllerx/start/installation/

Hope the steps are more clear and solve the issue that people might have when updating or installing ControllerX for now.

Thanks!