# SNMP msg.payload changed between versions

**URL:** <https://discourse.nodered.org/t/snmp-msg-payload-changed-between-versions/84434>\
**Category:** General\
**Created:** [9 January 2024 20:27 UTC](https://discourse.nodered.org/t/snmp-msg-payload-changed-between-versions/84434 "2024-01-09T20:27:32Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![element22](https://avatars.discourse-cdn.com/v4/letter/e/b4bc9f/32.png) [@element22](https://discourse.nodered.org/u/element22)\
**Post date:** [9 January 2024 20:27 UTC](https://discourse.nodered.org/t/snmp-msg-payload-changed-between-versions/84434/1 "2024-01-09T20:27:32Z")

</div>

I've recently upgraded from Node-RED v3.0.2 with the node-red-node-snmp node v0.0.25, to Node-RED v3.1.3 with node-red-node-snmp node v2.0.0.

I'm noticing a difference in how the output from the SNMP node is displayed in the never version combination, which is breaking some further processing.

Historically, I used to be able to get the value "on" from payload[0].value in:

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/a/a/aa2cb98e3114d4a73a879e1d1a875656ace2f614.png)

However in the latest version, I'm getting the hexadecimal. I can click on 'raw' which changes it to string and shows correctly, but unlike the previous versions, that isn't actually what's being passed on in payload[0].value.

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/b/d/bd52a67ae932e0f06d61ad997fc36d4d7f4a1b11.png)

Is there any way to either specify that I want the text or convert the payload?

Once I've tidied it up, I'd like to see:

`{"device":"UPS Eco Mode","reading":"on"}`

but instead I'm seeing:

`{"device":"UPS Eco Mode","reading":[111,110]}`

Many thanks!!!

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [9 January 2024 20:41 UTC](https://discourse.nodered.org/t/snmp-msg-payload-changed-between-versions/84434/2 "2024-01-09T20:41:06Z")

</div>

> [@Snmp data visualization](https://discourse.nodered.org/t/snmp-data-visualization/83147/34):
>
> snmp data type 4 is an OctetString (also shown as the tstr property). so just bytes as a string. So in theory it's safe to turn into a string... BUT when I did that it caused other (real power) snmp users to have problems and so I "fixed" it to send what they expect and let them handle it.

Use `.toString()` on the `value`

---

<div class="post-metadata">

**Author:** ![element22](https://avatars.discourse-cdn.com/v4/letter/e/b4bc9f/32.png) [@element22](https://discourse.nodered.org/u/element22)\
**Post date:** [10 January 2024 09:59 UTC](https://discourse.nodered.org/t/snmp-msg-payload-changed-between-versions/84434/3 "2024-01-10T09:59:33Z")

</div>

Thank you @Steve-Mcl - I didn't see the other post 🙂

---

<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:** [24 January 2024 09:59 UTC](https://discourse.nodered.org/t/snmp-msg-payload-changed-between-versions/84434/4 "2024-01-24T09:59:57Z")

</div>

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