Giter Club home page Giter Club logo

Comments (7)

justme-1968 avatar justme-1968 commented on June 26, 2024

i have absolutely no idea how this can happen. i'm also pretty sure it is not related to the fhem plugin.

please verify in the logs:

  • do device serial numbers stay the same?
  • are there any other messages that look strange?

was there any update ?

from homebridge-fhem.

LightningRhino avatar LightningRhino commented on June 26, 2024

Serial numbers do not change.
I regularly update homebridge and the plugins, so yes, there were updates.
Today I updated the homebridge docker version to 1.3.4 and will check the behavior the next few days.
If it's still not working I will have to disable some other plugins to check the mutual influence.

from homebridge-fhem.

LightningRhino avatar LightningRhino commented on June 26, 2024

It happened again. After container restart all the fhem devices are gone. I restarted homebridge from the webgui and everything is back now.
Seems to be a difference if one restarts the whole docker container or just restart from inside homebridge.
I disabled the plugin "homebridge-fritz" because it's the only plugin which gives me errors in the log to see if this helps.

from homebridge-fhem.

LightningRhino avatar LightningRhino commented on June 26, 2024

Disabling the plugin "homebridge-fritz" didn't make any difference. After restarting the homebridge container my fhem devices are gone again.
But I think I now narrowed it down now.
My backupscript stops all docker containers to enable a consistent backup.
It seem like there passes too much time between starting homebridge and FHEM.
The homebridge log states:
[4/18/2021, 4:38:21 AM] [FHEM] longpoll error: Error: connect ECONNREFUSED 192.168.178.222:8083, retrys exhausted
And after this entry it doesn't try to connect to FHEM again.

I changed the order in which the containers will be restarted, positioning the start auf homebridge after FHEM.
This should do the trick.

@justme-1968 What is your timeout setting until the plugin stops to connect to FHEM? In my case the FHEM container is stopped at 4:30 and obviously after 8:21 minutes the plugin stops to retry the connection.

from homebridge-fhem.

justme-1968 avatar justme-1968 commented on June 26, 2024

good that you found it. there is no timeout if the connection had been established once. then the plugin will try indefinitely again. this woks without blocking homebridge.

but i had to make a change to the first connection attempt after startup as the homebridge config gut requirements say that a plugin is not allowed to block the homebridge startup. as the first gathering of fhem devices can not be done in the background as the fhem plugin uses the non dynamic api. so i had to limit the retries to a 20 second timeout. this applies only to the first connection after a restart.

if you keep the order so that fhem is started before homebridge this should never be a problem.

from homebridge-fhem.

justme-1968 avatar justme-1968 commented on June 26, 2024

@LightningRhino: also i have just added a "neverTimeout": true option to the config file that you can set. but keep in mind that this will block homebridge.

from homebridge-fhem.

LightningRhino avatar LightningRhino commented on June 26, 2024

Great. Thank you. When now everything is working I don't think I will need this. But good to know.

from homebridge-fhem.

Related Issues (20)

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.