GithubHelp home page GithubHelp logo

Comments (9)

JoDehli avatar JoDehli commented on July 17, 2024 1

I will send you a log configuration which I use.

And I can make the timeout configurable and by default bigger as it is now. I think it is only a problem with the key exchange. When the mini server response is to slow the connection timeout will accur. There we have a change to fix this issue. My loxone server is never under heavy load. That is maybe the reason that I had never problems.

from pyloxone.

JoDehli avatar JoDehli commented on July 17, 2024

Please update to the newest home assistant version and try it again.if you have the same error message I will look for it. If you have no error message again please close the issue.

from pyloxone.

johny-mnemonic avatar johny-mnemonic commented on July 17, 2024

I am already using the latest HA version 109.6
When I tried to restart HA to check, whether the error is still there, I got this:

2020-05-18 16:54:37 ERROR (MainThread) [homeassistant.setup] Setup failed for loxone: Integration failed to initialize.
2020-05-18 16:54:37 ERROR (MainThread) [homeassistant.setup] Unable to prepare setup for platform loxone.switch: Unable to set up component.
2020-05-18 16:54:37 ERROR (MainThread) [homeassistant.setup] Unable to prepare setup for platform loxone.cover: Unable to set up component.
2020-05-18 16:54:37 ERROR (MainThread) [homeassistant.setup] Unable to prepare setup for platform loxone.alarm_control_panel: Unable to set up component.
2020-05-18 16:54:37 ERROR (MainThread) [homeassistant.setup] Unable to prepare setup for platform loxone.scene: Unable to set up component.
2020-05-18 16:54:37 ERROR (MainThread) [homeassistant.setup] Unable to prepare setup for platform loxone.sensor: Unable to set up component.
2020-05-18 16:54:37 ERROR (MainThread) [homeassistant.setup] Unable to prepare setup for platform loxone.light: Unable to set up component.

It is not the first time I got it and as always, restart of HA fixes it, but it is weird.
On the bright side, the reported error did not come back, so it was probably fixed.

from pyloxone.

JoDehli avatar JoDehli commented on July 17, 2024

Some users reported some problems with the connection. But I had no issues so far. They all had the port 80 as the loxone port. Some of the errors disappeared after changing the port to a other port.

I think it is maybe a problem with some network latency.

I would first check the port. If you on 80 change it to some other port. Then I would try to start
home-assistant only with the loxone binding and all other integrations commented out. In this
case you can maybe clarify if some other component interfere with the loxone binding.

Sorry but I can not reproduce your error.

from pyloxone.

johny-mnemonic avatar johny-mnemonic commented on July 17, 2024

No probs. Thanks for hint.
Yep, I have it on port 80 and it has pretty big program, so latency can play some role.
Is there a way to see the log why it failed? Will something like this work?

logger:
  default: warning
  logs:
    custom_components.pyloxone: debug

from pyloxone.

JoDehli avatar JoDehli commented on July 17, 2024

Please try the dev branch. I increased the default timeout to 10 seconds. Maybe this solves your problems.

Please let me know if it helps.

And here are me debug settings:

  default: critical
  logs:
    homeassistant: error
    custom_components.loxone: debug

from pyloxone.

johny-mnemonic avatar johny-mnemonic commented on July 17, 2024

I tried to restart HA multiple times with 10s timeout and no issue so far.
Here is the debug log:

2020-05-22 18:24:11 DEBUG (MainThread) [custom_components.loxone] starting loxone sensor...
2020-05-22 18:24:11 DEBUG (MainThread) [custom_components.loxone] starting loxone switch...
2020-05-22 18:24:11 DEBUG (MainThread) [custom_components.loxone] starting loxone cover...
2020-05-22 18:24:11 DEBUG (MainThread) [custom_components.loxone] starting loxone light...
2020-05-22 18:24:11 DEBUG (MainThread) [custom_components.loxone] starting loxone scene...
2020-05-22 18:24:11 DEBUG (MainThread) [custom_components.loxone] starting loxone alarm_control_panel...
2020-05-22 18:24:11 DEBUG (MainThread) [custom_components.loxone] try to read token
2020-05-22 18:24:11 DEBUG (MainThread) [custom_components.loxone] try to get public key: http://loxone.XXXXXXX:80/jdev/sys/getPublicKey
2020-05-22 18:24:11 WARNING (MainThread) [homeassistant.components.switch] SwitchDevice is deprecated, modify LoxoneTimedSwitch to extend SwitchEntity
2020-05-22 18:24:12 WARNING (MainThread) [homeassistant.components.switch] SwitchDevice is deprecated, modify LoxoneSwitch to extend SwitchEntity
2020-05-22 18:24:12 WARNING (MainThread) [homeassistant.components.switch] SwitchDevice is deprecated, modify LoxoneIntercomSubControl to extend SwitchEntity
2020-05-22 18:24:12 WARNING (MainThread) [homeassistant.components.cover] CoverDevice is deprecated, modify LoxoneGate to extend CoverEntity
2020-05-22 18:24:12 WARNING (MainThread) [homeassistant.components.cover] CoverDevice is deprecated, modify LoxoneWindow to extend CoverEntity
2020-05-22 18:24:12 WARNING (MainThread) [homeassistant.components.cover] CoverDevice is deprecated, modify LoxoneJalousie to extend CoverEntity
2020-05-22 18:24:12 WARNING (MainThread) [homeassistant.components.light] Light is deprecated, modify LoxonelightcontrollerV2 to extend LightEntity
2020-05-22 18:24:12 WARNING (MainThread) [homeassistant.components.light] Light is deprecated, modify LoxoneColorPickerV2 to extend LightEntity
2020-05-22 18:24:12 WARNING (MainThread) [homeassistant.components.light] Light is deprecated, modify LoxoneDimmer to extend LightEntity
2020-05-22 18:24:12 WARNING (MainThread) [homeassistant.setup] Setup of loxone is taking over 10 seconds.
2020-05-22 18:24:12 WARNING (MainThread) [homeassistant.components.alarm_control_panel] AlarmControlPanel is deprecated, modify LoxoneAlarm to extend AlarmControlPanelEntity
2020-05-22 18:24:12 DEBUG (MainThread) [custom_components.loxone] get_public_key successfully...
2020-05-22 18:24:12 DEBUG (MainThread) [custom_components.loxone] init_rsa_cipher successfully...
2020-05-22 18:24:12 DEBUG (MainThread) [custom_components.loxone] generate_session_key successfully...
2020-05-22 18:24:13 DEBUG (MainThread) [custom_components.loxone] parse_loxone_message successfully...
2020-05-22 18:24:13 DEBUG (MainThread) [custom_components.loxone] acquire_tokend
2020-05-22 18:24:13 DEBUG (MainThread) [custom_components.loxone] get_new_aes_chiper successfully...
2020-05-22 18:24:13 DEBUG (MainThread) [custom_components.loxone] parse_loxone_message successfully...
2020-05-22 18:24:13 DEBUG (MainThread) [custom_components.loxone] hash_credentials successfully...
2020-05-22 18:24:13 DEBUG (MainThread) [custom_components.loxone] get_new_aes_chiper successfully...
2020-05-22 18:24:13 DEBUG (MainThread) [custom_components.loxone] parse_loxone_message successfully...
2020-05-22 18:24:13 DEBUG (MainThread) [custom_components.loxone] save_token successfully...
2020-05-22 18:24:13 DEBUG (MainThread) [custom_components.loxone] get_new_aes_chiper successfully...
2020-05-22 18:24:13 INFO (MainThread) [custom_components.loxone] loxone discovered

It is interesting, that just a one second after first log message, it is already complaining "Setup of loxone is taking over 10 seconds." :-)

from pyloxone.

JoDehli avatar JoDehli commented on July 17, 2024

Ok I think this was the problem. I close this issue.

from pyloxone.

johny-mnemonic avatar johny-mnemonic commented on July 17, 2024

Oh well, I just got the error from OP again...
Seems like we successfully fixed that random failure of loxone integration initialization by increasing the timeout, but the original error is still there.
Anyway, keep it closed till you release new version and in case it happens again, I will reopen.

from pyloxone.

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.