Discussion:
[Nut-upsuser] how to install NUT on raspberry pi
Flavio.Boschiggia
2014-09-08 06:26:35 UTC
Permalink
Hi.
I'm an italian user.
I have a nome ups, AROS Spring RT1500.
I would like connect it by usb on my server raspberry pi.
Someone knows a simple tutorial to send me? I did some test without success.....
Thanks
Flavio
Charles Lepple
2014-09-08 12:21:00 UTC
Permalink
Post by Flavio.Boschiggia
Hi.
I'm an italian user.
I have a nome ups, AROS Spring RT1500.
I would like connect it by usb on my server raspberry pi.
Someone knows a simple tutorial to send me? I did some test without success.....
Thanks
Flavio
We try to collect tutorial links here: http://www.networkupstools.org/documentation.html#_offsite_links

but it doesn't look like we have any in Italian yet.

(Also, rather than have someone write a another tutorial, I think it would be better for us to learn what parts of the NUT documentation need to be improved.)

What output do you get from 'sudo lsusb -v'?
--
Charles Lepple
clepple at gmail
Roger Price
2014-09-08 13:03:43 UTC
Permalink
Post by Charles Lepple
Post by Flavio.Boschiggia
I would like connect it by usb on my server raspberry pi.
Someone knows a simple tutorial to send me? I did some test without success.....
http://www.networkupstools.org/documentation.html#_offsite_links
In addition to the many writeups by NUT users on that page, there is also
a fully worked and commented example of the NUT configuration files at
http://rogerprice.org/NUT.html This setup has been tested with the
openSUSE distribution.

Charles: Since there is currently no user writeup for openSUSE in your
list, maybe it would be useful to add this reference.

Roger
Charles Lepple
2014-09-08 13:38:23 UTC
Permalink
Charles: Since there is currently no user writeup for openSUSE in your list, maybe it would be useful to add this reference.
Roger, thanks for the reminder - I thought we had added that link a while ago. It's committed to Git now, but we need to untangle a few things before it will show up on the web server.
--
Charles Lepple
clepple at gmail
Steve Ballantyne
2014-09-08 14:00:46 UTC
Permalink
Hello all,

Here is build instructions for putting NUT on a Raspberry Pi.

Charles - Feel free to put this on your docs list.

# Do an rpi-update to prevent USB strangeness

#some dependencies from repo
sudo apt-get -y install m4 libtool libudev-dev automake

#fixing autoconf for later
sudo ln -s /usr/share/autoconf/Autom4te /usr/local/share/autoreconf/Autom4te
sudo ln -s /usr/bin/autom4te /usr/local/bin/autom4te
sudo ln -s /usr/bin/autoconf /usr/local/bin/autoconf
sudo ln -s /usr/bin/autoheader /usr/local/bin/autoheader

#installing nut dependencies
mkdir nut-depends
cd ./nut-depends

# acscripts from source
wget http://sourceforge.net/projects/acscripts.berlios/files/acscripts-0.0.1.13.tar.bz2
tar xf acscripts-0.0.1.13.tar.bz2
sudo mkdir /usr/lib/scripts
sudo mv acscripts-0.0.1.13 /usr/lib/scripts/acscripts

#autoreconf from source
wget http://sourceforge.net/projects/autoreconf/files/0.0.0.1/autoreconf-0.0.0.1.tar.bz2
tar xf autoreconf-0.0.0.1.tar.bz2
cd autoreconf-0.0.0.1
./configure && sudo make install
cd ..

#libusb and libusb-compat from source
wget "http://downloads.sourceforge.net/project/libusb/libusb-1.0/libusb-1.0.18/libusb-1.0.18.tar.bz2?r=http%3A%2F%2Fwww.libusb.org%2F&ts=1404210716&use_mirror=softlayer-ams"
-O libusb-1.0.18.tar.bz2
tar -xjf libusb-1.0.18.tar.bz2
cd libusb-1.0.18
./configure && sudo make install
cd ..
wget "http://downloads.sourceforge.net/project/libusb/libusb-compat-0.1/libusb-compat-0.1.4/libusb-compat-0.1.4.tar.bz2?r=http%3A%2F%2Fwww.libusb.org%2F&ts=1404210428&use_mirror=softlayer-ams"
-O libusb-compat-0.1.4.tar.bz2
tar -xjf libusb-compat-0.1.4.tar.bz2
cd libusb-compat-0.1.4
./configure && sudo make install
cd ..

#get back to home root
cd ..

#download nut from dev repo
git clone git://github.com/networkupstools/nut.git
cd nut

echo "Running autogen ..."
./autogen.sh

#create some groups and directories and mod some persmissions
sudo groupadd nut
sudo usermod -a -G nut pi
sudo usermod -a -G nut root
sudo mkdir /var/run/nut
sudo chown root:nut /var/run/nut
sudo mkdir -p /var/state/ups
sudo chown root:nut /var/state/ups
sudo chmod 0770 /var/state/ups

#now we configure and make it (note that I built it for TrippLite,
make sure you change it to what you need!)
./configure --without-doc --with-drivers=tripplite_usb,upsdrvctl

#still tries to build docs, even though I said NO to docs
cp Makefile Makefile.orig
sed -i 's/include common clients conf data tools docs drivers/include
common clients conf data tools drivers/' Makefile

make
sudo make install


Steve Ballantyne
Network Engineer
MCSE/MCDST; Novell CLA; LPIC-1; CTT+; A+; Network+; Linux+; Server+;
I-Net+; Security+; SonicWALL CSSA
Post by Charles Lepple
Charles: Since there is currently no user writeup for openSUSE in your list, maybe it would be useful to add this reference.
Roger, thanks for the reminder - I thought we had added that link a while ago. It's committed to Git now, but we need to untangle a few things before it will show up on the web server.
--
Charles Lepple
clepple at gmail
_______________________________________________
Nut-upsuser mailing list
Nut-upsuser at lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsuser
flavio
2014-09-26 21:44:32 UTC
Permalink
Hi Steve.
Thanks for your tutorial.
I was following on my raspberry pi with raspbian os.
i have an error, when i run " sudo ln -s /usr/bin/autom4te
/usr/local/bin/autom4te " i have this error messagge " ln: failed to
create symbolic link `/usr/local/bin/autom4te': File exists ".
Sorry but i'm not an expert as you....
How can i fix it?
It's important?

Thanks!
Steve Ballantyne
2014-09-27 11:53:17 UTC
Permalink
Hello Flavio,
Did any of the next steps after that one fail on you? They may have
updated that package to create that link for you - or maybe they moved
the binary to that location in an update. In that case, you can just
disregard that error and move along with the installation.

Steve Ballantyne
Network Engineer
MCSE/MCDST; Novell CLA; LPIC-1; CTT+; A+; Network+; Linux+; Server+;
I-Net+; Security+; SonicWALL CSSA
Post by flavio
Hi Steve.
Thanks for your tutorial.
I was following on my raspberry pi with raspbian os.
i have an error, when i run " sudo ln -s /usr/bin/autom4te
/usr/local/bin/autom4te " i have this error messagge " ln: failed to
create symbolic link `/usr/local/bin/autom4te': File exists ".
Sorry but i'm not an expert as you....
How can i fix it?
It's important?
Thanks!
_______________________________________________
Nut-upsuser mailing list
Nut-upsuser at lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsuser
flavio
2014-09-28 20:22:02 UTC
Permalink
Hi Steve
thanks for your answer.
I follow your tutorial untill this instruction:

wget "http://downloads.sourceforge.net/project/libusb/libusb-1.0/libusb-
1.0.18/libusb-1.0.18.tar.bz2?
r=http%3A%2F%2Fwww.libusb.org%2F&ts=1404210716&use_mirror=softlayer-ams"
-O libusb-1.0.18.tar.bz2

in my opiniono there are 2 " that are not needed and i when -O libusb-
1.0.18.tar.bz2 is not recognize from shell ( maybe because the
instruction is divided in two lines ).

I removed " and put all instruction in 1 line but shell freeze itself.
This is the output:
pi at raspberrypi ~ $ wget
http://downloads.sourceforge.net/project/libusb/libusb-1.0/libusb-
1.0.18/libusb-1.0.18.tar.bz2?
r=http%3A%2F%2Fwww.libusb.org%2F&ts=1404210716&use_mirror=softlayer-ams
-O libusb-1.0.18.tar.bz2
[1] 3158
[2] 3159
-bash: -O: command not found
[2]+ Done ts=1404210716
pi at raspberrypi ~ $ --2014-09-28 20:14:58--
http://downloads.sourceforge.net/project/libusb/libusb-1.0/libusb-
1.0.18/libusb-1.0.18.tar.bz2?r=http%3A%2F%2Fwww.libusb.org%2F
Resolving downloads.sourceforge.net (downloads.sourceforge.net)...
216.34.181.59
Connecting to downloads.sourceforge.net
(downloads.sourceforge.net)|216.34.181.59|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: http://netcologne.dl.sourceforge.net/project/libusb/libusb-
1.0/libusb-1.0.18/libusb-1.0.18.tar.bz2 [following]
--2014-09-28 20:14:59--
http://netcologne.dl.sourceforge.net/project/libusb/libusb-1.0/libusb-
1.0.18/libusb-1.0.18.tar.bz2
Resolving netcologne.dl.sourceforge.net
(netcologne.dl.sourceforge.net)... 78.35.24.46, 2001:4dd0:1234:6::5f
Connecting to netcologne.dl.sourceforge.net
(netcologne.dl.sourceforge.net)|78.35.24.46|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 502160 (490K) [application/octet-stream]
Saving to: `libusb-1.0.18.tar.bz2?r=http:%2F%2Fwww.libusb.org%2F'

100%
[=======================================================================
========================================================================
========>] 502,160 204K/s in 2.4s

2014-09-28 20:15:01 (204 KB/s) - `libusb-1.0.18.tar.bz2?
r=http:%2F%2Fwww.libusb.org%2F' saved [502160/502160]


i waited several minutes but i had to force stop process with Ctrl-x .
Any idea?
Thanks
Flavio
Kristian Rasmussen
2014-09-28 20:32:16 UTC
Permalink
Post by Steve Ballantyne
wget "http://downloads.sourceforge.net/project/libusb/libusb-1.0/libusb-
1.0.18/libusb-1.0.18.tar.bz2?
r=http%3A%2F%2Fwww.libusb.org%2F&ts=1404210716&use_mirror=softlayer-ams"
-O libusb-1.0.18.tar.bz2
in my opiniono there are 2 " that are not needed and i when -O libusb-
1.0.18.tar.bz2 is not recognize from shell ( maybe because the
instruction is divided in two lines ).
I removed " and put all instruction in 1 line but shell freeze itself.
The double quotes are needed because the download string contains
characters that would otherwise be interpreted by the shell. Removing
the quotes caused the shell to cut the URL short at the first ampersand
(&) and put the process into the background.

The entire command should be on one continuous line, and the double
quotes need to stay.
Steve Ballantyne
2014-09-29 01:30:22 UTC
Permalink
On Sun, Sep 28, 2014 at 4:32 PM, Kristian Rasmussen
Post by Kristian Rasmussen
The entire command should be on one continuous line, and the double
quotes need to stay.
I probably should have posted this as a pastebin link to retain
carriage returns and such. Mailing lists have a way of mangling stuff
like this. :-)

Try this: http://pastebin.com/2hTBU8XF

Steve Ballantyne
Network Engineer
MCSE/MCDST; Novell CLA; LPIC-1; CTT+; A+; Network+; Linux+; Server+;
I-Net+; Security+; SonicWALL CSSA
Charles Lepple
2014-09-29 03:03:41 UTC
Permalink
Post by Steve Ballantyne
On Sun, Sep 28, 2014 at 4:32 PM, Kristian Rasmussen
Post by Kristian Rasmussen
The entire command should be on one continuous line, and the double
quotes need to stay.
I probably should have posted this as a pastebin link to retain
carriage returns and such. Mailing lists have a way of mangling stuff
like this. :-)
Try this: http://pastebin.com/2hTBU8XF
I'm still confused as to why the Debian packages aren't sufficient to build NUT on a Raspbian.

Matus UHLAR's suggestion of "apt-get build-dep nut" should work, then you can skip to the "git clone" step.
--
Charles Lepple
clepple at gmail
Flavio.Boschiggia
2014-09-30 18:41:48 UTC
Permalink
Hi
I follow all the instructions without problem.
Now how can I test it?
Ups is connected to raspberry by ups.
I have an Ubuntu 14.04 client on my lan.
Thanks
Flavio

-----Original Message-----
From: Nut-upsuser [mailto:nut-upsuser-bounces+flavio.boschiggia=infineon.com at lists.alioth.debian.org] On Behalf Of Steve Ballantyne
Sent: Monday, September 29, 2014 3:30 AM
To: Kristian Rasmussen
Cc: NUT List
Subject: Re: [Nut-upsuser] how to install NUT on raspberry pi
Post by Kristian Rasmussen
The entire command should be on one continuous line, and the double
quotes need to stay.
I probably should have posted this as a pastebin link to retain carriage returns and such. Mailing lists have a way of mangling stuff like this. :-)

Try this: http://pastebin.com/2hTBU8XF

Steve Ballantyne
Network Engineer
MCSE/MCDST; Novell CLA; LPIC-1; CTT+; A+; Network+; Linux+; Server+;
I-Net+; Security+; SonicWALL CSSA
Flavio.Boschiggia
2014-10-02 16:50:57 UTC
Permalink
Hi
I follow all the instructions without problem.
Now how can I test it?
Ups is connected to raspberry by ups.
I have an Ubuntu 14.04 client on my lan.
Thanks
Flavio

-----Original Message-----
From: Nut-upsuser [mailto:nut-upsuser-bounces+flavio.boschiggia=infineon.com at lists.alioth.debian.org] On Behalf Of Steve Ballantyne
Sent: Monday, September 29, 2014 3:30 AM
To: Kristian Rasmussen
Cc: NUT List
Subject: Re: [Nut-upsuser] how to install NUT on raspberry pi
Post by Kristian Rasmussen
The entire command should be on one continuous line, and the double
quotes need to stay.
I probably should have posted this as a pastebin link to retain carriage returns and such. Mailing lists have a way of mangling stuff like this. :-)

Try this: http://pastebin.com/2hTBU8XF

Steve Ballantyne
Network Engineer
MCSE/MCDST; Novell CLA; LPIC-1; CTT+; A+; Network+; Linux+; Server+;
I-Net+; Security+; SonicWALL CSSA
flavio
2014-10-02 11:13:32 UTC
Permalink
Hi Steve
I follow all the instructions from here http://pastebin.com/2hTBU8XF
without problem.
Now how can I test it?
Ups is connected to raspberry by usb.
I have an Ubuntu 14.04 client on my lan.
Thanks
Flavio
Charles Lepple
2014-10-03 02:20:13 UTC
Permalink
Post by Flavio.Boschiggia
Now how can I test it?
Ups is connected to raspberry by usb.
I have an Ubuntu 14.04 client on my lan.
Assuming you are following either one of these sets of directions:

http://www.networkupstools.org/docs/user-manual.chunked/ar01s06.html#_basic_configuration

or http://rogerprice.org/NUT.html ,

which steps have you done already?

As requested earlier: what does "sudo lsusb -v" show?

Your UPS does not appear on this list, so I am not sure which driver you should use:

http://www.networkupstools.org/stable-hcl.html
--
Charles Lepple
clepple at gmail
flavio
2014-10-10 13:40:20 UTC
Permalink
Hi
I follow all the instructions without problem.
Now how can I test it?
Ups is connected to raspberry by ups.
I have an Ubuntu 14.04 client on my lan.
Thanks
Flavio
Roger Price
2014-10-10 13:57:52 UTC
Permalink
Post by Flavio.Boschiggia
I follow all the instructions without problem.
Now how can I test it?
Ups is connected to raspberry by ups.
I have an Ubuntu 14.04 client on my lan.
When you pull the UPS power cord from the wall to simulate a building
power failure, does the rasberry shut down? Does the UPS unit then power
off? Then, when you reconnect the UPS power cord to the wall, does the
rasberry pi power on?

Did the users receive warnings that the rasberry was about to shutdown?
Do the logs include a record of the UPS driven shutdown?

Roger

Loading...