This is my current rule:

```
rule "Nibe uplink"
when
Time cron "15 * * * * ?"
then
val hotWaterBoost = Heatpump_Hotwater_Boost.state
val ventilationBoost = Heatpump_Ventilation_Speed.state
var parameters = "40004,40067,40013,40014,43416,43420,43136,40050,43066,40032,43084,43009,40047,40048,43008,40007,40129,43005,47011,47010"
if (hotWaterBoost != 0) { parameters += ",48132" }
if (ventilationBoost != 0) { parameters += ",47260" }
val String output = try {
executeCommandLine("ruby@@/etc/openhab2/scripts/ruby/nu.rb@@-p@@" + parameters + "@@-v@@rawValue", 5000)
} catch (Exception e) {
null
}
if (output !== null && output != "") {
Heatpump_Outdoor_Temp.postUpdate(Double::parseDouble(transform("JSONPATH", "$.40004", output)) / 10)
Heatpump_Status_MeanOutdoorTemp.postUpdate(Double::parseDouble(transform("JSONPATH", "$.40067", output)) / 10)
Heatpump_HotWater_Top.postUpdate(Double::parseDouble(transform("JSONPATH", "$.40013", output)) / 10)
Heatpump_HotWater_Bottom.postUpdate(Double::parseDouble(transform("JSONPATH", "$.40014", output)) / 10)
Heatpump_Compressor_Starts.postUpdate(transform("JSONPATH", "$.43416", output))
Heatpump_Compressor_ActiveTime.postUpdate(transform("JSONPATH", "$.43420", output))
val compressorFreq = (Double::parseDouble(transform("JSONPATH", "$.43136", output)) / 10).intValue
Heatpump_Compressor_Frequency.postUpdate(compressorFreq)
Heatpump_Airflow.postUpdate(Double::parseDouble(transform("JSONPATH", "$.40050", output)) / 10)
var Number defrost = Integer::parseInt(transform("JSONPATH", "$.43066", output))
if (defrost > 0 && compressorFreq == 0) {
Heatpump_Status_Defrost.postUpdate(ON)
} else {
Heatpump_Status_Defrost.postUpdate(OFF)
}
Heatpump_Status_DefrostTime.postUpdate(defrost)
Heatpump_FF_Temp.postUpdate(Double::parseDouble(transform("JSONPATH", "$.40032", output)) / 10)
Heatpump_ElectricAddon.postUpdate(Double::parseDouble(transform("JSONPATH", "$.43084", output)) / 100)
Heatpump_HeatMedium_Calc.postUpdate(Double::parseDouble(transform("JSONPATH", "$.43009", output)) / 10)
Heatpump_HeatMedium_Flow.postUpdate(Double::parseDouble(transform("JSONPATH", "$.40047", output)) / 10)
Heatpump_HeatMedium_Return.postUpdate(Double::parseDouble(transform("JSONPATH", "$.40048", output)) / 10)
Heatpump_FloorHeating_Calc.postUpdate(Double::parseDouble(transform("JSONPATH", "$.43008", output)) / 10)
Heatpump_FloorHeating_Flow.postUpdate(Double::parseDouble(transform("JSONPATH", "$.40007", output)) / 10)
Heatpump_FloorHeating_Return.postUpdate(Double::parseDouble(transform("JSONPATH", "$.40129", output)) / 10)
Heatpump_DegreeMinutes.postUpdate(Integer::parseInt(transform("JSONPATH", "$.43005", output)) / 10)
Heatpump_Radiators_Adjustment.postUpdate(transform("JSONPATH", "$.47011", output))
Heatpump_FloorHeating_Adjustment.postUpdate(transform("JSONPATH", "$.47010", output))
if (hotWaterBoost != 0) { Heatpump_Hotwater_Boost.postUpdate(transform("JSONPATH", "$.48132", output)) }
if (ventilationBoost != 0) { Heatpump_Ventilation_Speed.postUpdate(transform("JSONPATH", "$.47260", output)) }
} else {
logInfo("Nibe uplink", "Empty response")
}
end
```

I also have a few other rules that checks different aspects of the heatpump, but this is the main one.