otaviojr / node-red-contrib-smartthings

Allows you to control your devices and get their status using NodeRed
MIT License
32 stars 16 forks source link

No Updated Data in Node Red from Smartthings Thermostats #35

Closed burtonjk closed 2 years ago

burtonjk commented 4 years ago

First of all - awesome solution, has been really useful for me, thank you for the great work.

Not exactly sure when this started happening, but it was all working correctly when I first installed late last year. I can't be sure it is limited to Thermostats, but that is where my issue lies at the moment.

The issue is that a change to the Thermostat in the ST app triggers an event in Node Red but the data sent from the Thermostat node is the same as it was on deploy of the flow. IE. it never changes.

The screenshot from Node Red below is the result of me changing the set temperature 3 times, from 21 down to 18. You can see it always reports as 20

image

I do have the required devices set in the SmartApp configuration and when I run the simulator for the SmartApp, I get the error as below:

Screenshot 2020-05-11 at 15 14 10

My Version of node-red-contrib-smartthings is 0.0.20

Hope you can help with this

cspawn1 commented 4 years ago

Hi there our two issues might be related. Can you share your flow? or maybe just what you are injecting into the thermostat node to try and updated the heatingSetpoint?

burtonjk commented 4 years ago

I think you are correct and our 2 issues are more than likely related.

However, my problem is not to do with updating the heatingSetpoint by injecting a value - that works fine and my code to inject is:

var msg = { topic: "heatingSetpoint", payload: { "value": msg.payload.TargetTemperature } } return msg;

My problem is that when changing the heatingSetpoint from the thermostat in the Smartthings app or indeed from the physical thermostat, the Node-Red thermostat doesn't update, it simply repeats the previously set value (hope that makes sense)

So in my flow as shown below, I can successfully change the heatingSetpoint by adjusting the Heating South (Apple Homekit) node, but changes initiated by Smartthings are not reflected in the flow. As I say, the trigger occurs, but the value doesn't change.

Hope we can work together to solve our respective issues.

[{"id":"28f1379.b2561c8","type":"subflow","name":"Timer (Heating South)","info":"","category":"","in":[],"out":[{"x":1040,"y":480,"wires":[{"id":"59455d05.dc4dcc","port":0}]},{"x":1040,"y":520,"wires":[{"id":"2b1190fc.6269b","port":0}]},{"x":960,"y":640,"wires":[{"id":"a15c559d.8ede","port":0}]},{"x":960,"y":680,"wires":[{"id":"f4b61876.d31c18","port":0}]},{"x":960,"y":760,"wires":[{"id":"6baff0e.5727e1","port":0}]},{"x":960,"y":800,"wires":[{"id":"b33f4517.df9508","port":0}]}]},{"id":"7c7b1e13.7da3e","type":"function","z":"28f1379.b2561c8","name":"HK Target from Timer","func":"var msg = {\n payload: {\n \"TargetTemperature\": parseFloat(msg.payload)\n }\n}\nreturn msg;\n\n ","outputs":1,"noerr":0,"x":540,"y":680,"wires":[["a15c559d.8ede","f4b61876.d31c18","ae1d639d.9578d8","920bba32.ece65"]]},{"id":"f8390101.59302","type":"bigtimer","z":"28f1379.b2561c8","outtopic":"","outpayload1":"20","outpayload2":"16","name":"Weekday AM","comment":"","lat":"55.887270","lon":"-4.966840","starttime":"360","endtime":"630","starttime2":"0","endtime2":0,"startoff":0,"endoff":0,"startoff2":0,"endoff2":0,"offs":0,"outtext1":"Heat to 20","outtext2":"Setback to 16","timeout":1440,"sun":false,"mon":true,"tue":true,"wed":true,"thu":true,"fri":true,"sat":false,"jan":true,"feb":true,"mar":true,"apr":true,"may":true,"jun":true,"jul":true,"aug":true,"sep":true,"oct":true,"nov":true,"dec":true,"day1":0,"month1":0,"day2":0,"month2":0,"day3":0,"month3":0,"day4":0,"month4":0,"day5":0,"month5":0,"day6":0,"month6":0,"day7":"","month7":"","day8":"","month8":"","day9":"","month9":"","day10":"","month10":"","day11":"","month11":"","day12":"","month12":"","d1":0,"w1":0,"d2":0,"w2":0,"d3":0,"w3":0,"d4":0,"w4":0,"d5":0,"w5":0,"d6":0,"w6":0,"xday1":0,"xmonth1":0,"xday2":0,"xmonth2":0,"xday3":0,"xmonth3":0,"xday4":0,"xmonth4":0,"xday5":0,"xmonth5":0,"xday6":0,"xmonth6":0,"xd1":0,"xw1":0,"xd2":0,"xw2":0,"xd3":0,"xw3":0,"xd4":0,"xw4":0,"xd5":0,"xw5":0,"xd6":0,"xw6":0,"suspend":false,"random":false,"repeat":false,"atstart":false,"odd":false,"even":false,"x":240,"y":700,"wires":[["7c7b1e13.7da3e","bc1fa48d.202778"],[],[]]},{"id":"17128dd5.a85a12","type":"bigtimer","z":"28f1379.b2561c8","outtopic":"","outpayload1":"20","outpayload2":"12","name":"Weekends","comment":"","lat":"55.887270","lon":"-4.966840","starttime":"450","endtime":"1380","starttime2":"0","endtime2":"0","startoff":0,"endoff":0,"startoff2":0,"endoff2":0,"offs":0,"outtext1":"Heat to 20","outtext2":"Setback to 12","timeout":1440,"sun":true,"mon":false,"tue":false,"wed":false,"thu":false,"fri":false,"sat":true,"jan":true,"feb":true,"mar":true,"apr":true,"may":true,"jun":true,"jul":true,"aug":true,"sep":true,"oct":true,"nov":true,"dec":true,"day1":0,"month1":0,"day2":0,"month2":0,"day3":0,"month3":0,"day4":0,"month4":0,"day5":0,"month5":0,"day6":0,"month6":0,"day7":"","month7":"","day8":"","month8":"","day9":"","month9":"","day10":"","month10":"","day11":"","month11":"","day12":"","month12":"","d1":0,"w1":0,"d2":0,"w2":0,"d3":0,"w3":0,"d4":0,"w4":0,"d5":0,"w5":0,"d6":0,"w6":0,"xday1":0,"xmonth1":0,"xday2":0,"xmonth2":0,"xday3":0,"xmonth3":0,"xday4":0,"xmonth4":0,"xday5":0,"xmonth5":0,"xday6":0,"xmonth6":0,"xd1":0,"xw1":0,"xd2":0,"xw2":0,"xd3":0,"xw3":0,"xd4":0,"xw4":0,"xd5":0,"xw5":0,"xd6":0,"xw6":0,"suspend":false,"random":false,"repeat":false,"atstart":true,"odd":false,"even":false,"x":230,"y":880,"wires":[["7c7b1e13.7da3e","bc1fa48d.202778"],[],[]]},{"id":"a15c559d.8ede","type":"switch","z":"28f1379.b2561c8","name":"Night ?","property":"heatNight","propertyType":"flow","rules":[{"t":"false"},{"t":"else"}],"checkall":"true","repair":false,"outputs":2,"x":820,"y":640,"wires":[[],["208176c0.d817a2"]]},{"id":"75c9b490.7357b4","type":"change","z":"28f1379.b2561c8","name":"heatAway","rules":[{"t":"set","p":"heatAway","pt":"flow","to":"true","tot":"bool"},{"t":"set","p":"payload","pt":"msg","to":"12","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":630,"y":500,"wires":[["59455d05.dc4dcc","2b1190fc.6269b"]]},{"id":"208176c0.d817a2","type":"debug","z":"28f1379.b2561c8","name":"Night","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","x":810,"y":600,"wires":[]},{"id":"621a5e35.ae6408","type":"cytech alarm mode event","z":"28f1379.b2561c8","name":"","trigger":true,"setmode":false,"setmodeparam":"payload.mode","setmodevalue":"cytechtext","setpassparam":"payload.passcode","setpassvalue":"1234","inputtype":"passive","activewait":5,"outputtype":"detailed","outputsimplifiedkey":"payload","outputmodevalue":"cytechtext","x":270,"y":500,"wires":[["a61c00a1.e1e87"]]},{"id":"a61c00a1.e1e87","type":"switch","z":"28f1379.b2561c8","name":"","property":"payload.event.status","propertyType":"msg","rules":[{"t":"eq","v":"night","vt":"str"},{"t":"eq","v":"away","vt":"str"},{"t":"else"}],"checkall":"true","repair":false,"outputs":3,"x":470,"y":500,"wires":[["6c389f26.60cbc8"],["75c9b490.7357b4"],["f4aae47d.8433d8"]]},{"id":"6c389f26.60cbc8","type":"change","z":"28f1379.b2561c8","name":"heatNight","rules":[{"t":"set","p":"heatNight","pt":"flow","to":"true","tot":"bool"},{"t":"set","p":"payload","pt":"msg","to":"12","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":630,"y":460,"wires":[["59455d05.dc4dcc","2b1190fc.6269b"]]},{"id":"f4aae47d.8433d8","type":"change","z":"28f1379.b2561c8","name":"Heat Normal","rules":[{"t":"set","p":"heatAway","pt":"flow","to":"false","tot":"bool"},{"t":"set","p":"heatNight","pt":"flow","to":"false","tot":"bool"},{"t":"set","p":"payload","pt":"msg","to":"22","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":630,"y":540,"wires":[["59455d05.dc4dcc","2b1190fc.6269b"]]},{"id":"f4b61876.d31c18","type":"switch","z":"28f1379.b2561c8","name":"Away ?","property":"heatAway","propertyType":"flow","rules":[{"t":"false"},{"t":"else"}],"checkall":"true","repair":false,"outputs":2,"x":820,"y":680,"wires":[[],["923f4380.b39f1"]]},{"id":"923f4380.b39f1","type":"debug","z":"28f1379.b2561c8","name":"Away","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","x":810,"y":720,"wires":[]},{"id":"59455d05.dc4dcc","type":"function","z":"28f1379.b2561c8","name":"HK Target from Mode","func":"var msg = {\n payload: {\n \"TargetTemperature\": msg.payload\n }\n}\nreturn msg;\n\n ","outputs":1,"noerr":0,"x":860,"y":480,"wires":[["abf20788.2dae58","920bba32.ece65"]]},{"id":"dbda1b46.eb5d08","type":"comment","z":"28f1379.b2561c8","name":"Triggers for Night and Away","info":"","x":280,"y":420,"wires":[]},{"id":"fbf74199.b06768","type":"comment","z":"28f1379.b2561c8","name":"Triggers - Timed","info":"","x":240,"y":600,"wires":[]},{"id":"bc1fa48d.202778","type":"function","z":"28f1379.b2561c8","name":"ST Target from Timer","func":"var msg = {\n topic: \"heatingSetpoint\",\n payload: {\n \"value\": parseFloat(msg.payload)\n }\n}\nreturn msg;\n\n ","outputs":1,"noerr":0,"x":540,"y":760,"wires":[["6baff0e.5727e1","b33f4517.df9508","ed89ae6e.a93188"]]},{"id":"6baff0e.5727e1","type":"switch","z":"28f1379.b2561c8","name":"Night ?","property":"heatNight","propertyType":"flow","rules":[{"t":"false"},{"t":"else"}],"checkall":"true","repair":false,"outputs":2,"x":820,"y":760,"wires":[[],[]]},{"id":"b33f4517.df9508","type":"switch","z":"28f1379.b2561c8","name":"Away ?","property":"heatAway","propertyType":"flow","rules":[{"t":"false"},{"t":"else"}],"checkall":"true","repair":false,"outputs":2,"x":820,"y":800,"wires":[[],[]]},{"id":"2b1190fc.6269b","type":"function","z":"28f1379.b2561c8","name":"ST Target from Mode","func":"var msg = {\n topic: \"heatingSetpoint\",\n payload: {\n \"value\": msg.payload\n }\n}\nreturn msg;\n\n ","outputs":1,"noerr":0,"x":860,"y":520,"wires":[["2b5097eb.0ea0d"]]},{"id":"2b5097eb.0ea0d","type":"debug","z":"28f1379.b2561c8","name":"ST Target from Mode","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","x":860,"y":560,"wires":[]},{"id":"abf20788.2dae58","type":"debug","z":"28f1379.b2561c8","name":"HK Target from Mode","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","x":860,"y":440,"wires":[]},{"id":"ae1d639d.9578d8","type":"debug","z":"28f1379.b2561c8","name":"HK Target from Timer","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","x":540,"y":640,"wires":[]},{"id":"ed89ae6e.a93188","type":"debug","z":"28f1379.b2561c8","name":"ST Target from Timer","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","x":540,"y":800,"wires":[]},{"id":"79606009.54018","type":"bigtimer","z":"28f1379.b2561c8","outtopic":"","outpayload1":"20","outpayload2":"12","name":"Weekday PM","comment":"","lat":"55.887270","lon":"-4.966840","starttime":"930","endtime":"0","starttime2":"0","endtime2":0,"startoff":0,"endoff":0,"startoff2":0,"endoff2":0,"offs":0,"outtext1":"Heat to 20","outtext2":"Setback to 12","timeout":1440,"sun":false,"mon":true,"tue":true,"wed":true,"thu":true,"fri":true,"sat":false,"jan":true,"feb":true,"mar":true,"apr":true,"may":true,"jun":true,"jul":true,"aug":true,"sep":true,"oct":true,"nov":true,"dec":true,"day1":0,"month1":0,"day2":0,"month2":0,"day3":0,"month3":0,"day4":0,"month4":0,"day5":0,"month5":0,"day6":0,"month6":0,"day7":"","month7":"","day8":"","month8":"","day9":"","month9":"","day10":"","month10":"","day11":"","month11":"","day12":"","month12":"","d1":0,"w1":0,"d2":0,"w2":0,"d3":0,"w3":0,"d4":0,"w4":0,"d5":0,"w5":0,"d6":0,"w6":0,"xday1":0,"xmonth1":0,"xday2":0,"xmonth2":0,"xday3":0,"xmonth3":0,"xday4":0,"xmonth4":0,"xday5":0,"xmonth5":0,"xday6":0,"xmonth6":0,"xd1":0,"xw1":0,"xd2":0,"xw2":0,"xd3":0,"xw3":0,"xd4":0,"xw4":0,"xd5":0,"xw5":0,"xd6":0,"xw6":0,"suspend":false,"random":false,"repeat":false,"atstart":false,"odd":false,"even":false,"x":240,"y":760,"wires":[["7c7b1e13.7da3e","bc1fa48d.202778"],[],[]]},{"id":"64169532.2ad124","type":"inject","z":"28f1379.b2561c8","name":"Inject 12","topic":"","payload":"12","payloadType":"num","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":240,"y":640,"wires":[["7c7b1e13.7da3e","bc1fa48d.202778"]]},{"id":"9778bc12.dfc668","type":"debug","z":"28f1379.b2561c8","name":"Floating Debug","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","x":800,"y":860,"wires":[]},{"id":"9d65cb40.6796f","type":"inject","z":"28f1379.b2561c8","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":280,"y":460,"wires":[["a61c00a1.e1e87"]]},{"id":"920bba32.ece65","type":"change","z":"28f1379.b2561c8","name":"Target Temp","rules":[{"t":"set","p":"targetTemp","pt":"flow","to":"payload.TargetTemperature","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":850,"y":380,"wires":[[]]},{"id":"76f67ef9.83f7e8","type":"smartthings-node-thermostat","z":"bef96085.311e68","conf":"c1f9528b.a757d","name":"Thermostat - Hall","capability":"thermostat","device":"d0e01085-e0af-4a89-9dc7-acbc5368ea0d","x":1070,"y":740,"wires":[["c753c0ef.ac9dd8","1ec7aa1c.c12a1e"],["9c518d41.ec1af8"],["22b99fae.c20fc8"],["2a942731.f816b"],["81091a96.9bcf2"],["ed6b514c.0d8de"],["c14facf8.b5a518"]]},{"id":"c14facf8.b5a518","type":"debug","z":"bef96085.311e68","name":"State","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","x":1430,"y":940,"wires":[]},{"id":"c753c0ef.ac9dd8","type":"function","z":"bef96085.311e68","name":"HK Current from ST","func":"var msg = {\n payload: {\n \"CurrentTemperature\": Number(parseFloat(msg.payload.value).toFixed(1))\n }\n}\nreturn msg;\n","outputs":1,"noerr":0,"x":1100,"y":600,"wires":[["1415dc12.17ec7c","58008a4d.41876c"]]},{"id":"1ec7aa1c.c12a1e","type":"debug","z":"bef96085.311e68","name":"HK Current from ST","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","x":1480,"y":620,"wires":[]},{"id":"9c518d41.ec1af8","type":"debug","z":"bef96085.311e68","name":"Output 2","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","x":1440,"y":740,"wires":[]},{"id":"22b99fae.c20fc8","type":"debug","z":"bef96085.311e68","name":"Hall ST Htg Set Point Out","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","x":1500,"y":780,"wires":[]},{"id":"2a942731.f816b","type":"debug","z":"bef96085.311e68","name":"Output 4","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","x":1440,"y":820,"wires":[]},{"id":"81091a96.9bcf2","type":"debug","z":"bef96085.311e68","name":"Output 5","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","x":1440,"y":860,"wires":[]},{"id":"ed6b514c.0d8de","type":"debug","z":"bef96085.311e68","name":"Output 6","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","x":1440,"y":900,"wires":[]},{"id":"23e641f2.4cb0e6","type":"function","z":"bef96085.311e68","name":"ST Target from HK","func":"var msg = {\n topic: \"heatingSetpoint\",\n payload: {\n \"value\": msg.payload.TargetTemperature\n }\n}\nreturn msg;\n\n ","outputs":1,"noerr":0,"x":710,"y":620,"wires":[["76f67ef9.83f7e8","24d7e089.00e32"]]},{"id":"24d7e089.00e32","type":"debug","z":"bef96085.311e68","name":"ST Target from HK","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","x":750,"y":560,"wires":[]},{"id":"1415dc12.17ec7c","type":"homekit-service","z":"bef96085.311e68","isParent":true,"bridge":"60b02d51.d6e784","parentService":"","name":"Heating South","serviceName":"Thermostat","topic":"","filter":false,"manufacturer":"Default Manufacturer","model":"Default Model","serialNo":"Default Serial Number","cameraConfigVideoProcessor":"","cameraConfigSource":"","cameraConfigStillImageSource":"","cameraConfigMaxStreams":"","cameraConfigMaxWidth":"","cameraConfigMaxHeight":"","cameraConfigMaxFPS":"","cameraConfigMaxBitrate":"","cameraConfigVideoCodec":"","cameraConfigAudioCodec":"","cameraConfigAudio":false,"cameraConfigPacketSize":"","cameraConfigVerticalFlip":false,"cameraConfigHorizontalFlip":false,"cameraConfigMapVideo":"","cameraConfigMapAudio":"","cameraConfigVideoFilter":"","cameraConfigAdditionalCommandLine":"","cameraConfigDebug":false,"cameraConfigSnapshotOutput":"disabled","characteristicProperties":"{\n \"TargetHeatingCoolingState\": {\n \"validValues\": [0, 1]\n },\n \"CurrentHeatingCoolingState\": {\n \"validValues\": [0, 1]\n }\n}","x":680,"y":420,"wires":[["c7a40080.588908","caa80785.0811b","542ceb31.7cad0c","b1b2c2a.e35c84"],[]]},{"id":"c7a40080.588908","type":"debug","z":"bef96085.311e68","name":"Output","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","x":900,"y":480,"wires":[]},{"id":"542ceb31.7cad0c","type":"switch","z":"bef96085.311e68","name":"Current Temp","property":"payload.CurrentTemperature","propertyType":"msg","rules":[{"t":"gte","v":"targetTemp","vt":"flow"},{"t":"lt","v":"targetTemp","vt":"flow"}],"checkall":"true","repair":false,"outputs":2,"x":920,"y":440,"wires":[["cc9b99d5.373138","6a2ae529.22c274"],["d56c1419.3d56b"]]},{"id":"6a2ae529.22c274","type":"debug","z":"bef96085.311e68","name":"Heat Off","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","x":1260,"y":280,"wires":[]},{"id":"cc9b99d5.373138","type":"function","z":"bef96085.311e68","name":"Set Target Heating Off","func":"var msg = {\n payload: {\n \"TargetHeatingCoolingState\": 0\n }\n}\nreturn msg;\n\n ","outputs":1,"noerr":0,"x":810,"y":300,"wires":[["1415dc12.17ec7c","e0222e41.a30b4","39b77a00.0b48a6"]]},{"id":"d56c1419.3d56b","type":"function","z":"bef96085.311e68","name":"Set Target Heating On","func":"var msg = {\n payload: {\n \"TargetHeatingCoolingState\": 1\n }\n}\nreturn msg;\n\n ","outputs":1,"noerr":0,"x":810,"y":260,"wires":[["1415dc12.17ec7c","e0222e41.a30b4","f0d2a864.e9831"]]},{"id":"2b61454f.3ac86a","type":"debug","z":"bef96085.311e68","name":"Heat On","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","x":1260,"y":240,"wires":[]},{"id":"e0222e41.a30b4","type":"debug","z":"bef96085.311e68","name":"function out","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","x":1390,"y":160,"wires":[]},{"id":"caa80785.0811b","type":"switch","z":"bef96085.311e68","name":"Target Temp","property":"payload.TargetTemperature","propertyType":"msg","rules":[{"t":"gt","v":"currentTemp","vt":"flow"},{"t":"lte","v":"currentTemp","vt":"flow"}],"checkall":"true","repair":false,"outputs":2,"x":910,"y":400,"wires":[["d56c1419.3d56b","2b61454f.3ac86a"],["cc9b99d5.373138"]]},{"id":"77019f1e.3740b8","type":"inject","z":"bef96085.311e68","name":"Request off","topic":"","payload":"{\"TargetHeatingCoolingState\":0}","payloadType":"json","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":170,"y":160,"wires":[["1415dc12.17ec7c"]]},{"id":"81969bbb.2f0e1","type":"inject","z":"bef96085.311e68","name":"Current 20 C","topic":"","payload":"{\"CurrentTemperature\": 20}","payloadType":"json","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":170,"y":240,"wires":[["58008a4d.41876c","1415dc12.17ec7c"]]},{"id":"9983761c.004f78","type":"inject","z":"bef96085.311e68","name":"Target 19 C","topic":"","payload":"{\"TargetTemperature\": 19}","payloadType":"json","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":170,"y":320,"wires":[["1415dc12.17ec7c"]]},{"id":"46f7c557.60521c","type":"inject","z":"bef96085.311e68","name":"Target 10 C","topic":"","payload":"{\"TargetTemperature\": 10}","payloadType":"json","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":170,"y":360,"wires":[["1415dc12.17ec7c"]]},{"id":"af28d660.541298","type":"inject","z":"bef96085.311e68","name":"Current 15 C","topic":"","payload":"{\"CurrentTemperature\": 15}","payloadType":"json","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":150,"y":280,"wires":[["58008a4d.41876c","1415dc12.17ec7c"]]},{"id":"d53bce0f.eb086","type":"inject","z":"bef96085.311e68","name":"Current 25 C","topic":"","payload":"{\"CurrentTemperature\": 25}","payloadType":"json","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":170,"y":200,"wires":[["58008a4d.41876c","1415dc12.17ec7c"]]},{"id":"f62b5709.cc8048","type":"inject","z":"bef96085.311e68","name":"Request heat","topic":"","payload":"{\"TargetHeatingCoolingState\":1}","payloadType":"json","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":170,"y":120,"wires":[["1415dc12.17ec7c"]]},{"id":"58008a4d.41876c","type":"change","z":"bef96085.311e68","name":"Current Temp","rules":[{"t":"set","p":"currentTemp","pt":"flow","to":"payload.CurrentTemperature","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":560,"y":240,"wires":[[]]},{"id":"863fdc56.cb346","type":"subflow:28f1379.b2561c8","z":"bef96085.311e68","name":"Timer (Heating South)","x":125,"y":670,"wires":[["1415dc12.17ec7c"],["76f67ef9.83f7e8"],["1415dc12.17ec7c"],["1415dc12.17ec7c"],["76f67ef9.83f7e8"],["76f67ef9.83f7e8"]]},{"id":"b1b2c2a.e35c84","type":"switch","z":"bef96085.311e68","name":"","property":"payload.TargetTemperature","propertyType":"msg","rules":[{"t":"gt","v":"0","vt":"num"},{"t":"else"}],"checkall":"true","repair":false,"outputs":2,"x":490,"y":600,"wires":[["23e641f2.4cb0e6"],["a8b5188e.df3e98"]]},{"id":"a8b5188e.df3e98","type":"debug","z":"bef96085.311e68","name":"Empty","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","x":450,"y":660,"wires":[]},{"id":"f0d2a864.e9831","type":"function","z":"bef96085.311e68","name":"Switch ON","func":"var msg = {\n topic: \"switch\",\n payload: {\n value: 1\n }\n}\nreturn msg;","outputs":1,"noerr":0,"x":1210,"y":80,"wires":[["69482ade.b7fcd4"]]},{"id":"39b77a00.0b48a6","type":"function","z":"bef96085.311e68","name":"Switch OFF","func":"var msg = {\n topic: \"switch\",\n payload: {\n value: 0\n }\n}\nreturn msg;","outputs":1,"noerr":0,"x":1230,"y":120,"wires":[["69482ade.b7fcd4"]]},{"id":"69482ade.b7fcd4","type":"smartthings-node-onoff","z":"bef96085.311e68","conf":"c1f9528b.a757d","name":"Heat - South","device":"f2a849e1-cb0a-4f95-8f2a-298f41951bc4","x":1500,"y":100,"wires":[[]]},{"id":"afdf3d17.2c02d","type":"inject","z":"bef96085.311e68","name":"","topic":"update","payload":"","payloadType":"date","repeat":"","crontab":"","once":true,"onceDelay":0.1,"x":790,"y":780,"wires":[["76f67ef9.83f7e8"]]},{"id":"c1f9528b.a757d","type":"smartthings-config","z":"","name":"ArdeerST","token":"8036a42b-b303-4722-a7c2-32024460e152"},{"id":"60b02d51.d6e784","type":"homekit-bridge","z":"","bridgeName":"NR Thermostat Sth","pinCode":"111-11-111","port":"","allowInsecureRequest":false,"manufacturer":"Default Manufacturer","model":"Default Model","serialNo":"Default Serial Number","customMdnsConfig":false,"mdnsMulticast":true,"mdnsInterface":"","mdnsPort":"","mdnsIp":"","mdnsTtl":"","mdnsLoopback":true,"mdnsReuseAddr":true,"allowMessagePassthrough":true}]

cspawn1 commented 4 years ago

burtonjk - sorry for the delay in updating. I have been working on this project on an inconsistent basis.

I can confirm the same findings as you. It seems like none of the Thermostat Node outputs are updating (except for the current temperature) if the setpoints or thermostatMode/fanModes are adjusted via the thermostat itself (or via the TCC web portal).

Seems like it is something in the nodes code that need to be fixed....

I have gotten around this issue for now by locking all our buildings thermostats. This works OK in my case since occupants shouldn't be adjusting temperatures anyway.

Derek-st commented 2 years ago

A little more info. I took the liberty of catching the webhook POST. It correctly reflects changes. (In my case I'm interested in keeping track of OperatingState so grabbed one of those)

{\x22id\x22:\x225b009a71-7770-4cb7-b888-9e6259432d85\x22,\x22date\x22:\x222021-11-30T19:04:44.257Z\x22,\x22value\x22:\x22idle\x22,\x22name\x22:\x22thermostatOperatingState\x22,\x22display_name\x22:\x22Radient thermostat\x22,\x22description\x22:\x22Radient thermostat thermostat operating state is idle\x22,\x22source\x22:\x22DEVICE\x22,\x22state_changed\x22:true,\x22physical\x22:false,\x22location_id\x22:\x22blah blah\x22,\x22hub_id\x22:\x22blah blah\x22}

same message at the output of the thermostat node: - Note the value is stuck at heating. A new Deploy needed to change that

11/30/2021, 2:04:44 PMnode: 3e803164cea4b821 device : msg.payload : Object object deviceId: "5b009a71-7770-4cb7-b888-9e6259432d85" deviceType: "thermostatOperatingState" name: "Radient thermostat(thermostatOperatingState)" value: "heating"

Derek-st commented 2 years ago

... and a bread crumb for someone who can maintain this

Line 192 in "smartthings-thermostat.js

  switch(evt["name"].toLowerCase()){               "Converts the comparison to lowercase... 

but the values in the switch are camel case.

e.g. case "coolingSetpoint":

Changing all of the values in case quotes to lower case will do the trick.