How I'm using power4 for the shed
This is mostly me talking to myself about how I use power4 for running the battery banks and generators in my shed.
Hardware
- 48v battery bank with attached controllable DC propane generator and a provision for a manual AC gasoline generator.
- 24v battery bank with a manual AC gasoline generator for charging.
- DC/DC 48v -> 24v charger controlled by a relay.
- 400w of solar panels on the 24v bank.
- Each bank has an inverter which can be used to power the house, only one at a time.
Configuration
The power4/examples/shed.lua script is my actual configuration, so updating my configuration looks like this…
- Check out power4 on my laptop
- Have a chat with an AI about how I want to change my script, or just change it myself
- Commit the change and push
- Log in the shed.island.XXX.XXX
- Check out the power4 repository
power4ctl stage examples/shed.luapower4ctl policy acceptpower4ctl show logs
Extending
If I have to make changes to the power controller's firmware or the power4ctl program, then it goes like this:
On the laptop:
$ # make the changes
$ make package && scp dist/power4-firmware.tar.gz shed.island.XXX.XXX:
On shed.island:
$ # Deploy the new firmware
$ rm -rf power4-firmware && tar -zxvf power4-firmware.tar.gz && ( cd power4-firmware && ./flash.sh && ./monitor.sh )
$
$ # If we need a new config or power4ctl then
$ cd ~/coding/power4
$ git pull
$ make deb && sudo dpkg -i power4ctl/power4ctl_1.0.0_arm64.deb && sudo systemctl restart power4ctl