Cabinet Temperature Controller - PWM Issue

Hi All,

I have being playing around with a cabinet temperature controller on a Raspi 4 with NR which in theory should do the following:

  1. Monitor temperatures for lower and upper shelves
  2. If temperature rises in either the fans (2 (Arctic F12 PWM) increase or decrease in speed.

There are two RGB LED's which change colour according to the temperature's set and also this corresponds with the gauge in the dashboard. So far this is working fine.

I used the same principle for the PWM control but it does not seem to be working with the fans running at 100% from startup.

Any help would be gratefully appreciated.

[{"id":"4c449e11.76fe6","type":"tab","label":"Tempreture + LED","disabled":false,"info":""},{"id":"85317411.fccf48","type":"tab","label":"Fan Control","disabled":false,"info":""},{"id":"b825ac24.ce861","type":"ui_base","theme":{"name":"theme-dark","lightTheme":{"default":"#0094CE","baseColor":"#0094CE","baseFont":"-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif","edited":true,"reset":false},"darkTheme":{"default":"#097479","baseColor":"#097479","baseFont":"-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif","edited":true,"reset":false},"customTheme":{"name":"Untitled Theme 1","default":"#4B7930","baseColor":"#4B7930","baseFont":"-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif"},"themeState":{"base-color":{"default":"#097479","value":"#097479","edited":false},"page-titlebar-backgroundColor":{"value":"#097479","edited":false},"page-backgroundColor":{"value":"#111111","edited":false},"page-sidebar-backgroundColor":{"value":"#333333","edited":false},"group-textColor":{"value":"#0eb8c0","edited":false},"group-borderColor":{"value":"#555555","edited":false},"group-backgroundColor":{"value":"#333333","edited":false},"widget-textColor":{"value":"#eeeeee","edited":false},"widget-backgroundColor":{"value":"#097479","edited":false},"widget-borderColor":{"value":"#333333","edited":false},"base-font":{"value":"-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif"}},"angularTheme":{"primary":"indigo","accents":"blue","warn":"red","background":"grey"}},"site":{"name":"Node-RED Dashboard","hideToolbar":"false","allowSwipe":"false","lockMenu":"false","allowTempTheme":"true","dateFormat":"DD/MM/YYYY","sizes":{"sx":48,"sy":48,"gx":6,"gy":6,"cx":6,"cy":6,"px":0,"py":0}}},{"id":"3518a88f.b1a4a8","type":"ui_tab","name":"Cabinet","icon":"dashboard","disabled":false,"hidden":false},{"id":"2cfa49ff.a37426","type":"ui_group","name":"Tempreature Sensors","tab":"3518a88f.b1a4a8","order":2,"disp":true,"width":"5","collapse":false},{"id":"ce2f38e2.9bbb58","type":"ui_spacer","name":"spacer","group":"2cfa49ff.a37426","order":2,"width":"0","height":"0"},{"id":"11ae7819.12c8e8","type":"ui_group","name":"Fans","tab":"3518a88f.b1a4a8","order":3,"disp":true,"width":"5","collapse":false},{"id":"a02c35d9.bfe428","type":"ui_spacer","name":"spacer","group":"11ae7819.12c8e8","order":2,"width":1,"height":1},{"id":"15a23dd2.a604aa","type":"ui_group","name":"Col1","tab":"","order":1,"disp":false,"width":"6"},{"id":"10302fc.fa9f6d","type":"ui_group","name":"Col2","tab":"","order":2,"disp":false,"width":"6"},{"id":"fb86037f.14866","type":"ui_group","name":"Col3","tab":"","order":3,"disp":false,"width":"6"},{"id":"adf6585f.f213f","type":"ui_group","name":"hidden_group","tab":"","order":1,"disp":false,"width":"6","collapse":false},{"id":"6b94777b.6a4018","type":"ui_spacer","name":"spacer","group":"3a01b2a3.8c70ee","order":2,"width":1,"height":1},{"id":"6f7e14fb.5ce79c","type":"sensor-ds18b20","z":"4c449e11.76fe6","name":"Upper Cabinet","topic":"","sensorid":"28-01144fe149aa","timer":"1","repeat":true,"x":300,"y":140,"wires":[["93983778.1d0cc8","31b7bce8.ad23d4","a1f8e4de.4ed478","99570ba7.987328","20247b71.b3b304","e5f0711c.45094"]]},{"id":"ce05e76f.038f88","type":"sensor-ds18b20","z":"4c449e11.76fe6","name":"Lower Cabinet","topic":"","sensorid":"28-011450905baa","timer":"1","repeat":true,"x":280,"y":960,"wires":[["f9cf39c3.c7ed08","c54c92e6.00c65","641d3979.a97508","f10df65b.bb0d28","2aec0ca2.7239c4"]]},{"id":"93983778.1d0cc8","type":"debug","z":"4c449e11.76fe6","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":510,"y":140,"wires":[]},{"id":"f9cf39c3.c7ed08","type":"debug","z":"4c449e11.76fe6","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":490,"y":960,"wires":[]},{"id":"7474a50.6c8aa5c","type":"inject","z":"4c449e11.76fe6","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":120,"y":140,"wires":[["6f7e14fb.5ce79c"]]},{"id":"30142821.8930e8","type":"inject","z":"4c449e11.76fe6","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":100,"y":960,"wires":[["ce05e76f.038f88"]]},{"id":"31b7bce8.ad23d4","type":"ui_artlessgauge","z":"4c449e11.76fe6","group":"2cfa49ff.a37426","order":1,"width":"5","height":"5","name":"Upper Tempreature","icon":"fa-thermometer","label":"Upper Tempreature","unit":"Degrees c","layout":"radial","decimals":"1","differential":false,"minmax":true,"colorTrack":"#555555","style":"","colorFromTheme":true,"property":"payload","sectors":[{"val":0,"col":"#1eff00","t":"min","dot":0},{"val":30,"col":"#f7db26","t":"sec","dot":0},{"val":35,"col":"#f42525","t":"sec","dot":0},{"val":70,"col":"#f42525","t":"max","dot":0}],"lineWidth":"15","bgcolorFromTheme":true,"diffCenter":"","x":530,"y":80,"wires":[]},{"id":"c54c92e6.00c65","type":"ui_artlessgauge","z":"4c449e11.76fe6","group":"2cfa49ff.a37426","order":3,"width":"5","height":"5","name":"Lower Tempreature","icon":"fa-thermometer","label":"Lower Tempreature","unit":"Degrees c","layout":"radial","decimals":"1","differential":false,"minmax":true,"colorTrack":"#555555","style":"","colorFromTheme":true,"property":"payload","sectors":[{"val":0,"col":"#1eff00","t":"min","dot":0},{"val":30,"col":"#f7db26","t":"sec","dot":0},{"val":35,"col":"#f42525","t":"sec","dot":0},{"val":70,"col":"#f42525","t":"max","dot":0}],"lineWidth":"15","bgcolorFromTheme":true,"diffCenter":"","x":510,"y":900,"wires":[]},{"id":"c9713361.64899","type":"inject","z":"85317411.fccf48","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":120,"y":100,"wires":[["373d66b1.df79fa"]]},{"id":"373d66b1.df79fa","type":"sensor-ds18b20","z":"85317411.fccf48","name":"Upper Cabinet","topic":"","sensorid":"28-01144fe149aa","timer":"1","repeat":true,"x":300,"y":100,"wires":[["2e689737.c19868","98676b88.ec2c48","c105e730.cf40d8","4bbb2416.e4f27c","eff81cca.76f3d","a639a3b8.2672e","f85106b2.9da5e8"]]},{"id":"fd3d5e06.e5ac9","type":"inject","z":"85317411.fccf48","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":120,"y":540,"wires":[["5969fb27.79e354"]]},{"id":"5969fb27.79e354","type":"sensor-ds18b20","z":"85317411.fccf48","name":"Lower Cabinet","topic":"","sensorid":"28-011450905baa","timer":"1","repeat":true,"x":300,"y":540,"wires":[["9cef5010.ec8bc","bc3806fd.33a1b8","7f951954.dbada8","fd898a39.0be778","6d1d5929.4e63d8","8d5c568e.9ecd48","7de4ed5.303d414"]]},{"id":"f761f5b1.e17998","type":"ui_artlessgauge","z":"85317411.fccf48","group":"11ae7819.12c8e8","order":1,"width":"5","height":"5","name":"Upper Fan","icon":"fa-snowflake-o","label":"Upper Fan","unit":"Percent %","layout":"radial","decimals":0,"differential":false,"minmax":true,"colorTrack":"#555555","style":"","colorFromTheme":true,"property":"payload","sectors":[{"val":0,"col":"#2bff00","t":"min","dot":0},{"val":100,"col":"#2bff00","t":"max","dot":0}],"lineWidth":"15","bgcolorFromTheme":true,"diffCenter":"","x":990,"y":160,"wires":[]},{"id":"a1f8e4de.4ed478","type":"switch","z":"4c449e11.76fe6","name":"Temp <30","property":"payload","propertyType":"msg","rules":[{"t":"lte","v":"30","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":520,"y":200,"wires":[["b7765d2f.9e2ef","cf03c9bd.6b1208","e091cace.310328"]]},{"id":"b7765d2f.9e2ef","type":"change","z":"4c449e11.76fe6","name":"Change","rules":[{"t":"set","p":"payload","pt":"msg","to":"1","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":700,"y":200,"wires":[["9a023ea4.f9326"]]},{"id":"9a023ea4.f9326","type":"rpi-gpio out","z":"4c449e11.76fe6","name":"GREEN","pin":"35","set":"","level":"0","freq":"","out":"out","x":860,"y":200,"wires":[]},{"id":"99570ba7.987328","type":"switch","z":"4c449e11.76fe6","name":"Temp >35","property":"payload","propertyType":"msg","rules":[{"t":"gte","v":"35.1","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":520,"y":600,"wires":[["d9a05ccc.1f3c1","cff4e83.1941d18","a5496bbf.22b478"]]},{"id":"d9a05ccc.1f3c1","type":"change","z":"4c449e11.76fe6","name":"Change","rules":[{"t":"set","p":"payload","pt":"msg","to":"1","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":700,"y":660,"wires":[["a9e7e285.13eec"]]},{"id":"a9e7e285.13eec","type":"rpi-gpio out","z":"4c449e11.76fe6","name":"RED","pin":"33","set":"","level":"0","freq":"","out":"out","x":850,"y":660,"wires":[]},{"id":"cf03c9bd.6b1208","type":"change","z":"4c449e11.76fe6","name":"Change","rules":[{"t":"set","p":"payload","pt":"msg","to":"0","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":700,"y":260,"wires":[["5f2c9eb6.77e72"]]},{"id":"5f2c9eb6.77e72","type":"rpi-gpio out","z":"4c449e11.76fe6","name":"RED","pin":"33","set":"","level":"0","freq":"","out":"out","x":850,"y":260,"wires":[]},{"id":"cff4e83.1941d18","type":"change","z":"4c449e11.76fe6","name":"Change","rules":[{"t":"set","p":"payload","pt":"msg","to":"0","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":700,"y":600,"wires":[["385dccdd.578244"]]},{"id":"385dccdd.578244","type":"rpi-gpio out","z":"4c449e11.76fe6","name":"GREEN","pin":"35","set":"","level":"0","freq":"","out":"out","x":860,"y":600,"wires":[]},{"id":"6d789bb1.4f96f4","type":"rpi-gpio out","z":"4c449e11.76fe6","name":"BLUE","pin":"37","set":"","level":"0","freq":"","out":"out","x":850,"y":320,"wires":[]},{"id":"e091cace.310328","type":"change","z":"4c449e11.76fe6","name":"Change","rules":[{"t":"set","p":"payload","pt":"msg","to":"0","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":700,"y":320,"wires":[["6d789bb1.4f96f4"]]},{"id":"a5496bbf.22b478","type":"change","z":"4c449e11.76fe6","name":"Change","rules":[{"t":"set","p":"payload","pt":"msg","to":"0","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":700,"y":720,"wires":[["fbbd2087.82461"]]},{"id":"fbbd2087.82461","type":"rpi-gpio out","z":"4c449e11.76fe6","name":"BLUE","pin":"37","set":"","level":"0","freq":"","out":"out","x":850,"y":720,"wires":[]},{"id":"20247b71.b3b304","type":"switch","z":"4c449e11.76fe6","name":"Temp >30 <35","property":"payload","propertyType":"msg","rules":[{"t":"btwn","v":"30.1","vt":"num","v2":"34.9","v2t":"num"}],"checkall":"true","repair":false,"outputs":1,"x":540,"y":400,"wires":[["3e8fcf1d.d4d36","dc396899.f73bd8","1121316d.c26f7f"]]},{"id":"3e8fcf1d.d4d36","type":"change","z":"4c449e11.76fe6","name":"Change","rules":[{"t":"set","p":"payload","pt":"msg","to":"1","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":700,"y":460,"wires":[["ae5f5562.3b7d48"]]},{"id":"ae5f5562.3b7d48","type":"rpi-gpio out","z":"4c449e11.76fe6","name":"RED","pin":"33","set":"","level":"0","freq":"","out":"out","x":850,"y":460,"wires":[]},{"id":"dc396899.f73bd8","type":"change","z":"4c449e11.76fe6","name":"Change","rules":[{"t":"set","p":"payload","pt":"msg","to":"1","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":700,"y":400,"wires":[["7b71c212.b41c0c"]]},{"id":"7b71c212.b41c0c","type":"rpi-gpio out","z":"4c449e11.76fe6","name":"GREEN","pin":"35","set":"","level":"0","freq":"","out":"out","x":860,"y":400,"wires":[]},{"id":"1121316d.c26f7f","type":"change","z":"4c449e11.76fe6","name":"Change","rules":[{"t":"set","p":"payload","pt":"msg","to":"0","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":700,"y":520,"wires":[["b2b4b950.b1c4f8"]]},{"id":"b2b4b950.b1c4f8","type":"rpi-gpio out","z":"4c449e11.76fe6","name":"BLUE","pin":"37","set":"","level":"0","freq":"","out":"out","x":850,"y":520,"wires":[]},{"id":"641d3979.a97508","type":"switch","z":"4c449e11.76fe6","name":"Temp <30","property":"payload","propertyType":"msg","rules":[{"t":"lte","v":"30","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":520,"y":1020,"wires":[["52f56168.f2fb","ae16417e.1c3e4","bd896e88.1045d"]]},{"id":"52f56168.f2fb","type":"change","z":"4c449e11.76fe6","name":"Change","rules":[{"t":"set","p":"payload","pt":"msg","to":"1","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":700,"y":1020,"wires":[["28d7c23d.562ace"]]},{"id":"28d7c23d.562ace","type":"rpi-gpio out","z":"4c449e11.76fe6","name":"GREEN","pin":"11","set":"","level":"0","freq":"","out":"out","x":860,"y":1020,"wires":[]},{"id":"2aec0ca2.7239c4","type":"switch","z":"4c449e11.76fe6","name":"Temp >35","property":"payload","propertyType":"msg","rules":[{"t":"gte","v":"35.1","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":520,"y":1420,"wires":[["8b1a3f12.b8c6f","60427024.07861","c3722162.5ea96"]]},{"id":"8b1a3f12.b8c6f","type":"change","z":"4c449e11.76fe6","name":"Change","rules":[{"t":"set","p":"payload","pt":"msg","to":"1","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":700,"y":1480,"wires":[["9be95c74.a294d"]]},{"id":"9be95c74.a294d","type":"rpi-gpio out","z":"4c449e11.76fe6","name":"RED","pin":"13","set":"","level":"0","freq":"","out":"out","x":850,"y":1480,"wires":[]},{"id":"ae16417e.1c3e4","type":"change","z":"4c449e11.76fe6","name":"Change","rules":[{"t":"set","p":"payload","pt":"msg","to":"0","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":700,"y":1080,"wires":[["dfe7edd4.51ec2"]]},{"id":"dfe7edd4.51ec2","type":"rpi-gpio out","z":"4c449e11.76fe6","name":"RED","pin":"13","set":"","level":"0","freq":"","out":"out","x":850,"y":1080,"wires":[]},{"id":"60427024.07861","type":"change","z":"4c449e11.76fe6","name":"Change","rules":[{"t":"set","p":"payload","pt":"msg","to":"0","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":700,"y":1420,"wires":[["31858d1d.0f18b2"]]},{"id":"31858d1d.0f18b2","type":"rpi-gpio out","z":"4c449e11.76fe6","name":"GREEN","pin":"11","set":"","level":"0","freq":"","out":"out","x":860,"y":1420,"wires":[]},{"id":"cfea7b3c.8b7358","type":"rpi-gpio out","z":"4c449e11.76fe6","name":"BLUE","pin":"15","set":"","level":"0","freq":"","out":"out","x":850,"y":1140,"wires":[]},{"id":"bd896e88.1045d","type":"change","z":"4c449e11.76fe6","name":"Change","rules":[{"t":"set","p":"payload","pt":"msg","to":"0","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":700,"y":1140,"wires":[["cfea7b3c.8b7358"]]},{"id":"c3722162.5ea96","type":"change","z":"4c449e11.76fe6","name":"Change","rules":[{"t":"set","p":"payload","pt":"msg","to":"0","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":700,"y":1540,"wires":[["1fa9b4c3.85df1b"]]},{"id":"1fa9b4c3.85df1b","type":"rpi-gpio out","z":"4c449e11.76fe6","name":"BLUE","pin":"15","set":"","level":"0","freq":"","out":"out","x":850,"y":1540,"wires":[]},{"id":"f10df65b.bb0d28","type":"switch","z":"4c449e11.76fe6","name":"Temp >30 <35","property":"payload","propertyType":"msg","rules":[{"t":"btwn","v":"30.1","vt":"num","v2":"34.9","v2t":"num"}],"checkall":"true","repair":false,"outputs":1,"x":540,"y":1220,"wires":[["673d3f13.cad88","d893c2c9.34933","b8ada6b2.247298"]]},{"id":"673d3f13.cad88","type":"change","z":"4c449e11.76fe6","name":"Change","rules":[{"t":"set","p":"payload","pt":"msg","to":"1","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":700,"y":1280,"wires":[["db28309a.563d7"]]},{"id":"db28309a.563d7","type":"rpi-gpio out","z":"4c449e11.76fe6","name":"RED","pin":"13","set":"","level":"0","freq":"","out":"out","x":850,"y":1280,"wires":[]},{"id":"d893c2c9.34933","type":"change","z":"4c449e11.76fe6","name":"Change","rules":[{"t":"set","p":"payload","pt":"msg","to":"1","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":700,"y":1220,"wires":[["38d08477.9e1f0c"]]},{"id":"38d08477.9e1f0c","type":"rpi-gpio out","z":"4c449e11.76fe6","name":"GREEN","pin":"11","set":"","level":"0","freq":"","out":"out","x":860,"y":1220,"wires":[]},{"id":"b8ada6b2.247298","type":"change","z":"4c449e11.76fe6","name":"Change","rules":[{"t":"set","p":"payload","pt":"msg","to":"0","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":700,"y":1340,"wires":[["855ec40a.c1eee8"]]},{"id":"855ec40a.c1eee8","type":"rpi-gpio out","z":"4c449e11.76fe6","name":"BLUE","pin":"15","set":"","level":"0","freq":"","out":"out","x":850,"y":1340,"wires":[]},{"id":"e5f0711c.45094","type":"switch","z":"4c449e11.76fe6","name":"Temp >70","property":"payload","propertyType":"msg","rules":[{"t":"gte","v":"70","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":520,"y":780,"wires":[[]]},{"id":"4bbb2416.e4f27c","type":"debug","z":"85317411.fccf48","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":550,"y":40,"wires":[]},{"id":"2e689737.c19868","type":"switch","z":"85317411.fccf48","name":"Temp 10c","property":"payload","propertyType":"msg","rules":[{"t":"lte","v":"10","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":540,"y":100,"wires":[["35a88183.28f5ae"]]},{"id":"35a88183.28f5ae","type":"change","z":"85317411.fccf48","name":"Fan Speed 10%","rules":[{"t":"set","p":"payload","pt":"msg","to":"10","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":720,"y":100,"wires":[["92819144.bd5d7","f761f5b1.e17998"]]},{"id":"92819144.bd5d7","type":"rpi-gpio out","z":"85317411.fccf48","name":"Upper Fan","pin":"12","set":"","level":"0","freq":"50","out":"pwm","x":990,"y":220,"wires":[]},{"id":"98676b88.ec2c48","type":"switch","z":"85317411.fccf48","name":"Temp >10 <20","property":"payload","propertyType":"msg","rules":[{"t":"btwn","v":"10.1","vt":"num","v2":"20","v2t":"num"}],"checkall":"true","repair":false,"outputs":1,"x":520,"y":160,"wires":[["e5b8a0ac.b735b"]]},{"id":"e5b8a0ac.b735b","type":"change","z":"85317411.fccf48","name":"Fan Speed 20%","rules":[{"t":"set","p":"payload","pt":"msg","to":"20","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":720,"y":160,"wires":[["92819144.bd5d7","f761f5b1.e17998"]]},{"id":"a639a3b8.2672e","type":"switch","z":"85317411.fccf48","name":"Temp >50 <70","property":"payload","propertyType":"msg","rules":[{"t":"btwn","v":"50.1","vt":"num","v2":"70","v2t":"num"}],"checkall":"true","repair":false,"outputs":1,"x":520,"y":340,"wires":[["ff744b79.eb5ec8"]]},{"id":"ff744b79.eb5ec8","type":"change","z":"85317411.fccf48","name":"Fan Speed 75%","rules":[{"t":"set","p":"payload","pt":"msg","to":"75","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":720,"y":340,"wires":[["92819144.bd5d7","f761f5b1.e17998"]]},{"id":"c105e730.cf40d8","type":"switch","z":"85317411.fccf48","name":"Temp >20 <30","property":"payload","propertyType":"msg","rules":[{"t":"btwn","v":"20.1","vt":"num","v2":"30","v2t":"num"}],"checkall":"true","repair":false,"outputs":1,"x":520,"y":220,"wires":[["a7d65533.a7f688"]]},{"id":"a7d65533.a7f688","type":"change","z":"85317411.fccf48","name":"Fan Speed 40%","rules":[{"t":"set","p":"payload","pt":"msg","to":"40","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":720,"y":220,"wires":[["92819144.bd5d7","f761f5b1.e17998"]]},{"id":"eff81cca.76f3d","type":"switch","z":"85317411.fccf48","name":"Temp >30 <50","property":"payload","propertyType":"msg","rules":[{"t":"btwn","v":"30.1","vt":"num","v2":"50","v2t":"num"}],"checkall":"true","repair":false,"outputs":1,"x":520,"y":280,"wires":[["58206c96.95fb84"]]},{"id":"58206c96.95fb84","type":"change","z":"85317411.fccf48","name":"Fan Speed 60%","rules":[{"t":"set","p":"payload","pt":"msg","to":"60","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":720,"y":280,"wires":[["f761f5b1.e17998","92819144.bd5d7"]]},{"id":"f85106b2.9da5e8","type":"switch","z":"85317411.fccf48","name":"Temp >70","property":"payload","propertyType":"msg","rules":[{"t":"gt","v":"70.1","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":540,"y":400,"wires":[["2649e4f9.d685cc"]]},{"id":"2649e4f9.d685cc","type":"change","z":"85317411.fccf48","name":"Fan Speed 100%","rules":[{"t":"set","p":"payload","pt":"msg","to":"100","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":730,"y":400,"wires":[["92819144.bd5d7","f761f5b1.e17998"]]},{"id":"a4cdf7e8.0583a8","type":"ui_artlessgauge","z":"85317411.fccf48","group":"11ae7819.12c8e8","order":3,"width":"5","height":"5","name":"Lower Fan","icon":"fa-snowflake-o","label":"Lower Fan","unit":"Percent %","layout":"radial","decimals":0,"differential":false,"minmax":true,"colorTrack":"#555555","style":"","colorFromTheme":true,"property":"payload","sectors":[{"val":0,"col":"#2bff00","t":"min","dot":0},{"val":100,"col":"#2bff00","t":"max","dot":0}],"lineWidth":"15","bgcolorFromTheme":true,"diffCenter":"","x":990,"y":600,"wires":[]},{"id":"bc3806fd.33a1b8","type":"switch","z":"85317411.fccf48","name":"Temp 10c","property":"payload","propertyType":"msg","rules":[{"t":"lte","v":"10","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":540,"y":540,"wires":[["1f0b2a10.dea356"]]},{"id":"1f0b2a10.dea356","type":"change","z":"85317411.fccf48","name":"Fan Speed 10%","rules":[{"t":"set","p":"payload","pt":"msg","to":"10","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":720,"y":540,"wires":[["cab3f8d3.365778","a4cdf7e8.0583a8"]]},{"id":"cab3f8d3.365778","type":"rpi-gpio out","z":"85317411.fccf48","name":"Lower Fan","pin":"32","set":"","level":"0","freq":"50","out":"pwm","x":990,"y":660,"wires":[]},{"id":"7f951954.dbada8","type":"switch","z":"85317411.fccf48","name":"Temp >10 <20","property":"payload","propertyType":"msg","rules":[{"t":"btwn","v":"10.1","vt":"num","v2":"20","v2t":"num"}],"checkall":"true","repair":false,"outputs":1,"x":520,"y":600,"wires":[["b5df3e02.3d2ad"]]},{"id":"b5df3e02.3d2ad","type":"change","z":"85317411.fccf48","name":"Fan Speed 20%","rules":[{"t":"set","p":"payload","pt":"msg","to":"20","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":720,"y":600,"wires":[["cab3f8d3.365778","a4cdf7e8.0583a8"]]},{"id":"8d5c568e.9ecd48","type":"switch","z":"85317411.fccf48","name":"Temp >50 <70","property":"payload","propertyType":"msg","rules":[{"t":"btwn","v":"50.1","vt":"num","v2":"70","v2t":"num"}],"checkall":"true","repair":false,"outputs":1,"x":520,"y":780,"wires":[["6c5114aa.386f6c"]]},{"id":"6c5114aa.386f6c","type":"change","z":"85317411.fccf48","name":"Fan Speed 75%","rules":[{"t":"set","p":"payload","pt":"msg","to":"75","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":720,"y":780,"wires":[["cab3f8d3.365778","a4cdf7e8.0583a8"]]},{"id":"fd898a39.0be778","type":"switch","z":"85317411.fccf48","name":"Temp >20 <30","property":"payload","propertyType":"msg","rules":[{"t":"btwn","v":"20.1","vt":"num","v2":"30","v2t":"num"}],"checkall":"true","repair":false,"outputs":1,"x":520,"y":660,"wires":[["4c96f2b.1ea960c"]]},{"id":"4c96f2b.1ea960c","type":"change","z":"85317411.fccf48","name":"Fan Speed 40%","rules":[{"t":"set","p":"payload","pt":"msg","to":"40","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":720,"y":660,"wires":[["cab3f8d3.365778","a4cdf7e8.0583a8"]]},{"id":"6d1d5929.4e63d8","type":"switch","z":"85317411.fccf48","name":"Temp >30 <50","property":"payload","propertyType":"msg","rules":[{"t":"btwn","v":"30.1","vt":"num","v2":"50","v2t":"num"}],"checkall":"true","repair":false,"outputs":1,"x":520,"y":720,"wires":[["df2cd3.157d133"]]},{"id":"df2cd3.157d133","type":"change","z":"85317411.fccf48","name":"Fan Speed 60%","rules":[{"t":"set","p":"payload","pt":"msg","to":"60","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":720,"y":720,"wires":[["a4cdf7e8.0583a8","cab3f8d3.365778"]]},{"id":"7de4ed5.303d414","type":"switch","z":"85317411.fccf48","name":"Temp >70","property":"payload","propertyType":"msg","rules":[{"t":"gt","v":"70.1","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":540,"y":840,"wires":[["33f12a6a.aca6a6"]]},{"id":"33f12a6a.aca6a6","type":"change","z":"85317411.fccf48","name":"Fan Speed 100%","rules":[{"t":"set","p":"payload","pt":"msg","to":"100","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":730,"y":840,"wires":[["cab3f8d3.365778","a4cdf7e8.0583a8"]]},{"id":"9cef5010.ec8bc","type":"debug","z":"85317411.fccf48","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":550,"y":480,"wires":[]}]

Show us what you see in the debug node

[Edit] In your Switch nodes you are comparing the payload to string values, you should be comparing to numbers (click the a/z dropdown).

By the way, all the Switch nodes could be combined into one Switch node with multiple outputs.

Thanks Colin, I'll amend and give it another whirl.

As requested.

As far as i can see your flow might not be optimum (see @colin s suggestions) but looking at the debug and your screenshot - you are actually sending 40 to the "Upper Fan" node.

So perhaps you have a hardware or wiring issue (wrong pin)?

Perhaps try another GPIO?

Hi Steve,

I've changed the GPIO pin's as recommended to 23 (upper fan) and 24 (lower fan) but still no difference in fan speed when the temperature is decreased or increased.

[{"id":"4c449e11.76fe6","type":"tab","label":"Tempreture + LED","disabled":false,"info":""},{"id":"85317411.fccf48","type":"tab","label":"Fan Control","disabled":false,"info":""},{"id":"b825ac24.ce861","type":"ui_base","theme":{"name":"theme-dark","lightTheme":{"default":"#0094CE","baseColor":"#0094CE","baseFont":"-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif","edited":true,"reset":false},"darkTheme":{"default":"#097479","baseColor":"#097479","baseFont":"-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif","edited":true,"reset":false},"customTheme":{"name":"Untitled Theme 1","default":"#4B7930","baseColor":"#4B7930","baseFont":"-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif"},"themeState":{"base-color":{"default":"#097479","value":"#097479","edited":false},"page-titlebar-backgroundColor":{"value":"#097479","edited":false},"page-backgroundColor":{"value":"#111111","edited":false},"page-sidebar-backgroundColor":{"value":"#333333","edited":false},"group-textColor":{"value":"#0eb8c0","edited":false},"group-borderColor":{"value":"#555555","edited":false},"group-backgroundColor":{"value":"#333333","edited":false},"widget-textColor":{"value":"#eeeeee","edited":false},"widget-backgroundColor":{"value":"#097479","edited":false},"widget-borderColor":{"value":"#333333","edited":false},"base-font":{"value":"-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif"}},"angularTheme":{"primary":"indigo","accents":"blue","warn":"red","background":"grey"}},"site":{"name":"Node-RED Dashboard","hideToolbar":"false","allowSwipe":"false","lockMenu":"false","allowTempTheme":"true","dateFormat":"DD/MM/YYYY","sizes":{"sx":48,"sy":48,"gx":6,"gy":6,"cx":6,"cy":6,"px":0,"py":0}}},{"id":"3518a88f.b1a4a8","type":"ui_tab","name":"Cabinet","icon":"dashboard","disabled":false,"hidden":false},{"id":"2cfa49ff.a37426","type":"ui_group","name":"Tempreature Sensors","tab":"3518a88f.b1a4a8","order":2,"disp":true,"width":"5","collapse":false},{"id":"ce2f38e2.9bbb58","type":"ui_spacer","name":"spacer","group":"2cfa49ff.a37426","order":2,"width":"0","height":"0"},{"id":"11ae7819.12c8e8","type":"ui_group","name":"Fans","tab":"3518a88f.b1a4a8","order":3,"disp":true,"width":"5","collapse":false},{"id":"a02c35d9.bfe428","type":"ui_spacer","name":"spacer","group":"11ae7819.12c8e8","order":2,"width":1,"height":1},{"id":"15a23dd2.a604aa","type":"ui_group","name":"Col1","tab":"","order":1,"disp":false,"width":"6"},{"id":"10302fc.fa9f6d","type":"ui_group","name":"Col2","tab":"","order":2,"disp":false,"width":"6"},{"id":"fb86037f.14866","type":"ui_group","name":"Col3","tab":"","order":3,"disp":false,"width":"6"},{"id":"adf6585f.f213f","type":"ui_group","name":"hidden_group","tab":"","order":1,"disp":false,"width":"6","collapse":false},{"id":"6b94777b.6a4018","type":"ui_spacer","name":"spacer","group":"3a01b2a3.8c70ee","order":2,"width":1,"height":1},{"id":"6f7e14fb.5ce79c","type":"sensor-ds18b20","z":"4c449e11.76fe6","name":"Upper Cabinet","topic":"","sensorid":"28-01144fe149aa","timer":"1","repeat":true,"x":300,"y":140,"wires":[["93983778.1d0cc8","31b7bce8.ad23d4","a1f8e4de.4ed478","99570ba7.987328","20247b71.b3b304","e5f0711c.45094"]]},{"id":"ce05e76f.038f88","type":"sensor-ds18b20","z":"4c449e11.76fe6","name":"Lower Cabinet","topic":"","sensorid":"28-011450905baa","timer":"1","repeat":true,"x":280,"y":960,"wires":[["f9cf39c3.c7ed08","c54c92e6.00c65","641d3979.a97508","f10df65b.bb0d28","2aec0ca2.7239c4"]]},{"id":"93983778.1d0cc8","type":"debug","z":"4c449e11.76fe6","name":"Upper Temp","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":510,"y":140,"wires":[]},{"id":"f9cf39c3.c7ed08","type":"debug","z":"4c449e11.76fe6","name":"Lower Temp","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":490,"y":960,"wires":[]},{"id":"7474a50.6c8aa5c","type":"inject","z":"4c449e11.76fe6","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":120,"y":140,"wires":[["6f7e14fb.5ce79c"]]},{"id":"30142821.8930e8","type":"inject","z":"4c449e11.76fe6","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":100,"y":960,"wires":[["ce05e76f.038f88"]]},{"id":"31b7bce8.ad23d4","type":"ui_artlessgauge","z":"4c449e11.76fe6","group":"2cfa49ff.a37426","order":1,"width":"5","height":"5","name":"Upper Tempreature","icon":"fa-thermometer","label":"Upper Tempreature","unit":"Degrees c","layout":"radial","decimals":"1","differential":false,"minmax":true,"colorTrack":"#555555","style":"","colorFromTheme":true,"property":"payload","sectors":[{"val":0,"col":"#1eff00","t":"min","dot":0},{"val":30,"col":"#f7db26","t":"sec","dot":0},{"val":35,"col":"#f42525","t":"sec","dot":0},{"val":70,"col":"#f42525","t":"max","dot":0}],"lineWidth":"15","bgcolorFromTheme":true,"diffCenter":"","x":530,"y":80,"wires":[]},{"id":"c54c92e6.00c65","type":"ui_artlessgauge","z":"4c449e11.76fe6","group":"2cfa49ff.a37426","order":3,"width":"5","height":"5","name":"Lower Tempreature","icon":"fa-thermometer","label":"Lower Tempreature","unit":"Degrees c","layout":"radial","decimals":"1","differential":false,"minmax":true,"colorTrack":"#555555","style":"","colorFromTheme":true,"property":"payload","sectors":[{"val":0,"col":"#1eff00","t":"min","dot":0},{"val":30,"col":"#f7db26","t":"sec","dot":0},{"val":35,"col":"#f42525","t":"sec","dot":0},{"val":70,"col":"#f42525","t":"max","dot":0}],"lineWidth":"15","bgcolorFromTheme":true,"diffCenter":"","x":510,"y":900,"wires":[]},{"id":"c9713361.64899","type":"inject","z":"85317411.fccf48","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":120,"y":100,"wires":[["ad2c3c38.94ef5"]]},{"id":"fd3d5e06.e5ac9","type":"inject","z":"85317411.fccf48","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":120,"y":480,"wires":[["5969fb27.79e354"]]},{"id":"5969fb27.79e354","type":"sensor-ds18b20","z":"85317411.fccf48","name":"Lower Cabinet","topic":"","sensorid":"28-011450905baa","timer":"1","repeat":true,"x":300,"y":480,"wires":[["9cef5010.ec8bc","5bd72ec8.c5869"]]},{"id":"f761f5b1.e17998","type":"ui_artlessgauge","z":"85317411.fccf48","group":"11ae7819.12c8e8","order":1,"width":"5","height":"5","name":"Upper Fan","icon":"fa-snowflake-o","label":"Upper Fan","unit":"Percent %","layout":"radial","decimals":0,"differential":false,"minmax":true,"colorTrack":"#555555","style":"","colorFromTheme":true,"property":"payload","sectors":[{"val":0,"col":"#2bff00","t":"min","dot":0},{"val":100,"col":"#2bff00","t":"max","dot":0}],"lineWidth":"15","bgcolorFromTheme":true,"diffCenter":"","x":1070,"y":180,"wires":[]},{"id":"a1f8e4de.4ed478","type":"switch","z":"4c449e11.76fe6","name":"Temp <30","property":"payload","propertyType":"msg","rules":[{"t":"lte","v":"30","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":520,"y":200,"wires":[["b7765d2f.9e2ef","cf03c9bd.6b1208","e091cace.310328"]]},{"id":"b7765d2f.9e2ef","type":"change","z":"4c449e11.76fe6","name":"Change","rules":[{"t":"set","p":"payload","pt":"msg","to":"1","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":700,"y":200,"wires":[["9a023ea4.f9326"]]},{"id":"9a023ea4.f9326","type":"rpi-gpio out","z":"4c449e11.76fe6","name":"GREEN","pin":"35","set":"","level":"0","freq":"","out":"out","x":860,"y":200,"wires":[]},{"id":"99570ba7.987328","type":"switch","z":"4c449e11.76fe6","name":"Temp >35","property":"payload","propertyType":"msg","rules":[{"t":"gte","v":"35.1","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":520,"y":600,"wires":[["d9a05ccc.1f3c1","cff4e83.1941d18","a5496bbf.22b478"]]},{"id":"d9a05ccc.1f3c1","type":"change","z":"4c449e11.76fe6","name":"Change","rules":[{"t":"set","p":"payload","pt":"msg","to":"1","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":700,"y":660,"wires":[["a9e7e285.13eec"]]},{"id":"a9e7e285.13eec","type":"rpi-gpio out","z":"4c449e11.76fe6","name":"RED","pin":"33","set":"","level":"0","freq":"","out":"out","x":850,"y":660,"wires":[]},{"id":"cf03c9bd.6b1208","type":"change","z":"4c449e11.76fe6","name":"Change","rules":[{"t":"set","p":"payload","pt":"msg","to":"0","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":700,"y":260,"wires":[["5f2c9eb6.77e72"]]},{"id":"5f2c9eb6.77e72","type":"rpi-gpio out","z":"4c449e11.76fe6","name":"RED","pin":"33","set":"","level":"0","freq":"","out":"out","x":850,"y":260,"wires":[]},{"id":"cff4e83.1941d18","type":"change","z":"4c449e11.76fe6","name":"Change","rules":[{"t":"set","p":"payload","pt":"msg","to":"0","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":700,"y":600,"wires":[["385dccdd.578244"]]},{"id":"385dccdd.578244","type":"rpi-gpio out","z":"4c449e11.76fe6","name":"GREEN","pin":"35","set":"","level":"0","freq":"","out":"out","x":860,"y":600,"wires":[]},{"id":"6d789bb1.4f96f4","type":"rpi-gpio out","z":"4c449e11.76fe6","name":"BLUE","pin":"37","set":"","level":"0","freq":"","out":"out","x":850,"y":320,"wires":[]},{"id":"e091cace.310328","type":"change","z":"4c449e11.76fe6","name":"Change","rules":[{"t":"set","p":"payload","pt":"msg","to":"0","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":700,"y":320,"wires":[["6d789bb1.4f96f4"]]},{"id":"a5496bbf.22b478","type":"change","z":"4c449e11.76fe6","name":"Change","rules":[{"t":"set","p":"payload","pt":"msg","to":"0","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":700,"y":720,"wires":[["fbbd2087.82461"]]},{"id":"fbbd2087.82461","type":"rpi-gpio out","z":"4c449e11.76fe6","name":"BLUE","pin":"37","set":"","level":"0","freq":"","out":"out","x":850,"y":720,"wires":[]},{"id":"20247b71.b3b304","type":"switch","z":"4c449e11.76fe6","name":"Temp >30 <35","property":"payload","propertyType":"msg","rules":[{"t":"btwn","v":"30.1","vt":"num","v2":"34.9","v2t":"num"}],"checkall":"true","repair":false,"outputs":1,"x":540,"y":400,"wires":[["3e8fcf1d.d4d36","dc396899.f73bd8","1121316d.c26f7f"]]},{"id":"3e8fcf1d.d4d36","type":"change","z":"4c449e11.76fe6","name":"Change","rules":[{"t":"set","p":"payload","pt":"msg","to":"1","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":700,"y":460,"wires":[["ae5f5562.3b7d48"]]},{"id":"ae5f5562.3b7d48","type":"rpi-gpio out","z":"4c449e11.76fe6","name":"RED","pin":"33","set":"","level":"0","freq":"","out":"out","x":850,"y":460,"wires":[]},{"id":"dc396899.f73bd8","type":"change","z":"4c449e11.76fe6","name":"Change","rules":[{"t":"set","p":"payload","pt":"msg","to":"1","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":700,"y":400,"wires":[["7b71c212.b41c0c"]]},{"id":"7b71c212.b41c0c","type":"rpi-gpio out","z":"4c449e11.76fe6","name":"GREEN","pin":"35","set":"","level":"0","freq":"","out":"out","x":860,"y":400,"wires":[]},{"id":"1121316d.c26f7f","type":"change","z":"4c449e11.76fe6","name":"Change","rules":[{"t":"set","p":"payload","pt":"msg","to":"0","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":700,"y":520,"wires":[["b2b4b950.b1c4f8"]]},{"id":"b2b4b950.b1c4f8","type":"rpi-gpio out","z":"4c449e11.76fe6","name":"BLUE","pin":"37","set":"","level":"0","freq":"","out":"out","x":850,"y":520,"wires":[]},{"id":"641d3979.a97508","type":"switch","z":"4c449e11.76fe6","name":"Temp <30","property":"payload","propertyType":"msg","rules":[{"t":"lte","v":"30","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":520,"y":1020,"wires":[["52f56168.f2fb","ae16417e.1c3e4","bd896e88.1045d"]]},{"id":"52f56168.f2fb","type":"change","z":"4c449e11.76fe6","name":"Change","rules":[{"t":"set","p":"payload","pt":"msg","to":"1","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":700,"y":1020,"wires":[["28d7c23d.562ace"]]},{"id":"28d7c23d.562ace","type":"rpi-gpio out","z":"4c449e11.76fe6","name":"GREEN","pin":"11","set":"","level":"0","freq":"","out":"out","x":860,"y":1020,"wires":[]},{"id":"2aec0ca2.7239c4","type":"switch","z":"4c449e11.76fe6","name":"Temp >35","property":"payload","propertyType":"msg","rules":[{"t":"gte","v":"35.1","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":520,"y":1420,"wires":[["8b1a3f12.b8c6f","60427024.07861","c3722162.5ea96"]]},{"id":"8b1a3f12.b8c6f","type":"change","z":"4c449e11.76fe6","name":"Change","rules":[{"t":"set","p":"payload","pt":"msg","to":"1","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":700,"y":1480,"wires":[["9be95c74.a294d"]]},{"id":"9be95c74.a294d","type":"rpi-gpio out","z":"4c449e11.76fe6","name":"RED","pin":"13","set":"","level":"0","freq":"","out":"out","x":850,"y":1480,"wires":[]},{"id":"ae16417e.1c3e4","type":"change","z":"4c449e11.76fe6","name":"Change","rules":[{"t":"set","p":"payload","pt":"msg","to":"0","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":700,"y":1080,"wires":[["dfe7edd4.51ec2"]]},{"id":"dfe7edd4.51ec2","type":"rpi-gpio out","z":"4c449e11.76fe6","name":"RED","pin":"13","set":"","level":"0","freq":"","out":"out","x":850,"y":1080,"wires":[]},{"id":"60427024.07861","type":"change","z":"4c449e11.76fe6","name":"Change","rules":[{"t":"set","p":"payload","pt":"msg","to":"0","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":700,"y":1420,"wires":[["31858d1d.0f18b2"]]},{"id":"31858d1d.0f18b2","type":"rpi-gpio out","z":"4c449e11.76fe6","name":"GREEN","pin":"11","set":"","level":"0","freq":"","out":"out","x":860,"y":1420,"wires":[]},{"id":"cfea7b3c.8b7358","type":"rpi-gpio out","z":"4c449e11.76fe6","name":"BLUE","pin":"15","set":"","level":"0","freq":"","out":"out","x":850,"y":1140,"wires":[]},{"id":"bd896e88.1045d","type":"change","z":"4c449e11.76fe6","name":"Change","rules":[{"t":"set","p":"payload","pt":"msg","to":"0","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":700,"y":1140,"wires":[["cfea7b3c.8b7358"]]},{"id":"c3722162.5ea96","type":"change","z":"4c449e11.76fe6","name":"Change","rules":[{"t":"set","p":"payload","pt":"msg","to":"0","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":700,"y":1540,"wires":[["1fa9b4c3.85df1b"]]},{"id":"1fa9b4c3.85df1b","type":"rpi-gpio out","z":"4c449e11.76fe6","name":"BLUE","pin":"15","set":"","level":"0","freq":"","out":"out","x":850,"y":1540,"wires":[]},{"id":"f10df65b.bb0d28","type":"switch","z":"4c449e11.76fe6","name":"Temp >30 <35","property":"payload","propertyType":"msg","rules":[{"t":"btwn","v":"30.1","vt":"num","v2":"34.9","v2t":"num"}],"checkall":"true","repair":false,"outputs":1,"x":540,"y":1220,"wires":[["673d3f13.cad88","d893c2c9.34933","b8ada6b2.247298"]]},{"id":"673d3f13.cad88","type":"change","z":"4c449e11.76fe6","name":"Change","rules":[{"t":"set","p":"payload","pt":"msg","to":"1","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":700,"y":1280,"wires":[["db28309a.563d7"]]},{"id":"db28309a.563d7","type":"rpi-gpio out","z":"4c449e11.76fe6","name":"RED","pin":"13","set":"","level":"0","freq":"","out":"out","x":850,"y":1280,"wires":[]},{"id":"d893c2c9.34933","type":"change","z":"4c449e11.76fe6","name":"Change","rules":[{"t":"set","p":"payload","pt":"msg","to":"1","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":700,"y":1220,"wires":[["38d08477.9e1f0c"]]},{"id":"38d08477.9e1f0c","type":"rpi-gpio out","z":"4c449e11.76fe6","name":"GREEN","pin":"11","set":"","level":"0","freq":"","out":"out","x":860,"y":1220,"wires":[]},{"id":"b8ada6b2.247298","type":"change","z":"4c449e11.76fe6","name":"Change","rules":[{"t":"set","p":"payload","pt":"msg","to":"0","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":700,"y":1340,"wires":[["855ec40a.c1eee8"]]},{"id":"855ec40a.c1eee8","type":"rpi-gpio out","z":"4c449e11.76fe6","name":"BLUE","pin":"15","set":"","level":"0","freq":"","out":"out","x":850,"y":1340,"wires":[]},{"id":"e5f0711c.45094","type":"switch","z":"4c449e11.76fe6","name":"Temp >70","property":"payload","propertyType":"msg","rules":[{"t":"gte","v":"70","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":520,"y":780,"wires":[[]]},{"id":"2e689737.c19868","type":"switch","z":"85317411.fccf48","name":"Switch","property":"payload","propertyType":"msg","rules":[{"t":"lte","v":"10","vt":"num"},{"t":"btwn","v":"10.1","vt":"num","v2":"20","v2t":"num"},{"t":"btwn","v":"20.1","vt":"num","v2":"30","v2t":"num"},{"t":"btwn","v":"30.1","vt":"num","v2":"50","v2t":"num"},{"t":"btwn","v":"50.1","vt":"num","v2":"70","v2t":"num"},{"t":"gt","v":"70","vt":"str"}],"checkall":"true","repair":false,"outputs":6,"x":490,"y":260,"wires":[["35a88183.28f5ae"],["e5b8a0ac.b735b"],["a7d65533.a7f688"],["58206c96.95fb84"],["ff744b79.eb5ec8"],["2649e4f9.d685cc"]]},{"id":"35a88183.28f5ae","type":"change","z":"85317411.fccf48","name":"Fan Speed 10%","rules":[{"t":"set","p":"payload","pt":"msg","to":"10","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":780,"y":100,"wires":[["92819144.bd5d7","f761f5b1.e17998"]]},{"id":"92819144.bd5d7","type":"rpi-gpio out","z":"85317411.fccf48","name":"Upper Fan","pin":"16","set":"","level":"0","freq":"50","out":"pwm","x":1070,"y":260,"wires":[]},{"id":"e5b8a0ac.b735b","type":"change","z":"85317411.fccf48","name":"Fan Speed 20%","rules":[{"t":"set","p":"payload","pt":"msg","to":"20","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":780,"y":160,"wires":[["92819144.bd5d7","f761f5b1.e17998"]]},{"id":"ff744b79.eb5ec8","type":"change","z":"85317411.fccf48","name":"Fan Speed 75%","rules":[{"t":"set","p":"payload","pt":"msg","to":"75","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":780,"y":340,"wires":[["92819144.bd5d7","f761f5b1.e17998"]]},{"id":"a7d65533.a7f688","type":"change","z":"85317411.fccf48","name":"Fan Speed 40%","rules":[{"t":"set","p":"payload","pt":"msg","to":"40","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":780,"y":220,"wires":[["92819144.bd5d7","f761f5b1.e17998"]]},{"id":"58206c96.95fb84","type":"change","z":"85317411.fccf48","name":"Fan Speed 60%","rules":[{"t":"set","p":"payload","pt":"msg","to":"60","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":780,"y":280,"wires":[["f761f5b1.e17998","92819144.bd5d7"]]},{"id":"2649e4f9.d685cc","type":"change","z":"85317411.fccf48","name":"Fan Speed 100%","rules":[{"t":"set","p":"payload","pt":"msg","to":"100","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":790,"y":400,"wires":[["92819144.bd5d7","f761f5b1.e17998"]]},{"id":"a4cdf7e8.0583a8","type":"ui_artlessgauge","z":"85317411.fccf48","group":"11ae7819.12c8e8","order":3,"width":"5","height":"5","name":"Lower Fan","icon":"fa-snowflake-o","label":"Lower Fan","unit":"Percent %","layout":"radial","decimals":0,"differential":false,"minmax":true,"colorTrack":"#555555","style":"","colorFromTheme":true,"property":"payload","sectors":[{"val":0,"col":"#2bff00","t":"min","dot":0},{"val":100,"col":"#2bff00","t":"max","dot":0}],"lineWidth":"15","bgcolorFromTheme":true,"diffCenter":"","x":1070,"y":580,"wires":[]},{"id":"1f0b2a10.dea356","type":"change","z":"85317411.fccf48","name":"Fan Speed 10%","rules":[{"t":"set","p":"payload","pt":"msg","to":"10","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":780,"y":480,"wires":[["cab3f8d3.365778","a4cdf7e8.0583a8"]]},{"id":"cab3f8d3.365778","type":"rpi-gpio out","z":"85317411.fccf48","name":"Lower Fan","pin":"18","set":"","level":"0","freq":"50","out":"pwm","x":1070,"y":640,"wires":[]},{"id":"b5df3e02.3d2ad","type":"change","z":"85317411.fccf48","name":"Fan Speed 20%","rules":[{"t":"set","p":"payload","pt":"msg","to":"20","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":780,"y":540,"wires":[["cab3f8d3.365778","a4cdf7e8.0583a8"]]},{"id":"6c5114aa.386f6c","type":"change","z":"85317411.fccf48","name":"Fan Speed 75%","rules":[{"t":"set","p":"payload","pt":"msg","to":"75","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":780,"y":720,"wires":[["cab3f8d3.365778","a4cdf7e8.0583a8"]]},{"id":"4c96f2b.1ea960c","type":"change","z":"85317411.fccf48","name":"Fan Speed 40%","rules":[{"t":"set","p":"payload","pt":"msg","to":"40","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":780,"y":600,"wires":[["cab3f8d3.365778","a4cdf7e8.0583a8"]]},{"id":"df2cd3.157d133","type":"change","z":"85317411.fccf48","name":"Fan Speed 60%","rules":[{"t":"set","p":"payload","pt":"msg","to":"60","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":780,"y":660,"wires":[["a4cdf7e8.0583a8","cab3f8d3.365778"]]},{"id":"33f12a6a.aca6a6","type":"change","z":"85317411.fccf48","name":"Fan Speed 100%","rules":[{"t":"set","p":"payload","pt":"msg","to":"100","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":790,"y":780,"wires":[["cab3f8d3.365778","a4cdf7e8.0583a8"]]},{"id":"9cef5010.ec8bc","type":"debug","z":"85317411.fccf48","name":"Lower Fan Control","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":530,"y":480,"wires":[]},{"id":"5bd72ec8.c5869","type":"switch","z":"85317411.fccf48","name":"Switch","property":"payload","propertyType":"msg","rules":[{"t":"lte","v":"10","vt":"num"},{"t":"btwn","v":"10.1","vt":"num","v2":"20","v2t":"num"},{"t":"btwn","v":"20.1","vt":"num","v2":"30","v2t":"num"},{"t":"btwn","v":"30.1","vt":"num","v2":"50","v2t":"num"},{"t":"btwn","v":"50.1","vt":"num","v2":"70","v2t":"num"},{"t":"gt","v":"70","vt":"str"}],"checkall":"true","repair":false,"outputs":6,"x":490,"y":620,"wires":[["1f0b2a10.dea356"],["b5df3e02.3d2ad"],["4c96f2b.1ea960c"],["df2cd3.157d133"],["6c5114aa.386f6c"],["33f12a6a.aca6a6"]]},{"id":"ad2c3c38.94ef5","type":"sensor-ds18b20","z":"85317411.fccf48","name":"Upper Cabinet","topic":"","sensorid":"28-01144fe149aa","timer":"1","repeat":true,"x":300,"y":100,"wires":[["2e689737.c19868","59636413.d27b2c"]]},{"id":"59636413.d27b2c","type":"debug","z":"85317411.fccf48","name":"Upper Fan Control","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":530,"y":100,"wires":[]}]

Add debug nodes to appropriate places and work out which node(s) is not doing what you expect. That is always the first thing to do when something is going wrong. Give each of the debug nodes names so you can identify which is which in the debug.

Hi,

Just thought I'd let you know it now works on both fans independently :laughing:. Schoolboy error, I forgot to ground the fan to the raspi as well :blush:

Just got to sort a PCB out and put it all together in one package..

Thanks for your input guy's..

Side advise (if your setup is connected to internet) you can have a bit better icons for fan
https://iconify.design/icon-sets/?query=fan :wink:

Hi,

Yeah I saw those icon the other day but could not work it out how to apply one :frowning:

To get iconify icons you'll need to add the script to dashboard. Read more from here: https://github.com/node-red/node-red-dashboard#icons
Try and if no success, I will make an example .

Hi,

This is doing my nut in, tried so many iterations but can't get the icon to appear in the widget....

Would appreciate a sample.

Thanks

Check your version of artless-gauge also. It should be at least 0.2.4 (0.2.6 should be available)

[{"id":"5c744e88.155bd","type":"ui_template","z":"d7dd1239.8c663","group":"78c150e7.b098d","name":"","order":4,"width":0,"height":0,"format":"<script src=\"https://code.iconify.design/1/1.0.7/iconify.min.js\"></script>","storeOutMessages":true,"fwdInMessages":true,"resendOnRefresh":true,"templateScope":"global","x":340,"y":200,"wires":[[]]},{"id":"13bf257.2aaeedb","type":"ui_artlessgauge","z":"d7dd1239.8c663","group":"78c150e7.b098d","order":0,"width":0,"height":0,"name":"","icon":"iconify-whh:fan","label":"Gauge","unit":"","layout":"linear","decimals":0,"differential":false,"minmax":false,"colorTrack":"#555555","style":"","colorFromTheme":true,"property":"payload","sectors":[{"val":0,"col":"#ff9900","t":"min","dot":0},{"val":10,"col":"#ff9900","t":"max","dot":0}],"lineWidth":3,"bgcolorFromTheme":true,"diffCenter":"","x":360,"y":240,"wires":[]},{"id":"5ea3722e.49f8fc","type":"inject","z":"d7dd1239.8c663","name":"","topic":"","payload":"5","payloadType":"num","repeat":"","crontab":"","once":true,"onceDelay":0.1,"x":170,"y":240,"wires":[["13bf257.2aaeedb"]]},{"id":"78c150e7.b098d","type":"ui_group","z":"","name":"Default Group","tab":"65fa9b03.5ede34","order":1,"disp":true,"width":"6","collapse":false},{"id":"65fa9b03.5ede34","type":"ui_tab","z":"","name":"Home","icon":"dashboard","disabled":false,"hidden":false}]

Thanks, saw where I went wrong and appreciate the guidance. Changed the fan icon and back colour and looking good now.

2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.