Re: [Nut-upsuser] building on Solus
Hi Charles, I installed all the components according to the readme. I also ran python -c 'import sys; print sys.path' Then Copy PyNUT.py to that directory. Unfortunately I couldn't get it to work. For now I am happy to have a graceful shut-down. Thanks for your help. On 18/09/17 12:00, Charles Lepple wrote: On Sep 17, 2017, at 9:39 PM, MTS wrote: I am looking at the readme in /scripts/python but am unsure how to proceed. To be honest, the install process for the GUI is pretty much "install the distro package", due to the additional dependencies. (I have been trying to install some Python GUI modules from PyPI for another project, and the .deb packages seem way cleaner.) To install the PyNUT module, look for the 'site-packages' directory in the output of this command: python -c 'import sys; print sys.path' Copy PyNUT.py to that directory. (The Debian/Ubuntu/Mint way is to put modules in python-support, then the postinst does some magic to compile the modules into the site-packages for each of the Python versions that are installed.) To run the NUT-Monitor GUI, you will need PyGTK. For help there, you may need to ask on a Solus list or forum. ___ Nut-upsuser mailing list Nut-upsuser@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsuser
Re: [Nut-upsuser] building on Solus
On Sep 17, 2017, at 9:39 PM, MTS wrote: > > I am looking at the readme in /scripts/python but am unsure how to proceed. To be honest, the install process for the GUI is pretty much "install the distro package", due to the additional dependencies. (I have been trying to install some Python GUI modules from PyPI for another project, and the .deb packages seem way cleaner.) To install the PyNUT module, look for the 'site-packages' directory in the output of this command: python -c 'import sys; print sys.path' Copy PyNUT.py to that directory. (The Debian/Ubuntu/Mint way is to put modules in python-support, then the postinst does some magic to compile the modules into the site-packages for each of the Python versions that are installed.) To run the NUT-Monitor GUI, you will need PyGTK. For help there, you may need to ask on a Solus list or forum. ___ Nut-upsuser mailing list Nut-upsuser@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsuser
Re: [Nut-upsuser] building on Solus
Hi Charles, Can you give any instructions for installing the NutMonitor. I am looking at the readme in /scripts/python but am unsure how to proceed. I know absolutely nothing about python. Is there no install process for this? On 18/09/17 11:32, Charles Lepple wrote: On Sep 17, 2017, at 6:33 PM, MTS wrote: I am using the same configs as I have in Linux Mint. What do I need to change here? Sounds like this worked itself out, but if you change upsd.users in the future, you will need to reload (sudo upsd -c reload) or restart upsd. ___ Nut-upsuser mailing list Nut-upsuser@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsuser
Re: [Nut-upsuser] building on Solus
On Sep 17, 2017, at 6:33 PM, MTS wrote: > > I am using the same configs as I have in Linux Mint. What do I need to change > here? Sounds like this worked itself out, but if you change upsd.users in the future, you will need to reload (sudo upsd -c reload) or restart upsd. ___ Nut-upsuser mailing list Nut-upsuser@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsuser
Re: [Nut-upsuser] building on Solus
Hi Charles, I finally succeeded in getting a successful shutdown. From upssched.conf: # mandatory fields that must be set before AT commands PIPEFN /var/run/nut/upssched.pipe LOCKFN /var/run/nut/upssched.lock I had to create /var/run/nut directory. Owned by ups, group nut. Then it all worked fine. Seems the only thing left to do is to try and follow the readme instructions in the scripts folder for the nut monitor. It didn't install this, unlike the Linux Mint install which did. On 17/09/17 22:12, Charles Lepple wrote: On Sep 17, 2017, at 3:26 AM, MTS wrote: 0.003814Trying to connect to UPS [defender@localhost] 0.004327Login on UPS [defender@localhost] failed - got [ERR ACCESS-DENIED] The MONITOR line in upsmon.conf needs to match a NUT user in upsd.users. http://networkupstools.org/docs/man/upsmon.conf.html http://networkupstools.org/docs/man/upsd.users.html Looks like you are using this as a master system (UPS is directly connected, and upsmon shuts down that system), so the appropriate NUT user needs "upsmon master" in upsd.users. Note that the NUT users listed in upsd.users do not need to correspond to actual system users - think of them more as roles. If you add a slave system that connects over the network, you might not want it to be able to shut down the master, so you would use a different NUT username with "upsmon slave" privileges. ___ Nut-upsuser mailing list Nut-upsuser@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsuser
Re: [Nut-upsuser] building on Solus
Hi Charles, Not getting error re login for upsmon now. When turning off power I am getting the following failed error. Sep 18 10:35:24 solus upsmon[685]:*UPS defender@localhost on battery* Sep 18 10:35:32 solus upssched[1261]:*Failed to connect to parent and failed to create parent: No such file or directory* Sep 18 10:35:44 solus upsmon[685]:*UPS defender@localhost on line power* Is this another permission issue. upssched.conf root:nut 640 CMDSCRIPT /usr/etc/upsShutdownNow.sh # mandatory fields that must be set before AT commands PIPEFN /var/run/nut/upssched.pipe LOCKFN /var/run/nut/upssched.lock # the timers, here 120 sec after the ONBATT (ups on battery) event AT ONBATT * START-TIMER onbatt 120 # cancel the countdown if power is back AT ONLINE * CANCEL-TIMER onbatt Note I didn't have /var/run/nut folder so created one. On 17/09/17 22:12, Charles Lepple wrote: On Sep 17, 2017, at 3:26 AM, MTS wrote: 0.003814Trying to connect to UPS [defender@localhost] 0.004327Login on UPS [defender@localhost] failed - got [ERR ACCESS-DENIED] The MONITOR line in upsmon.conf needs to match a NUT user in upsd.users. http://networkupstools.org/docs/man/upsmon.conf.html http://networkupstools.org/docs/man/upsd.users.html Looks like you are using this as a master system (UPS is directly connected, and upsmon shuts down that system), so the appropriate NUT user needs "upsmon master" in upsd.users. Note that the NUT users listed in upsd.users do not need to correspond to actual system users - think of them more as roles. If you add a slave system that connects over the network, you might not want it to be able to shut down the master, so you would use a different NUT username with "upsmon slave" privileges. ___ Nut-upsuser mailing list Nut-upsuser@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsuser
Re: [Nut-upsuser] building on Solus
Hi Charles, I am using the same configs as I have in Linux Mint. What do I need to change here? ups.conf [defender] driver = blazer_usb port = auto pollinterval = 5 desc = "PowerShield Defender 650" upsd default.battery.voltage.high = 13.70 default.battery.voltage.low = 10.40 upsd.users [local_mon] password = allowfrom = localhost actions = set actions = fsd instcmds = all upsmon master upsmon.conf MONITOR defender@localhost 1 local_mon *** master On 17/09/17 22:12, Charles Lepple wrote: On Sep 17, 2017, at 3:26 AM, MTS wrote: 0.003814Trying to connect to UPS [defender@localhost] 0.004327Login on UPS [defender@localhost] failed - got [ERR ACCESS-DENIED] The MONITOR line in upsmon.conf needs to match a NUT user in upsd.users. http://networkupstools.org/docs/man/upsmon.conf.html http://networkupstools.org/docs/man/upsd.users.html Looks like you are using this as a master system (UPS is directly connected, and upsmon shuts down that system), so the appropriate NUT user needs "upsmon master" in upsd.users. Note that the NUT users listed in upsd.users do not need to correspond to actual system users - think of them more as roles. If you add a slave system that connects over the network, you might not want it to be able to shut down the master, so you would use a different NUT username with "upsmon slave" privileges. ___ Nut-upsuser mailing list Nut-upsuser@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsuser
Re: [Nut-upsuser] building on Solus
On Sep 17, 2017, at 3:26 AM, MTS wrote: > >0.003814Trying to connect to UPS [defender@localhost] >0.004327Login on UPS [defender@localhost] failed - got [ERR > ACCESS-DENIED] The MONITOR line in upsmon.conf needs to match a NUT user in upsd.users. http://networkupstools.org/docs/man/upsmon.conf.html http://networkupstools.org/docs/man/upsd.users.html Looks like you are using this as a master system (UPS is directly connected, and upsmon shuts down that system), so the appropriate NUT user needs "upsmon master" in upsd.users. Note that the NUT users listed in upsd.users do not need to correspond to actual system users - think of them more as roles. If you add a slave system that connects over the network, you might not want it to be able to shut down the master, so you would use a different NUT username with "upsmon slave" privileges. ___ Nut-upsuser mailing list Nut-upsuser@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsuser
Re: [Nut-upsuser] building on Solus
Hi Charles, Thanks for your help. Seems to be mostly ok except am getting error access denied. See below. I see from searching this is a common error but so far I can't find a fix. This is how I configured things before make and install. created group nut nut:x:103: created system user ups with group nut. ups:x:123:103::/home/ups:/bin/bash Create statepath directory. sudo mkdir -p /var/state/ups sudo chmod 0770 /var/state/ups sudo chown root:nut /var/state/ups ./configure --prefix=/usr --with-usb --with-user=ups --with-group=nut --with-udev-dir=/etc/udev --with-drivers=blazer_usb Had to enable both these services. They weren't enabled by default. sudo systemctl enable nut-server sudo systemctl enable nut-monitor $ sudo /usr/sbin/upsmon -DD Network UPS Tools upsmon 2.7.4 0.00 fopen /var/run/upsmon.pid: No such file or directory 0.000143 UPS: defender@localhost (master) (power value 1) 0.000270 Using power down flag file /etc/killpower 0.000422 debug level is '2' 0.003814 Trying to connect to UPS [defender@localhost] 0.004327 Login on UPS [defender@localhost] failed - got [ERR ACCESS-DENIED] 5.004467 pollups: defender@localhost 5.004630 parse_status: [OL] 10.004764 pollups: defender@localhost 10.004922 parse_status: [OL] 15.005048 pollups: defender@localhost 15.005208 parse_status: [OL] 20.005319 pollups: defender@localhost 20.005485 parse_status: [OL] 25.005600 pollups: defender@localhost 25.005762 parse_status: [OL] ^C 25.379863 Signal 2: exiting 25.379899 Dropping connection to UPS [defender@localhost] upsmon.pid is in /run directory. upsmon is looking for it in /var/run. /var/state/ups contains blazer_usb-defender, blazer_usb-defender.pid and upsd.pid. Any help would be greatly appreciated. On 17/09/17 02:28, Charles Lepple wrote: On Sep 15, 2017, at 11:15 PM, MTS wrote: Hi, I thought it might be problematic. I am really frustrated I cannot get it working on Solus. I use Solus way more than Mint these days and it would be nice to have NUT working. If you describe the problems you are having when trying to build it, maybe we can help. Please use reply-all to keep the list CC'd. ___ Nut-upsuser mailing list Nut-upsuser@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsuser
Re: [Nut-upsuser] building on Solus (was: Flatpak request)
On Sep 15, 2017, at 11:15 PM, MTS wrote: > > Hi, > > I thought it might be problematic. I am really frustrated I cannot get it > working on Solus. > I use Solus way more than Mint these days and it would be nice to have NUT > working. If you describe the problems you are having when trying to build it, maybe we can help. Please use reply-all to keep the list CC'd. ___ Nut-upsuser mailing list Nut-upsuser@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsuser