The Phidgets node-red package is written as a very loose wrapper of our JavaScript libraries, so any incoming message must be formatted in a very specific way:
- The topic of the message must exactly match the name of a method in our JavaScript API
- the payload of the message must be a json object, where the name of each member in the object must match a parameter of the method you're trying to call
So, in order to turn on a digital output, you'd need to make a message like this:
Code: Select all
Topic: setState
Payload: {
"state": true
}
You may need to use function blocks to conform upstream data into this format.