Satec Powermeter
Satec worker supports PM180 power meters via Modbus TCP.
Install the Satec 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-satec) repository:
git clone https://github.com/tetherto/miningos-wrk-powermeter-satec.gitAfter cloning the repository, move into its directory:
cd miningos-wrk-powermeter-satec2. Install Dependencies
Inside the miningos-wrk-powermeter-satec 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 Satec 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 Worker
You can now start the worker by running the following command:
# PM180
DEBUG="miningos:*" pm2 -s start worker.js --name 'pm180-1' -- --wtype wrk-powermeter-rack-pm180 --env development --rack rack-16. Start Mock Server (Development Only)
For development and testing without physical powermeters, use the mock server to simulate a Satec device:
# Start mock PM180 powermeter
DEBUG="miningos:*" pm2 -s start mock/server.js --name 'mock-pm180-1' -- --type pm180 --env development --port 4027Mock servers are useful for testing the worker without connecting to actual powermeter hardware.