[{"data":1,"prerenderedAt":264},["ShallowReactive",2],{"node-red-\u002Fnode-red\u002Fcore-nodes\u002Frange":3},{"id":4,"title":5,"body":6,"description":246,"extension":257,"meta":258,"navigation":259,"path":260,"seo":261,"stem":262,"__hash__":263},"nodeRed\u002Fnode-red\u002Fcore-nodes\u002Frange.md","Node-RED - Range Node",{"type":7,"value":8,"toc":245},"minimark",[9,14,19,23,26,33,39,45,51,55,58,65,70,74],[10,11,13],"h1",{"id":12},"range","Range",[15,16,18],"h2",{"id":17},"whats-the-range-node-in-node-red-used-for","What's the Range node in Node-RED used for?",[20,21,22],"p",{},"The \"Range\" node in Node-RED allows you to map a numeric value from one range to another. For example, if you wanted to map miles to kilometers, you can specific the input range at 1 to 100 and the target range as 1 to 160.",[20,24,25],{},"Besides unit conversion, the range node can be used for:",[20,27,28,32],{},[29,30,31],"strong",{},"Data Scaling",": Use the \"Range\" node to scale or normalize data. For example, if you have sensor readings that range from 0 to 1023 but you want to convert them to a 0-100 percentage scale, you can use the \"Range\" node for this transformation.",[20,34,35,38],{},[29,36,37],{},"Data Compression",": Reduce the range of data values while preserving the relationships between values. This can be useful for displaying data on a smaller scale without losing important variations.",[20,40,41,44],{},[29,42,43],{},"Analog-to-Digital Conversion",": When interfacing with analog sensors, you can map the analog voltage range to a digital value range for processing.",[20,46,47,50],{},[29,48,49],{},"Data Smoothing",": Smooth out data fluctuations by mapping values within a range to a single value.",[15,52,54],{"id":53},"examples-for-the-range-node","Examples for the Range node",[20,56,57],{},"An example of a change node that converts from miles to kilometers.",[20,59,60],{},[61,62],"img",{"alt":63,"src":64},"Range properties","\u002Fnode-red\u002Fcore-nodes\u002Fimages\u002Frange-node2.png",[66,67],"render-flow",{":height":68,"flow":69},"200","W3siaWQiOiIxODM3MzlhZWNkYTdkYzQzIiwidHlwZSI6InJhbmdlIiwieiI6ImU5MmZiNmMzYjMwNGZkN2MiLCJtaW5pbiI6IjEiLCJtYXhpbiI6IjEwMCIsIm1pbm91dCI6IjAiLCJtYXhvdXQiOiIxNjAiLCJhY3Rpb24iOiJzY2FsZSIsInJvdW5kIjp0cnVlLCJwcm9wZXJ0eSI6InBheWxvYWQiLCJuYW1lIjoiTWlsZXMgPkttIiwieCI6MzkwLCJ5IjoyMjAsIndpcmVzIjpbWyI5YzRlZGY3MjUwYzM0Y2RiIl1dfV0=",[15,71,73],{"id":72},"node-documentation","Node Documentation",[75,76,79,82,83,82,88,82,112,82,116,82,127,82,131,82,134,82,140,82,146,82,152,82,155],"div",{"className":77},[78],"core-node-doc",[20,80,81],{},"Maps a numeric value to a different range."," ",[84,85,87],"h3",{"id":86},"inputs","Inputs",[89,90,93,103],"dl",{"className":91},[92],"message-properties",[94,95,96,97],"dt",{},"payload ",[98,99,102],"span",{"className":100},[101],"property-type","number",[104,105,106,107,111],"dd",{},"The payload ",[108,109,110],"i",{},"must"," be a number. Anything else will try to be\nparsed into a number and rejected if that fails.",[84,113,115],{"id":114},"outputs","Outputs",[89,117,119,124],{"className":118},[92],[94,120,96,121],{},[98,122,102],{"className":123},[101],[104,125,126],{},"The value mapped to the new range.",[84,128,130],{"id":129},"details","Details",[20,132,133],{},"This node will linearly scale the received value. By default, the result\nis not constrained to the range defined in the node.",[20,135,136,139],{},[108,137,138],{},"Scale and limit to target range"," means that the result will never be outside\nthe range specified within the target range.",[20,141,142,145],{},[108,143,144],{},"Scale and wrap within the target range"," means that the result will\nbe wrapped within the target range.",[20,147,148,151],{},[108,149,150],{},"Scale, but drop if outside input range"," means that the result will\nbe scaled, but any inputs outside of the inout range will be dropped.",[20,153,154],{},"For example an input 0 - 10 mapped to 0 - 100.",[156,157,159],"table",{"style":158},"outline-width:#888 solid thin",[160,161,162,176,195,211,227],"tbody",{},[163,164,165,170,173],"tr",{},[166,167,169],"th",{"width":168},"80px","mode",[166,171,172],{"width":168},"input",[166,174,175],{"width":168},"output",[163,177,178,185,190],{},[179,180,181],"td",{},[182,183,184],"center",{},"scale",[179,186,187],{},[182,188,189],{},"12",[179,191,192],{},[182,193,194],{},"120",[163,196,197,202,206],{},[179,198,199],{},[182,200,201],{},"limit",[179,203,204],{},[182,205,189],{},[179,207,208],{},[182,209,210],{},"100",[163,212,213,218,222],{},[179,214,215],{},[182,216,217],{},"wrap",[179,219,220],{},[182,221,189],{},[179,223,224],{},[182,225,226],{},"20",[163,228,229,234,238],{},[179,230,231],{},[182,232,233],{},"drop",[179,235,236],{},[182,237,189],{},[179,239,240],{},[182,241,242],{},[108,243,244],{},"(no output)",{"title":246,"searchDepth":247,"depth":247,"links":248},"",2,[249,250,251],{"id":17,"depth":247,"text":18},{"id":53,"depth":247,"text":54},{"id":72,"depth":247,"text":73,"children":252},[253,255,256],{"id":86,"depth":254,"text":87},3,{"id":114,"depth":254,"text":115},{"id":129,"depth":254,"text":130},"md",{},true,"\u002Fnode-red\u002Fcore-nodes\u002Frange",{"title":5,"description":246},"node-red\u002Fcore-nodes\u002Frange","e8zBStOjg0oLGVNNO8bSnAXwdMSYDTxH_6fL9PX4PMY",1780070556134]