node-red-contrib-sparkcore 0.0.12
Node-RED node to connect to Spark Core. This can be used to connect to Spark Core and call functions, read variables or listen to events
node-red-contrib-sparkcore
Node-RED node to connect to Spark Core. This can be used to connect to Spark Core and call functions, read variables or listen to events.
Intsall
npm install node-red-contrib-sparkcore
Usage
The node implements basic things to interact with Spark Core, such as call a function, read a variable and subscribe to events. This node defines INPUT and OUTPUT nodes. Input node can be used to call a function, read a variable and subscribe to events. The output node can be used to call a function and pass an input parameter. Following are the return values:
Function call
- msg.raw contains the raw JSON string returned
- msg.payload contains the return value of the function
- msg.id contains the core id
Read a Variable
- msg.raw contains the raw JSON string returned
- msg.payload contains the value of the variable
- msg.id contains the core id
Subscribe to variables
- msg.raw contains the raw JSON string returned
- msg.payload the event data
- msg.id contains the core id
- msg.published_at contain the published date and time