Re: [Nut-upsuser] NUT supporting Modbus TCP

2017-06-29 Thread Sergei O. Naumov
Yeah, I have its datasheet (it's a Xantrex XW invertor by the way). I do not 
know why creating a more-or-less generic driver is an issue. Of course, there 
are Modbus beasts that can scare everyone but mostly one would need to read 
either intreger or float numbers out of Modbus registers in order to decide 
whether or not to start or stop the shutdown process.

24 июня 2017 г. 19:25:14 GMT+03:00, Charles Lepple  пишет:
>On Jun 24, 2017, at 10:57 AM, Sergei Naumov wrote:
>
>> I was wonering if there is a driver that supports communicating with
>a Modbus aware device over IP. I have a solar/wind invertor that can
>broadcast its state and I would like to monitor the batteries. If they
>discarge to a certain voltage or come to a defined state, I would
>perform a shutdown. All of this information id provided in Modbus
>holding registers. This could of course be done placing a
>Modbus-to-SNMP gateway but they seem to be somewhat pricey.
>
>There is a GitHub issue tracking the general idea of a NUT MODBUS
>driver: https://github.com/networkupstools/nut/issues/50
>
>The skeleton code on the referenced branch uses libmodbus, which as I
>understand, can communicate over TCP.
>
>However, since you have a specific device in mind, you might be better
>served by creating a new driver based on the phoenixcontact_modbus
>driver (which also uses libmodbus):
>https://github.com/networkupstools/nut/pull/404 and
>https://github.com/networkupstools/nut/blob/7bd8971db89eec51fa55bbb75c8a54ca4a46e7dc/drivers/phoenixcontact_modbus.c
>
>Do you have a datasheet or protocol document for this device?
>___
>Nut-upsuser mailing list
>Nut-upsuser@lists.alioth.debian.org
>http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsuser

-- 
Простите за краткость, создано в K-9 Mail.___
Nut-upsuser mailing list
Nut-upsuser@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsuser

Re: [Nut-upsuser] Help with Elite 800VA usb UPS

2017-06-29 Thread Charles Lepple
On Jun 29, 2017, at 6:52 AM, Andrea de Lutti wrote:
>>> Anyway I still not receive any email on any test (power cord disconnected 
>>> and/or reconnected for example)
>> 
>> Oh, I misinterpreted "working script" as a script that was sending email, 
>> rather than work-in-progress. Does that same command work from the command 
>> line? Can you add something like "logger" before the mailx line to be sure 
>> that the script is executing properly? Be sure to "chmod a+x" the script.
>> 
> ​Yep, the script works flawlessy with a command line. It is a "modified" 
> script from other jobs, and I receive daily all the emails from them​

Bear in mind that upsmon runs as user "nut" on Ubuntu, as does the NOTIFYCMD 
script. At one point, you said that the script is in /root, which is not 
commonly readable by other users. Does the script work if you move it to, say, 
/usr/local/bin?

(With Ubuntu 16.04, there should be some error messages from upsmon in 
'journalctl' referencing permissions.)

>> 
>> I forget if I mentioned this earlier, but for testing notifications, you can 
>> use the dummy-ups driver:
>> 
>>http://networkupstools.org/docs/man/dummy-ups.html
>> 
>> The timer example will simulate the OL-OB-LB transition.
>> 
> ​Maybe I have missing someting. I have exported my configuration to a .dev 
> file, and then used for dummy ups, configured as dummy. Do i need to make 
> circular tests (timer configuration) or may I do them manually? Just beacuse 
> the only command allowed in dummy mode (upscmd -l dummy@artu) is load.off
> 

Under the Bugs heading, the man page says "Instant commands are not yet 
supported in Dummy Mode..." - one of the use cases was automated developer 
testing of NUT, and there isn't much use in simulating all of the commands in 
that case. "load.off" is probably worth implementing at some point for user 
testing.

So for your use case, the timers would probably be the easiest way with the 
current code.
___
Nut-upsuser mailing list
Nut-upsuser@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsuser

Re: [Nut-upsuser] Help with Elite 800VA usb UPS

2017-06-29 Thread Andrea de Lutti
> > , but when in battery test I have OL CAL status: it would be good to
> have the result.
>
> "OL CAL" or "OB CAL"? If the UPS is powering the load from the battery
> during calibration, it should report "OB CAL". The ONBATT handler in
> NOTIFYCMD can check for CAL at that point.
>
> I don't think we considered the case where CAL is paired with OL.
>
> ​I confirm it, during battery testing I have OL CAL​



> > Anyway I still not receive any email on any test (power cord
> disconnected and/or reconnected for example)
>
> Oh, I misinterpreted "working script" as a script that was sending email,
> rather than work-in-progress. Does that same command work from the command
> line? Can you add something like "logger" before the mailx line to be sure
> that the script is executing properly? Be sure to "chmod a+x" the script.
>

​Yep, the script works flawlessy with a command line. It is a "modified"
script from other jobs, and I receive daily all the emails from them​

>
> I forget if I mentioned this earlier, but for testing notifications, you
> can use the dummy-ups driver:
>
>http://networkupstools.org/docs/man/dummy-ups.html
>
> The timer example will simulate the OL-OB-LB transition.
>

​Maybe I have missing someting. I have exported my configuration to a .dev
file, and then used for dummy ups, configured as dummy. Do i need to make
circular tests (timer configuration) or may I do them manually? Just
beacuse the only command allowed in dummy mode (upscmd -l dummy@artu) is
load.off


> > Does the runtime calibration test alter the values of ups.conf? Or do I
> have to change it manually? Which would be the right procedure for changing
> the battery for calibrating NUT (over the manufacturer's suggestions)?
>
> The automatic calibration/battery test invoked by upscmd (or the UPS front
> panel button, if any) is for the UPS low battery warning.
>
> The manual calibration ups.conf parameters are necessary (and need to be
> maintained separately) because Qx-based protocols do not all report the
> state-of-charge as calculated by the UPS.
>
> I would recommend both forms of calibration after replacing the battery.
>
> ​Ok, thanks. I will replace the battery and test it​
___
Nut-upsuser mailing list
Nut-upsuser@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsuser