Sorry, I am following this thread but we have family visiting so computer time is limited.
Yes, I have seen the offset, but whichever way I do things, I am required to interrogate or update the TRV on a regular basis for the current temperature status. My idea is to only communicate with the TRV when I need to change something.
If I use the offset, I have to interrogate the TRV to update NR with the Current Temperature, or use the regular status message to see what the temperature is. If I use NR and the external source, I only have to communicate with the TRV when I want to change Open/Close and I hope to be able to reduce the sending of Status Message to conserve power.
Of course:
[{"id":"4f90b9a595b6f9b3","type":"inject","z":"29ddb158bef0fd2c","name":"Select current Profile","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"[ { \"schedule_profile\": 1, \"profile_name\": \"Living Room\", \"rules\": [ { \"days\": \"0123456\", \"time\": \"06:00\", \"temperature\": 19 }, { \"days\": \"0123456\", \"time\": \"08:00\", \"temperature\": 21 }, { \"days\": \"0123456\", \"time\": \"10:30\", \"temperature\": 19 }, { \"days\": \"0123456\", \"time\": \"15:00\", \"temperature\": 20 }, { \"days\": \"0123456\", \"time\": \"17:00\", \"temperature\": 21 }, { \"days\": \"0123456\", \"time\": \"18:00\", \"temperature\": 22 }, { \"days\": \"0123456\", \"time\": \"21:30\", \"temperature\": 16 } ] }, { \"schedule_profile\": 2, \"profile_name\": \"Living Room Weekend\", \"rules\": [ { \"days\": \"06\", \"time\": \"07:00\", \"temperature\": 21 }, { \"days\": \"06\", \"time\": \"10:00\", \"temperature\": 20 }, { \"days\": \"06\", \"time\": \"16:00\", \"temperature\": 20 }, { \"days\": \"06\", \"time\": \"18:00\", \"temperature\": 22 }, { \"days\": \"06\", \"time\": \"22:00\", \"temperature\": 16 } ] }, { \"schedule_profile\": 3, \"profile_name\": \"AM Visitors\", \"rules\": [ { \"days\": \"0123456\", \"time\": \"07:00\", \"temperature\": 21 }, { \"days\": \"0123456\", \"time\": \"13:00\", \"temperature\": 19 }, { \"days\": \"0123456\", \"time\": \"16:00\", \"temperature\": 20 }, { \"days\": \"0123456\", \"time\": \"18:00\", \"temperature\": 22 }, { \"days\": \"0123456\", \"time\": \"21:30\", \"temperature\": 16 } ] }, { \"schedule_profile\": 4, \"profile_name\": \"PM Visitors\", \"rules\": [ { \"days\": \"0123456\", \"time\": \"07:00\", \"temperature\": 21 }, { \"days\": \"0123456\", \"time\": \"10:30\", \"temperature\": 19 }, { \"days\": \"0123456\", \"time\": \"12:00\", \"temperature\": 21 }, { \"days\": \"0123456\", \"time\": \"18:00\", \"temperature\": 22 }, { \"days\": \"0123456\", \"time\": \"21:30\", \"temperature\": 16 } ] }, { \"schedule_profile\": 5, \"profile_name\": \"Spare\", \"rules\": [ { \"days\": \"06\", \"time\": \"11:30\", \"temperature\": 18 }, { \"days\": \"06\", \"time\": \"14:30\", \"temperature\": 20 }, { \"days\": \"06\", \"time\": \"22:30\", \"temperature\": 15 } ] } ]","payloadType":"jsonata","x":410,"y":580,"wires":[["7af6b66a1c9f1fde"]]},{"id":"7af6b66a1c9f1fde","type":"function","z":"29ddb158bef0fd2c","name":"split file","func":"let profileSelected = (global.get('ZprofileSelect') - 1) || 0;\nmsg.payload = msg.payload[profileSelected];\nglobal.set('ZprofileEvents', msg.payload.rules);\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":580,"y":580,"wires":[["6748bf65c6058e19","ca44a403f52e4783"]]},{"id":"e1a0b7a516aa8e84","type":"inject","z":"29ddb158bef0fd2c","name":"Profile 1","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"1","payloadType":"num","x":180,"y":520,"wires":[["be2574bab2b971c1"]]},{"id":"4e777a15c7947d51","type":"inject","z":"29ddb158bef0fd2c","name":"Profile 2","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"2","payloadType":"num","x":180,"y":560,"wires":[["be2574bab2b971c1"]]},{"id":"a33af1209e1b80e1","type":"inject","z":"29ddb158bef0fd2c","name":"Profile 3","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"3","payloadType":"num","x":180,"y":600,"wires":[["be2574bab2b971c1"]]},{"id":"4b9692153e429c8c","type":"inject","z":"29ddb158bef0fd2c","name":"Profile 4","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"4","payloadType":"num","x":180,"y":640,"wires":[["be2574bab2b971c1"]]},{"id":"5987db1c2ede4c6a","type":"inject","z":"29ddb158bef0fd2c","name":"Profile 5","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"5","payloadType":"num","x":180,"y":680,"wires":[["be2574bab2b971c1"]]},{"id":"be2574bab2b971c1","type":"change","z":"29ddb158bef0fd2c","name":"Set Profile","rules":[{"t":"set","p":"ZprofileSelect","pt":"global","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":350,"y":520,"wires":[["ef9a5ec91786e7cb"]]},{"id":"ef9a5ec91786e7cb","type":"debug","z":"29ddb158bef0fd2c","name":"debug 123","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":510,"y":520,"wires":[]},{"id":"6748bf65c6058e19","type":"debug","z":"29ddb158bef0fd2c","name":"debug 124","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":710,"y":540,"wires":[]},{"id":"ca44a403f52e4783","type":"function","z":"29ddb158bef0fd2c","name":"set Profile time/deg/days","func":"let eventTime;\nlet eventTimeNC;\nlet eventTemp;\nlet eventDays;\nlet eventString = \"\";\nlet arr = msg.payload.rules;\nlet elements = arr.length;\n\nlet profileNumber = msg.payload.schedule_profile;\nlet profileName = msg.payload.profile_name;\n\nfor (let i = 0; i < elements; i++) {\n eventTime = msg.payload.rules[i].time;\n //Remove Colon, Shelly doesn't like\n eventTimeNC = eventTime.replace(\":\", \"\")\n eventTemp = msg.payload.rules[i].temperature;\n eventDays = msg.payload.rules[i].days;\n eventString = eventString + eventTimeNC + \"-\" + eventDays + \"-\" + eventTemp\n if (i < elements-1){\n eventString = eventString + \",\";\n }\n}\n\nlet messageString = \"http://XXX.XXX.XXX.XXX/settings/thermostat/0?schedule_profile=\" + profileNumber + \"&profile_name=\" + profileName + \"&schedule_rules=\" + eventString\nmsg.url = messageString;\nreturn msg","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":810,"y":580,"wires":[["64f33d3f8e5e561e","73185e4573535fba","5a17e1334ef54a25","3aa3ef0e2d9aa6b4"]]},{"id":"64f33d3f8e5e561e","type":"debug","z":"29ddb158bef0fd2c","name":"debug 125","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"url","targetType":"msg","statusVal":"","statusType":"auto","x":910,"y":540,"wires":[]},{"id":"1b7ae76f21b65952","type":"comment","z":"29ddb158bef0fd2c","name":"Select desired Profile (1-5)","info":"","x":370,"y":480,"wires":[]},{"id":"6b7544e1f9b0aa6c","type":"comment","z":"29ddb158bef0fd2c","name":"Assemble message for TRV from JSON","info":"","x":550,"y":620,"wires":[]},{"id":"73185e4573535fba","type":"function","z":"29ddb158bef0fd2c","name":"set CH time/deg/days","func":"let length;\nlet setHours;\nlet setMinutes;\nlet eventTime;\nlet eventDay;\nlet timeEvent;\nlet arr = global.get('ZprofileEvents');\n//CH background temp.\nlet tempDesired\nif (tempDesired === undefined) {\n tempDesired = 16;\n}\n\n//Get current day start and end timestamp\nlet dateNow = Date.now();\nlet timeFrom = new Date(dateNow).setHours(0, 0, 0, 0);\nlet timeTo = new Date(dateNow).setHours(23, 59, 59, 0);\n\nconst d = new Date();\nlet day = ((d.getDay() + 7) - 1) % 7;\n\n//Add offset, iterate until file time < current time\nfor (let i = arr.length - 1; i >= 0; i--) {\n eventTime = arr[i].time;\n eventDay = arr[i].days\n msg.test1 = eventTime;\n setHours = eventTime.slice(0, 2);\n setMinutes = eventTime.slice(3);\n timeEvent = new Date(timeFrom).setHours(setHours, setMinutes, 0, 0); //Date from midnight this morning\n tempDesired = parseFloat(arr[i].temperature);\n msg.tempDesired = tempDesired;\n msg.dateNow = dateNow;\n msg.timeEvent = timeEvent;\n msg.dayNow = day;\n //msg.dayNow = eventDay.includes(day);\n\n\n if (i === 0 && (dateNow < timeEvent)) {\n tempDesired = parseFloat(arr[arr.length - 1].temperature);\n global.set('ZtempDesiredCH',);\n node.status({ text: timeEvent + \" | \" + tempDesired + \" | \" + \"<<<<<\" });\n return msg\n }\n else if (dateNow > timeEvent && eventDay.includes(day)) {\n global.set('ZtempDesiredCH', tempDesired, 'storeInFile');\n node.status({ text: timeEvent + \" | \" + tempDesired });\n return msg\n }\n}","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":860,"y":660,"wires":[["d19584808941f204"]]},{"id":"d5cc96591e11e507","type":"debug","z":"29ddb158bef0fd2c","name":"debug 126","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1110,"y":540,"wires":[]},{"id":"dd6d14f02e5c9077","type":"inject","z":"29ddb158bef0fd2c","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":620,"y":660,"wires":[["73185e4573535fba"]]},{"id":"5a17e1334ef54a25","type":"debug","z":"29ddb158bef0fd2c","name":"debug 127","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1090,"y":620,"wires":[]},{"id":"212226c1473cf92e","type":"comment","z":"29ddb158bef0fd2c","name":"CH tempDesired","info":"","x":480,"y":700,"wires":[]},{"id":"3aa3ef0e2d9aa6b4","type":"http request","z":"29ddb158bef0fd2c","name":"","method":"GET","ret":"txt","paytoqs":false,"url":"","persist":false,"insecureHTTPParser":false,"authType":"","senderr":false,"headers":[],"x":1090,"y":580,"wires":[["d5cc96591e11e507"]]},{"id":"d19584808941f204","type":"debug","z":"29ddb158bef0fd2c","name":"debug 128","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1070,"y":680,"wires":[]},{"id":"effb4dbd1604ac66","type":"comment","z":"29ddb158bef0fd2c","name":"using JSON","info":"","x":170,"y":480,"wires":[]}]
'Select desired profile' will allow changing selected profile by sending just a number.
'Assemble message for TRV' removes Colon from the time for the Shelly
'CHtempDesired' is the current temperature desired for the boiler control side of things (OTGW)
I will read @Buckskin link, hopefully today, but I have an inkling of what it is going to say. Solving problems with accurate temperature control was part of my role when I was working. This is the reason that I don't have much faith in temperature sensors being linked to the control unit right next to the heat source. Convenient, but not necessarily that accurate. Having said that, my expectations regarding temperature control are very high!
Keep asking and challenging, it makes me think!
Get this week out of the way and Family commitments drop off to allow more time to 'play'. I want to test the 'Combined Profile' for switching things on/off on different days at different times in the same Profile.