cr3ative / homebridge-apcaccess

what if apcaccess, but in homebridge??
MIT License
8 stars 4 forks source link

problem with 'ECONNREFUSED' #12

Closed angladacamps closed 1 year ago

angladacamps commented 1 year ago

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?

cr3ative commented 1 year ago

Hi, you have location where it should be host, see the README for some example configuration.

Try:

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

You can also run apcaccess on the command line to check the output works there too.

angladacamps commented 1 year ago

it worked, thank you very much