Hi Daniel, for two days I have tried yours and Hennings hints but i can`t get the .py scripts running.
First I have to say I´m new to HA, and python…
My Setup is:
- Home Assistant 2023.2.2 running from SSD on a x86/x64 Intel machine
- AppDaemon is runnig in HA as an Add-on
After lot’s of reading I copied the two .py files config_getjudo.py and getjudo.py inside the
/config/appdeamon folder.
( I put the other two .py scripts main_entity.py and messages_getjudo.py also there)
The same I did with the appdaemon.yaml file.
After starting the Appdeamon Addon I get this Log File
s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service base-addon-banner: starting
-----------------------------------------------------------
Add-on: AppDaemon
Python Apps and Dashboard using AppDaemon 4.x for Home Assistant
-----------------------------------------------------------
Add-on version: 0.11.0
You are running the latest version of this add-on.
System: Home Assistant OS 9.5 (amd64 / generic-x86-64)
Home Assistant Core: 2023.2.2
Home Assistant Supervisor: 2023.01.1
-----------------------------------------------------------
Please, share the above information when looking for help
or support in, e.g., GitHub, forums or the Discord chat.
-----------------------------------------------------------
s6-rc: info: service base-addon-banner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service base-addon-log-level: starting
s6-rc: info: service fix-attrs successfully started
s6-rc: info: service base-addon-log-level successfully started
s6-rc: info: service legacy-cont-init: starting
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service init-appdaemon: starting
s6-rc: info: service init-appdaemon successfully started
s6-rc: info: service appdaemon: starting
s6-rc: info: service appdaemon successfully started
s6-rc: info: service legacy-services: starting
s6-rc: info: service legacy-services successfully started
[21:42:17] INFO: Starting AppDaemon...
2023-02-06 21:42:19.288656 INFO AppDaemon: AppDaemon Version 4.2.1 starting
2023-02-06 21:42:19.288764 INFO AppDaemon: Python version is 3.10.9
2023-02-06 21:42:19.288834 INFO AppDaemon: Configuration read from: /config/appdaemon/appdaemon.yaml
2023-02-06 21:42:19.288899 INFO AppDaemon: Added log: AppDaemon
2023-02-06 21:42:19.288967 INFO AppDaemon: Added log: Error
2023-02-06 21:42:19.289033 INFO AppDaemon: Added log: Access
2023-02-06 21:42:19.289087 INFO AppDaemon: Added log: Diag
2023-02-06 21:42:19.357797 INFO AppDaemon: Loading Plugin HASS using class HassPlugin from module hassplugin
2023-02-06 21:42:19.450939 INFO HASS: HASS Plugin Initializing
2023-02-06 21:42:19.451067 INFO HASS: HASS Plugin initialization complete
2023-02-06 21:42:19.451318 INFO AppDaemon: Initializing HTTP
2023-02-06 21:42:19.451496 INFO AppDaemon: Using 'ws' for event stream
2023-02-06 21:42:19.453513 INFO AppDaemon: Starting API
2023-02-06 21:42:19.455012 INFO AppDaemon: Starting Admin Interface
2023-02-06 21:42:19.455208 INFO AppDaemon: Starting Dashboards
2023-02-06 21:42:19.463678 INFO HASS: Connected to Home Assistant 2023.2.2
2023-02-06 21:42:19.470654 INFO AppDaemon: App 'hello_world' added
2023-02-06 21:42:19.471727 INFO AppDaemon: App 'judo_app' added
2023-02-06 21:42:19.472696 INFO AppDaemon: Found 2 total apps
2023-02-06 21:42:19.473255 INFO AppDaemon: Starting Apps with 2 workers and 2 pins
2023-02-06 21:42:19.476028 INFO AppDaemon: Running on port 5050
2023-02-06 21:42:19.493863 INFO HASS: Evaluating startup conditions
2023-02-06 21:42:19.499269 INFO HASS: Startup condition met: hass state=RUNNING
2023-02-06 21:42:19.499447 INFO HASS: All startup conditions met
2023-02-06 21:42:19.514860 INFO AppDaemon: Got initial state from namespace default
2023-02-06 21:42:21.084452 INFO AppDaemon: New client Admin Client connected
2023-02-06 21:42:21.483466 INFO AppDaemon: Scheduler running in realtime
2023-02-06 21:42:21.492417 INFO AppDaemon: Adding /config/appdaemon/apps to module import path
2023-02-06 21:42:21.497021 INFO AppDaemon: Loading App Module: /config/appdaemon/apps/hello.py
2023-02-06 21:42:21.516595 WARNING AppDaemon: No app description found for: /config/appdaemon/apps/config_getjudo.py - ignoring
2023-02-06 21:42:21.517574 INFO AppDaemon: Loading App Module: /config/appdaemon/apps/getjudo.py
2023-02-06 21:42:21.523634 WARNING Error: ------------------------------------------------------------
2023-02-06 21:42:21.523917 WARNING Error: Unexpected error loading module: /config/appdaemon/apps/getjudo.py:
2023-02-06 21:42:21.524077 WARNING Error: ------------------------------------------------------------
2023-02-06 21:42:21.525387 WARNING Error: Traceback (most recent call last):
File "/usr/lib/python3.10/site-packages/appdaemon/app_management.py", line 993, in check_app_updates
await utils.run_in_executor(self, self.read_app, mod["name"], mod["reload"])
File "/usr/lib/python3.10/site-packages/appdaemon/utils.py", line 337, in run_in_executor
response = future.result()
File "/usr/lib/python3.10/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/lib/python3.10/site-packages/appdaemon/app_management.py", line 784, in read_app
self.modules[module_name] = importlib.import_module(module_name)
File "/usr/lib/python3.10/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 883, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "/config/appdaemon/apps/getjudo.py", line 8, in <module>
import messages_getjudo
ModuleNotFoundError: No module named 'messages_getjudo'
2023-02-06 21:42:21.525543 WARNING Error: ------------------------------------------------------------
2023-02-06 21:42:21.525690 WARNING AppDaemon: Removing associated apps:
2023-02-06 21:42:21.525839 WARNING AppDaemon: judo_app
2023-02-06 21:42:21.526088 INFO AppDaemon: Initializing app hello_world using class HelloWorld from module hello
2023-02-06 21:42:21.561206 INFO hello_world: Hello from AppDaemon
2023-02-06 21:42:21.561684 INFO hello_world: You are now ready to run Apps!
2023-02-06 21:42:21.562448 INFO AppDaemon: App initialization complete
I’m happy for every hint, please tell me if you need anything more…