Home lab
Connect your home lab
Use the computer you already have. In a few minutes it shows up as your own small datacenter. A smart plug, UPS, Raspberry Pi, or Home Assistant sensor can join it. When nothing is live, your simulated datacenter stays on the home lab page.
1. Create my home lab
The commands below use YOUR_TOKEN until you sign in. Google is the first sign-in on the next page.
Sign in with Google2. Copy the command for this computer
Run the preview line first. It prints the JSON and does not send it.
Node 18 or newer. macOS: brew install node. Raspberry Pi OS and Debian: sudo apt install nodejs. Then node -v should print v18 or higher. The file is https://energyatit.com/agent/energyatit-agent.mjs.
Preview first
ENERGYATIT_BASE_URL=https://energyatit.com ENERGYATIT_ENROLLMENT_TOKEN=YOUR_TOKEN ENERGYATIT_PROFILE=home node energyatit-agent.mjs --preview
Run
curl -fsSL https://energyatit.com/agent/energyatit-agent.mjs -o energyatit-agent.mjs ENERGYATIT_BASE_URL=https://energyatit.com ENERGYATIT_ENROLLMENT_TOKEN=YOUR_TOKEN ENERGYATIT_PROFILE=home node energyatit-agent.mjs
3. Watch for the first reading
Sign in to watch this account. The page checks every few seconds after you create a token.
Stuck? Post a question
4. Optional sensors
Shelly: set SHELLY_URL to the plug, for example http://plug.local. Generation 2 and 3 use Switch.GetStatus. Generation 1 uses /status. The agent only sends GET. If the plug asks for a password, this version says authentication is not supported yet. Tasmota: set TASMOTA_URL and, if you use a web password, TASMOTA_USER and TASMOTA_PASSWORD. Watts are labeled wall power.
Keep it running
Leave the terminal open for the first run. A service file is copy-paste only. This page does not install one. A sleeping computer goes quiet after 15 minutes and the simulated datacenter shows again. That is expected.
[Service] ExecStart=/usr/bin/node /home/learner/energyatit-agent.mjs Environment=ENERGYATIT_PROFILE=home Environment=ENERGYATIT_BASE_URL=https://energyatit.com Environment=ENERGYATIT_ENROLLMENT_TOKEN=YOUR_TOKEN
<?xml version="1.0" encoding="UTF-8"?>
<plist version="1.0"><dict>
<key>Label</key><string>com.energyatit.home-lab</string>
<key>ProgramArguments</key>
<array><string>/usr/local/bin/node</string><string>energyatit-agent.mjs</string></array>
<key>EnvironmentVariables</key>
<dict>
<key>ENERGYATIT_PROFILE</key><string>home</string>
</dict>
</plist>schtasks /Create /SC MINUTE /MO 1 /TN EnergyAtItHome /TR "node energyatit-agent.mjs"