This directory provides a reproducible build setup (using Raspberry Pi pi-gen) to create a ready-to-run NibePi image with Node-RED and the node-red-contrib-nibepi node preinstalled.
- Base OS: Raspberry Pi OS (Bookworm Lite)
- Node.js: 20.x LTS
- Node-RED: 3.1.x
- node-red-contrib-nibepi: 1.3.0 (contains 15-minute price interval logic)
raspi-image/
versions.env # Central version pins
README.md # This file
stage-nibepi/
00-packages # Additional Debian packages to install
01-install/
00-run.sh # Install Node.js + Node-RED
02-nibepi/
00-run.sh # Copy/Install project sources & flows
flows.json # Initial flows
03-services/
00-run.sh # Install & enable systemd services
node-red.service # Node-RED unit
nibepi.service # Backend unit
- Clone pi-gen:
git clone https://github.com/RPi-Distro/pi-gen.git cd pi-gen - Copy this stage into pi-gen root:
cp -r ../node-red-contrib-nibepi/raspi-image/stage-nibepi ./ cp ../node-red-contrib-nibepi/raspi-image/versions.env ./
- Create a
configfile (example):IMG_NAME="nibepi" STAGE_LIST="stage0 stage1 stage2 stage3 stage-nibepi" ENABLE_SSH=1
- Run build (Docker recommended):
./build-docker.sh
- Resulting image appears in
deploy/(e.g.nibepi-*.img).
- Hostname defaults to
nibepi(set insidenibepi.serviceworking dir assumptions). - Node-RED auto-starts and serves flows in
/home/pi/.node-red. - Backend service
nibepi.serviceruns/opt/nibepi/node-red-contrib-nibepi/index.js(adjust path if repo layout changes). - Place secrets (tokens, etc.) after first boot under
/etc/nibepi/(directory created by script if missing).
- Change versions: edit
versions.envbefore build. - Add packages: append to
stage-nibepi/00-packages. - Additional services: add more unit files in
03-servicesand enable them in03-services/00-run.sh.
If you bump the project version:
- Update
versions.env. - Re-run the build.
flows.jsonis a minimal placeholder referencing the contrib node category.- The interval detection for 15-minute pricing is included in this version.
- Consider adding a first-boot wizard later for token injection.
Generated scaffolding. Adjust paths as needed before first build.