Skip to content

Commit

Permalink
Finalize initial support for autoconf_remote_nut_devices
Browse files Browse the repository at this point in the history
Signed-off-by: Arnaud Quette <[email protected]>
  • Loading branch information
aquette committed Dec 17, 2023
1 parent a80b69e commit 0fd9241
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 6 deletions.
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,19 +74,20 @@ As a result, many NUT limitations can be removed, to focus on drivers and event
- [ ] Fix user's MQTT configuration retrieval
- [ ] Complete documentation
- [x] Complete base translations (en, fr)
- [ ] Add support for remote NUT server discovery and configuration (autoconf_remote_nut_devices)
- [ ] 0.3 - 0.5:
- [ ] Work on MQTT UPS integration in https://www.home-assistant.io/integrations/mqtt
- [ ] Work on MQTT full UPS integration in https://www.home-assistant.io/integrations/mqtt
- [ ] Consider other publication methods, more direct with HA
- [ ] Complete CICD builds
- [ ] Add support for remote NUT server discovery and configuration (autoconf_remote_nut_devices)
- [ ] Ease SNMP and NetXML-UPS discovery and configuration
- [ ] Full integration with HA MQTT UPS
- [ ] Add options for autoconf_snmp_devices & autoconf_netxml_devices (?)
- [ ] Apparmor & security
- [ ] Add more translations (make a doc section!)
- [ ] Dev & users feedback integration, issues fix and polishing

### Beta:
- Aim:
- Improved reactivity (no more dual loop), lower footprint (CPU & RAM) and clean code
- Improved reactivity (no more dual loop), lower footprint (CPU & RAM) and clean code (no more shell hack)
- Requirements/solutions:
- Finalize upstream SmartNUT: https://github.com/networkupstools/nut/projects/3
- Switch SmartNUT Add-on to upstream SmartNUT
Expand Down
15 changes: 13 additions & 2 deletions smartnut/rootfs/etc/cont-init.d/smartnut.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ if bashio::config.true 'autoconf_usb_devices' ;then
bashio::log.info "Autodetecting and configuring USB devices"
nut-scanner -U >> "${UPS_CONF}"
bashio::log.info "=> OK"
# FIXME: device name hack! (nutdev1 => nutdev-usb1)
fi

# Process manual edits
Expand Down Expand Up @@ -80,16 +81,26 @@ if bashio::config.true 'autoconf_remote_nut_devices' ;then
#nut-scanner -A

# Or using classic method...
# FIXME: requires network params
nut-scanner -O -m 192.168.1.1/24
# FIXME: get network params ; for now, try a sane default
nut-scanner -O -m 192.168.1.1/24 >> "${UPS_CONF}"

# NUT remote support hack! need upstream fix
# FIXME: + >> "${UPS_CONF}"
# + cd /lib/nut; ln -s dummy-ups nutclient
# FIXME: device name hack! (nutdev1 => nutdev-nut1)
bashio::log.info "=> OK"
# FIXME: sanity check -s
# test_config_file_and_print()
fi

# FIXME:
# autoconf_snmp_devices
# nut-scanner -S -m 192.168.1.1/24
# FIXME: device name hack! (nutdev1 => nutdev-snmp1)
#
# autoconf_netxml_devices
# nut-scanner -M -m 192.168.1.1/24
# FIXME: device name hack! (nutdev1 => nutdev-xml1)

# MQTT config
bashio::log.info "Configuring MQTT..."
Expand Down

0 comments on commit 0fd9241

Please sign in to comment.