MiningOS Logo
Install MiningOS

Inventory Worker

Seneca worker interfaces with SENECA temperature sensors via Modbus TCP for environmental monitoring.

Install the Inventory Worker

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-inventory) repository:

git clone https://github.com/tetherto/miningos-wrk-inventory.git

After cloning the repository, move into its directory:

cd miningos-wrk-inventory

2. Install Dependencies

Inside the miningos-wrk-inventory directory, run the following command to install dependencies using npm:

npm ci

3. 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.sh

4. Enable Debugging and Start the Workers

You can now start the workers by running the following commands:

# PSU (Power Supply Units)
DEBUG="miningos:*" pm2 -s start worker.js --name 'psu-1' -- --wtype wrk-inventory-rack-miner_part-psu --env development --rack rack-1

#**For Hashboards:**
DEBUG="miningos:*" pm2 -s start worker.js --name 'hashboard-2' -- --wtype wrk-inventory-rack-miner_part-hashboard --env development --rack rack-2

#**For Controllers:**
DEBUG="miningos:*" pm2 -s start worker.js --name 'controller-3' -- --wtype wrk-inventory-rack-miner_part-controller --env development --rack rack-3

#**For Dry Coolers (Container Parts):**
DEBUG="miningos:*" pm2 -s start worker.js --name 'drycooler-4' -- --wtype wrk-inventory-rack-container_part-drycooler --env development --rack rack-4

Inventory workers do not have mock servers since they manage database records, not physical devices.

On this page