Skip to content

digtaalfathir/protokit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Protokit

A kit of device communication protocols.

Industrial device comms (Modbus, MC, Open Protocol) — not related to protobuf tooling.

Protokit is a monorepo of small, focused Node.js libraries for talking to industrial devices (PLCs, controllers, assembly tools). Each protocol is published as its own npm package under the @digta scope, so you install only the protocol you need.

Packages

Package Protocol Status npm
@digta/fins Omron FINS TCP ✅ Working (app/service) npm i @digta/fins
@digta/modbus Modbus TCP ✅ Working (zero-dep TCP master) npm i @digta/modbus
@digta/mcprotocol Mitsubishi MELSEC MC (1E/3E) ✅ Working (fork of mcprotocol 0.1.2 + ASCII 3E framing fix) npm i @digta/mcprotocol
@digta/open-protocol Atlas Copco Open Protocol ✅ Working (zero-dep MID codec + TCP client) npm i @digta/open-protocol

Status legend: ✅ usable today · 🚧 scaffolded, implementation in progress.

Note: @digta/openprotocol is the Atlas Copco assembly-tool protocol, not Google Protocol Buffers.

Install

Install any package on its own:

npm i @digta/fins
npm i @digta/modbus
npm i @digta/mcprotocol
npm i @digta/open-protocol

Development

This repo uses native npm workspaces (no Lerna/Nx/Turborepo).

git clone https://github.com/digtaalfathir/protokit.git
cd protokit
npm install            # installs all workspaces + links them together

Common workspace commands:

npm install                          # install deps for every package
npm run start -w @digta/fins         # run a script in one package
npm test --workspaces --if-present   # run tests across all packages

How to add a protocol package

  1. Create the folder: packages/<name>/.
  2. Add packages/<name>/package.json:
    • "name": "@digta/<name>", "version": "0.1.0"
    • description + keywords (protocol, industrial, plc, iot, tcp, serial, …)
    • "license": "MIT", "author": "Rifky Andigta Al-Fathir"
    • main / exports and a "files" field (publish only what's needed)
    • repository: { "type": "git", "url": "git+https://github.com/digtaalfathir/protokit.git", "directory": "packages/<name>" }
  3. Add packages/<name>/index.js (the entrypoint) and packages/<name>/README.md (what the protocol is, install, a short usage example).
  4. Run npm install at the repo root to wire the new workspace in.
  5. Add a row to the Packages table above.

Publishing

📖 First time? Full step-by-step walkthrough: PUBLISHING.md.

Packages are not published automatically. To publish (or update) a package:

Prerequisites (one-time):

  • Create the npm organization digta (npmjs.com → Add Organization).
  • Log in locally: npm login.

Publish a package. Scoped packages default to private, so you must pass --access public:

npm publish -w @digta/<name> --access public

For example:

npm publish -w @digta/fins --access public

License

MIT © Rifky Andigta Al-Fathir

About

A kit of device communication protocols for industrial devices — Omron FINS, Mitsubishi MC, Atlas Copco Open Protocol, Modbus. npm workspaces monorepo (@digta/*).

Topics

Resources

License

Stars

2 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages