Judo water treatment

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

Hey mucki,
Thanks, i’ve fixed it in the repo

best regards…

Hey gokhan,
maybe the issue with the wrong/zero values causes of a different response from the Softwell-P

Could you post the response of
https://www.myjudo.eu/interface/?token=YOUROTOKEN=register&command=get%20device%20data

!!!Attention - Remove your Token from the response!!!

Then we will have a look at how the data set of the softwell is structured and see if we can find the values elsewhere.

Best regards

I`ve tried your URL + knmtoken and/or judotoken but the result is only a blank page… :roll_eyes:

Hi Gohakn

the Gesamthartwasseranteil is negative because it is very likely calculated as (Gesamtwasserverbrauch - Gesamtweichwasseranteil). SInce your Gesamtwasserverbrauch = 0 you get a negative value. See screenshot. Hope that helps a little.

BR

Judo Wasserverbrauch

Two stupid questions:

  1. Does this also work for the JUDO ZEWA i-SAFE FILT?
  2. Does it need a permanent connection to some cloud or is control and sensors locally with MQTT?
1 Like

Hello Henning,

here is the result you asked for ( one month ago) . :grimacing:
Now i managed to get the desired device data out of my JUDO…

{"data":[{"serialnumber":"0815"
installation_date:"2022-02-28T19:03:51"
status:"online"
sv:"2.10"
hv:"3.0"
data:[{"da":"0x1"
dt:"0x34"
sv:"1.10e"
hv:"5.20"
data:{"1":{"data":"650A01"
st:"OK"
er:""}
2:{"data":"1405"
st:"OK"
er:""}
3:{"data":"259F0300"
st:"OK"
er:""}
5:{"data":"0302AF01"
st:"OK"
er:""}
6:{"data":"6214B8F8"
st:"OK"
er:""}
7:{"data":"F41B01000000"
st:"OK"
er:""}
8:{"data":"00000000"
st:"OK"
er:""}
9:{"data":"7B580200"
st:"OK"
er:""}
10:{"data":"00"
st:"OK"
er:""}
12:{"data":"00"
st:"OK"
er:""}
14:{"data":"0702AF01"
st:"OK"
er:""}
63:{"data":"21"
st:"OK"
er:""}
90:{"data":"1500"
st:"OK"
er:""}
92:{"data":"1500"
st:"OK"
er:""}
93:{"data":"0000000000"
st:"OK"
er:""}
94:{"data":"00000000"
st:"OK"
er:""}
790:{"data":"0:00810F1000000100080015000000000000000000000000008F06150288000000"
st:"OK"
er:""}
791:{"data":"1:800000000B489C03B100000000000000710023000000020000000E003B069302"
st:"OK"
er:""}
792:{"data":"2:0036000000000000000000000000000000008000000000000000000000000000"
st:"OK"
er:""}
793:null
794:null
lu:"29\/4\/2023 - 14:26:38"}}]
errors:[]
waterscene_time:null
waterscene_time_garden:null
waterscene_time_heater:null
waterscene_time_washing:null
waterscene:null
disable_time:null
waterscene_normal:null
sleepmode_time:null
holiday_mode:null
update:"0"}]
status:"ok"
token:"0815"
command:"get device data"}


Can we give it a try to get more usable entities for your HA intergration with that?

The data & picture where taken at the same time so the Values ( if you can read them) should match…

Especially the Values for Total / todays / yesterday water consumption would be good to have in HomeAssistant.

Thank you.

To all who are also struggling getting the Device data:

I used this link instead of the one posted by Henning on April 2nd.

New Link

1 Like

Heyy gohakn,

your dataset looks normal so far, but unfortunately the attachment under index 8 returns the value 0

8:{“data”: “00000000”
st: “OK”
er:""}

This should actually be your total water consumption in hexadecimal coding. I searched the myjudo javascript again to see if there is another index where the total water hardness is coded, but unfortunately found nothing:

https://www.myjudo.eu/js/deviceDataConverter.js?version=1.312

Is the app or the myjudo portal showing you the total water consumption correctly?

Many greetings

Henning

Yes, the APP and also the Website is showing the actual Value…

And also the daily Consumption is working.

Do you think the serviceguys at judo.de will tell where`s the difference in the data between the isoft+ and the Softwell P ?

Hey Gohakn,
I noticed that the display of the totalwater amount in the app/browser is very similar with the softwater amount from the script. Is it maybe the same value and you have used another 3.7m³ in the meantime, or do you have very hard water? The statistics query (chart) is a different HTTP command. I had also executed this via my script in the meantime. The problem was that the Judo server had blocked the token if this command was executed in too short time intervals. Therefore the daily consumption is calculated by the script itself from the difference of the current total water quantity to that of 0.00o’clock.

Maybe you note the value of your water meter and the value from the script, wait a few days and then compare the difference of the values. If this is the same, then it could be that the value of the soft water quantity at the Softwell is the total water quantity.

greetings

Henning

Hey Henning,

As there is no point / value for hard water inside the Softwell P i think your last thoughts point to the right direction…


Here you can see how the Menu looks like and which Values are given inside the Webpage.

So for me your:

  • “Gesamtweichwasser Anteil” is the Total Consumption and should be the “Gesamtwasserverbrauch”
  • “Gesamthartwasser Anteil”, “Batterierestkapazität” and “Salzreichweite” are unneccesary because it`s not measured / monitored
  • “Verbrauch Gestern und Verbrauch heute” should be calculated from the “Wasserverbrauchsdiagramm” 0:00 to 24:00 Uhr / day

As I`ve never done programming & coding something like your Judo Integration I have no plan how much time it would take to make these three changes and this only if one is using a Softwell P, because otherwise everything works perfect right as it is.
Can you make a forecast how much there is to do?¿?

Hello gohakn,

this is all done relatively fast, if you know the code of the script and where to start. Since I wrote the code, this would be maybe a quarter of an hour’s work for me.
If you give me a little time, I would adjust everything on occasion so that you can set in the config file if you want to use the script with the Softwell system. Then we would have a version that can be used for both systems.

Greetings

Henning

Of course , if you find the time to make all the changes i will be happy to see, test and use your Softwell-Custom Version.
Thank you :beers:

Hello Henning, (@www-ShapeLabs-de ),
I’ll jump on what @Sesshoumaru wrote: Do you think this would work with the ZEWA i-SAFE? Due to stupid reasons, I won’t be able to get the i-soft, so for leakage protection etc. the ZEWA i-SAFE is my only choice.

Also: Judo advertises local API access… has anybody found any link into that? Because running this script seems overly difficult, if really there should be local API integration. No?

That said: thank you so much for your work here!

Dear Henning,

just wanted to ask (without beeing urgent!!) if you were able spending some time at the code for the Softwell System.

Greetings

Stephan