timeprop is not working for me, unsure why. My understanding of pid is that it is for controlling a temperature directly, whereas I'm using an actual thermostat.
Here is my test sketch with timeprop:
[
{
"id": "1dcd707332701bf2",
"type": "debug",
"z": "1b4dc69d8cd3f4af",
"name": "output",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 1460,
"y": 920,
"wires": []
},
{
"id": "99afa2ae7f661cbe",
"type": "inject",
"z": "1b4dc69d8cd3f4af",
"name": "",
"props": [
{
"p": "payload"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "0.5",
"payloadType": "num",
"x": 1110,
"y": 960,
"wires": [
[
"70ee8ef879c76a39"
]
]
},
{
"id": "70ee8ef879c76a39",
"type": "timeprop",
"z": "1b4dc69d8cd3f4af",
"name": "",
"cycleTime": "600",
"deadTime": 0,
"triggerPeriod": "6",
"invert": false,
"x": 1320,
"y": 940,
"wires": [
[
"1dcd707332701bf2"
]
]
},
{
"id": "d601a366669cee57",
"type": "inject",
"z": "1b4dc69d8cd3f4af",
"name": "",
"props": [
{
"p": "payload"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "0.2",
"payloadType": "num",
"x": 1110,
"y": 920,
"wires": [
[
"70ee8ef879c76a39"
]
]
},
{
"id": "656222e32a2f6622",
"type": "inject",
"z": "1b4dc69d8cd3f4af",
"name": "",
"props": [
{
"p": "payload"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "1",
"payloadType": "num",
"x": 1110,
"y": 1000,
"wires": [
[
"70ee8ef879c76a39"
]
]
}
]
To clarify a little bit:
- Two heaters: primary and auxiliary.
- Primary is directly controlled by a thermostat.
- Auxiliary heater is connected to a Zigbee-controlled plug.
- Primary thermostat outputs (via Zigbee) and heating demand percentage.
- When the thermostat calls for a heating demand percentage higher than N, I want to start cycling the auxiliary heater to match.
Examples of what I expect with demand percentages:
- 50%: cycle the auxiliary for 5 minutes ON, 5 minutes OFF
- 75%: cycle the auxiliary for 7.5 minutes ON, 2.5 minutes OFF
- Etc.
I will likely have to tweak that to get a smooth temperature without an annoying start/stop in the background.
I'm actually more comfortable coding than using Node-RED, at this point, so I'll take your ideas and see about writing a function @craigcurtin .