Giter Site home page Giter Site logo

homebridge-apcaccess's Introduction

homebridge-apcaccess

An apcaccess wrapper for Homebridge. Supports precisely one UPS. If you're on battery power, the Contact Sensor is open.

This accessory:

  • Is essentially a worse version of homespun/homebridge-accessory-apcupsd which I was too dumb to get working.
  • Publishes a BatteryService to show charging state / battery levels.
  • Publishes ContactSensor two subscribable events: Contact State and Low Battery, for your push alerting pleasure.
  • Optionally publishes a TemperatureSensor if you have a fancy UPS which reports this.

Configuration

The plugin will run with these default values, they can be changed in the accessories: [] section of homebridge config:

{
    "name": "APC UPS",
    "host": "127.0.0.1",
    "port": 3551,
    "manufacturer": "American Power Conversion'",
    "model": "APCAccess UPS",
    "serial": "unknown",
    "interval": 1,
    "temperatureSensor": false,
    "errorLogsOnly": false
}

interval is in seconds.

homebridge-apcaccess's People

Contributors

cr3ative avatar davidjbradshaw avatar dependabot[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

homebridge-apcaccess's Issues

Unable to change log level

Getting the following error if I set errorLogsOnly: true

[APC Smart-UPS] Polling UPS service failed: TypeError: this.log.update.warn is not a function
    at APCAccess.checkContact (/homebridge/node_modules/homebridge-apcaccess/index.js:180:21)
    at APCAccess.doPolledChecks (/homebridge/node_modules/homebridge-apcaccess/index.js:238:10)
    at /homebridge/node_modules/homebridge-apcaccess/index.js:99:14
    at processTicksAndRejections (node:internal/process/task_queues:95:5)

Suppress Logs

Would there be the possibility to stop the logs, perhaps by defining a debug and a deploy mode?

problem with 'ECONNREFUSED'

The plugin, whatever version I use, throws an error:

Couldn't connect to service: Error: connect ECONNREFUSED ::1:3551
at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1300:16) {
errno: -111,
code: 'ECONNREFUSED',
syscall: 'connect',
address: '::1',
port: 3551

my json file configuration is

{
"name": "SAI bateria",
"accessory": "APCAccess",
"location": "127.0.0.1",
"port": 3551,
"manufacturer": "Fujitsu APC",
"model": "FJT750i",
"serial": "AS1305696928",
"interval": 1
}

I'v tried other IPs, and seems that 'address' block always stays at: '::x',

can you help me please?

enhancement: Homekit App status

Is it possible to add the following information in the Homekit App status?
Battery Level
Charging State
Mains power

Thanks

Please Fix

Getting the following status every second

Polling UPS service failed: TypeError: Cannot read properties of undefined (reading 'trim')
at APCAccess.parseData (/var/lib/homebridge/node_modules/homebridge-apcaccess/index.js:161:45)
at APCAccess.checkBatteryLevel (/var/lib/homebridge/node_modules/homebridge-apcaccess/index.js:226:34)
at APCAccess.doPolledChecks (/var/lib/homebridge/node_modules/homebridge-apcaccess/index.js:241:10)
at /var/lib/homebridge/node_modules/homebridge-apcaccess/index.js:99:14
at processTicksAndRejections (node:internal/process/task_queues:95:5)

Invalid value for battery charge. NaN

Hi there
This plugin is just what I’m after. Something to tell me when my house IT falls down and I can tell my wife to shut things down…whilst I’m working in a foreign country.
But I have a wee snag in that I can’t get it to work.
Can I send you a debug report so you could tell me what I’ve done wrong? Probably best if I can send it to you direct as I do bones not computers. Not sure how to run through everything and anonymise it.

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.