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 🙏

© 2025 – Pkg Stats / Ryan Hefner

n8n-nodes-modbus-fccomplete

v0.17.3

Published

n8n nodes for industrial automation with complete Modbus support (FC1-FC4) and intuitive data conversion with scaling options

Readme

Banner image

n8n-nodes-modbus-fccomplete

Description

n8n community node package for industrial automation with complete Modbus protocol support. Provides three nodes for reading, writing, and converting Modbus data with an intuitive interface.

Features

Nodes

  1. Modbus Trigger - Triggers workflows based on Modbus events
  2. Modbus - Read/write operations for function codes FC1-FC4
  3. Modbus Data Converter - Quick and custom data conversion with scaling

Modbus Support

  • Function codes: FC1 (Read Coils), FC2 (Read Discrete Inputs), FC3 (Read Holding Registers), FC4 (Read Input Registers)
  • Data types: INT16, UINT16, INT32, UINT32, FLOAT32, Double, BCD, Bitfields
  • Byte ordering: Big Endian and Little Endian
  • Connection types: TCP/IP with configurable timeout and retry

Data Converter Features

Quick Convert Mode

  • Single Value - Basic INT16 conversion with scaling
  • Float (2 Registers) - IEEE 754 32-bit floating point
  • Long Integer (2 Registers) - 32-bit signed/unsigned with value selection
  • Double (4 Registers) - 64-bit double precision
  • BCD - Binary Coded Decimal conversion
  • Bitfield - Individual bit extraction for status flags
  • All Common Types - Shows all possible conversions

Custom Mode

  • Multiple conversion rules per execution
  • Named output fields
  • Full data type support
  • Configurable scaling and offsets

Output Organization

  • Configurable field names for clean output structure
  • Optional metadata with conversion details
  • Timestamp support for time-series data
  • Scaling options with direct factor input

Installation

Follow the installation guide in the n8n community nodes documentation.

npm install n8n-nodes-modbus-fccomplete

Quick Start

Power Meter Example (replaces Node-RED function)

  1. Modbus Node:

    • Function Code: FC3 (Read Holding Registers)
    • Memory Address: Power register address
    • Quantity: 2 (for 32-bit values)
  2. Modbus Data Converter:

    • Conversion Mode: Quick Convert
    • Quick Convert Type: Long Integer (2 Registers)
    • Long Integer Value: Signed (for negative power)
    • Scale: ✅ Enabled
    • Scale Factor: 0.001 (divides by 1000)
    • Add Timestamp: ✅ Enabled

Output:

{
  "output": {
    "value": 1.234
  },
  "timestamp": "2024-01-01T12:00:00.000Z"
}

Access your power value with: {{ $json.output.value }}

Temperature Sensor Example

  1. Modbus Node:

    • Function Code: FC3 (Read Holding Registers)
    • Memory Address: Temperature register
    • Quantity: 2
  2. Modbus Data Converter:

    • Conversion Mode: Quick Convert
    • Quick Convert Type: Float (2 Registers)
    • Byte Order: Big Endian
    • Output Field Name: "temperature"

Output:

{
  "temperature": {
    "value": 23.5
  }
}

Configuration

Modbus Connection

Configure connection credentials in n8n:

  • Host: Modbus server IP address
  • Port: Default 502 for Modbus TCP
  • Unit ID: Modbus slave/unit identifier
  • Timeout: Connection timeout in milliseconds

Data Converter Scaling

Common scaling examples:

  • Temperature sensors: Often need scaling (e.g., 0.1 for tenths of degrees)
  • Power meters: Typically 0.001 for kW conversion
  • Pressure sensors: Various factors depending on units

Troubleshooting

Common Issues

  1. "No register data found"

    • Ensure Modbus node output contains data array
    • Check connection to Modbus device
  2. Incorrect values

    • Verify byte order (Big Endian vs Little Endian)
    • Check data type selection (signed vs unsigned)
    • Confirm scaling factor
  3. Connection timeouts

    • Increase timeout in credentials
    • Verify network connectivity
    • Check Modbus device configuration

Version History

  • v0.10.0 - Initial release with simplified Quick Convert and Custom modes, improved UI with always-visible output options

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

MIT License