[Nut-upsdev] Liebert ESP II driver
Arjen de Korte
nut+devel at de-korte.org
Mon Jul 19 10:33:53 UTC 2010
Citeren Robert Jobbagy <jobbagy.robert op gmail.com>:
> first:
>
> What's wrong with this:
>
> dstate_setinfo("battery.runtime.low","%d",3500);
>
> it doesnt work.
If you put this in the right location, this will work. But without
context, I can't tell if you did. Also remember that the
dstate_setinfo() function is only for setting variables in the driver
that are read by the upsd server. It won't magically update these
values in the UPS. That should be done in the setvar / instcmd
functions (that are currently empty in this driver) and which
implement a UPS specific method to change settings or initiate a
command respectively. Please read *all* the developer documentation
before asking for help or start hacking in the sources.
> second:
>
> If I figure out how can I shutdown PC and UPS that ups shutdown too and if I
> plug back the power PC start automatic.
> I put this command in upsdrv_shutdown, is it right?
Maybe.
> Or I need put it in other function?
It depends on when you need to send this command. As far as I can tell
the UPS will now shutdown automatically when the power fails. Since we
don't have a functional upsdrv_shutdown() function, I guess that we
should tell the UPS not to do this *before* a power failure hits us.
In that case, the command should be in upsdrv_initinfo(). However, if
you need to send it right before the UPS should be brought down, it
should be in upsdrv_shutdown(). I can't tell, I have no idea how this
works on your UPS.
Best regards, Arjen
--
Please keep list traffic on the list
More information about the Nut-upsdev
mailing list