Giter VIP home page Giter VIP logo

apcupsd-docker's People

Contributors

apearson avatar cassiorossi avatar gersilex avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

apcupsd-docker's Issues

Linux/arm Linux/arm64 versions?

Is it possible to compile a Linux/arm and Linux/arm64 versions of this? I would like to run this on my Raspberry Pi Compute Module 4. Thank you very much.

COMMLOST when connecting UPS via USB

The default apcupsd.conf for this container specifies a UPSTYPE net. A custom config with UPSTYPE usb is needed for an UPS connected via USB according to the USB configuration in APCUPSD's documentation.

But trying to use the apcupsd.conf file

## apcupsd.conf v1.1 ##
UPSCABLE usb
UPSTYPE usb
DEVICE
BATTERYLEVEL 5
MINUTES 10
LOCKFILE /var/lock
UPSCLASS standalone
UPSMODE disable

and mapping it onto the container with

volumes:
      - /tmp/apcupsd-docker:/tmp/apcupsd-docker
      - /file/path/apcupsd.conf:/etc/apcupsd/apcupsd.conf
      - /file/path/doshutdown:/etc/apcupsd/doshutdown

results in a COMMLOST error using apcaccess:

APC      : 001,017,0429
DATE     : 2022-04-26 15:13:41 +0000  
HOSTNAME : 8bfdba79ab48
VERSION  : 3.14.14 (31 May 2016) unknown
CABLE    : USB Cable
DRIVER   : USB UPS Driver
UPSMODE  : Stand Alone
STARTTIME: 2022-04-26 15:12:30 +0000  
STATUS   : COMMLOST 
MBATTCHG : 5 Percent
MINTIMEL : 10 Minutes
MAXTIME  : 0 Seconds
NUMXFERS : 0
TONBATT  : 0 Seconds
CUMONBATT: 0 Seconds
XOFFBATT : N/A
STATFLAG : 0x05000100
END APC  : 2022-04-26 15:14:00 +0000 

with the log also not showing NIS server startup succeeded.

Using the apcupsd.conf as

# /etc/apcupsd/apcupsd.conf (in the apcupsd-docker container)

UPSCABLE usb
UPSTYPE usb
DEVICE
BATTERYLEVEL 5
MINUTES 10

at least results in a successful NIS server startup succeeded, followed by a loss of communications:

/sbin/apcupsd: Warning: old configuration file found.

/sbin/apcupsd: Expected: "## apcupsd.conf v1.1 ##"
/sbin/apcupsd: Found:    "# /etc/apcupsd/apcupsd.conf (in the apcupsd-docker container)
"

/sbin/apcupsd: Please check new file format and
/sbin/apcupsd: modify accordingly the first line
/sbin/apcupsd: of config file.

/sbin/apcupsd: Processing config file anyway.
apcupsd[1]: apcupsd 3.14.14 (31 May 2016) unknown startup succeeded
apcupsd[1]: NIS server startup succeeded
apcupsd[1]: Communications with UPS lost.
/etc/apcupsd/commfailure: line 18: mail: not found
: Warning: old configuration file found.

: Expected: "## apcupsd.conf v1.1 ##"
: Found:    "# /etc/apcupsd/apcupsd.conf (in the apcupsd-docker container)
"

: Please check new file format and
: modify accordingly the first line
: of config file.

: Processing config file anyway.
Warning communications lost with UPS 

A working USB option apcupsd.conf file would be highly appreciated.

using with modbus

Hi, any ideas what other devices than /dev/usb/hiddev0 would need to be handed over to the container when trying to use modbus?
I am constantly getting COMMLOST when running in docker. If I install on the host, modbus communication is perfectly running using the same apcupsd.conf

Manually stopping containers before shutdown + --restart unless-stopped

Hello and thanks a lot for this repo,

I've been using it on a Rpi with libreelec for a while now and it's been very helpful. The only issue I had was with the docker stop command in host-trigger-check.sh because I create all my containers using the --restart unless-stopped option. When manually stopping a container created with this option, it will never be started after a reboot (when power comes back).

I know that in your guidelines you specify that custom changes might be needed per use case but I would like to ask you why not simply halt the system? It will try to gracefully stop the docker service which will stop all containers. 'Systemd' usually has a sane timeout (90 secs on most installations I've seen).

Regards,

Panos

Include host-trigger-check.sh in Dockerfile

Hi,

I think you forgot to include host-trigger-check.sh in Dockerfile, at least the Readme says, that I should copy it from the dockercontainer to the host.

Thanks for the container, have a nice day,
Cyber1000

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.