# Sensor data turned into null value after function node

**URL:** <https://discourse.nodered.org/t/sensor-data-turned-into-null-value-after-function-node/80719>\
**Category:** General\
**Tags:** function-node\
**Created:** [22 August 2023 16:28 UTC](https://discourse.nodered.org/t/sensor-data-turned-into-null-value-after-function-node/80719 "2023-08-22T16:28:05Z")\
**Posts on this page:** 7\
**Page:** 2

<div class="post-metadata">

**Author:** ![mstk\_olsen](https://avatars.discourse-cdn.com/v4/letter/m/ac8455/32.png) [@mstk\_olsen](https://discourse.nodered.org/u/mstk_olsen)\
**Post date:** [23 August 2023 10:52 UTC](https://discourse.nodered.org/t/sensor-data-turned-into-null-value-after-function-node/80719/21 "2023-08-23T10:52:47Z")

</div>

I've set the "Split Input" option to "after silence = 500 ms" but the result its still the same. I'm still receiving errors....

---

<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:** [23 August 2023 11:22 UTC](https://discourse.nodered.org/t/sensor-data-turned-into-null-value-after-function-node/80719/22 "2023-08-23T11:22:37Z")

</div>

> [@mstk\_olsen](#):
>
> I'm still receiving errors....

What errors - from where - what do they say - show us.

---

<div class="post-metadata">

**Author:** ![mstk\_olsen](https://avatars.discourse-cdn.com/v4/letter/m/ac8455/32.png) [@mstk\_olsen](https://discourse.nodered.org/u/mstk_olsen)\
**Post date:** [23 August 2023 11:27 UTC](https://discourse.nodered.org/t/sensor-data-turned-into-null-value-after-function-node/80719/23 "2023-08-23T11:27:57Z")

</div>

Still receiving these

> [@mstk\_olsen](#):
>
> ```auto
> [error] [json:JSON to String/Object] Unexpected token : in JSON at position 9
> [error] [json:JSON to String/Object] Unexpected token : in JSON at position 14
> [error] [json:JSON to String/Object] Unexpected token : in JSON at position 17
> [error] [json:JSON to String/Object] Unexpected token } in JSON at position 2
> [error] [json:JSON to String/Object] Unexpected token : in JSON at position 10
> [error] [json:JSON to String/Object] Unexpected token : in JSON at position 14
> [error] [json:JSON to String/Object] Unexpected token : in JSON at position 14
> [error] [json:JSON to String/Object] Unexpected token } in JSON at position 2
> [error] [json:JSON to String/Object] Unexpected token : in JSON at position 7
> [error] [json:JSON to String/Object] Unexpected token : in JSON at position 16
> [error] [json:JSON to String/Object] Unexpected token } in JSON at position 2
> 
> ```

---

<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:** [23 August 2023 11:30 UTC](https://discourse.nodered.org/t/sensor-data-turned-into-null-value-after-function-node/80719/24 "2023-08-23T11:30:23Z")

</div>

not enough.

Show me a screenshot of your flow.

Show me where this error emanates from.

Capture the JSON using the "Copy Value" button on the debug message.

---

<div class="post-metadata">

**Author:** ![mstk\_olsen](https://avatars.discourse-cdn.com/v4/letter/m/ac8455/32.png) [@mstk\_olsen](https://discourse.nodered.org/u/mstk_olsen)\
**Post date:** [23 August 2023 11:49 UTC](https://discourse.nodered.org/t/sensor-data-turned-into-null-value-after-function-node/80719/25 "2023-08-23T11:49:46Z")

</div>

It's just these errors, i don't know even i can to make it to work by end of today because this is my assignment and is going to due today....

```auto
23 Aug 19:47:17 - [error] [json:JSON to String/Object] Unexpected end of JSON input
23 Aug 19:47:17 - [error] [json:JSON to String/Object] Unexpected token : in JSON at position 9
23 Aug 19:47:17 - [error] [json:JSON to String/Object] Unexpected token : in JSON at position 14
23 Aug 19:47:17 - [error] [json:JSON to String/Object] Unexpected token : in JSON at position 17
23 Aug 19:47:17 - [error] [json:JSON to String/Object] Unexpected token } in JSON at position 2
23 Aug 19:47:17 - [error] [json:JSON to String/Object] Unexpected token : in JSON at position 10
23 Aug 19:47:18 - [error] [json:JSON to String/Object] Unexpected token : in JSON at position 14
23 Aug 19:47:18 - [error] [json:JSON to String/Object] Unexpected token : in JSON at position 14
23 Aug 19:47:18 - [error] [json:JSON to String/Object] Unexpected token } in JSON at position 2
23 Aug 19:47:18 - [error] [json:JSON to String/Object] Unexpected token : in JSON at position 7
23 Aug 19:47:18 - [error] [json:JSON to String/Object] Unexpected token : in JSON at position 16
23 Aug 19:47:18 - [error] [json:JSON to String/Object] Unexpected token } in JSON at position 2
23 Aug 19:47:18 - [error] [json:JSON to String/Object] Unexpected token } in JSON at position 0
23 Aug 19:47:18 - [error] [json:JSON to String/Object] Unexpected end of JSON

```

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

---

<div class="post-metadata">

**Author:** ![jbudd](https://avatars.discourse-cdn.com/v4/letter/j/5f8ce5/32.png) [@jbudd](https://discourse.nodered.org/u/jbudd)\
**Post date:** [23 August 2023 11:56 UTC](https://discourse.nodered.org/t/sensor-data-turned-into-null-value-after-function-node/80719/26 "2023-08-23T11:56:42Z")

</div>

> [@jbudd](#):
>
> So that we can see your actual data, put a debug node on the output of your serial node. copy the value and paste it here.

> [@jbudd](#):
>
> Please show us the data arriving in Node-red along with any errors.

> [@Steve-Mcl](#):
>
> Capture the JSON using the "Copy Value" button on the debug message.

You are not doing what we are asking you to do.

If we are going to help we need to see the data which is causing those error messages in Node-red.  
Not a picture of the data, the actual data.  
If you don't understand how to do that it's better to say so than just to ignore the request.

---

<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:** [22 October 2023 11:57 UTC](https://discourse.nodered.org/t/sensor-data-turned-into-null-value-after-function-node/80719/27 "2023-10-22T11:57:31Z")

</div>

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

[Previous page](https://discourse.nodered.org/t/sensor-data-turned-into-null-value-after-function-node/80719.md?page=1)
