Thanks for the reply koffienl
I get the general idea, where I struggle is the specifics. Below is a screenshot of what I have now:
![alt text](https://image.ibb.co/g87SBF/pimatic_problem_1.jpg)
What I like to accomplish is to have the “Heater” turn on when the “Salt Water Tank” temperature goes below the set temperature in the “Salt Water Tank Thermostat”. At the moment I have a fixed rule setup to do this at a hardcoded temperature of 28 Degree, not using the “Salt Water Tank Thermostat” setting.
I need help with the exact syntax for the rule based on my config.json.
Here is my config.json:
“plugins”: [
{
“plugin”: “cron”
},
{
“plugin”: “mobile-frontend”,
“customTitle”: “Chrisi’s Command Center”
},
{
“plugin”: “ds18b20”
},
{
“plugin”: “gpio”
},
{
“plugin”: “sysinfo”
}
],
“devices”: [
{
“class”: “DummyHeatingThermostat”,
“id”: “dummythermostat”,
“name”: “Salt Water Tank Thermostat”,
“comfyTemp”: 25,
“ecoTemp”: 20,
“guiShowModeControl”: true,
“guiShowPresetControl”: true,
“guiShowValvePosition”: false,
“guiShowTemperatureInput”: true
},
{
“id”: “my-sensor”,
“name”: “Salt Water Tank”,
“class”: “DS18B20Sensor”,
“hardwareId”: “28-04169309f3ff”,
“interval”: 500
},
{
“id”: “heater-light”,
“class”: “GpioSwitch”,
“name”: “Heater”,
“gpio”: 21,
“inverted”: false,
“defaultState”: false,
“xConfirm”: true
}
],
“rules”: [
{
“id”: “heater”,
“name”: “Heater”,
“rule”: “when temperature of Salt Water Tank is less or equal than 28 then turn heater-light on”,
“active”: true,
“logging”: true
},
{
“id”: “heateroff”,
“name”: “HeaterOFF”,
“rule”: “when temperature of Salt Water Tank is greater than 28.1 then turn heater-light off”,
“active”: true,
“logging”: true
}
],
“pages”: [
{
“id”: “fishery”,
“name”: “Tanks”,
“devices”: [
{
“deviceId”: “my-sensor”
},
{
“deviceId”: “dummythermostat”
},
{
“deviceId”: “heater-light”
}
]
}
],
“groups”: [
{
“id”: “saltwater-tank”,
“name”: “Saltwater Tank”,
“devices”: [
“my-sensor”,
“heater-light”,
“dummythermostat”
],
“rules”: [],
“variables”: []
}
],
“users”: [
{
“username”: “admin”,
“password”: “alex”,
“role”: “admin”
}
],
“roles”: [
{
“name”: “admin”,
“permissions”: {
“pages”: “write”,
“rules”: “write”,
“variables”: “write”,
“messages”: “write”,
“events”: “write”,
“devices”: “write”,
“groups”: “write”,
“plugins”: “write”,
“updates”: “write”,
“database”: “write”,
“config”: “write”,
“controlDevices”: true,
“restart”: true
}
}
],
“variables”: [
{
“name”: “desiredtemp”,
“expression”: “$dummythermostat.temperatureSetpoint”
}
]
}
Thanks!
Alex