---
title: "node-red-node-random • FlowFuse Integrations"
description: "FlowFuse builds your first industrial solution with your team, proves it at one plant, then helps you roll it out to every plant, faster each time."
canonical_url: "https://flowfuse.com/integrations/node-red-node-random/"
meta:
  "og:description": "FlowFuse builds your first industrial solution with your team, proves it at one plant, then helps you roll it out to every plant, faster each time."
  "og:title": "node-red-node-random • FlowFuse Integrations"
---

> Index of every page on this site: [llms.txt](https://flowfuse.com/llms.txt)

# **node-red-node-random**

A Node-RED node that when triggered generates a random number between two values.

**Version:** 0.4.1**Weekly Downloads:** 2,875**Author:**Dave Conway-Jones**Updated:** Oct 12, 2022

# node-red-node-random

A [Node-RED](http://nodered.org) node that when triggered generates a random number between two values.

## Install

Either use the Manage Palette option in the Node-RED Editor menu, or run the following command in your Node-RED user directory - typically `~/.node-red`

```
npm i node-red-node-random
```

## Usage

A simple node to generate a random number when triggered.

If set to return an integer it can include both the low and high values. `min <= n <= max` - so selecting 1 to 6 will return values 1,2,3,4,5 or 6.

If set to return a floating point value it will be from the low value, up to, but **not** including the high value. `min <= n < max` - so selecting 1 to 6 will return values 1 <= n < 6 .

You can dynamically pass in the 'From' and 'To' values to the node using msg.to and/or msg.from. **NOTE:** hard coded values in the node **always take precedence**.

**Note:** This returns numbers - objects of type **number**.

## **Installation **

Install in Node-RED via the [**palette manager**](https://flowfuse.com/docs/node-red/getting-started/library/#using-the-palette-manager).

![Node-RED Palette Manager dialog with the node selected and the Install button visible.](https://flowfuse.com/images/integrations/palette-manager-install.png)

## **Quick Stats**

Current Version**0.4.1**

Weekly Downloads**2,875**

First Published**Oct 27, 2014**

Last Updated**Oct 12, 2022**

## **GitHub Stats**

[Open Issues ![GitHub Issues](https://img.shields.io/github/issues/node-red/node-red-nodes.svg?style=flat-square)](https://github.com/node-red/node-red-nodes/issues) [ Stars ![GitHub Stars](https://img.shields.io/github/stars/node-red/node-red-nodes.svg?style=flat-square)](https://github.com/node-red/node-red-nodes/stargazers) [ Forks ![GitHub Forks](https://img.shields.io/github/forks/node-red/node-red-nodes.svg?style=flat-square)](https://github.com/node-red/node-red-nodes/network/members)

## **External Resources**

[View on NPM](https://www.npmjs.com/package/node-red-node-random) [ View Repository](https://github.com/node-red/node-red-nodes)

## **Need Help?**

Get professional support for your Node-RED projects with FlowFuse.

[**Contact Us**](https://flowfuse.com/contact-us/)

```json
{"@context":"https://schema.org","@graph":[{"@id":"https://flowfuse.com/#website","@type":"WebSite","description":"FlowFuse builds your first industrial solution with your team, proves it at one plant, then helps you roll it out to every plant, faster each time.","inLanguage":"en","name":"FlowFuse","url":"https://flowfuse.com/","alternateName":["FlowForge","Flow Fuse"],"publisher":{"@id":"https://flowfuse.com/#identity"}},{"@id":"https://flowfuse.com/integrations/node-red-node-random/#webpage","@type":"WebPage","description":"FlowFuse builds your first industrial solution with your team, proves it at one plant, then helps you roll it out to every plant, faster each time.","name":"node-red-node-random","url":"https://flowfuse.com/integrations/node-red-node-random/","isPartOf":{"@id":"https://flowfuse.com/#website"},"potentialAction":[{"@type":"ReadAction","target":["https://flowfuse.com/integrations/node-red-node-random/"]}],"primaryImageOfPage":{"@id":"https://flowfuse.com/#logo"}},{"@id":"https://flowfuse.com/#identity","@type":"Organization","legalName":"FlowFuse Inc.","name":"FlowFuse","url":"https://flowfuse.com","alternateName":["FlowForge","Flow Fuse"],"logo":{"@id":"https://flowfuse.com/#logo"},"sameAs":["https://twitter.com/FlowFuseinc","https://github.com/FlowFuse","https://www.linkedin.com/company/flowfuse/","https://www.facebook.com/FlowFuse/","https://www.youtube.com/channel/UCbBzP8NZbv3WDtlt4UouA-g"]},{"@id":"https://flowfuse.com/#logo","@type":"ImageObject","caption":"FlowFuse","contentUrl":"https://flowfuse.com/handbook/images/logos/ff-logo--square--dark.png","inLanguage":"en","url":"https://flowfuse.com/handbook/images/logos/ff-logo--square--dark.png"}]}
```

## Sitemap

See the full [sitemap](https://flowfuse.com/sitemap.md) for all pages.
