Dear NUT developers, I am using NUT + bcmxcp + Powerware 9315. I would like to use NUT to shut down my systems if the air conditioning fails and the room get too hot. I want the same shutdown sequence as would be produced when the UPS goes on battery. The UPS has a terminal block at the front for up to six different 'building alarms'. I can connect a thermostat (35C) to the 'Alarm 1' contacts. If the room temperature reaches 35C, the thermostat contacts close, and the UPS signals 'Building Alarm 1'. I have browsed the NUT source code, and it appears that the driver itself can detect this. But it also appears that there is a commented-out alarm_init() stub function: drivers/bcmxcp.c ... bcmxcp_alarm_map[BCMXCP_ALARM_BUILDING_ALARM_1].alarm_desc = "BUILDING_ALARM_1"; ... /* alarm_init(); Alarms are not supported by NUT */ I browsed the docs: docs/new-drivers.txt: There is no official list of alarm words as of this writing, so don't use these functions until you check with the upsdev list. So I am checking with the list, to ask if the functionality that I describe above is already available with NUT or if I need to modify the driver so that a building alarm gets treated in the same way as an 'On battery' event. If I need to modify the driver, it might be as simple as my calling status_set("OB") in the right place. But this is based from ten minutes of browsing the code, so it could be naive. PS: I'd be grateful if you could copy me in any replies, not just reply 'to the list'. Cheers, Bruce
On 6/2/06, Bruce Allen <ballen@gravity.phys.uwm.edu> wrote:> If I need to modify the driver, it might be as simple as my calling > status_set("OB") in the right place. But this is based from ten minutes > of browsing the code, so it could be naive.I am not an expert on the bcmxcp driver, but to minimize changes to the rest of your setup, you may want "LB" (low battery) instead of just "on battery". You can still perform actions on the "OB" status (even after a time delay) but the usual setup is designed to keep things running for as long as possible, until the UPS says the battery is almost depleted. -- - Charles Lepple
Bruce Allen wrote: [...]> So I am checking with the list, to ask if the functionality that I > describe above is already available with NUT or if I need to modify the > driver so that a building alarm gets treated in the same way as an 'On > battery' event.I wouldn't mess with the driver. So far, there is little/no support for these additional inputs that some UPS apparently have. Since people may hook up quite different signals to them, this would inevitably mean that you would need additional configuration parameters for them to define the function. I foresee quite some additional coding needed and a lot of confusion on how to use them. Instead, it may be a lot easier to make use of the 'genericups' driver and hook up your thermostat so, that it changes the serial input line from the 'OL' the 'OB+LB' signal. This solution would not require any changes to drivers and furthermore it would be immediately clear what the reason of the shutdown is (and not 'faking' a power out/low battery event where there isn't). If you can find someone to make the necessary hardware (as simple as a DB-9 plug, one 10k resistor and a couple of meters of wire), this may be a much easier solution. Connect RI and DCD together, connect a resistor from there to RTS and the thermostat to DTR. Then, the following entry to your ups.conf file (change the port to whereever you connected this to) would be sufficient to monitor your thermostat: [thermostat] driver = genericups port = /dev/ttyS0 upstype = 1 desc = "Room temperature limit switch" Lastly, you would need some modifications to upsmon.conf to allow systems you want to shutdown to monitor the thermostat. Arjen
Apparently Analagous Threads
- [nut-commits] svn commit r3448 - trunk/drivers (extern variables)
- Is there any Asterisk controllable thermostat?
- Build error
- [nut-commits] svn commit r915 - in trunk: . drivers
- Standardized IVR UI Pattern (was: Re: Is there any Asterisk controllable thermostat?)