# Help with function node and multiple inputs

**URL:** <https://discourse.nodered.org/t/help-with-function-node-and-multiple-inputs/63411>\
**Category:** General\
**Tags:** node-red-dashboard, function-node\
**Created:** [3 June 2022 08:15 UTC](https://discourse.nodered.org/t/help-with-function-node-and-multiple-inputs/63411 "2022-06-03T08:15:02Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![TheOzarkWizard](https://avatars.discourse-cdn.com/v4/letter/t/4da419/32.png) [@TheOzarkWizard](https://discourse.nodered.org/u/TheOzarkWizard)\
**Post date:** [3 June 2022 08:15 UTC](https://discourse.nodered.org/t/help-with-function-node-and-multiple-inputs/63411/1 "2022-06-03T08:15:02Z")

</div>

Hey all, Im terrible with programing, I have made it this far by reading and combining multiple tutorials, however im not sure what I am missing and I feel like I am bashing my head against the wall trying to figure this out..

I have a raspberry pi zero w, i have a BME680, and I am using the BME680 with the Pimoroni library, which does not have altitude.

I am trying to use the input of a dashboard text node for the standard pressure input, and the sensor data via msg.payload.Pressure\_HPA in a function node to calculate altitude with the formula:

pressure altitude = ((standard pressure – current pressure) \* 1000 ) + field elevation

![Capture](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/8/1/810d20e6775bced91eb6ce3300f3f461fe9263aa.png)

The prepare pressure function contains:  
 ![prepresss](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/b/d/bdf2542301cac55adbcd970112d4b4bf0c80a381.png)  
And will return  
 ![preppres](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/5/9/59eff3f8b6eec9d4240ef09e34d617a1798f4a12.png)

Is the function node the correct way to go about calculating altitude? Am I doing this all wrong? Could someone please at least point me in the right direction?

---

<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:** [3 June 2022 08:18 UTC](https://discourse.nodered.org/t/help-with-function-node-and-multiple-inputs/63411/2 "2022-06-03T08:18:46Z")

</div>

See [this article in the cookbook](https://cookbook.nodered.org/basic/join-streams) for an example of how to join messages into one object.

---

<div class="post-metadata">

**Author:** ![mickym2](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/mickym2/32/36128_2.png) [@mickym2](https://discourse.nodered.org/u/mickym2)\
**Post date:** [3 June 2022 08:52 UTC](https://discourse.nodered.org/t/help-with-function-node-and-multiple-inputs/63411/3 "2022-06-03T08:52:59Z")

</div>

If you do not like programming, I cannot understand why you are using function nodes for this.

If you need to specify altitude as input use a change node to store the value into a flow variable and use the content in another change node to modify the value output of your sensor with your formula.

---

<div class="post-metadata">

**Author:** ![TheOzarkWizard](https://avatars.discourse-cdn.com/v4/letter/t/4da419/32.png) [@TheOzarkWizard](https://discourse.nodered.org/u/TheOzarkWizard)\
**Post date:** [3 June 2022 18:00 UTC](https://discourse.nodered.org/t/help-with-function-node-and-multiple-inputs/63411/4 "2022-06-03T18:00:45Z")

</div>

I was very tired and should have thought about it over sleep, but i thought id ask anyways. I am using flow variables elsewhere in my flow, but i didnt make the connection. Thanks for the help 🙂

---

<div class="post-metadata">

**Author:** ![TheOzarkWizard](https://avatars.discourse-cdn.com/v4/letter/t/4da419/32.png) [@TheOzarkWizard](https://discourse.nodered.org/u/TheOzarkWizard)\
**Post date:** [6 June 2022 03:29 UTC](https://discourse.nodered.org/t/help-with-function-node-and-multiple-inputs/63411/5 "2022-06-06T03:29:22Z")

</div>

Here is my current setup, i know this is wrong, but im not sure what I am doing wrong. I have spent all day looking through tutorials but no matter what I do the output is always "The input value (undefined) is not a number". you can see in this picture, that message comes from a different node, but this time it is because there is something wrong with how the function is currently written.

sorry for being such a noob, im trying to learn

![flow](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/9/8/9876be58640eb9e8d7d907e00f302d67b935e421.png)

 ![notrihgt](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/6/c/6cea1d1af004c4b4927245f37e4de75c4cc555bc.png)

Heres the altimeter setting, I forgot to include this screenshot.  
 ![alti](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/3/f/3fc07a7c74ae27774348412f8719b1c01bcf2eea.png)

---

<div class="post-metadata">

**Author:** ![ScheepersJohan](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/scheepersjohan/32/39556_2.png) [@ScheepersJohan](https://discourse.nodered.org/u/ScheepersJohan)\
**Post date:** [6 June 2022 04:13 UTC](https://discourse.nodered.org/t/help-with-function-node-and-multiple-inputs/63411/6 "2022-06-06T04:13:05Z")

</div>

Place a debug node to catch the incoming msg. to the function node, set the debug node to complete msg. object.

What do you see?

---

<div class="post-metadata">

**Author:** ![TheOzarkWizard](https://avatars.discourse-cdn.com/v4/letter/t/4da419/32.png) [@TheOzarkWizard](https://discourse.nodered.org/u/TheOzarkWizard)\
**Post date:** [6 June 2022 06:01 UTC](https://discourse.nodered.org/t/help-with-function-node-and-multiple-inputs/63411/7 "2022-06-06T06:01:24Z")

</div>

![object](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/0/7/079469f331ead3a0f388eb01880bea65a509f43e.png)

---

<div class="post-metadata">

**Author:** ![ScheepersJohan](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/scheepersjohan/32/39556_2.png) [@ScheepersJohan](https://discourse.nodered.org/u/ScheepersJohan)\
**Post date:** [6 June 2022 06:28 UTC](https://discourse.nodered.org/t/help-with-function-node-and-multiple-inputs/63411/8 "2022-06-06T06:28:55Z")

</div>

For mat your post please correctly, you need to Copy the value of the debug and post it in between ```

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

---

<div class="post-metadata">

**Author:** ![ScheepersJohan](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/scheepersjohan/32/39556_2.png) [@ScheepersJohan](https://discourse.nodered.org/u/ScheepersJohan)\
**Post date:** [6 June 2022 06:37 UTC](https://discourse.nodered.org/t/help-with-function-node-and-multiple-inputs/63411/9 "2022-06-06T06:37:55Z")

</div>

And also post you flow, it is easier to see what is going on.

---

<div class="post-metadata">

**Author:** ![Buckskin](https://avatars.discourse-cdn.com/v4/letter/b/b9e5f3/32.png) [@Buckskin](https://discourse.nodered.org/u/Buckskin)\
**Post date:** [6 June 2022 20:30 UTC](https://discourse.nodered.org/t/help-with-function-node-and-multiple-inputs/63411/10 "2022-06-06T20:30:50Z")

</div>

Change the function to

```auto

   let result = (altimeter - pressure) * 1000
   .... whatever is under the error message

   return result

```

You cannot have a calculation as an argument in a function definition so if there is further calculations under the error message you would need

```auto
function altitude(altimeter, pressure) {
  result = (altimeter - pressure) * 10000
  rest of calculation

   return result
}

msg.payload = altitude(altimeter, pressure)

return msg

```

---

<div class="post-metadata">

**Author:** ![TheOzarkWizard](https://avatars.discourse-cdn.com/v4/letter/t/4da419/32.png) [@TheOzarkWizard](https://discourse.nodered.org/u/TheOzarkWizard)\
**Post date:** [10 June 2022 17:17 UTC](https://discourse.nodered.org/t/help-with-function-node-and-multiple-inputs/63411/11 "2022-06-10T17:17:47Z")

</div>

```auto
[{"id":"f8535fdf67d273c2","type":"tab","label":"Flow 1","disabled":true,"info":"","env":[]},{"id":"6557bcc7108c8f9c","type":"function","z":"f8535fdf67d273c2","name":"Prep Pres","func":"var newMsg={};\nnewMsg.topic = 'Pressure_HPA';\nnewMsg.payload = msg.payload.Pressure_HPA\nreturn newMsg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":960,"y":160,"wires":[["44bba037c3a47aa4"]]},{"id":"66221b9114fd8b9c","type":"function","z":"f8535fdf67d273c2","name":"Prepare data","func":"var newMsg={temp:{},pressure:{},humidity:{},voc:{}};\nvar temp_min=flow.get('temp_min') || 100;\nvar temp_max=flow.get('temp_max') || -100;\nvar pressure_min=flow.get('pressure_min') || 5000;\nvar pressure_max=flow.get('pressure_max') || -5000;\nvar humidity_min=flow.get('humidity_min') || 100;\nvar humidity_max=flow.get('humidity_max') || -100;\nvar voc_min=flow.get('voc_min') || 500000;\nvar voc_max=flow.get('voc_max') || -500000;\n//\nnewMsg.payload = msg.payload;\n\n//\n\nif (msg.payload.Temperature_oC < temp_min) {\n newMsg.temp.min = msg.payload.Temperature_oC;\n flow.set('temp_min', msg.payload.Temperature_oC);\n} else {\n newMsg.temp.min = temp_min;\n}\nif (msg.payload.Temperature_oC > temp_max) {\n newMsg.temp.max = msg.payload.Temperature_oC;\n flow.set('temp_max', msg.payload.Temperature_oC);\n} else {\n newMsg.temp.max = temp_max;\n}\n\n//\n\nif (msg.payload.Pressure_HPA < pressure_min) {\n newMsg.pressure.min = msg.payload.Pressure_HPA;\n flow.set('pressure_min', msg.payload.Pressure_HPA);\n} else {\n newMsg.pressure.min = pressure_min;\n}\nif (msg.payload.Pressure_HPA > pressure_max) {\n newMsg.pressure.max = msg.payload.Pressure_HPA;\n flow.set('pressure_max', msg.payload.Pressure_HPA);\n} else {\n newMsg.pressure.max = pressure_max;\n}\n\n//\n\nif (msg.payload.RelativeHumidity_percent < humidity_min) {\n newMsg.humidity.min = msg.payload.RelativeHumidity_percent;\n flow.set('humidity_min', msg.payload.RelativeHumidity_percent);\n} else {\n newMsg.humidity.min = humidity_min;\n}\nif (msg.payload.RelativeHumidity_percent > humidity_max) {\n newMsg.humidity.max = msg.payload.RelativeHumidity_percent;\n flow.set('humidity_max', msg.payload.RelativeHumidity_percent);\n} else {\n newMsg.humidity.max = humidity_max;\n}\n\n//\n\nif (msg.payload.Resistance_Ohms < voc_min) {\n newMsg.voc.min = msg.payload.Resistance_Ohms;\n flow.set('voc_min', msg.payload.Resistance_Ohms);\n} else {\n newMsg.voc.min = voc_min;\n}\nif (msg.payload.Resistance_Ohms > voc_max) {\n newMsg.voc.max = msg.payload.Resistance_Ohms;\n flow.set('voc_max', msg.payload.Resistance_Ohms);\n} else {\n newMsg.voc.max = voc_max;\n}\n\nreturn newMsg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":550,"y":180,"wires":[["6557bcc7108c8f9c","4f839fabe80355bc","e769d7796ca92538"]]},{"id":"e40f4f216d871f04","type":"join","z":"f8535fdf67d273c2","name":"","mode":"custom","build":"merged","property":"payload","propertyType":"msg","key":"topic","joiner":"","joinerType":"str","accumulate":false,"timeout":"","count":"","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"","reduceFixup":"","x":350,"y":160,"wires":[["66221b9114fd8b9c","708e096eb9ae2133"]]},{"id":"52f9724683855c3f","type":"function","z":"f8535fdf67d273c2","name":"Reset","func":"flow.set('temp_min', 100);\nflow.set('temp_max', -100);\nflow.set('pressure_min', 5000);\nflow.set('pressure_max', -5000);\nflow.set('humidity_min', 100);\nflow.set('humidity_max', -100);\nflow.set('voc_min', 5000000);\nflow.set('voc_max', -5000000);\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":350,"y":240,"wires":[["66221b9114fd8b9c"]]},{"id":"1212f1a329356472","type":"split","z":"f8535fdf67d273c2","name":"","splt":",","spltType":"str","arraySplt":1,"arraySpltType":"len","stream":false,"addname":"","x":150,"y":160,"wires":[["cc645c236b588053"]]},{"id":"cc645c236b588053","type":"json","z":"f8535fdf67d273c2","name":"","property":"payload","action":"obj","pretty":false,"x":150,"y":200,"wires":[["e40f4f216d871f04"]]},{"id":"8698adccd600fe6d","type":"inject","z":"f8535fdf67d273c2","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":true,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":170,"y":100,"wires":[["02ee370969a0b1a4"]]},{"id":"3de0fc5b92561b75","type":"file","z":"f8535fdf67d273c2","name":"BKP","filename":"BME680 Data.txt","appendNewline":true,"createDir":true,"overwriteFile":"false","encoding":"none","x":590,"y":100,"wires":[[]]},{"id":"572352ca7bc0a381","type":"debug","z":"f8535fdf67d273c2","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":950,"y":80,"wires":[]},{"id":"61edc201f4510533","type":"ui_button","z":"f8535fdf67d273c2","name":"","group":"e66437e4.1a68e8","order":3,"width":6,"height":1,"passthru":false,"label":"Reset","tooltip":"","color":"","bgcolor":"","className":"","icon":"","payload":"","payloadType":"str","topic":"","topicType":"str","x":150,"y":240,"wires":[["52f9724683855c3f"]]},{"id":"4f839fabe80355bc","type":"ui_gauge","z":"f8535fdf67d273c2","name":"Pressure Gauge","group":"b4c4e00d.cbf16","order":1,"width":3,"height":4,"gtype":"gage","title":"","label":"Pressure HPA","format":"{{msg.payload.Pressure_HPA}}","min":0,"max":"1500","colors":["#00b500","#e6e600","#ca3838"],"seg1":"500","seg2":"1000","className":"","x":1210,"y":200,"wires":[]},{"id":"44bba037c3a47aa4","type":"ui_chart","z":"f8535fdf67d273c2","name":"Pressure Chart (HPA)","group":"b4c4e00d.cbf16","order":2,"width":11,"height":4,"label":"","chartType":"line","legend":"false","xformat":"auto","interpolate":"linear","nodata":"","dot":false,"ymin":"","ymax":"","removeOlder":"12","removeOlderPoints":"","removeOlderUnit":"3600","cutout":0,"useOneColor":false,"useUTC":false,"colors":["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#fd0006","#ff9896","#9467bd","#c5b0d5"],"outputs":1,"useDifferentColor":false,"className":"","x":1220,"y":160,"wires":[[]]},{"id":"e769d7796ca92538","type":"ui_template","z":"f8535fdf67d273c2","group":"b4c4e00d.cbf16","name":"Pressure max and min","order":3,"width":14,"height":1,"format":"<div layout=\"row\" layout-align=\"start center\">\n <span flex>&emsp;&emsp;&emsp;&emsp;Min (HPA):&emsp;<span style=\"color: green\">{{msg.pressure.min}}</span>\n &emsp;&emsp;Max:&emsp;<span flex style=\"color: red\">{{msg.pressure.max}}</span></span>\n</div>","storeOutMessages":false,"fwdInMessages":true,"resendOnRefresh":false,"templateScope":"local","x":1220,"y":240,"wires":[[]]},{"id":"02ee370969a0b1a4","type":"pythonshell in","z":"f8535fdf67d273c2","name":"BME680 Reader","pyfile":"/home/weatherstaff/bme680/examples/BMESCRIPT.py","virtualenv":"","continuous":true,"stdInData":true,"x":410,"y":100,"wires":[["1212f1a329356472","3de0fc5b92561b75"]]},{"id":"5d53df1e84a90d89","type":"ui_text_input","z":"f8535fdf67d273c2","name":"","label":"Set Altimeter","tooltip":"hPa","group":"556809bfb29d0453","order":3,"width":0,"height":0,"passthru":true,"mode":"number","delay":300,"topic":"altimeter","sendOnBlur":true,"className":"","topicType":"flow","x":170,"y":280,"wires":[["58352bc042d7301d"]]},{"id":"58352bc042d7301d","type":"change","z":"f8535fdf67d273c2","name":"flow.alt","rules":[{"t":"set","p":"altimeter","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":350,"y":280,"wires":[[]]},{"id":"708e096eb9ae2133","type":"function","z":"f8535fdf67d273c2","name":"","func":"var pressure=msg.Pressure_HPA ;\nvar altimeter=flow.altimeter ;\n\nfunction altitude(altimeter, pressure) {\n result = (altimeter - pressure) * 10000\n\n return result\n}\n\nmsg.payload = altitude(altimeter, pressure)\n\nreturn msg\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":960,"y":120,"wires":[["572352ca7bc0a381","0e22fbb684a689d0","f235df18f02ca23c"]]},{"id":"f235df18f02ca23c","type":"ui_gauge","z":"f8535fdf67d273c2","name":"Altitude Gauge","group":"556809bfb29d0453","order":1,"width":3,"height":4,"gtype":"gage","title":"","label":"units","format":"{{value}}","min":0,"max":10,"colors":["#00b500","#e6e600","#ca3838"],"seg1":"","seg2":"","className":"","x":1200,"y":80,"wires":[]},{"id":"0e22fbb684a689d0","type":"ui_chart","z":"f8535fdf67d273c2","name":"Altitude Chart","group":"556809bfb29d0453","order":2,"width":11,"height":4,"label":"","chartType":"line","legend":"false","xformat":"HH:mm:ss","interpolate":"linear","nodata":"","dot":false,"ymin":"","ymax":"","removeOlder":1,"removeOlderPoints":"","removeOlderUnit":"3600","cutout":0,"useOneColor":false,"useUTC":false,"colors":["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"outputs":1,"useDifferentColor":false,"className":"","x":1200,"y":120,"wires":[[]]},{"id":"e66437e4.1a68e8","type":"ui_group","name":"Buttons","tab":"6c90afc.b3623d","order":6,"disp":false,"width":"14","collapse":false,"className":""},{"id":"b4c4e00d.cbf16","type":"ui_group","name":"Pressure (HPA)","tab":"6c90afc.b3623d","order":2,"disp":true,"width":14,"collapse":false},{"id":"556809bfb29d0453","type":"ui_group","name":"Altitude","tab":"6c90afc.b3623d","order":5,"disp":true,"width":14,"collapse":false,"className":""},{"id":"6c90afc.b3623d","type":"ui_tab","name":"BME688","icon":"dashboard","order":1,"disabled":false,"hidden":false}]

```

---

<div class="post-metadata">

**Author:** ![ScheepersJohan](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/scheepersjohan/32/39556_2.png) [@ScheepersJohan](https://discourse.nodered.org/u/ScheepersJohan)\
**Post date:** [11 June 2022 21:27 UTC](https://discourse.nodered.org/t/help-with-function-node-and-multiple-inputs/63411/12 "2022-06-11T21:27:30Z")

</div>

Why are you using **node-red-contrib-pythonshell** and not **node-red-contrib-bme680-rpi**?

You function node you can

```auto
msg.payload.altitude = (flow.get("altimeter") - msg.Pressure_HPA) * 1000;

return msg;

```

Also post the json object you get out pythonshell, then it is easy for us to test your flow.

---

<div class="post-metadata">

**Author:** ![TheOzarkWizard](https://avatars.discourse-cdn.com/v4/letter/t/4da419/32.png) [@TheOzarkWizard](https://discourse.nodered.org/u/TheOzarkWizard)\
**Post date:** [27 June 2022 15:43 UTC](https://discourse.nodered.org/t/help-with-function-node-and-multiple-inputs/63411/13 "2022-06-27T15:43:20Z")

</div>

Sorry for the delayed response, this is a project I have been working on and off of for around 4 years. That node did not exist at the time and I do not want to rewrite the entire project for one feature that is not a necessity. The flow I have posted is only the relevant parts, and the full flow is much bigger.

---

<div class="post-metadata">

**Author:** ![TheOzarkWizard](https://avatars.discourse-cdn.com/v4/letter/t/4da419/32.png) [@TheOzarkWizard](https://discourse.nodered.org/u/TheOzarkWizard)\
**Post date:** [27 June 2022 16:10 UTC](https://discourse.nodered.org/t/help-with-function-node-and-multiple-inputs/63411/14 "2022-06-27T16:10:51Z")

</div>

Here is the code for the pythonshell, Which comes from an older version of pimoroni's bme680 code:

```auto
   /home/weatherstaff/bme680/examples/BMESCRIPT.py

#!/usr/bin/env python

import bme680
import time

try:
    sensor = bme680.BME680(bme680.I2C_ADDR_SECONDARY)
except IOError:
    sensor = bme680.BME680(bme680.I2C_ADDR_PRIMARY)

# These oversampling settings can be tweaked to
# change the balance between accuracy and noise in
# the data.

sensor.set_humidity_oversample(bme680.OS_2X)
sensor.set_pressure_oversample(bme680.OS_4X)
sensor.set_temperature_oversample(bme680.OS_8X)
sensor.set_filter(bme680.FILTER_SIZE_3)
sensor.set_gas_status(bme680.ENABLE_GAS_MEAS)

#print('\n\nInitial reading:')
#for name in dir(sensor.data):
# value = getattr(sensor.data, name)
# if not name.startswith('_'):
# print('{}: {}'.format(name, value))

sensor.set_gas_heater_temperature(320)
sensor.set_gas_heater_duration(150)
sensor.select_gas_heater_profile(0)

# Up to 10 heater profiles can be configured, each
# with their own temperature and duration.
# sensor.set_gas_heater_profile(200, 150, nb_profile=1)
# sensor.select_gas_heater_profile(1)

#print('\n\nPolling:')
try:
    while True:
        if sensor.get_sensor_data():
            output = '{{"Temperature_oC":{0:.2f}}},{{"Pressure_HPA":{1:.2f}}},{>
                sensor.data.temperature,
                sensor.data.pressure,
                sensor.data.humidity)
            #output = '{0:.2f} C,{1:.2f} hPa,{2:.2f} %RH'.format(
                #sensor.data.temperature,
                #sensor.data.pressure,
                #sensor.data.humidity)

            if sensor.data.heat_stable:
                print('{0},{{"Resistance_Ohms":{1}}}'.format(
                    output,
                    sensor.data.gas_resistance))
                #print('{0},{1} Ohms'.format(
                # output,
                # sensor.data.gas_resistance))
            else:
                print(output)

        time.sleep(10)

except KeyboardInterrupt:
    pass

```

Here is the output of the pythonshell:

```auto
{"payload":"{\"Temperature_oC\":27.43},{\"Pressure_HPA\":994.72},{\"RelativeHumidity_percent\":39.76},{\"Resistance_Ohms\":665151.023059435}\n","_msgid":"35f8602c4daab435"}

```

---

<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:** [28 June 2022 10:35 UTC](https://discourse.nodered.org/t/help-with-function-node-and-multiple-inputs/63411/15 "2022-06-28T10:35:23Z")

</div>

What do you get if you feed that output into a JSON node?

---

<div class="post-metadata">

**Author:** ![TheOzarkWizard](https://avatars.discourse-cdn.com/v4/letter/t/4da419/32.png) [@TheOzarkWizard](https://discourse.nodered.org/u/TheOzarkWizard)\
**Post date:** [20 July 2022 03:08 UTC](https://discourse.nodered.org/t/help-with-function-node-and-multiple-inputs/63411/16 "2022-07-20T03:08:30Z")

</div>

`{"payload":{"Temperature_oC":34.06},"parts":{"id":"ec4a61897e0fbbb7","type":"string","ch":",","index":0,"count":3},"_msgid":"c0fb62cbabd43b7c"}`

Above is the result of the JSON Node. This message is for temp, and there are separate messages for other parameters such as pressure and humidity. Below is the same result going through a join node:

`{"payload":{"Temperature_oC":33.89,"Pressure_HPA":978.03,"RelativeHumidity_percent":58.52},"_msgid":"4419cb1a11a1f595"}`

---

<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:** [20 July 2022 08:03 UTC](https://discourse.nodered.org/t/help-with-function-node-and-multiple-inputs/63411/17 "2022-07-20T08:03:23Z")

</div>

You will have to remind us what you are trying to do with that.

---

<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:** [18 September 2022 08:03 UTC](https://discourse.nodered.org/t/help-with-function-node-and-multiple-inputs/63411/18 "2022-09-18T08:03:28Z")

</div>

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