update: mqqt bme280 in is working. but still have the stat reverting to a defaulted value. flow/code attached this time.
[
{
"id": "c69f4c874a69e46a",
"type": "ui_ui_control",
"z": "1fef5af48987e862",
"name": "",
"events": "all",
"x": 3340,
"y": 820,
"wires": [
[
"441ee3605ebe21e9",
"70892cf3a2425e65"
]
]
},
{
"id": "0db49073c80b4848",
"type": "function",
"z": "1fef5af48987e862",
"name": "target_temperature",
"func": "msg.topic = 'target_temperature';\nvar data = {\n 'target_temperature':msg.payload \n}\nmsg.payload = data;\nreturn msg;",
"outputs": 1,
"timeout": "",
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 2550,
"y": 860,
"wires": [
[
"b970206bd9e41276",
"a03c9f54bdd84880"
]
]
},
{
"id": "a0751344b25431c5",
"type": "function",
"z": "1fef5af48987e862",
"name": "hvac_state",
"func": "msg.topic = \"hvac_state\";\nglobal.set(\"hvac_state\",msg.payload);\nreturn msg;",
"outputs": 1,
"timeout": "",
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 2730,
"y": 1180,
"wires": [
[
"a03c9f54bdd84880",
"8361cfb7b1422492"
]
]
},
{
"id": "21089888fd1ad681",
"type": "function",
"z": "1fef5af48987e862",
"name": "away",
"func": "msg.topic = \"away\";\nglobal.set(\"away\", msg.payload);\nreturn msg;",
"outputs": 1,
"timeout": "",
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 2750,
"y": 1220,
"wires": [
[
"3679633df92d935f",
"532c26de0efbdd5d",
"789023cb7db45a79",
"3a25b47ef744f5ed"
]
]
},
{
"id": "a03c9f54bdd84880",
"type": "function",
"z": "1fef5af48987e862",
"name": "Data",
"func": "\nif (msg.topic == \"ambient_temperature\") {\n global.set(\"ambient_temperature\", msg.payload.ambient_temperature);\n}\nmsg.topic = \"update\";\nvar data = {\n 'ambient_temperature': global.get(\"ambient_temperature\") || 72,\n 'target_temperature': global.get(\"target_temperature\") || 72,\n 'hvac_state': global.get(\"hvac_state\") || 'off',\n 'away': global.get(\"away\") || 'false'\n}\nmsg.payload = data;\nreturn msg;",
"outputs": 1,
"timeout": "",
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 2990,
"y": 1060,
"wires": [
[
"71daca0a0035395d",
"441ee3605ebe21e9"
]
]
},
{
"id": "8361cfb7b1422492",
"type": "debug",
"z": "1fef5af48987e862",
"name": "debug 19",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "false",
"statusVal": "",
"statusType": "auto",
"x": 2720,
"y": 1140,
"wires": []
},
{
"id": "b970206bd9e41276",
"type": "debug",
"z": "1fef5af48987e862",
"d": true,
"name": "debug 21",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "false",
"statusVal": "",
"statusType": "auto",
"x": 2560,
"y": 820,
"wires": []
},
{
"id": "71daca0a0035395d",
"type": "debug",
"z": "1fef5af48987e862",
"name": "debug 22",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "false",
"statusVal": "",
"statusType": "auto",
"x": 3040,
"y": 960,
"wires": []
},
{
"id": "70892cf3a2425e65",
"type": "debug",
"z": "1fef5af48987e862",
"name": "debug 24",
"active": false,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "false",
"statusVal": "",
"statusType": "auto",
"x": 3340,
"y": 780,
"wires": []
},
{
"id": "532c26de0efbdd5d",
"type": "debug",
"z": "1fef5af48987e862",
"name": "debug 41",
"active": false,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "false",
"statusVal": "",
"statusType": "auto",
"x": 3000,
"y": 1220,
"wires": []
},
{
"id": "789023cb7db45a79",
"type": "change",
"z": "1fef5af48987e862",
"name": "",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "true",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 2940,
"y": 1180,
"wires": [
[
"a03c9f54bdd84880"
]
]
}
]
Good afternoon all, i have my flow operational and accepts all my data inputs and thermostat responds correctly turning on my pi relays. The issue im facing and can not seem to track down is that the stat reverts to 72* and "OFF" after about 30 seconds after changing via UI . debug changes to everything correctly until it reverts. i have debug nodes attached throughout. any help greatly appreciated. im still a new forum user so cant upload my flow.