node-red-contrib-yotta-gpio 1.0.1
Yotta GPIO API nodes for Node-RED
Introduction
This Node-RED module provides a collection of custom nodes for communicating with distributed controllers and communication modules produced by Yottacontrol Co.. These nodes allow you to easily read from and write to various digital and analog inputs/outputs over Modbus using Node-RED.
Features
- Read Nodes: Read data from Digital Input (DI), Digital Output (DO), Analog Input (AI), and Analog Output (AO) pins.
- Write Nodes: Write data to DO and AO pins.
- Works with Modbus-compatible YottaControl modules.
- Designed to work in conjunction with the
Modbus-Flex-Getter
andModbus-Flex-Write
nodes provided bynode-red-contrib-modbus
Installation
Run the following command in your Node-RED user directory (typically ~/.node-red
):
npm install node-red-contrib-yottacontrol
Nodes Included
Read Nodes
Read_DI
Read_DO
Read_AI
Read_AO
These nodes are used to read data from YottaControl modules. The output is passed in msg.payload
. When reading more than one point, msg.payload
should be an array.
Write Nodes
Write_DI
Write_DO
Write_AI
Write_AO
These nodes send data to YottaControl modules. You need to configure:
- Model type (e.g., Yotta I/O module model)
- Output pin
- Modbus ID
- Quantity
Read Mode
DI/DO
{ value: msg.payload, 'fc': 1, 'unitid': 1, 'address': 0 , 'quantity': 1 }
AI/AO
{ value: msg.payload, 'fc': 3, 'unitid': 1, 'address': 0 , 'quantity': 1 }
Write node
DO
{value: msg.payload, 'fc': 5, 'unitid': 1, 'address': 0 , 'quantity': 1}
AO
{value: msg.payload, 'fc': 6, 'unitid': 1, 'address': 0 , 'quantity': 1}
Usage Tips
- Ensure all required fields are filled; otherwise, message construction may fail.
- When reading multiple channels, make sure
msg.payload
is in array format. - Make sure Modbus ID and address correspond correctly with your hardware.