Schneider Powermeter
Schneider worker supports PM5340 power meters and P3U30 protection relays via Modbus TCP.
Install the Schneider Powermeter
1. Clone the Repository
Use the same working directory for all the workers.
Inside your working directory, run the following command to clone the (miningos-wrk-powermeter-schneider) repository:
git clone https://github.com/tetherto/miningos-wrk-powermeter-schneider.gitAfter cloning the repository, move into its directory:
cd miningos-wrk-powermeter-schneider2. Install Dependencies
Inside the miningos-wrk-powermeter-schneider directory, run the following command to install dependencies using npm:
npm ci3. Generate Configuration Files
Next, run the following script to scan the config/ directory,
copy each .example file into an active configuration file by removing the .example suffix.
sh setup-config.sh4. Configure the Worker
After generating the configuration files, edit the files in the config/ directory to match your environment:
- common.json - Worker-wide settings including worker identity
- base.thing.json - Device-specific configuration for your Schneider powermeters
Ensure your powermeter IP addresses and Modbus TCP ports are correctly configured and accessible from the worker machine.
5. Enable Debugging and Start the Workers
You can now start the workers by running the following commands:
# PM5340
DEBUG="miningos:*" pm2 -s start worker.js --name 'pm5340-1' -- --wtype wrk-powermeter-rack-pm5340 --env development --rack rack-1
# P3U30
DEBUG="miningos:*" pm2 -s start worker.js --name 'p3u30-2' -- --wtype wrk-powermeter-rack-p3u30 --env development --rack rack-26. Start Mock Servers (Development Only)
For development and testing without physical powermeters, use mock servers to simulate Schneider devices:
# pm5340 mock
DEBUG="miningos:*" pm2 -s start mock/server.js --name 'mock-pm5340-1' -- --type pm5340 --env development --port 4025
# p3u30 mock
DEBUG="miningos:*" pm2 -s start mock/server.js --name 'mock-p3u30-2' -- --type p3u30 --env development --port 4026Mock servers are useful for testing the worker without connecting to actual powermeter hardware.