But do you really need to add one to all of them? Would keeping one of them up during the power outage improve the boot times of the rest perhaps? I don’t use a mesh system so can’t say I know how they work. The fact that they take so long to boot certainly doesn’t recommend them.
But typically you can only have one DHCP server per subnetwork. Since all of your mesh is on the same subnetwork I suspect that indeed the DHCP server is only running on the primary AP. It’s worth doing some research to find out.
Where I live in Colorado, USA most of the power lines are buried and the power is very reliable. In the five years I’ve lived here we’ve only lost power three times. One caused by a forest fire, one caused by a car hitting a power substation, and the most recent caused by the bomb cyclone that happened a few weeks ago. The first two lasted under an hour. The last one was over four hours I think (we were actually on a cruise ship heading into Saint Thomas at the time).
For the last power outage I can say that everything did not come back up cleanly. But enough came back up cleanly that I was able to get almost everything working again using the wifi from a restaurant on the beach in about 10 minutes.
I think the APCs have good support too, but I went with CyberPower for the same reason.
In case it helps, here are my Ansible scripts I use to configure my NUT server:
---
# tasks file for nut
- name: Install nut server
apt:
name: "{{ item }}"
update_cache: no
become: true
with_items:
- nut
- nut-client
- nut-server
register: nut_installed
- name: Configure NUT for the CyberPower CP1500AVRLCD
ini_file:
path: /etc/nut/ups.conf
state: present
section: cyberpower1
option: "{{ item.option }}"
value: "{{ item.value }}"
with_items:
- { option: "driver", value: "usbhid-ups" }
- { option: "port", value: "auto" }
- { option: "desc", value: "\"CyberPower CP1500AVRLCD\"" }
- { option: "pollinterval", value: "15" }
become: true
- name: Reboot
include_role:
name: reboot
when: nut_installed.changed
- name: Start the NUT Driver
systemd:
daemon_reload: yes
enabled: yes
name: nut-driver
state: started
become: true
- name: Update upsd.conf
blockinfile:
path: /etc/nut/upsd.conf
block: |
LISTEN 127.0.0.1
LISTEN {{ nutserver }}
MAXAGE 25
become: yes
- name: Add nut users
ini_file:
path: /etc/nut/upsd.users
state: present
section: "{{ item.section }}"
option: "{{ item.option }}"
value: "{{ item.value }}"
with_items:
- { section: "admin", option: "password", value: "{{ share_pass }}" }
- { section: "admin", option: "actions", value: "SET" }
- { section: "admin", option: "instcmds", value: "ALL" }
- { section: "rich", option: "password", value: "{{ share_pass }}" }
- { section: "rich", option: "upsmon", value: "master" }
become: true
- name: Configure the server to run
lineinfile:
backrefs: yes
line: MODE=standalone
path: /etc/nut/nut.conf
regexp: MODE=none
state: present
become: yes
- name: Start the NUT Server
systemd:
daemon_reload: yes
enabled: yes
name: nut-server
state: started
become: true
- name: Set up the NUT client
include_role:
name: nut-client
- name: Cycle the services
systemd:
name: "{{ item }}"
state: started
become: true
with_items:
- nut-driver
- nut-server
- nut-monitor
And here is the nut-client Ansible script
---
- name: Install nut client
apt:
name: nut
update_cache: no
become: true
- name: Set up the NUT client
blockinfile:
path: /etc/nut/upsmon.conf
block: |
MONITOR cyberpower1@localhost 1 rich {{ share_pass }} master
DEADTIME 25
NOTIFYCMD /etc/nut/notifycmd.sh
NOTIFYFLAG ONLINE SYSLOG+WALL+EXEC
NOTIFYFLAG ONBATT SYSLOG+WALL+EXEC
NOTIFYFLAG LOWBATT SYSLOG+WALL+EXEC
NOTIFYFLAG FSD SYSLOG+WALL+EXEC
NOTIFYFLAG COMMOK SYSLOG+WALL+EXEC
NOTIFYFLAG COMMBAD SYSLOG+WALL+EXEC
NOTIFYFLAG SHUTDOWN SYSLOG+WALL+EXEC
NOTIFYFLAG REPLBATT SYSLOG+WALL+EXEC
NOTIFYFLAG NOCOMM SYSLOG+WALL+EXEC
NOTIFYFLAG NOPARENT SYSLOG+WALL
become: true
- name: Copy the notify shell script
copy:
src: notifycmd.sh
dest: /etc/nut/notifycmd.sh
mode: 0755
owner: root
group: nut
become: yes
#- name: Cycle the services
# systemd:
# name: "{{ item }}"
# state: started
# become: true
# with_items:
# - nut-monitor
And the notifycmd.sh script mentioned in the last script
#!/bin/bash
sendmail=/usr/sbin/sendmail
email=$EMAIL_ADDRESS
to='To: '$email'\n'
from='From: '$email'\n'
hostname=$(uname -n)
subject='Subject: NUT ALERT: '$NOTIFYTYPE'\n\n'
body='Alert type: '$NOTIFYTYPE
msg=${to}${from}${subject}${body}
I don’t configure anything by hand if I can help it. Everything is scripted through Ansible which means my entire configured is documented and repeatable. I could rebuild all of my VMs and RPis automatically in about an hour except for ESXi, the NAS, the AP, and pfSense which I still need to build by hand. But those don’t take much longer than the rest to rebuild with backups.