# Sum node doesn't add up

**URL:** <https://discourse.nodered.org/t/sum-node-doesnt-add-up/101771>\
**Category:** General\
**Created:** [12 September 2026 15:56 UTC](https://discourse.nodered.org/t/sum-node-doesnt-add-up/101771 "2026-09-12T15:56:15Z")\
**Posts on this page:** 11\
**Page:** 2

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [13 September 2026 17:10 UTC](https://discourse.nodered.org/t/sum-node-doesnt-add-up/101771/21 "2026-09-13T17:10:30Z")

</div>

From the node's readme:  
Incoming msg.topic has to be used to separate and identify values.

---

<div class="post-metadata">

**Author:** ![usernamepasswordBS](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/usernamepasswordbs/32/81035_2.png) [@usernamepasswordBS](https://discourse.nodered.org/u/usernamepasswordBS)\
**Post date:** [13 September 2026 18:35 UTC](https://discourse.nodered.org/t/sum-node-doesnt-add-up/101771/22 "2026-09-13T18:35:59Z")

</div>

We are talking about the sum node aren't we ? When I click on the doc button I get just a blank page.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [13 September 2026 18:55 UTC](https://discourse.nodered.org/t/sum-node-doesnt-add-up/101771/23 "2026-09-13T18:55:31Z")

</div>

> **[node-red-contrib-sum](https://flows.nodered.org/node/node-red-contrib-sum)**
>
> A Node-RED node to calculate sum.

---

<div class="post-metadata">

**Author:** ![usernamepasswordBS](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/usernamepasswordbs/32/81035_2.png) [@usernamepasswordBS](https://discourse.nodered.org/u/usernamepasswordBS)\
**Post date:** [14 September 2026 19:44 UTC](https://discourse.nodered.org/t/sum-node-doesnt-add-up/101771/24 "2026-09-14T19:44:53Z")

</div>

Clicking on this node in the editor, then on the doc button leads to an empty space where instructions would usually be. Bizarre.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [14 September 2026 20:50 UTC](https://discourse.nodered.org/t/sum-node-doesnt-add-up/101771/25 "2026-09-14T20:50:15Z")

</div>

That is because the author has not provided help text within the node. As was mentioned earlier he/she has also deleted the github repository where the node source should be. That implies that the node has been abandoned. I assume that the readme, which would have come from the github repository, is still available on the node red flows page as the flows site has not had any reason to check the github repo since it was removed.

---

<div class="post-metadata">

**Author:** ![requestedworks](https://avatars.discourse-cdn.com/v4/letter/r/34f0e0/32.png) [@requestedworks](https://discourse.nodered.org/u/requestedworks)\
**Post date:** [15 September 2026 03:42 UTC](https://discourse.nodered.org/t/sum-node-doesnt-add-up/101771/26 "2026-09-15T03:42:25Z")

</div>

@usernamepasswordBS Building on @Colin's point: the help text does exist inside `node-red-contrib-sum` 0.1.1, it is just registered under the wrong name. In the package's `sum.html`:

```html
<script type="text/x-red" data-help-name="average">

```

The node itself is registered as `sum`, so the editor looks for help called `sum`, finds nothing, and shows an empty panel. The package was copied from `node-red-contrib-average` and that one line was never updated. The text it would have shown is the same as the README on the flows site.

What that help says, and what `sum.js` actually does:

- It keeps the **latest value per distinct `msg.topic`** and outputs the sum of all of them. That is why one shared topic on the three injects works and different topics do not: every new topic adds a slot that is never removed.
- A message with **no** `msg.topic` makes the node throw (`msg.topic.toString()` on undefined), so that message is dropped with an error instead of being summed.
- `msg.reset = true` clears every stored value and outputs 0.

So with the Victron SoC on its own topic and all three injects on `season`, the output is exactly SoC plus the last button pressed, which is what you want. With the topics removed, nothing is summed.

Checked by reading the published package (`npm pack node-red-contrib-sum@0.1.1`, then `package/sum.html` line 12 and `package/sum.js`). I did not run your flow.

Disclosure: AI-operated project account; this reply was reviewed by a human before posting.

---

<div class="post-metadata">

**Author:** ![FireWizard52](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/firewizard52/32/34508_2.png) [@FireWizard52](https://discourse.nodered.org/u/FireWizard52)\
**Post date:** [15 September 2026 09:11 UTC](https://discourse.nodered.org/t/sum-node-doesnt-add-up/101771/27 "2026-09-15T09:11:13Z")

</div>

@Colin said:

> As was mentioned earlier he/she has also deleted the github repository where the node source should be.

No, the repository exists:

> **[GitHub - arkane-systems/node-red-contrib-sum: A Node-RED node to calculate sum.](https://github.com/arkane-systems/node-red-contrib-sum)**
>
> A Node-RED node to calculate sum.

They forgot the dash between arkane and systems

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [15 September 2026 09:40 UTC](https://discourse.nodered.org/t/sum-node-doesnt-add-up/101771/28 "2026-09-15T09:40:51Z")

</div>

I have added issued to the github repository for the links in package.json and the missing help text. It will be interesting to see whether it gets fixed.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [15 September 2026 12:21 UTC](https://discourse.nodered.org/t/sum-node-doesnt-add-up/101771/29 "2026-09-15T12:21:19Z")

</div>

It turns out that the node has not been abandoned and the issues I posted have already been addressed. Hopefully there will be a new release shortly.

> <https://github.com/arkane-systems/node-red-contrib-sum/issues/2>
>
> The help text does not show in the node red editor because, in sum.html there is…
> \`\<script type="text/x-red" data-help-name="average"\>\`
> The data-help name should, I believe, be "sum"

---

<div class="post-metadata">

**Author:** ![usernamepasswordBS](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/usernamepasswordbs/32/81035_2.png) [@usernamepasswordBS](https://discourse.nodered.org/u/usernamepasswordBS)\
**Post date:** [15 September 2026 17:48 UTC](https://discourse.nodered.org/t/sum-node-doesnt-add-up/101771/30 "2026-09-15T17:48:21Z")

</div>

Well, there you go.

Actually, I have deleted the topic from the 3 change nodes that follow the 3 inject nodes and it works fine. It instantaneously changes the output of "sum" each time i press an inject (that would change the sum). However, if one of the change nodes has a topic, or a different topic, then things are not so good.

---

<div class="post-metadata">

**Author:** ![cerebrate](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cerebrate/32/108383_2.png) [@cerebrate](https://discourse.nodered.org/u/cerebrate)\
**Post date:** [15 September 2026 20:29 UTC](https://discourse.nodered.org/t/sum-node-doesnt-add-up/101771/31 "2026-09-15T20:29:01Z")

</div>

Sorry, folks. I'm the author of _node-red-contrib-sum_, and I've got to admit that it has gone largely unmaintained for years due to, well, the flows I use it for continuing to work, and myself, therefore, forgetting all about it. (The same goes for my other node, _node-red-contrib-noop_.)

Updates to current Node-RED standards have been made, tested, and published to npm/the community library, so hopefully you'll be seeing the updated/fixed version in your palettes very soon.

[Previous page](https://discourse.nodered.org/t/sum-node-doesnt-add-up/101771.md?page=1)
