Binding Request: Judo Entkalkungsanlagen

We have a decalcification system from the company Judo (https://judo.eu/produkt/judo-i-soft-plus-vollautomatische-enthaertungsanlage/), which I have queried so far with a rule.
Unfortunately, with the conversion to 2.4, the query no longer works due to an SSL error. (sendHttpGetRequest not working under OH 2.4 M7 after Update from 2.3)

I have done the following so far:
Installation of the certificate for the decalcification system

Loaded the crt to /home/openhabian

export JAVA_HOME=/usr/lib/jvm/zulu-embedded-8-armhf

keytool -importcert -file /home/openhabian/PeterBauer.crt -keystore $JAVA_HOME/jre/lib/security/cacerts -alias Judo

Used the password: changeit

The rule so far has been this:

val String BENUTZER= "USER"
val String PASSWORD= "PW"
val String GERAETEID= "XXXXXX"
val String JUDOIP= "192.168.178.28"
val String PORT= "8124"


rule "Judo"
when
    Item residual_hardness_setpoint changed or
    Item watervalveswitch changed or
    Time is midnight or
    Time is noon

then
logInfo("Judo","1")
	var String tokenjson = sendHttpGetRequest("https://"+ JUDOIP +":" + PORT + "?group=register&command=login&msgnumber=2&name=login&user=" + BENUTZER + "&password=" + PASSWORD + "&role=customer")

logInfo("Judo","2")
	var String TOKEN = transform("JSONPATH", "$.token", tokenjson)

logInfo("Judo","3")
	var String loginjson = sendHttpGetRequest("https://"+ JUDOIP +":" + PORT + "?group=register&command=connect&msgnumber=5&token=" + TOKEN + "&parameter=i-soft%20plus&serial%20number=" + GERAETEID)

logInfo("Judo","4")
    var String LOGINSTATUS = transform("JSONPATH", "$.status", loginjson)

    if (LOGINSTATUS == "ok")
    {
        logInfo("Judo","Login erfolgreich")

        var String wcjson = sendHttpGetRequest("https://"+ JUDOIP +":" + PORT + "?group=consumption&command=water%20current&msgnumber=1&token=" + TOKEN )
        var String var_water_current = transform("JSONPATH", "$.data", wcjson)
        water_current.postUpdate(var_water_current)

        var String wtjson = sendHttpGetRequest("https://"+ JUDOIP +":" + PORT + "?group=consumption&command=water%20total&msgnumber=1&token=" + TOKEN )
        var String var_water_total = transform("JSONPATH", "$.data", wtjson)
        var Number var_rawwater = Float::parseFloat(var_water_total.split(" ").get(1))
        var Number var_decarbonatedwater = Float::parseFloat(var_water_total.split(" ").get(2))
        water_total.postUpdate(var_water_total)
        rawwater.postUpdate(var_rawwater)
        decarbonatedwater.postUpdate(var_decarbonatedwater)

        var String wajson = sendHttpGetRequest("https://"+ JUDOIP +":" + PORT + "?group=consumption&command=water%20average&msgnumber=1&token=" + TOKEN )
        var String var_water_average = transform("JSONPATH", "$.data", wajson)
        water_average.postUpdate(var_water_average)

        var String aqjson = sendHttpGetRequest("https://"+ JUDOIP +":" + PORT + "?group=consumption&command=actual%20quantity&msgnumber=1&token=" + TOKEN )
        var String var_actual_quantity = transform("JSONPATH", "$.data", aqjson)
        actual_quantity.postUpdate(var_actual_quantity)

        var String sqjson = sendHttpGetRequest("https://"+ JUDOIP +":" + PORT + "?group=consumption&command=salt%20quantity&msgnumber=1&token=" + TOKEN )
        var String var_salt_quantity = transform("JSONPATH", "$.data", sqjson)
        salt_quantity.postUpdate(var_salt_quantity)

        var String srjson = sendHttpGetRequest("https://"+ JUDOIP +":" + PORT + "?group=consumption&command=salt%20range&msgnumber=1&token=" + TOKEN )
        var String var_salt_range = transform("JSONPATH", "$.data", srjson)
        salt_range.postUpdate(var_salt_range)

        var String rhjson = sendHttpGetRequest("https://"+ JUDOIP +":" + PORT + "?group=settings&command=residual%20hardness&msgnumber=1&token=" + TOKEN )
        var String var_residual_hardness = transform("JSONPATH", "$.data", rhjson)
        residual_hardness.postUpdate(var_residual_hardness)

        var String nhjson = sendHttpGetRequest("https://"+ JUDOIP +":" + PORT + "?group=settings&command=residual%20hardness&msgnumber=1&token=" + TOKEN )
        var String var_natural_hardness = transform("JSONPATH", "$.data", nhjson)
        natural_hardness.postUpdate(var_natural_hardness)

        var String vajson = sendHttpGetRequest("https://"+ JUDOIP +":" + PORT + "?group=waterstop&command=valve&msgnumber=1&token=" + TOKEN )
        var String var_valve = transform("JSONPATH", "$.data", vajson)
        valve.postUpdate(var_valve)

        var String wwjson = sendHttpGetRequest("https://"+ JUDOIP +":" + PORT + "?group=consumption&command=water%20weekly&msgnumber=1&token=" + TOKEN + "&year=%3CYEAR%3E&month=%3CMONTH%3E&day=%3CDAY%3E")
        var String var_water_weekly = transform("JSONPATH", "$.data", wwjson)
        var Number var_mon = Float::parseFloat(var_water_weekly.split(" ").get(1))
        var Number var_tue = Float::parseFloat(var_water_weekly.split(" ").get(2))
        var Number var_wed = Float::parseFloat(var_water_weekly.split(" ").get(3))
        var Number var_thu = Float::parseFloat(var_water_weekly.split(" ").get(4))
        var Number var_fri = Float::parseFloat(var_water_weekly.split(" ").get(5))
        var Number var_sat = Float::parseFloat(var_water_weekly.split(" ").get(6))
        var Number var_sun = Float::parseFloat(var_water_weekly.split(" ").get(7))
        water_weekly.postUpdate(var_water_weekly)
        watermon.postUpdate(var_mon)
        watertue.postUpdate(var_tue)
        waterwed.postUpdate(var_wed)
        waterthu.postUpdate(var_thu)
        waterfri.postUpdate(var_fri)
        watersat.postUpdate(var_sat)
        watersun.postUpdate(var_sun)


        var String wyjson = sendHttpGetRequest("https://"+ JUDOIP +":" + PORT + "?group=consumption&command=water%20yearly&msgnumber=1&token=" + TOKEN + "&year=%3CYEAR%3E")
        var String var_water_yearly = transform("JSONPATH", "$.data", wyjson)
        var Number var_jan = Float::parseFloat(var_water_yearly.split(" ").get(1))
        var Number var_feb = Float::parseFloat(var_water_yearly.split(" ").get(2))
        var Number var_mar = Float::parseFloat(var_water_yearly.split(" ").get(3))
        var Number var_apr = Float::parseFloat(var_water_yearly.split(" ").get(4))
        var Number var_mai = Float::parseFloat(var_water_yearly.split(" ").get(5))
        var Number var_jun = Float::parseFloat(var_water_yearly.split(" ").get(6))
        var Number var_jul = Float::parseFloat(var_water_yearly.split(" ").get(7))
        var Number var_aug = Float::parseFloat(var_water_yearly.split(" ").get(8))
        var Number var_sep = Float::parseFloat(var_water_yearly.split(" ").get(9))
        var Number var_okt = Float::parseFloat(var_water_yearly.split(" ").get(10))
        var Number var_nov = Float::parseFloat(var_water_yearly.split(" ").get(11))
        var Number var_dez = Float::parseFloat(var_water_yearly.split(" ").get(12))

        water_yearly.postUpdate(var_water_yearly)
        waterjan.postUpdate(var_jan)
        waterfeb.postUpdate(var_feb)
        watermar.postUpdate(var_mar)
        waterapr.postUpdate(var_apr)
        watermai.postUpdate(var_mai)
        waterjun.postUpdate(var_jun)
        waterjul.postUpdate(var_jul)
        wateraug.postUpdate(var_aug)
        watersep.postUpdate(var_sep)
        waterokt.postUpdate(var_okt)
        waternov.postUpdate(var_nov)
        waterdez.postUpdate(var_dez)

        if (residual_hardness_setpoint.state != residual_hardness)
            {
            var String rhsjson = sendHttpGetRequest("https://"+ JUDOIP +":" + PORT + "?group=settings&command=residual%20hardness&msgnumber=1&token=" + TOKEN + "&parameter=" + residual_hardness_setpoint.state )
            var String var_residual_hardness_status = transform("JSONPATH", "$.status", rhsjson)
            if ( var_residual_hardness_status == "ok")
                {
                var String var_residual_hardness_setpoint = transform("JSONPATH", "$.parameter", rhsjson)
                residual_hardness.postUpdate(var_residual_hardness_setpoint)
                residual_hardness_setpoint.postUpdate(var_residual_hardness_setpoint)
                }
            }


        if (watervalveswitch.state == ON && valve.state.toString.contains("opened"))
            {
            var String vsjson = sendHttpGetRequest("https://"+ JUDOIP +":" + PORT + "?group=waterstop&command=valve&msgnumber=1&token=" + TOKEN + "&parameter=close")
            logInfo("Judo","Wassersperrventil GESCHLOSSEN")
            }


        if (watervalveswitch.state == OFF && valve.state.toString.contains("closed"))
            {
            var String vsjson = sendHttpGetRequest("https://"+ JUDOIP +":" + PORT + "?group=waterstop&command=valve&msgnumber=1&token=" + TOKEN + "&parameter=open")
            logInfo("Judo","Wassersperrventil OFFEN")
            }

        }
end

The information I got from the blog of Mario “µ” Mueh. (https://blog.muwave.de/2017/06/monitoring-and-controlling-a-judo-i-soft-plus-water-softening-device-via-lan/) Who has already written a PHP script for the query, which can be used if necessary.
https://blog.muwave.de/wp-content/uploads/2017/06/judo_ui.txt

1 Like

It’s not very clear, does it work again or not?

No, the rules are not working anymore since the Change to 2.4,

A Http Request with the Http Binding to the URL is working. Thats also the reason why im asking for a Binding, perhabs its working like Http Binding and not like the rules.

We have also a decalcification system from the company Judo an i am interested in integrate it in the open hab system. i would glad, if you post your hints to get a running system für the Judo i-Soft Plus integration.

M

There are no timeout parameters in your http calls, add one:
example:

var String tokenjson = sendHttpGetRequest("https://"+ JUDOIP +":" + PORT + "?group=register&command=login&msgnumber=2&name=login&user=" + BENUTZER + "&password=" + PASSWORD + "&role=customer", 5000)

I’m also interested in a solution to connect to a JUDO system integrated in OH2.5. Could you get it working? If so can you share steps to do so.(judo.rules & judo.items but no values have been transfered into HABPanel

Ist only working if you have a OH < 2.4. In my case i configured an extra OH System running on 2.3 for this Judo System. The other OH Instance with 2.5.3 is getting the values from the Judo OH every 5 min. The problem is that the OH above 2.4 doesn’t accept the cerificate of the Judo System anymore. The second system is the only workaround thats working for me at the moment

Run openHAB 2.5.7 snapshot #157. Tried to apply your rule. The error which i can retrieve within openhab.log is not “SSL handshake error” which i would expect due to the expired certificate. Instead of this i see “fatal transport error…etc.”?

Tried to connect JUDO w.r.t. the certificate. Are there any news on your side in the meantime?

Thanks and best regards,
Willi

Unfortunately, nothing else has come up. I also had fatal errors. Sadly I do not have the know how to develop a binding.
I still have a second OH 2.4 system running for the Judo decalcification system
.

Would it be possible that one of the experts could check the rule syntax of zippochonda’s rule for openHAB 2.5.7. (snapshot #157)? This would be great…

val String BENUTZER= “USER”
val String PASSWORD= “PW”
val String GERAETEID= “XXXXXX”
val String JUDOIP= “192.168.178.28”
val String PORT= “8124”

rule “Judo”
when
Item residual_hardness_setpoint changed or
Item watervalveswitch changed or
Time is midnight or
Time is noon

then
logInfo(“Judo”,“1”)
var String tokenjson = sendHttpGetRequest(“https://”+ JUDOIP +":" + PORT + “?group=register&command=login&msgnumber=2&name=login&user=” + BENUTZER + “&password=” + PASSWORD + “&role=customer”)

logInfo(“Judo”,“2”)
var String TOKEN = transform(“JSONPATH”, “$.token”, tokenjson)

logInfo(“Judo”,“3”)
var String loginjson = sendHttpGetRequest(“https://”+ JUDOIP +":" + PORT + “?group=register&command=connect&msgnumber=5&token=” + TOKEN + “&parameter=i-soft%20plus&serial%20number=” + GERAETEID)

logInfo(“Judo”,“4”)
var String LOGINSTATUS = transform(“JSONPATH”, “$.status”, loginjson)

if (LOGINSTATUS == "ok")
{
    logInfo("Judo","Login erfolgreich")

    var String wcjson = sendHttpGetRequest("https://"+ JUDOIP +":" + PORT + "?group=consumption&command=water%20current&msgnumber=1&token=" + TOKEN )
    var String var_water_current = transform("JSONPATH", "$.data", wcjson)
    water_current.postUpdate(var_water_current)

    var String wtjson = sendHttpGetRequest("https://"+ JUDOIP +":" + PORT + "?group=consumption&command=water%20total&msgnumber=1&token=" + TOKEN )
    var String var_water_total = transform("JSONPATH", "$.data", wtjson)
    var Number var_rawwater = Float::parseFloat(var_water_total.split(" ").get(1))
    var Number var_decarbonatedwater = Float::parseFloat(var_water_total.split(" ").get(2))
    water_total.postUpdate(var_water_total)
    rawwater.postUpdate(var_rawwater)
    decarbonatedwater.postUpdate(var_decarbonatedwater)

    var String wajson = sendHttpGetRequest("https://"+ JUDOIP +":" + PORT + "?group=consumption&command=water%20average&msgnumber=1&token=" + TOKEN )
    var String var_water_average = transform("JSONPATH", "$.data", wajson)
    water_average.postUpdate(var_water_average)

    var String aqjson = sendHttpGetRequest("https://"+ JUDOIP +":" + PORT + "?group=consumption&command=actual%20quantity&msgnumber=1&token=" + TOKEN )
    var String var_actual_quantity = transform("JSONPATH", "$.data", aqjson)
    actual_quantity.postUpdate(var_actual_quantity)

    var String sqjson = sendHttpGetRequest("https://"+ JUDOIP +":" + PORT + "?group=consumption&command=salt%20quantity&msgnumber=1&token=" + TOKEN )
    var String var_salt_quantity = transform("JSONPATH", "$.data", sqjson)
    salt_quantity.postUpdate(var_salt_quantity)

    var String srjson = sendHttpGetRequest("https://"+ JUDOIP +":" + PORT + "?group=consumption&command=salt%20range&msgnumber=1&token=" + TOKEN )
    var String var_salt_range = transform("JSONPATH", "$.data", srjson)
    salt_range.postUpdate(var_salt_range)

    var String rhjson = sendHttpGetRequest("https://"+ JUDOIP +":" + PORT + "?group=settings&command=residual%20hardness&msgnumber=1&token=" + TOKEN )
    var String var_residual_hardness = transform("JSONPATH", "$.data", rhjson)
    residual_hardness.postUpdate(var_residual_hardness)

    var String nhjson = sendHttpGetRequest("https://"+ JUDOIP +":" + PORT + "?group=settings&command=residual%20hardness&msgnumber=1&token=" + TOKEN )
    var String var_natural_hardness = transform("JSONPATH", "$.data", nhjson)
    natural_hardness.postUpdate(var_natural_hardness)

    var String vajson = sendHttpGetRequest("https://"+ JUDOIP +":" + PORT + "?group=waterstop&command=valve&msgnumber=1&token=" + TOKEN )
    var String var_valve = transform("JSONPATH", "$.data", vajson)
    valve.postUpdate(var_valve)

    var String wwjson = sendHttpGetRequest("https://"+ JUDOIP +":" + PORT + "?group=consumption&command=water%20weekly&msgnumber=1&token=" + TOKEN + "&year=%3CYEAR%3E&month=%3CMONTH%3E&day=%3CDAY%3E")
    var String var_water_weekly = transform("JSONPATH", "$.data", wwjson)
    var Number var_mon = Float::parseFloat(var_water_weekly.split(" ").get(1))
    var Number var_tue = Float::parseFloat(var_water_weekly.split(" ").get(2))
    var Number var_wed = Float::parseFloat(var_water_weekly.split(" ").get(3))
    var Number var_thu = Float::parseFloat(var_water_weekly.split(" ").get(4))
    var Number var_fri = Float::parseFloat(var_water_weekly.split(" ").get(5))
    var Number var_sat = Float::parseFloat(var_water_weekly.split(" ").get(6))
    var Number var_sun = Float::parseFloat(var_water_weekly.split(" ").get(7))
    water_weekly.postUpdate(var_water_weekly)
    watermon.postUpdate(var_mon)
    watertue.postUpdate(var_tue)
    waterwed.postUpdate(var_wed)
    waterthu.postUpdate(var_thu)
    waterfri.postUpdate(var_fri)
    watersat.postUpdate(var_sat)
    watersun.postUpdate(var_sun)


    var String wyjson = sendHttpGetRequest("https://"+ JUDOIP +":" + PORT + "?group=consumption&command=water%20yearly&msgnumber=1&token=" + TOKEN + "&year=%3CYEAR%3E")
    var String var_water_yearly = transform("JSONPATH", "$.data", wyjson)
    var Number var_jan = Float::parseFloat(var_water_yearly.split(" ").get(1))
    var Number var_feb = Float::parseFloat(var_water_yearly.split(" ").get(2))
    var Number var_mar = Float::parseFloat(var_water_yearly.split(" ").get(3))
    var Number var_apr = Float::parseFloat(var_water_yearly.split(" ").get(4))
    var Number var_mai = Float::parseFloat(var_water_yearly.split(" ").get(5))
    var Number var_jun = Float::parseFloat(var_water_yearly.split(" ").get(6))
    var Number var_jul = Float::parseFloat(var_water_yearly.split(" ").get(7))
    var Number var_aug = Float::parseFloat(var_water_yearly.split(" ").get(8))
    var Number var_sep = Float::parseFloat(var_water_yearly.split(" ").get(9))
    var Number var_okt = Float::parseFloat(var_water_yearly.split(" ").get(10))
    var Number var_nov = Float::parseFloat(var_water_yearly.split(" ").get(11))
    var Number var_dez = Float::parseFloat(var_water_yearly.split(" ").get(12))

    water_yearly.postUpdate(var_water_yearly)
    waterjan.postUpdate(var_jan)
    waterfeb.postUpdate(var_feb)
    watermar.postUpdate(var_mar)
    waterapr.postUpdate(var_apr)
    watermai.postUpdate(var_mai)
    waterjun.postUpdate(var_jun)
    waterjul.postUpdate(var_jul)
    wateraug.postUpdate(var_aug)
    watersep.postUpdate(var_sep)
    waterokt.postUpdate(var_okt)
    waternov.postUpdate(var_nov)
    waterdez.postUpdate(var_dez)

    if (residual_hardness_setpoint.state != residual_hardness)
        {
        var String rhsjson = sendHttpGetRequest("https://"+ JUDOIP +":" + PORT + "?group=settings&command=residual%20hardness&msgnumber=1&token=" + TOKEN + "&parameter=" + residual_hardness_setpoint.state )
        var String var_residual_hardness_status = transform("JSONPATH", "$.status", rhsjson)
        if ( var_residual_hardness_status == "ok")
            {
            var String var_residual_hardness_setpoint = transform("JSONPATH", "$.parameter", rhsjson)
            residual_hardness.postUpdate(var_residual_hardness_setpoint)
            residual_hardness_setpoint.postUpdate(var_residual_hardness_setpoint)
            }
        }


    if (watervalveswitch.state == ON && valve.state.toString.contains("opened"))
        {
        var String vsjson = sendHttpGetRequest("https://"+ JUDOIP +":" + PORT + "?group=waterstop&command=valve&msgnumber=1&token=" + TOKEN + "&parameter=close")
        logInfo("Judo","Wassersperrventil GESCHLOSSEN")
        }


    if (watervalveswitch.state == OFF && valve.state.toString.contains("closed"))
        {
        var String vsjson = sendHttpGetRequest("https://"+ JUDOIP +":" + PORT + "?group=waterstop&command=valve&msgnumber=1&token=" + TOKEN + "&parameter=open")
        logInfo("Judo","Wassersperrventil OFFEN")
        }

    }

end


val String BENUTZER= “USER”
val String PASSWORD= “PW”
val String GERAETEID= “XXXXXX”
val String JUDOIP= “192.168.178.28”
val String PORT= “8124”

rule “Judo”
when
Item residual_hardness_setpoint changed or
Item watervalveswitch changed or
Time is midnight or
Time is noon

then
logInfo(“Judo”,“1”)
var String tokenjson = sendHttpGetRequest(“https://”+ JUDOIP +":" + PORT + “?group=register&command=login&msgnumber=2&name=login&user=” + BENUTZER + “&password=” + PASSWORD + “&role=customer”)

logInfo(“Judo”,“2”)
var String TOKEN = transform(“JSONPATH”, “$.token”, tokenjson)

logInfo(“Judo”,“3”)
var String loginjson = sendHttpGetRequest(“https://”+ JUDOIP +":" + PORT + “?group=register&command=connect&msgnumber=5&token=” + TOKEN + “&parameter=i-soft%20plus&serial%20number=” + GERAETEID)

logInfo(“Judo”,“4”)
var String LOGINSTATUS = transform(“JSONPATH”, “$.status”, loginjson)

if (LOGINSTATUS == "ok")
{
    logInfo("Judo","Login erfolgreich")

    var String wcjson = sendHttpGetRequest("https://"+ JUDOIP +":" + PORT + "?group=consumption&command=water%20current&msgnumber=1&token=" + TOKEN )
    var String var_water_current = transform("JSONPATH", "$.data", wcjson)
    water_current.postUpdate(var_water_current)

    var String wtjson = sendHttpGetRequest("https://"+ JUDOIP +":" + PORT + "?group=consumption&command=water%20total&msgnumber=1&token=" + TOKEN )
    var String var_water_total = transform("JSONPATH", "$.data", wtjson)
    var Number var_rawwater = Float::parseFloat(var_water_total.split(" ").get(1))
    var Number var_decarbonatedwater = Float::parseFloat(var_water_total.split(" ").get(2))
    water_total.postUpdate(var_water_total)
    rawwater.postUpdate(var_rawwater)
    decarbonatedwater.postUpdate(var_decarbonatedwater)

    var String wajson = sendHttpGetRequest("https://"+ JUDOIP +":" + PORT + "?group=consumption&command=water%20average&msgnumber=1&token=" + TOKEN )
    var String var_water_average = transform("JSONPATH", "$.data", wajson)
    water_average.postUpdate(var_water_average)

    var String aqjson = sendHttpGetRequest("https://"+ JUDOIP +":" + PORT + "?group=consumption&command=actual%20quantity&msgnumber=1&token=" + TOKEN )
    var String var_actual_quantity = transform("JSONPATH", "$.data", aqjson)
    actual_quantity.postUpdate(var_actual_quantity)

    var String sqjson = sendHttpGetRequest("https://"+ JUDOIP +":" + PORT + "?group=consumption&command=salt%20quantity&msgnumber=1&token=" + TOKEN )
    var String var_salt_quantity = transform("JSONPATH", "$.data", sqjson)
    salt_quantity.postUpdate(var_salt_quantity)

    var String srjson = sendHttpGetRequest("https://"+ JUDOIP +":" + PORT + "?group=consumption&command=salt%20range&msgnumber=1&token=" + TOKEN )
    var String var_salt_range = transform("JSONPATH", "$.data", srjson)
    salt_range.postUpdate(var_salt_range)

    var String rhjson = sendHttpGetRequest("https://"+ JUDOIP +":" + PORT + "?group=settings&command=residual%20hardness&msgnumber=1&token=" + TOKEN )
    var String var_residual_hardness = transform("JSONPATH", "$.data", rhjson)
    residual_hardness.postUpdate(var_residual_hardness)

    var String nhjson = sendHttpGetRequest("https://"+ JUDOIP +":" + PORT + "?group=settings&command=residual%20hardness&msgnumber=1&token=" + TOKEN )
    var String var_natural_hardness = transform("JSONPATH", "$.data", nhjson)
    natural_hardness.postUpdate(var_natural_hardness)

    var String vajson = sendHttpGetRequest("https://"+ JUDOIP +":" + PORT + "?group=waterstop&command=valve&msgnumber=1&token=" + TOKEN )
    var String var_valve = transform("JSONPATH", "$.data", vajson)
    valve.postUpdate(var_valve)

    var String wwjson = sendHttpGetRequest("https://"+ JUDOIP +":" + PORT + "?group=consumption&command=water%20weekly&msgnumber=1&token=" + TOKEN + "&year=%3CYEAR%3E&month=%3CMONTH%3E&day=%3CDAY%3E")
    var String var_water_weekly = transform("JSONPATH", "$.data", wwjson)
    var Number var_mon = Float::parseFloat(var_water_weekly.split(" ").get(1))
    var Number var_tue = Float::parseFloat(var_water_weekly.split(" ").get(2))
    var Number var_wed = Float::parseFloat(var_water_weekly.split(" ").get(3))
    var Number var_thu = Float::parseFloat(var_water_weekly.split(" ").get(4))
    var Number var_fri = Float::parseFloat(var_water_weekly.split(" ").get(5))
    var Number var_sat = Float::parseFloat(var_water_weekly.split(" ").get(6))
    var Number var_sun = Float::parseFloat(var_water_weekly.split(" ").get(7))
    water_weekly.postUpdate(var_water_weekly)
    watermon.postUpdate(var_mon)
    watertue.postUpdate(var_tue)
    waterwed.postUpdate(var_wed)
    waterthu.postUpdate(var_thu)
    waterfri.postUpdate(var_fri)
    watersat.postUpdate(var_sat)
    watersun.postUpdate(var_sun)


    var String wyjson = sendHttpGetRequest("https://"+ JUDOIP +":" + PORT + "?group=consumption&command=water%20yearly&msgnumber=1&token=" + TOKEN + "&year=%3CYEAR%3E")
    var String var_water_yearly = transform("JSONPATH", "$.data", wyjson)
    var Number var_jan = Float::parseFloat(var_water_yearly.split(" ").get(1))
    var Number var_feb = Float::parseFloat(var_water_yearly.split(" ").get(2))
    var Number var_mar = Float::parseFloat(var_water_yearly.split(" ").get(3))
    var Number var_apr = Float::parseFloat(var_water_yearly.split(" ").get(4))
    var Number var_mai = Float::parseFloat(var_water_yearly.split(" ").get(5))
    var Number var_jun = Float::parseFloat(var_water_yearly.split(" ").get(6))
    var Number var_jul = Float::parseFloat(var_water_yearly.split(" ").get(7))
    var Number var_aug = Float::parseFloat(var_water_yearly.split(" ").get(8))
    var Number var_sep = Float::parseFloat(var_water_yearly.split(" ").get(9))
    var Number var_okt = Float::parseFloat(var_water_yearly.split(" ").get(10))
    var Number var_nov = Float::parseFloat(var_water_yearly.split(" ").get(11))
    var Number var_dez = Float::parseFloat(var_water_yearly.split(" ").get(12))

    water_yearly.postUpdate(var_water_yearly)
    waterjan.postUpdate(var_jan)
    waterfeb.postUpdate(var_feb)
    watermar.postUpdate(var_mar)
    waterapr.postUpdate(var_apr)
    watermai.postUpdate(var_mai)
    waterjun.postUpdate(var_jun)
    waterjul.postUpdate(var_jul)
    wateraug.postUpdate(var_aug)
    watersep.postUpdate(var_sep)
    waterokt.postUpdate(var_okt)
    waternov.postUpdate(var_nov)
    waterdez.postUpdate(var_dez)

    if (residual_hardness_setpoint.state != residual_hardness)
        {
        var String rhsjson = sendHttpGetRequest("https://"+ JUDOIP +":" + PORT + "?group=settings&command=residual%20hardness&msgnumber=1&token=" + TOKEN + "&parameter=" + residual_hardness_setpoint.state )
        var String var_residual_hardness_status = transform("JSONPATH", "$.status", rhsjson)
        if ( var_residual_hardness_status == "ok")
            {
            var String var_residual_hardness_setpoint = transform("JSONPATH", "$.parameter", rhsjson)
            residual_hardness.postUpdate(var_residual_hardness_setpoint)
            residual_hardness_setpoint.postUpdate(var_residual_hardness_setpoint)
            }
        }


    if (watervalveswitch.state == ON && valve.state.toString.contains("opened"))
        {
        var String vsjson = sendHttpGetRequest("https://"+ JUDOIP +":" + PORT + "?group=waterstop&command=valve&msgnumber=1&token=" + TOKEN + "&parameter=close")
        logInfo("Judo","Wassersperrventil GESCHLOSSEN")
        }


    if (watervalveswitch.state == OFF && valve.state.toString.contains("closed"))
        {
        var String vsjson = sendHttpGetRequest("https://"+ JUDOIP +":" + PORT + "?group=waterstop&command=valve&msgnumber=1&token=" + TOKEN + "&parameter=open")
        logInfo("Judo","Wassersperrventil OFFEN")
        }

    }

end

Sorry had a mistake in the previous post. I use the rule on a 2.3 Openhab system. On every OH Release < 2.3 you will have SSL Handshake Errors or Fatal Errors because you can not establish a connection to the Judo System. I think you will have no success with a 2.5.7 OH System.

My rule has changed a little bit, but is working flawless since more than a year:

val String BENUTZER= “x”
val String PASSWORD= “x”
val String GERAETEID= “x”
val String JUDOIP= “192.168.178.28”
val String PORT= “8124”

rule “Judo”
when
Item residual_hardness_setpoint changed or
Item watervalveswitch changed or
Time cron “0 0/4 * 1/1 * ? *”

then

var String tokenjson = sendHttpGetRequest("https://"+ JUDOIP +":" + PORT + "?group=register&command=login&msgnumber=2&name=login&user=" + BENUTZER + "&password=" + PASSWORD + "&role=customer", 5000)
var String TOKEN = transform("JSONPATH", "$.token", tokenjson)
var String loginjson = sendHttpGetRequest("https://"+ JUDOIP +":" + PORT + "?group=register&command=connect&msgnumber=5&token=" + TOKEN + "&parameter=i-soft%20plus&serial%20number=" + GERAETEID, 5000)
var String LOGINSTATUS = transform("JSONPATH", "$.status", loginjson)

// logInfo(“Judo”,“Login initalisiert”)

if (LOGINSTATUS == "ok")
{
    logInfo("Judo","Login erfolgreich")

    var String wcjson = sendHttpGetRequest("https://"+ JUDOIP +":" + PORT + "?group=consumption&command=water%20current&msgnumber=1&token=" + TOKEN, 5000)
    var String var_water_current = transform("JSONPATH", "$.data", wcjson)
    water_current.postUpdate(var_water_current)

Thread::sleep(3000)
// logInfo(“Judo”,“Wasserverbrauch aktuell”)

    var String wtjson = sendHttpGetRequest("https://"+ JUDOIP +":" + PORT + "?group=consumption&command=water%20total&msgnumber=1&token=" + TOKEN, 5000)
    var String var_water_total = transform("JSONPATH", "$.data", wtjson)
    var Number var_rawwater = Float::parseFloat(var_water_total.split(" ").get(1))
    var Number var_decarbonatedwater = Float::parseFloat(var_water_total.split(" ").get(2))
    water_total.postUpdate(var_water_total)
    rawwater.postUpdate(var_rawwater)
    decarbonatedwater.postUpdate(var_decarbonatedwater)

Thread::sleep(3000)
// logInfo(“Judo”,“Wasserverbrauch Rohwasser - entkalktes Wasser”)

    var String wajson = sendHttpGetRequest("https://"+ JUDOIP +":" + PORT + "?group=consumption&command=water%20average&msgnumber=1&token=" + TOKEN, 5000)
    var String var_water_average = transform("JSONPATH", "$.data", wajson)
    water_average.postUpdate(var_water_average)

Thread::sleep(3000)
// logInfo(“Judo”,“Wasserverbrauchsdurchschnitt”)

    var String aqjson = sendHttpGetRequest("https://"+ JUDOIP +":" + PORT + "?group=consumption&command=actual%20quantity&msgnumber=1&token=" + TOKEN, 5000)
    var String var_actual_quantity = transform("JSONPATH", "$.data", aqjson)
    actual_quantity.postUpdate(var_actual_quantity)

    var String sqjson = sendHttpGetRequest("https://"+ JUDOIP +":" + PORT + "?group=consumption&command=salt%20quantity&msgnumber=1&token=" + TOKEN, 5000)
    var String var_salt_quantity = transform("JSONPATH", "$.data", sqjson)
    salt_quantity.postUpdate(var_salt_quantity)

    var String srjson = sendHttpGetRequest("https://"+ JUDOIP +":" + PORT + "?group=consumption&command=salt%20range&msgnumber=1&token=" + TOKEN, 5000)
    var String var_salt_range = transform("JSONPATH", "$.data", srjson)
    salt_range.postUpdate(var_salt_range)

    var String rhjson = sendHttpGetRequest("https://"+ JUDOIP +":" + PORT + "?group=settings&command=residual%20hardness&msgnumber=1&token=" + TOKEN, 5000)
    var String var_residual_hardness = transform("JSONPATH", "$.data", rhjson)
    residual_hardness.postUpdate(var_residual_hardness)

    var String nhjson = sendHttpGetRequest("https://"+ JUDOIP +":" + PORT + "?group=settings&command=residual%20hardness&msgnumber=1&token=" + TOKEN, 5000)
    var String var_natural_hardness = transform("JSONPATH", "$.data", nhjson)
    natural_hardness.postUpdate(var_natural_hardness)

    var String vajson = sendHttpGetRequest("https://"+ JUDOIP +":" + PORT + "?group=waterstop&command=valve&msgnumber=1&token=" + TOKEN, 5000)
    var String var_valve = transform("JSONPATH", "$.data", vajson)
    valve.postUpdate(var_valve)

    var String wwjson = sendHttpGetRequest("https://"+ JUDOIP +":" + PORT + "?group=consumption&command=water%20weekly&msgnumber=1&token=" + TOKEN + "&year=%3CYEAR%3E&month=%3CMONTH%3E&day=%3CDAY%3E", 5000)
    var String var_water_weekly = transform("JSONPATH", "$.data", wwjson)
    var Number var_mon = Float::parseFloat(var_water_weekly.split(" ").get(1))
    var Number var_tue = Float::parseFloat(var_water_weekly.split(" ").get(2))
    var Number var_wed = Float::parseFloat(var_water_weekly.split(" ").get(3))
    var Number var_thu = Float::parseFloat(var_water_weekly.split(" ").get(4))
    var Number var_fri = Float::parseFloat(var_water_weekly.split(" ").get(5))
    var Number var_sat = Float::parseFloat(var_water_weekly.split(" ").get(6))
    var Number var_sun = Float::parseFloat(var_water_weekly.split(" ").get(7))
    water_weekly.postUpdate(var_water_weekly)
    watermon.postUpdate(var_mon)
    watertue.postUpdate(var_tue)
    waterwed.postUpdate(var_wed)
    waterthu.postUpdate(var_thu)
    waterfri.postUpdate(var_fri)
    watersat.postUpdate(var_sat)
    watersun.postUpdate(var_sun)

Thread::sleep(3000)
// logInfo(“Judo”,“Wasserverbrauch Woche”)

    var String wyjson = sendHttpGetRequest("https://"+ JUDOIP +":" + PORT + "?group=consumption&command=water%20yearly&msgnumber=1&token=" + TOKEN + "&year=%3CYEAR%3E", 5000)
    var String var_water_yearly = transform("JSONPATH", "$.data", wyjson)
    var Number var_jan = Float::parseFloat(var_water_yearly.split(" ").get(1))
    var Number var_feb = Float::parseFloat(var_water_yearly.split(" ").get(2))
    var Number var_mar = Float::parseFloat(var_water_yearly.split(" ").get(3))
    var Number var_apr = Float::parseFloat(var_water_yearly.split(" ").get(4))
    var Number var_mai = Float::parseFloat(var_water_yearly.split(" ").get(5))
    var Number var_jun = Float::parseFloat(var_water_yearly.split(" ").get(6))
    var Number var_jul = Float::parseFloat(var_water_yearly.split(" ").get(7))
    var Number var_aug = Float::parseFloat(var_water_yearly.split(" ").get(8))
    var Number var_sep = Float::parseFloat(var_water_yearly.split(" ").get(9))
    var Number var_okt = Float::parseFloat(var_water_yearly.split(" ").get(10))
    var Number var_nov = Float::parseFloat(var_water_yearly.split(" ").get(11))
    var Number var_dez = Float::parseFloat(var_water_yearly.split(" ").get(12))

    water_yearly.postUpdate(var_water_yearly)
    waterjan.postUpdate(var_jan)
    waterfeb.postUpdate(var_feb)
    watermar.postUpdate(var_mar)
    waterapr.postUpdate(var_apr)
    watermai.postUpdate(var_mai)
    waterjun.postUpdate(var_jun)
    waterjul.postUpdate(var_jul)
    wateraug.postUpdate(var_aug)
    watersep.postUpdate(var_sep)
    waterokt.postUpdate(var_okt)
    waternov.postUpdate(var_nov)
    waterdez.postUpdate(var_dez)

Thread::sleep(3000)
// logInfo(“Judo”,“Wasserverbrauch Jahr”)

    if (residual_hardness_setpoint.state != residual_hardness)
        {
        var String rhsjson = sendHttpGetRequest("https://"+ JUDOIP +":" + PORT + "?group=settings&command=residual%20hardness&msgnumber=1&token=" + TOKEN + "&parameter=" + residual_hardness_setpoint.state, 5000)
        var String var_residual_hardness_status = transform("JSONPATH", "$.status", rhsjson)
        if ( var_residual_hardness_status == "ok")
            {
            var String var_residual_hardness_setpoint = transform("JSONPATH", "$.parameter", rhsjson)
            residual_hardness.postUpdate(var_residual_hardness_setpoint)
            residual_hardness_setpoint.postUpdate(var_residual_hardness_setpoint)
            }
        }

Thread::sleep(3000)
// logInfo(“Judo”,“Wasserhärte”)

    if (watervalveswitch.state == ON && valve.state.toString.contains("opened"))
        {
        var String vsjson = sendHttpGetRequest("https://"+ JUDOIP +":" + PORT + "?group=waterstop&command=valve&msgnumber=1&token=" + TOKEN + "&parameter=close", 5000)
        logInfo("Judo","Wassersperrventil GESCHLOSSEN")
        }


    if (watervalveswitch.state == OFF && valve.state.toString.contains("closed"))
        {
        var String vsjson = sendHttpGetRequest("https://"+ JUDOIP +":" + PORT + "?group=waterstop&command=valve&msgnumber=1&token=" + TOKEN + "&parameter=open", 5000)
        logInfo("Judo","Wassersperrventil OFFEN")
        }

// logInfo(“Judo”,“Wassersperrventil überpüft und Regel abgeschlossen”)

    }

end

Hello Togehter,

has someone tried this already on OH3 ?
-> I think there is still the problem with HTTPS?

Didnt changed to OH 3, did you tried it?

The OH3 http binding has a “ignore ssl errors” option so it may work now (I dont have a Judo so I cant test it).

whooa, going to give it a try. That would be great. Will report, how it works…

Do you have already some news from the JUDO connection?

No, its not working

Still a SSL Error:
Fatal transport error: java.util.concurrent.ExecutionException: javax.net.ssl.SSLHandshakeException: Abruptly closed by peer

1 Like