# Smooth module not a number: nan

**URL:** <https://discourse.nodered.org/t/smooth-module-not-a-number-nan/27756>\
**Category:** General\
**Created:** [4 June 2020 09:01 UTC](https://discourse.nodered.org/t/smooth-module-not-a-number-nan/27756 "2020-06-04T09:01:46Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![hathemi](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/hathemi/32/3792_2.png) [@hathemi](https://discourse.nodered.org/u/hathemi)\
**Post date:** [4 June 2020 09:01 UTC](https://discourse.nodered.org/t/smooth-module-not-a-number-nan/27756/1 "2020-06-04T09:01:46Z")

</div>

i'am using smooth module connected to mqtt node. when i run the flow this error appears on terminal, but nothing showing in node-red. it causes too much troubles. my dashboard starts running too slowely.  
any help!

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [4 June 2020 09:07 UTC](https://discourse.nodered.org/t/smooth-module-not-a-number-nan/27756/2 "2020-06-04T09:07:47Z")

</div>

what smooth node?  
is it connected to a mqtt-out or mqtt-in node?  
what is being feed into the smooth node? (add a debug node to the output of the node feeding the smooth node.

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [4 June 2020 09:11 UTC](https://discourse.nodered.org/t/smooth-module-not-a-number-nan/27756/3 "2020-06-04T09:11:13Z")

</div>

MQTT nodes by default return strings or buffers - not numbers, and the smooth node operates on numbers. You can set it to return JSON if the payload really is JSON - and then that may have properties that are numbers... so how have you got your mqtt node configured and what is it actually outputting.

---

<div class="post-metadata">

**Author:** ![hathemi](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/hathemi/32/3792_2.png) [@hathemi](https://discourse.nodered.org/u/hathemi)\
**Post date:** [4 June 2020 09:16 UTC](https://discourse.nodered.org/t/smooth-module-not-a-number-nan/27756/4 "2020-06-04T09:16:11Z")

</div>

i mean this node

> **[node-red-node-smooth](https://flows.nodered.org/node/node-red-node-smooth)**
>
> A Node-RED node that provides several simple smoothing algorithms for incoming data values.

  
it is connected to mqtt-in  
i'am running a max6675.py on the same flow and publish the value on mqtt server. so, smooth node will receive max6675 values.

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [4 June 2020 10:52 UTC](https://discourse.nodered.org/t/smooth-module-not-a-number-nan/27756/5 "2020-06-04T10:52:19Z")

</div>

As Dave said, the smooth node needs a number and mqtt returns strings. What does the debug node show (you know the one I asked you to attach)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [3 August 2020 10:52 UTC](https://discourse.nodered.org/t/smooth-module-not-a-number-nan/27756/6 "2020-08-03T10:52:19Z")

</div>

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