npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

node-red-contrib-solution-engine

v0.9.4

Published

Node-RED nodes for Solution Engine and MTConnect integration

Readme

node-red-contrib-solution-engine

Node-RED nodes for interacting with Solution Engine and MTConnect devices.

Source

Full source is available in GitHub

Installation

Install the package by first navigating to the local node-RED folder.

On Windows this will likely be

cd C:\Users\<my-user-name>\.node-red
npm install node-red-contrib-your-node

or on Linux

cd ~/.node-red
npm install node-red-contrib-solution-engine

Or for development:

cd /path/to/node-red-contrib-solution-engine
npm link

cd ~/.node-red
npm link node-red-contrib-solution-engine

Restart Node-RED after installation.

Nodes

MTConnect Data Item (Read)

Reads a specific data item value from an MTConnect endpoint. Supports both Solution Engine and generic MTConnect brokers.

Configuration:

  • Host: IP address or hostname (e.g., 192.168.5.90, mtconnect.mazakcorp.com)
  • Port: MTConnect port (default: 5000)
  • Path: Optional path for generic brokers (leave empty for most cases)
  • Data Item ID: The dataItemId to query (e.g., EngineInfo.EngineID)

Input:

  • msg.payload: Any value (triggers the read)
  • msg.host: (optional) Override configured host
  • msg.port: (optional) Override configured port
  • msg.path: (optional) Override configured path
  • msg.dataItemId: (optional) Override configured data item ID

Output:

  • msg.payload: The data item value
  • msg.dataItemId: The data item ID that was queried
  • msg.timestamp: MTConnect timestamp
  • msg.sequence: MTConnect sequence number
  • msg.name: Friendly name of the data item

Broker Detection:

The node automatically detects whether the target is a Solution Engine or generic MTConnect broker:

  • Solution Engine: Uses /api/v6/mtc/current
  • Generic broker: Uses /{path}/current or /current

The broker type is cached after first detection for performance.

Examples:

Solution Engine:

Host: 192.168.5.90
Port: 7200
Path: (empty)
Data Item ID: EngineInfo.EngineID
→ URL: http://192.168.5.90:7200/api/v6/mtc/current
→ Returns: "DCA6326DA159"

Mazak Demo Broker:

Host: mtconnect.mazakcorp.com
Port: 5610
Path: (empty)
Data Item ID: xpm
→ URL: http://mtconnect.mazakcorp.com:5610/current
→ Returns: "UNAVAILABLE"

Important: Data item IDs are case-sensitive. Use exact case from the MTConnect XML (e.g., EngineInfo.EngineID not EngineInfo.EngineId).


Engine Set Data Item (Write)

Sets a data item value on a Solution Engine device.

Configuration:

  • Host: IP address or hostname (e.g., 192.168.5.90)
  • Port: Solution Engine port (default: 7200)
  • Data Item ID: The dataItemId to set (e.g., EngineInfo.Location.PostalCode)

Input:

  • msg.payload: The value to set (string or number)
  • msg.value: (alternative to payload) The value to set
  • msg.host: (optional) Override configured host
  • msg.port: (optional) Override configured port
  • msg.dataItemId: (optional) Override configured data item ID

Output:

  • msg.payload.success: true if successful, false if error
  • msg.payload.dataItemId: The data item ID that was set
  • msg.payload.value: The value that was sent
  • msg.payload.statusCode: HTTP status code
  • msg.response: Server response (if any)

Endpoint:

PUT http://{host}:{port}/api/v6/agent/data

Request Body (XML):

<DataItems>
    <DataItem dataItemId="EngineInfo.Location.PostalCode">
        <Value>12345</Value>
    </DataItem>
</DataItems>

Example:

Set a postal code:

msg.payload = "12345";
// Data Item ID configured as: EngineInfo.Location.PostalCode
// → Sends PUT request with XML body
// → Returns: { success: true, dataItemId: "...", value: "12345", statusCode: 200 }

Note: This node only works with Solution Engine devices, not generic MTConnect brokers.


Status Indicators

Both nodes show visual status indicators:

  • Blue dot: Request in progress
  • Green dot: Success
  • Yellow ring: Data item not found (read node only)
  • Red ring: Error occurred

Flow Examples

Basic Read Flow

[Inject] → [MTConnect Data Item] → [Debug]

Inject: Every 5 seconds
MTConnect Data Item:
  Host: 192.168.5.90
  Port: 7200
  Data Item ID: EngineInfo.CPUTemp
Debug: msg.payload

Read and Write Flow

[Inject] → [Change] → [Engine Set Data Item] → [Delay] → [MTConnect Data Item] → [Debug]

Inject: Manual trigger
Change: Set msg.payload = "New Value"
Engine Set Data Item:
  Host: 192.168.5.90
  Port: 7200
  Data Item ID: MyComponent.MyValue
Delay: 1 second
MTConnect Data Item:
  Host: 192.168.5.90
  Port: 7200
  Data Item ID: MyComponent.MyValue
Debug: msg.payload

Multiple Hosts

[Inject] → [MTConnect Data Item (Engine 1)] → [Debug]
           [MTConnect Data Item (Engine 2)] → [Debug]
           [MTConnect Data Item (Mazak)] → [Debug]

Each node can target a different host. Broker type is cached per host:port combination.


Troubleshooting

"Data item not found"

  1. Check case sensitivity: Data item IDs are case-sensitive. Verify the exact case in the MTConnect XML response.
  2. Verify the data item exists: Open http://{host}:{port}/api/v6/mtc/current in a browser and search for the dataItemId attribute.
  3. Check broker detection: Look at Node-RED logs to see which URL is being used.

Wrong URL being used

The broker type is cached in memory. Restart Node-RED to clear the cache if you changed the configuration.

Connection errors

  1. Verify the host and port are correct
  2. Check network connectivity: curl http://{host}:{port}/current
  3. Check firewall settings

Logging

Both nodes log useful debug information. View logs in the Node-RED console:

Detecting broker type for 192.168.5.90:7200...
Broker detection complete: isSolutionEngine=true
Fetching from: http://192.168.5.90:7200/api/v6/mtc/current
PUT to http://192.168.5.90:7200/api/v6/agent/data with body: <DataItems>...

License

MIT

Author

Chris Tacke - LECS Energy

Keywords

  • node-red
  • solutionengine
  • mtconnect
  • manufacturing
  • lecenergy
  • lecs