ilcato / homebridge-fibaro-home-center

Homebridge plugin for Fibaro Home Center
Apache License 2.0
28 stars 23 forks source link

Error getting data from Home Center: #508

Closed AshenPaladin closed 1 month ago

AshenPaladin commented 1 month ago

Description

Ever since the latest update to the plugin, that being 3.1.0, I'm getting an error with " Error getting data from Home Center:". The devices still work a little within Apple Home, but they usually disconnect and/or have issues.

I'm a little lost here because the plugin worked perfectly before the update, and I am certain that the IP, username and password are all correct,

Logs

[10/16/2024, 1:35:36 PM] [FibaroHC] Error getting data from Home Center:  SyntaxError: Unexpected token 'o', "[object Obj"... is not valid JSON
    at JSON.parse (<anonymous>)
    at remoteController (/volume1/homebridge/node_modules/homebridge-fibaro-home-center/src/deviceAuto.ts:379:46)
    at FibaroAccessory.configureAccessoryFromType (/volume1/homebridge/node_modules/homebridge-fibaro-home-center/src/fibaroAccessory.ts:439:35)
    at new FibaroAccessory (/volume1/homebridge/node_modules/homebridge-fibaro-home-center/src/fibaroAccessory.ts:52:40)
    at FibaroHC.addAccessory (/volume1/homebridge/node_modules/homebridge-fibaro-home-center/src/platform.ts:332:18)
    at /volume1/homebridge/node_modules/homebridge-fibaro-home-center/src/platform.ts:253:14
    at Array.map (<anonymous>)
    at FibaroHC.processDevices (/volume1/homebridge/node_modules/homebridge-fibaro-home-center/src/platform.ts:236:18)
    at FibaroHC.login (/volume1/homebridge/node_modules/homebridge-fibaro-home-center/src/platform.ts:153:12)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
[10/16/2024, 1:35:36 PM] [FibaroHC] Make sure you provide the correct data: URL or IP, username and password and that HC is enabled and available on the same network as Homebridge. Using https may be mandatory if you configured HC to use it.
[10/16/2024, 1:35:36 PM] [FibaroHC] Next try in 5 minutes
[10/16/2024, 1:36:09 PM] Error: This callback function has already been called by someone else; it can only be called one time.
    at /volume1/homebridge/node_modules/homebridge/node_modules/hap-nodejs/src/lib/util/once.ts:12:13
    at FibaroAccessory.getCharacteristicValue (/volume1/homebridge/node_modules/homebridge-fibaro-home-center/src/fibaroAccessory.ts:293:7)

Plugin config

{
    "name": "FibaroHC",
    "url": "",
    "username": "",
    "password": "",
    "pollerperiod": 3,
    "markDeadDevices": false,
    "thermostattimeout": 7200,
    "thermostatmaxtemperature": 100,
    "adminUsername": "",
    "adminPassword": "",
    "securitysystem": "disabled",
    "addRoomNameToDeviceName": "disabled",
    "logsLevel": 1,
    "devices": [
        {
            "displayAs": "switch"
        }
    ],
    "platform": "FibaroHC"
}

Plugin version

3.1.0

Fibaro HC / Yubii Home type and firmware

Fibaro Home Center 3, v5.160.42

ilcato commented 1 month ago

@AshenPaladin, was the problem present in 3.0.0 ?

AshenPaladin commented 1 month ago

@AshenPaladin, was the problem present in 3.0.0 ?

It was not as far as I'm aware, I've only noticed it after updating to 3.1.0 yesterday

rafalantas commented 1 month ago

same for me after updating to 3.1.0 had to revert back to 3.0.0

ilcato commented 1 month ago

ok, so it is a problem of the 3.1.0. Let me check. I'm using it since the release and also the betas without problems.

ilcato commented 1 month ago

@AshenPaladin , @rafalantas do you have remote controllers in you Fibaro Home centers? If yes which one?

rafalantas commented 1 month ago

I have Fibaro Button

AshenPaladin commented 1 month ago

@AshenPaladin , @rafalantas do you have remote controllers in you Fibaro Home centers? If yes which one?

I do not have any remote controllers

ilcato commented 1 month ago

@rafalantas, Ok. Can you past the API response for device?

ilcato commented 1 month ago

@AshenPaladin , @rafalantas do you have remote controllers in you Fibaro Home centers? If yes which one?

I do not have any remote controllers

@AshenPaladin, ok. Can you post the logs printed before the error? A few lines is sufficient.

AshenPaladin commented 1 month ago

@AshenPaladin , @rafalantas do you have remote controllers in you Fibaro Home centers? If yes which one?

I do not have any remote controllers

@AshenPaladin, ok. Can you post the logs printed before the error? A few lines is sufficient.

The only lines from Fibaro Home Center in the logs before the error are these [10/16/2024, 2:18:54 PM] [FibaroHC] Device dead: 27 service: Senzor Apa Baie Etaj Battery, reason: connection [10/16/2024, 2:18:54 PM] [FibaroHC] Device dead: 27 service: Senzor Apa Baie Etaj, reason: connection [10/16/2024, 2:18:54 PM] [FibaroHC] Device dead: 27 service: Senzor Apa Baie Etaj Battery, reason: connection

But the sensor also appears are disconnected in the Yubii Home app and I was going to replace its battery

Other than that I can provide other logs but they're from the other two plugins that I'm using, Midea Platform and Camera FFMPEG

ilcato commented 1 month ago

@AshenPaladin @rafalantas can you test 3.1.1-beta.1 ?

@AshenPaladin this should also fix the other error I see in the initial log you provided.

AshenPaladin commented 1 month ago

Thank you very much, with the update to the beta version that you suggested the error no longer appears and the devices seem to be working properly

ilcato commented 1 month ago

@rafalantas is it ok also for you? Are you able to program the Fibaro Button?

ilcato commented 1 month ago

Thank you very much, with the update to the beta version that you suggested the error no longer appears and the devices seem to be working properly

@AshenPaladin can you close the issue please? I will release 3.1.1 in a few days.