Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
homeautomation:nut [2024/10/31 10:02] – created willy | homeautomation:nut [Unknown date] (current) – removed - external edit (Unknown date) 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Network UPS Tools ====== | ||
- | The primary goal of the Network UPS Tools ([[https:// | ||
- | |||
- | NUT provides many control and monitoring features, with a uniform control and management interface. If you are just getting acquainted with NUT, that page also explains the technical design and some possible set-ups. | ||
- | |||
- | If you have an UPS at home, the chances it works with NUT are very high. Indeed brand devices have better chances to be actually supported, but at least very basic support should be available for any UPS with an USB connection. There are also UPS that support NUT over the network directly, but they are usually much more expensive than home devices. | ||
- | |||
- | |||
- | ==== Installing NUT ==== | ||
- | |||
- | NUT is a software that you need to install on a computer (or a rPi) which is located nearby the UPS itself and connected to it via USB cable. | ||
- | |||
- | For Gentoo, there is very detailed [[https:// | ||
- | |||
- | After you have installed the packages, the following command will show you if your UPS is supported: | ||
- | <code bash> | ||
- | # nut-scanner | ||
- | Scanning USB bus. | ||
- | No start IP, skipping SNMP | ||
- | No start IP, skipping NUT bus (old connect method) | ||
- | Scanning NUT simulation devices. | ||
- | Scanning NUT bus (avahi method). | ||
- | [nutdev-usb1] | ||
- | driver = " | ||
- | port = " | ||
- | vendorid = " | ||
- | productid = " | ||
- | product = "Eaton 3S" | ||
- | serial = " | ||
- | vendor = " | ||
- | # bus = " | ||
- | # device = " | ||
- | # busport = " | ||
- | </ | ||
- | |||
- | Note down this output, because this will also become your device setup later on. | ||
- | |||
- | |||
- | ==== Configuring NUT ==== | ||
- | |||
- | What you need to do is setup a NUT server on every device connected to a distinct UPS in your home. This is achieved by editing the following text configuration files: | ||
- | * / | ||
- | * / | ||
- | * / | ||
- | * / | ||
- | * / | ||
- | * / | ||
- | |||
- | Here is my example config: | ||
- | |||
- | **nut.conf** is used to configure the operating mode, and you want a // | ||
- | <file - nut.conf> | ||
- | MODE=netserver | ||
- | </ | ||
- | |||
- | **ups.conf** define the UPS connected to your server, and it's a copy-paste of the **nut-scanner** output: | ||
- | <file - ups.conf> | ||
- | [UPS-server] | ||
- | driver = " | ||
- | port = " | ||
- | vendorid = " | ||
- | productid = " | ||
- | product = "Eaton 3S" | ||
- | serial = " | ||
- | vendor = " | ||
- | bus = " | ||
- | </ | ||
- | please note that i have renamed the device with something more meaningful. | ||
- | |||
- | **upds.conf** contains some special setup for the daemon that manages the UPS data. In general you don't need to edit it. | ||
- | |||
- | **upsd.users** defines the users that can access your UPS data. You should define as follows: | ||
- | <file - upsd.users> | ||
- | [monmaster] | ||
- | password = monmaster | ||
- | upsmon master | ||
- | |||
- | [monslave] | ||
- | password = monslave | ||
- | upsmon slave | ||
- | </ | ||
- | it doesn' | ||
- | |||
- | **upsmon.conf** configure your NUT monitor, you should not need to change it from defaults. | ||
- | |||
- | **upssched.conf** define what your server sohuld do on UPS events, customize as you need. My default is: | ||
- | <file - upssched.conf> | ||
- | AT ONBATT * START-TIMER onbatt 300 | ||
- | AT ONLINE * CANCEL-TIMER onbatt online | ||
- | AT LOWBATT * EXECUTE onbatt | ||
- | AT COMMBAD * START-TIMER commbad 30 | ||
- | AT COMMOK * CANCEL-TIMER commbad commok | ||
- | AT NOCOMM * EXECUTE commbad | ||
- | AT SHUTDOWN * EXECUTE powerdown | ||
- | AT REPLBATT * EXECUTE replacebatt | ||
- | </ | ||
- | |||
- | |||
- | |||
- | |||
- | ==== Home Assistant ==== |