# Function" particle-function: in Rule engine

**URL:** <https://discourse.nodered.org/t/function-particle-function-in-rule-engine/17470>\
**Category:** General\
**Created:** [4 November 2019 03:51 UTC](https://discourse.nodered.org/t/function-particle-function-in-rule-engine/17470 "2019-11-04T03:51:31Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![NODE777](https://avatars.discourse-cdn.com/v4/letter/n/7993a0/32.png) [@NODE777](https://discourse.nodered.org/u/NODE777)\
**Post date:** [4 November 2019 03:51 UTC](https://discourse.nodered.org/t/function-particle-function-in-rule-engine/17470/1 "2019-11-04T03:51:31Z")

</div>

Hi, I'm new at Node-Red and also at Rule engine.  
I got a particle function implemented on Photon device code.  
I verified the correct function operation using particle console.  
Apparently the issue I have is setting the function "particle-function on Rule engine.  
Please see attached pic

 ![function%20nodes](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/6/6552f5eb029fe21f765c81da744e57a866ac228e.png)

A slider send a numeric value through the function "particle-function" called sliderhp.  
and at the debug pane one can see the slider value and msg.payload , where payload property is =1.  
I understand that this one is the return of the function called on particle device.

This is the Phoron device function called:

int sliderhp (String valor ) {

```
 sliderHPvalue=atoi (valor);
 Serial1.println (sliderHPvalue );
 return 1;  

```

}

If I set some value on the dashboard's slider, on the debug pane you got payload=1.  
But on the terminal, I got printed out "0" trough the Serial1.println (sliderHPvalue );.

My point is that in the node properties for that function "particle-function", I don't know  
what should be the correct function argument . Please see attached pic.

 ![Node%20properties](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/8/8dab1185775aef49f7cacae87c944d703a1ab6d9.png)  
It should be the slider payload but I do not succeed in the correct format it should have.  
Thank you for some help.
