Hi Colin and Johannes,
Please see the example flow I created. I am able to control the relay based on temperature range. Basically when it hits below 21 then the relay and when it is equal to or greater than 22 it turns off.
One thing that I don't know is where to place the ramp thermostat and what parameters to set. There is little in the way of explanation or examples that are useful.
If you have any thoughts I would appreciate it.
Robert
[
{
"id": "d87acc50.862d1",
"type": "tab",
"label": "Flow 1",
"disabled": false,
"info": ""
},
{
"id": "fee1635e.5b4f5",
"type": "mqtt in",
"z": "d87acc50.862d1",
"name": "Temperature",
"topic": "home/livingroom/temperature",
"qos": "2",
"datatype": "auto",
"broker": "8225a193.5398a",
"x": 90,
"y": 240,
"wires": [
[
"73a2686d.a78b38",
"cac59bd.c146e68",
"4e713a7.4bf4fc4",
"8047225e.861da"
]
]
},
{
"id": "317513be.fa125c",
"type": "mqtt in",
"z": "d87acc50.862d1",
"name": "Humidity",
"topic": "home/livingroom/humidity",
"qos": "2",
"datatype": "auto",
"broker": "8225a193.5398a",
"x": 80,
"y": 300,
"wires": [
[
"6c72ce5.015d23",
"73a2686d.a78b38"
]
]
},
{
"id": "6c72ce5.015d23",
"type": "ui_gauge",
"z": "d87acc50.862d1",
"name": "Humidity",
"group": "bc7f15c3.5ac668",
"order": 1,
"width": 0,
"height": 0,
"gtype": "gage",
"title": "Humidity",
"label": "%",
"format": "{{value}}",
"min": 0,
"max": "100",
"colors": [
"#00b500",
"#e6e600",
"#ca3838"
],
"seg1": "",
"seg2": "",
"x": 400,
"y": 340,
"wires": []
},
{
"id": "73a2686d.a78b38",
"type": "debug",
"z": "d87acc50.862d1",
"name": "",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"x": 410,
"y": 120,
"wires": []
},
{
"id": "cac59bd.c146e68",
"type": "ui_gauge",
"z": "d87acc50.862d1",
"name": "Temperature",
"group": "bc7f15c3.5ac668",
"order": 2,
"width": 0,
"height": 0,
"gtype": "gage",
"title": "Temperature",
"label": "C",
"format": "{{value}}",
"min": 0,
"max": "100",
"colors": [
"#00b500",
"#e6e600",
"#ca3838"
],
"seg1": "",
"seg2": "",
"x": 410,
"y": 220,
"wires": []
},
{
"id": "4e713a7.4bf4fc4",
"type": "switch",
"z": "d87acc50.862d1",
"name": "Check Temperature Level",
"property": "payload",
"propertyType": "msg",
"rules": [
{
"t": "lt",
"v": "21",
"vt": "str"
},
{
"t": "gte",
"v": "22",
"vt": "str"
}
],
"checkall": "true",
"repair": false,
"outputs": 2,
"x": 430,
"y": 540,
"wires": [
[
"254d0bdc.c7cb54"
],
[
"c3824d67.55e6b"
]
]
},
{
"id": "254d0bdc.c7cb54",
"type": "change",
"z": "d87acc50.862d1",
"name": "Turn Relay On",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "0",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 680,
"y": 480,
"wires": [
[
"32cbf966.4b3ac6",
"6fb27ee.404958",
"f0979053.c67f5"
]
]
},
{
"id": "c3824d67.55e6b",
"type": "change",
"z": "d87acc50.862d1",
"name": "Turn Real Off",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "1",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 670,
"y": 560,
"wires": [
[
"32cbf966.4b3ac6",
"f0979053.c67f5"
]
]
},
{
"id": "32cbf966.4b3ac6",
"type": "mqtt out",
"z": "d87acc50.862d1",
"d": true,
"name": "Send Command to GPIO 37",
"topic": "/relayboard/GPIO/37",
"qos": "",
"retain": "",
"broker": "8225a193.5398a",
"x": 1110,
"y": 440,
"wires": []
},
{
"id": "6fb27ee.404958",
"type": "rpi-gpio out",
"z": "d87acc50.862d1",
"name": "Relay On/Off",
"pin": "37",
"set": true,
"level": "0",
"freq": "",
"out": "out",
"x": 990,
"y": 580,
"wires": []
},
{
"id": "8047225e.861da",
"type": "ui_chart",
"z": "d87acc50.862d1",
"name": "",
"group": "bc7f15c3.5ac668",
"order": 2,
"width": 0,
"height": 0,
"label": "chart",
"chartType": "line",
"legend": "false",
"xformat": "HH:mm",
"interpolate": "linear",
"nodata": "",
"dot": false,
"ymin": "0",
"ymax": "100",
"removeOlder": "10",
"removeOlderPoints": "",
"removeOlderUnit": "60",
"cutout": 0,
"useOneColor": false,
"useUTC": false,
"colors": [
"#1f77b4",
"#aec7e8",
"#ff7f0e",
"#2ca02c",
"#98df8a",
"#d62728",
"#ff9896",
"#9467bd",
"#c5b0d5"
],
"outputs": 1,
"useDifferentColor": false,
"x": 400,
"y": 280,
"wires": [
[]
]
},
{
"id": "f0979053.c67f5",
"type": "ui_switch",
"z": "d87acc50.862d1",
"name": "",
"label": "Relay 1",
"tooltip": "",
"group": "b91687b1.1218f8",
"order": 0,
"width": 0,
"height": 0,
"passthru": true,
"decouple": "false",
"topic": "",
"style": "",
"onvalue": "0",
"onvalueType": "str",
"onicon": "",
"oncolor": "",
"offvalue": "1",
"offvalueType": "str",
"officon": "",
"offcolor": "",
"x": 840,
"y": 580,
"wires": [
[
"6fb27ee.404958"
]
]
},
{
"id": "c0ebb121.9d1eb",
"type": "ramp-thermostat",
"z": "d87acc50.862d1",
"name": "",
"profile": "9ca4b3cb.a8589",
"hysteresisplus": "1",
"hysteresisminus": "1",
"x": 300,
"y": 660,
"wires": [
[],
[],
[]
]
},
{
"id": "8225a193.5398a",
"type": "mqtt-broker",
"z": "",
"name": "MQTT-Raspberrt Pi4",
"broker": "localhost",
"port": "1883",
"clientid": "",
"usetls": false,
"compatmode": true,
"keepalive": "60",
"cleansession": true,
"birthTopic": "",
"birthQos": "0",
"birthPayload": "",
"closeTopic": "",
"closeQos": "0",
"closePayload": "",
"willTopic": "",
"willQos": "0",
"willPayload": ""
},
{
"id": "bc7f15c3.5ac668",
"type": "ui_group",
"z": "",
"name": "Sensor",
"tab": "215e58b8.b33b68",
"order": 2,
"disp": true,
"width": "6",
"collapse": false
},
{
"id": "b91687b1.1218f8",
"type": "ui_group",
"z": "",
"name": "GPIO",
"tab": "215e58b8.b33b68",
"order": 1,
"disp": true,
"width": "6",
"collapse": false
},
{
"id": "9ca4b3cb.a8589",
"type": "profile",
"z": "",
"name": "Test Thermostat",
"time1": "00:00",
"temp1": "21",
"time2": "23:59",
"temp2": "22",
"time3": "",
"temp3": "",
"time4": "",
"temp4": "",
"time5": "",
"temp5": "",
"time6": "",
"temp6": "",
"time7": "",
"temp7": "",
"time8": "",
"temp8": "",
"time9": "",
"temp9": "",
"time10": "",
"temp10": ""
},
{
"id": "215e58b8.b33b68",
"type": "ui_tab",
"z": "",
"name": "Room",
"icon": "dashboard",
"order": 1,
"disabled": false,
"hidden": false
}
]