Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - xbb

#1
Development and Code Review / Re: APC UPS new plugin
August 11, 2022, 02:25:29 PM
Quote from: i1mran92 on August 11, 2022, 11:36:25 AM
thank you. was able to make it shutdown fully with the script.
though i dont actually see "begining Shutdown Sequest" and "apcupsd initiated shutdown" when the shutdown procees was happening. not sure why?
but atleast it is fully shutting down now.

I think only logged in users can see the broadcast messages and I'm not sure if they are logged somewhere.

You can use the logger command if you want see a message in the system log.

For example:


logger -t apcupsd "some message"


man logger, for more details
#2
Development and Code Review / Re: APC UPS new plugin
August 06, 2022, 03:35:27 PM
Quote from: i1mran92 on August 06, 2022, 01:35:42 PM
though not sure if this is normal or not, i did a test to auto shutdown.
it went through the shut down process then it stopped for me to manually reboot or shutdown

the operating system has halted
please press any key to reboot

is there anything i can do to fully shutdown the device?
thanks

apcupsd actions (not the plugin) are controlled via the /usr/local/etc/apcupsd/apccontrol script.

Weirdly the FreeBSD version uses "shutdown -h now" instead of "shutdown -p now". I cannot change that in the plugin.

As a workaround, the apccontrol scripts permits overriding the default actions by creating another script named after the action (in this case "doshutdown") inside the /usr/local/etc/apcupsd/ directory.

For example you can create the script /usr/local/etc/apcupsd/doshutdown and make it executable otherwise it wont be executed by apccontrol.


#!/usr/bin/env sh

set -e

printf "Beginning Shutdown Sequence" | wall
/sbin/shutdown -p now "apcupsd initiated shutdown"

# 99 prevents apccontrol from executing the default doshutdown action
exit 99

#3
Quote from: danderson on July 18, 2022, 07:28:29 PM

Any way in the next version we can get an alarm time delay field, or in my case all I want is a checkbox to disable the alarm, I  dont need/want it beeping.

I think you have to use the `apctest` command line tool for that, you'll need to stop the apcupsd service first.

If the UPS model is supported, it should show a menu with this option "View/Change alarm behavior"
#4
Quote from: defaultuserfoo on May 31, 2022, 09:24:34 PM
Should I use the release 0.1 from April?  Maybe scp will work ...

Yes

With curl:

curl --remote-name --location https://github.com/xbb/apcupsd/releases/download/0.1/os-apcupsd-devel-0.1.txz
#5
Quote from: defaultuserfoo on May 31, 2022, 03:00:12 PM
Thank you for making this package!

How do I install it?  When I try to download it with


curl 'https://github.com/xbb/apcupsd/releases/download/1.2/os-apcupsd-1.2.txz' --output os-apcupsd-1.2.txz


I'm getting a file that's 0 bytes.

GitHub release assets links are redirected to another URL.

With curl you need to specify -L (--location) otherwise it won't follow HTTP redirects.

Also yes as hloiter said 0.1 is the newest version
#6
Development and Code Review / Re: APC UPS new plugin
February 07, 2022, 02:33:19 PM
Quote from: hloiter on February 07, 2022, 10:21:48 AM
Where can i download "os-apcupsd-1.2.2.txz"?

Like to test the new plugin.

https://github.com/xbb/apcupsd/releases, click on assets

Don't forget to uninstall any previous version first via the web UI or

pkg remove os-apcupsd
#8
Development and Code Review / Re: APC UPS new plugin
February 02, 2022, 01:59:27 AM
Quote from: mimugmail on February 01, 2022, 05:20:22 PM
What is the reason again why you dont pull against plugins? Any Help needed?

Thanks for the offer! I'm almost ready for the pull request just trying to find some time, I think later this evening.

Cheers
#9
Development and Code Review / Re: APC UPS new plugin
November 14, 2021, 12:56:34 PM
Quote from: Mario_Rossi on November 04, 2021, 04:03:34 PM
It would be nice to have a widget on the dashboard with ups status and battery charge as there was a pfsense

Hello, you can use my fork here: https://github.com/xbb/apcupsd (branch dev if you want to verify the code)

I have made improvements, it has a widget and if you check the releases I provide packages too.

I'm waiting for the other guys to merge the projects and possibly send a pull request to the official plugins repo.

Before installing the package I suggest you remove the previous version files and remove any manually applied modifications (apcupsd auto start, it's now controlled by the plugin)

Ignore the docs for the moment they need updating, download the package file and install it with: pkg install ./os-apcupsd-1.2.1.txz
#10
General Discussion / Re: Config third DNS in DHCP
April 04, 2021, 04:07:23 PM
Quote from: t.kayser on March 15, 2021, 08:18:37 PM
Is there a way to configure a third DNS?

Hi, I had the same issue.

I needed to configure 3 IPs:   192.168.0.10, 192.168.0.20, 192.168.0.1

You can use the additional options (ignore the 2 DNS fields)

Number: 6
Type: string
Value:
convert the numeric IPs to their hex value and concatenate them in the order you require, for example for the IPs I mentioned above the value is:
c0:a8:00:0a:c0:a8:00:14:c0:a8:00:01