Judo water treatment

I’ve committed a new Version
Attention: config_getjudo.py has changed!!

  • Error- and warning messages of plant published to notification topic ( LOCATION/NAME/notify ). Can be used for hassio telegram bot…
  • removed some bugs
  • today’s and yesterday’s consumption
  • Crashlog implemented
2 Likes

Hi Henning @www-ShapeLabs-de ,

May I ask you when should the LOCATION/NAME/notify be populated / change?
I accidentally deleted the topic in MQTT Explorer when I wanted to copy the topic and now it is not populated again.

br,
Paul

Hey distel,
it is meant that the notifiy topic "LOCATION/NAME/notify " LOCATION and NAME are placeholders for the corresponding values from your config. For me the topic is then e.g. “Keller/Judo_isoftsaveplus/notify/”.

By the way: Wait maybe another 1-2 days until you configure everything. I still have a new version, which I will commit tomorrow or the day after tomorrow. It runs much more stable. Besides, a notify entity with autoconfig sets up there then. Additionally I will add a corresponding example template for the automation with the Telegram bot in the description.

BR
Henning

I know that it is a placeholder for my system.

I deleted the topic Hausanschlussraum/judo/notify which initially was populated with a message (I think the last error the scrip catched from the system)
Now it is not longer populating and the topic is gone from my mqtt explorer.
Should it populated when I cut off the water via home assistant?

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…

Hi

You are on a good path.
Messages_getjudo.py does not seem to be in the same folder as the other files, which causes the exception.
Second problem is, that you need to adapt the AppDaemon configuration to contain paho-mqtt.
Can you sent a picture of your folder structure?

  1. MQTT should be already setup and running
  2. Install AppDaemon and Studio Code Server (Optional) through HomeAssistant Add-Ons store (Home Assistant Community Add-on: AppDaemon 4)
  3. Configure AppDaemon with the following settings:

image

  1. Copy all files from the python folder into the folder appdaemon/apps/main (inkl. temp_getjudo.pkl file) → Studio Code Server
  2. Modify the apps.yaml file:

image

  1. Modify config_judo.py to your system
  2. Start AppDaemon and check the logs for potential errors
  3. You can easily add more scripts into main_entity.py → main file, where all scripts are called

4

Followed your 0 to 7 points and started Appdaemon again…

Now i got this Log.

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
[22:00:59] INFO: Starting AppDaemon...
2023-02-07 22:01:01.219629 INFO AppDaemon: AppDaemon Version 4.2.1 starting
2023-02-07 22:01:01.219743 INFO AppDaemon: Python version is 3.10.9
2023-02-07 22:01:01.219816 INFO AppDaemon: Configuration read from: /config/appdaemon/appdaemon.yaml
2023-02-07 22:01:01.219883 INFO AppDaemon: Added log: AppDaemon
2023-02-07 22:01:01.219951 INFO AppDaemon: Added log: Error
2023-02-07 22:01:01.220117 INFO AppDaemon: Added log: Access
2023-02-07 22:01:01.220180 INFO AppDaemon: Added log: Diag
2023-02-07 22:01:01.288901 INFO AppDaemon: Loading Plugin HASS using class HassPlugin from module hassplugin
2023-02-07 22:01:01.382235 INFO HASS: HASS Plugin Initializing
2023-02-07 22:01:01.382354 INFO HASS: HASS Plugin initialization complete
2023-02-07 22:01:01.382595 INFO AppDaemon: Initializing HTTP
2023-02-07 22:01:01.382772 INFO AppDaemon: Using 'ws' for event stream
2023-02-07 22:01:01.384800 INFO AppDaemon: Starting API
2023-02-07 22:01:01.386320 INFO AppDaemon: Starting Admin Interface
2023-02-07 22:01:01.386520 INFO AppDaemon: Starting Dashboards
2023-02-07 22:01:01.394839 INFO HASS: Connected to Home Assistant 2023.2.2
2023-02-07 22:01:01.397768 INFO AppDaemon: App 'main_app' added
2023-02-07 22:01:01.398739 INFO AppDaemon: App 'hello_world' added
2023-02-07 22:01:01.399589 INFO AppDaemon: Found 2 total apps
2023-02-07 22:01:01.399976 INFO AppDaemon: Starting Apps with 2 workers and 2 pins
2023-02-07 22:01:01.400693 INFO AppDaemon: Running on port 5050
2023-02-07 22:01:01.427104 INFO HASS: Evaluating startup conditions
2023-02-07 22:01:01.433422 INFO HASS: Startup condition met: hass state=RUNNING
2023-02-07 22:01:01.433875 INFO HASS: All startup conditions met
2023-02-07 22:01:01.450075 INFO AppDaemon: Got initial state from namespace default
2023-02-07 22:01:03.406480 INFO AppDaemon: Scheduler running in realtime
2023-02-07 22:01:03.410114 INFO AppDaemon: Adding /config/appdaemon/apps to module import path
2023-02-07 22:01:03.410747 INFO AppDaemon: Adding /config/appdaemon/apps/main to module import path
2023-02-07 22:01:03.419501 INFO AppDaemon: Loading App Module: /config/appdaemon/apps/hello.py
2023-02-07 22:01:03.439767 WARNING AppDaemon: No app description found for: /config/appdaemon/apps/main/messages_getjudo.py - ignoring
2023-02-07 22:01:03.440442 WARNING AppDaemon: No app description found for: /config/appdaemon/apps/main/config_getjudo.py - ignoring
2023-02-07 22:01:03.441021 INFO AppDaemon: Loading App Module: /config/appdaemon/apps/main/main_entity.py
2023-02-07 22:01:03.442291 WARNING AppDaemon: No app description found for: /config/appdaemon/apps/main/getjudo.py - ignoring
2023-02-07 22:01:03.442834 INFO AppDaemon: Initializing app main_app using class main_loop from module main_entity
2023-02-07 22:01:03.443858 INFO AppDaemon: Initializing app hello_world using class HelloWorld from module hello
2023-02-07 22:01:03.445331 WARNING main_app: ------------------------------------------------------------
2023-02-07 22:01:03.445658 WARNING main_app: Unexpected error running initialize() for main_app
2023-02-07 22:01:03.445820 WARNING main_app: ------------------------------------------------------------
2023-02-07 22:01:03.446918 WARNING main_app: Traceback (most recent call last):
  File "/usr/lib/python3.10/site-packages/appdaemon/app_management.py", line 165, in initialize_app
    await utils.run_in_executor(self, init)
  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 "/config/appdaemon/apps/main/main_entity.py", line 9, in initialize
    if config_getjudo.appdaemon:
AttributeError: module 'config_getjudo' has no attribute 'appdaemon'
2023-02-07 22:01:03.447199 WARNING main_app: ------------------------------------------------------------
2023-02-07 22:01:03.479478 INFO hello_world: Hello from AppDaemon
2023-02-07 22:01:03.479962 INFO hello_world: You are now ready to run Apps!
2023-02-07 22:01:03.480767 INFO AppDaemon: App initialization complete
2023-02-07 22:01:04.683526 INFO AppDaemon: New client Admin Client connected
2023-02-07 22:01:07.024682 INFO AppDaemon: New client Admin Client connected

I un- and reinstalled Appdaemon, restarted and got this ( - paho-mqtt ) inside the config of Appdaemon. :slight_smile:

ending in a new result…

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
Looking in links: https://wheels.home-assistant.io/musllinux/
Requirement already satisfied: paho-mqtt in /usr/lib/python3.10/site-packages (1.6.1)
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
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
[23:24:21] INFO: Starting AppDaemon...
2023-02-07 23:24:23.088389 INFO AppDaemon: AppDaemon Version 4.2.1 starting
2023-02-07 23:24:23.088496 INFO AppDaemon: Python version is 3.10.9
2023-02-07 23:24:23.088566 INFO AppDaemon: Configuration read from: /config/appdaemon/appdaemon.yaml
2023-02-07 23:24:23.088631 INFO AppDaemon: Added log: AppDaemon
2023-02-07 23:24:23.088700 INFO AppDaemon: Added log: Error
2023-02-07 23:24:23.088759 INFO AppDaemon: Added log: Access
2023-02-07 23:24:23.088812 INFO AppDaemon: Added log: Diag
2023-02-07 23:24:23.157667 INFO AppDaemon: Loading Plugin HASS using class HassPlugin from module hassplugin
2023-02-07 23:24:23.251032 INFO HASS: HASS Plugin Initializing
2023-02-07 23:24:23.251154 INFO HASS: HASS Plugin initialization complete
2023-02-07 23:24:23.251391 INFO AppDaemon: Initializing HTTP
2023-02-07 23:24:23.251566 INFO AppDaemon: Using 'ws' for event stream
2023-02-07 23:24:23.253588 INFO AppDaemon: Starting API
2023-02-07 23:24:23.255086 INFO AppDaemon: Starting Admin Interface
2023-02-07 23:24:23.255278 INFO AppDaemon: Starting Dashboards
2023-02-07 23:24:23.263527 INFO HASS: Connected to Home Assistant 2023.2.2
2023-02-07 23:24:23.272977 INFO AppDaemon: App 'main_app' added
2023-02-07 23:24:23.273657 INFO AppDaemon: App 'hello_world' added
2023-02-07 23:24:23.274057 INFO AppDaemon: Found 2 total apps
2023-02-07 23:24:23.274271 INFO AppDaemon: Starting Apps with 2 workers and 2 pins
2023-02-07 23:24:23.275936 INFO AppDaemon: Running on port 5050
2023-02-07 23:24:23.293506 INFO HASS: Evaluating startup conditions
2023-02-07 23:24:23.299009 INFO HASS: Startup condition met: hass state=RUNNING
2023-02-07 23:24:23.299168 INFO HASS: All startup conditions met
2023-02-07 23:24:23.314545 INFO AppDaemon: Got initial state from namespace default
2023-02-07 23:24:25.282103 INFO AppDaemon: Scheduler running in realtime
2023-02-07 23:24:25.285540 INFO AppDaemon: Adding /config/appdaemon/apps to module import path
2023-02-07 23:24:25.286103 INFO AppDaemon: Adding /config/appdaemon/apps/main to module import path
2023-02-07 23:24:25.293188 INFO AppDaemon: Loading App Module: /config/appdaemon/apps/hello.py
2023-02-07 23:24:25.313769 WARNING AppDaemon: No app description found for: /config/appdaemon/apps/main/messages_getjudo.py - ignoring
2023-02-07 23:24:25.314344 WARNING AppDaemon: No app description found for: /config/appdaemon/apps/main/config_getjudo.py - ignoring
2023-02-07 23:24:25.314936 INFO AppDaemon: Loading App Module: /config/appdaemon/apps/main/main_entity.py
2023-02-07 23:24:25.316189 WARNING AppDaemon: No app description found for: /config/appdaemon/apps/main/getjudo.py - ignoring
2023-02-07 23:24:25.316637 INFO AppDaemon: Initializing app main_app using class main_loop from module main_entity
2023-02-07 23:24:25.317601 INFO AppDaemon: Initializing app hello_world using class HelloWorld from module hello
2023-02-07 23:24:25.319355 WARNING main_app: ------------------------------------------------------------
2023-02-07 23:24:25.319579 WARNING main_app: Unexpected error running initialize() for main_app
2023-02-07 23:24:25.319754 WARNING main_app: ------------------------------------------------------------
2023-02-07 23:24:25.320894 WARNING main_app: Traceback (most recent call last):
  File "/usr/lib/python3.10/site-packages/appdaemon/app_management.py", line 165, in initialize_app
    await utils.run_in_executor(self, init)
  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 "/config/appdaemon/apps/main/main_entity.py", line 9, in initialize
    if config_getjudo.appdaemon:
AttributeError: module 'config_getjudo' has no attribute 'appdaemon'
2023-02-07 23:24:25.321068 WARNING main_app: ------------------------------------------------------------
2023-02-07 23:24:25.353946 INFO hello_world: Hello from AppDaemon
2023-02-07 23:24:25.354434 INFO hello_world: You are now ready to run Apps!
2023-02-07 23:24:25.355269 INFO AppDaemon: App initialization complete
2023-02-07 23:24:26.144091 INFO AppDaemon: New client Admin Client connected
2023-02-07 23:24:48.259791 INFO AppDaemon: Client disconnection from None

Hey gohakn,
there is apparently still a small bug in Daniel’s part of the code

Try to change in the main_entity.py ind line 9
from
if config_getjudo.appdaemon:

to

if config_getjudo.APPDAEMON:

the same in line 16

Hey Henning,
changed the two line’s of code like you told me.

Although there are some WARNING messages I think it started

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
Looking in links: https://wheels.home-assistant.io/musllinux/
Requirement already satisfied: paho-mqtt in /usr/lib/python3.10/site-packages (1.6.1)
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
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
[17:06:25] INFO: Starting AppDaemon...
2023-02-08 17:06:27.689754 INFO AppDaemon: AppDaemon Version 4.2.1 starting
2023-02-08 17:06:27.689863 INFO AppDaemon: Python version is 3.10.9
2023-02-08 17:06:27.689935 INFO AppDaemon: Configuration read from: /config/appdaemon/appdaemon.yaml
2023-02-08 17:06:27.690008 INFO AppDaemon: Added log: AppDaemon
2023-02-08 17:06:27.690079 INFO AppDaemon: Added log: Error
2023-02-08 17:06:27.690139 INFO AppDaemon: Added log: Access
2023-02-08 17:06:27.690192 INFO AppDaemon: Added log: Diag
2023-02-08 17:06:27.759332 INFO AppDaemon: Loading Plugin HASS using class HassPlugin from module hassplugin
2023-02-08 17:06:27.854740 INFO HASS: HASS Plugin Initializing
2023-02-08 17:06:27.854936 INFO HASS: HASS Plugin initialization complete
2023-02-08 17:06:27.855205 INFO AppDaemon: Initializing HTTP
2023-02-08 17:06:27.855384 INFO AppDaemon: Using 'ws' for event stream
2023-02-08 17:06:27.857506 INFO AppDaemon: Starting API
2023-02-08 17:06:27.859041 INFO AppDaemon: Starting Admin Interface
2023-02-08 17:06:27.859238 INFO AppDaemon: Starting Dashboards
2023-02-08 17:06:27.867637 INFO HASS: Connected to Home Assistant 2023.2.2
2023-02-08 17:06:27.874108 INFO AppDaemon: App 'main_app' added
2023-02-08 17:06:27.875499 INFO AppDaemon: App 'hello_world' added
2023-02-08 17:06:27.876593 INFO AppDaemon: Found 2 total apps
2023-02-08 17:06:27.876870 INFO AppDaemon: Starting Apps with 2 workers and 2 pins
2023-02-08 17:06:27.878870 INFO AppDaemon: Running on port 5050
2023-02-08 17:06:27.896730 INFO HASS: Evaluating startup conditions
2023-02-08 17:06:27.902216 INFO HASS: Startup condition met: hass state=RUNNING
2023-02-08 17:06:27.902379 INFO HASS: All startup conditions met
2023-02-08 17:06:27.917942 INFO AppDaemon: Got initial state from namespace default
2023-02-08 17:06:29.884400 INFO AppDaemon: Scheduler running in realtime
2023-02-08 17:06:29.887919 INFO AppDaemon: Adding /config/appdaemon/apps to module import path
2023-02-08 17:06:29.888549 INFO AppDaemon: Adding /config/appdaemon/apps/main to module import path
2023-02-08 17:06:29.895132 INFO AppDaemon: Loading App Module: /config/appdaemon/apps/hello.py
2023-02-08 17:06:29.915924 WARNING AppDaemon: No app description found for: /config/appdaemon/apps/main/messages_getjudo.py - ignoring
2023-02-08 17:06:29.916687 WARNING AppDaemon: No app description found for: /config/appdaemon/apps/main/config_getjudo.py - ignoring
2023-02-08 17:06:29.917335 INFO AppDaemon: Loading App Module: /config/appdaemon/apps/main/main_entity.py
2023-02-08 17:06:29.918663 WARNING AppDaemon: No app description found for: /config/appdaemon/apps/main/getjudo.py - ignoring
2023-02-08 17:06:29.919219 INFO AppDaemon: Initializing app main_app using class main_loop from module main_entity
2023-02-08 17:06:29.920225 INFO AppDaemon: Initializing app hello_world using class HelloWorld from module hello
Login erfolgreich, neuer Token: ***** !!!!Achtung, Diesen Token nirgendwo Posten oder Verschicken. Hierdurch erhält man Vollzugriff auf die Anlage!!!!
Lade gespeicherte Variablen
----------------------
Letzte Fehler-ID: 0
Wasserverbrauch gestern: 0
Offset für heutigen Wasserverbrauch: 0
Letzte Ausführung des Scripts: 0
Initialisierung erfolgreich!
['Scriptfehler - Fehler beim Auswerten des Fehlerspeichers in Zeile: 331', IndexError('list index out of range')]
['Scriptfehler - Fehler beim Auswerten des Fehlerspeichers in Zeile: 331', IndexError('list index out of range')]
2023-02-08 17:07:14.354872 INFO AppDaemon: New client Admin Client connected

What does this mean "No app description found *** -ignoring

2023-02-08 17:06:29.915924 WARNING AppDaemon: No app description found for: /config/appdaemon/apps/main/messages_getjudo.py - ignoring
2023-02-08 17:06:29.916687 WARNING AppDaemon: No app description found for: /config/appdaemon/apps/main/config_getjudo.py - ignoring

I’m afraid that the last two Scriptfehler are a result as I`m using a Judo SoftwellP with the connectivity Modul.
Do you all have the I-Soft Pro/+ Versions or is anybody else using a SoftwellP like me ??

That is interesting, my version works like this and python shouldn’t be case sensitive?
It sounded more like missing APPDAEMON entry in the config file.

The no description found are fine, just that they are scanned but not used within the apps.yaml file.

It could be from the system difference, maybe Henning has an idea

Hello,
it could be that the output of the error memory is different with the Softwell. We could try this. Please run the HTTP GET manually and posting the response here.To do this, try to execute this URL (with inserted token) in your browser:

https://myjudo.eu/interface/?token=YOURTOKEN&group=register&command=get%20error%20messages

If this is structured differently in the softwell, we could also include this in the code if necessary. I will also check the javascript of myjudo.eu and see if the softwell needs other GET commands at this point.

BR

Henning

!!!Attention, remove your token from response before you post it!!!

OK, thank you, here’s the result

data	[]
data_hash	"40cd750bca9870f18acda2478b24840a"
status	"ok"
token	"0815 "
count	0
command	"get error messages"

As long as the AppDaemon is running I’m not able to log in in to the Webpage via my Computer.

Hello gohakn,

something is wrong with the connection between your softwell and the Judo server. Does the error really only exist when the script is running? If not, you would have to reconnect the system to the server as described in the manual of the plant.
The output of the error memory looks correct, but the error memory is completely empty. I suspect that this is related to connection problem.
But I will adjust the code anyway so that it can handle an empty error memory.

EDIT: I’ve added a handling for an empty faultmemory :slight_smile:

Hi,

thank you everyone for putting all of this together. I tried to implement this in my HA using Mosquitto and Appdemon and after a while I believe I got it generally working. At least the log of the Appdeamon start up is looking OK to me. One issue I am currently running into is that I get a script error for line 425:

[‘Scriptfehler - Fehler beim Holen und Auswerten der Gerätedaten in Zeile: 425’, TypeError(‘keys must be str, int, float, bool or None, not AppDaemon’)]

Any idea where this could come from and how to fix it?

Thanks,
Flo

Log file of Appdemon during startup:

Letzte Fehler-ID: 230837
Verbunden mit MQTT Broker...
Topics wurden abonniert...
Wasserverbrauch gestern: 0
Offset für heutigen Wasserverbrauch: 202775
Letzte Ausführung des Scripts: 22
da: XXX
dt: XXXX
serial: XXXXX
token: XXXXXXXXXXXXXXXX
Initialisierung erfolgreich!
2023-02-22 12:48:45.649182 WARNING AppDaemon: No app description found for: /config/appdaemon/apps/main/config_getjudo_default.py - ignoring
2023-02-22 12:48:45.690110 WARNING AppDaemon: No app description found for: /config/appdaemon/apps/main/messages_getjudo.py - ignoring
2023-02-22 12:48:45.695716 INFO AppDaemon: Initializing app hello_world using class HelloWorld from module hello
Autoconfigs wurden gesendet...
2023-02-22 12:48:45.710602 INFO AppDaemon: Initializing app main_app using class main_loop from module main_entity
2023-02-22 12:48:45.729951 INFO AppDaemon: Initializing app judo_app using class entity from module getjudo
2023-02-22 12:48:45.977588 INFO hello_world: Hello from AppDaemon
2023-02-22 12:48:45.979819 INFO hello_world: You are now ready to run Apps!
2023-02-22 12:48:45.985474 WARNING AppDaemon: Unable to find initialize() function in module judo_app - skipped
2023-02-22 12:48:45.986787 INFO AppDaemon: App initialization complete
['Scriptfehler - Fehler beim Holen und Auswerten der Gerätedaten in Zeile: 425', TypeError('keys must be str, int, float, bool or None, not AppDaemon')]

You have to setup and define your config, then rename from “config_getjudo_default” to “config_getjudo”

Did you modified the apps.yaml file or any other file? because I believe it runs the script twice:
2023-02-22 12:48:45.729951 INFO AppDaemon: Initializing app judo_app using class entity from module getjudo

Config was defined correctly and config was named correctly already.
Thanks for the hint with running the script twice. This was the case and I could resolve the issues with running it just once once.
What I learnt is that running the script as

main_app:
  module: main_entity
  class: main_loop

works for me. Nevertheless, running the scrips as

 judo_app:
   module: getjudo
   class: entity

runs into the script error posted before: [‘Scriptfehler - Fehler beim Holen und Auswerten der Gerätedaten in Zeile: 425’, TypeError(‘keys must be str, int, float, bool or None, not AppDaemon’)]

Just posting this finding here in case someone else is running into this issue as well in the future.
Thanks for your support!

1 Like

@www-ShapeLabs-de
Thank you for bringing Judo to my HA Installation!

All ist up and running and i can track my water consumption etc… (ok, right now my Judo itself is offline - have to fix this asap).

One question regarding the entitities:
To use eg the water entity in the HA energy dashboard it needs some extra information (i think so - i*m really new to HA).

Now it is:
unit_of_measurement: m³
icon: mdi:water-circle
friendly_name: Judo_isoftsaveplus-home Gesamtwasserverbrauch

Nice would be:
unit_of_measurement: m³
device_class: water
icon: mdi:water
friendly_name: Wasserverbrauch
state_class: total_increasing

Seems hard for a noob like me to fix this. Creating a template sensor in configuration.yaml with state_class: total increasing ist not accepted bei HA.

Any chance to implement this directly in the code for Judo?

Thanks

Edit:
HA does not accept a new sensor with state_class: total_increasing, but a template seem to work:


      - name: "Wasserverbrauch (Energy Dashboard)"
        unit_of_measurement: "m³"
        icon: mdi:water
        device_class: water
        state_class: total_increasing
        state: "{{ states('sensor.judo_isoftsaveplus_home_gesamtwasserverbrauch') }}"

So - problem solved…

Hello Henning, and Sorry for the late reply…

But on Feb. 10th I had an HDD Crash at my Computer and it took my a few Weeks to recover most of the things, and so the topic of getting my JUDO talking to Homeassistant was not that urgent.

UPDATE:

The last problem I had could was a result of wrong MQTT credentials I`ve entered into your config file.

Now your Script is doing well and I also get the Entities inside Homeassistant for about 2 hours.
Just one more question about the Entities:

  • Getting an 0 for Batterierestkappa, Salzreichweite and Wasserdurchflussmenge is OK as there`s no Sensor for that.
  • Gesamtwasserverbrauch, Verbrauch_Gestern and Verbrauch_Heute is also 0.

Can you tell me how long does it take for the Waterconsumption values to be published.?

  • The Gesamthartwasseranteil is declared to be negative -143,631 m³


Maybe this is because I´m using your script with a Softwell-P +additional Connectivity Module.
db2