---
title: "node-red-contrib-device-stats • 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-contrib-device-stats/"
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-contrib-device-stats • FlowFuse Integrations"
---

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

# **node-red-contrib-device-stats**

Node-RED nodes for Device Statistics

**Version:** 1.1.2**Weekly Downloads:** 4,054**Author:**Daisuke Baba**Updated:** Jun 21, 2022

# Device Statistics Node-RED node

[![GitHub release](https://img.shields.io/github/release/dbaba/node-red-contrib-device-stats.svg)](https://github.com/dbaba/node-red-contrib-device-stats/releases/latest) [![master Build Status](https://travis-ci.org/dbaba/node-red-contrib-device-stats.svg?branch=master)](https://travis-ci.org/dbaba/node-red-contrib-device-stats/) [![License MIT](https://img.shields.io/github/license/dbaba/node-red-contrib-device-stats.svg)](http://opensource.org/licenses/MIT)

**Linux and MacOS only**

This node creates statistics information according to the node settings on the editor. The statistics will be embedded into msg.payload and emitted to the output port.

This node emits the statistics information when a msg payload arrives via its input port. Otherwise, the node doesn't do anything.

Here is a typical example using this node. This flow will emit the statistics information every 3 seconds.

![Flow Example](https://raw.githubusercontent.com/dbaba/node-red-contrib-device-stats/master/images/screenshot-flow-example.png "Flow Example")

The left Inject node generates a message payload every 3 seconds. Its settings are as follows.

![Inject Node](https://raw.githubusercontent.com/dbaba/node-red-contrib-device-stats/master/images/screenshot-inject-node.png "Inject Node")

This Device Statistics node doesn't care of the incoming message payload content but just use it as a trigger to emit the statistics information.

You can configure the content of the statistics information in the following dialog.

![Device Statistics Node](https://raw.githubusercontent.com/dbaba/node-red-contrib-device-stats/master/images/screenshot-device-stats-node.png "Device Statistics Node")

When this Device Statistics node emit the stats info, you can see the following status indicator with `dup` status text.

![Status Indicator](https://raw.githubusercontent.com/dbaba/node-red-contrib-device-stats/master/images/screenshot-heartbeat.png "Status Indicator")

### Installation

```
cd ~/.node-red
npm install node-red-contrib-device-stats
```

# Prior to building

```
$ npm install
```

# Build

```
$ npm run build
```

will generate ES5 js files.

# Test

```
$ npm run test
```

# Shrinkwrap

```
$ rm -fr node_modules; \
  rm -f npm-shrinkwrap.json; \
  nodenv local 8.11.1; \
  npm install;npm run freeze
```

# Revision History

- 1.1.2
  - Fix an issue where shrinkwrap file contains devDependencies
- 1.1.1
  - Fix dependencies
- 1.1.0
  - Merge [#13](https://github.com/dbaba/node-red-contrib-device-stats/pull/13) to fix "device stats not working with HTTP" issue
  - Replace Grunt with gulp
  - Upgrade dependencies
- 1.0.3
  - Remove redundant dependency
- 1.0.2
  - Fix an issue where message resources aren't shown properly
- 1.0.1
  - Fix deployment error
- 1.0.0
  - Initial public release

# Copyright and License

The project is released under MIT License. See LICENSE for detail.

## **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**1.1.2**

Weekly Downloads**4,054**

First Published**Apr 24, 2016**

Last Updated**Jun 21, 2022**

## **GitHub Stats**

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

## **External Resources**

[View on NPM](https://www.npmjs.com/package/node-red-contrib-device-stats) [ View Repository](https://github.com/dbaba/node-red-contrib-device-stats)

## **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-contrib-device-stats/#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-contrib-device-stats","url":"https://flowfuse.com/integrations/node-red-contrib-device-stats/","isPartOf":{"@id":"https://flowfuse.com/#website"},"potentialAction":[{"@type":"ReadAction","target":["https://flowfuse.com/integrations/node-red-contrib-device-stats/"]}],"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.
