Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[homematic] Invalid configuration possible that disables updates from CCU3 #16940

Closed
soenkekueper opened this issue Jun 26, 2024 · 2 comments · Fixed by #17206
Closed

[homematic] Invalid configuration possible that disables updates from CCU3 #16940

soenkekueper opened this issue Jun 26, 2024 · 2 comments · Fixed by #17206
Assignees
Labels
bug An unexpected problem or unintended behavior of an add-on

Comments

@soenkekueper
Copy link
Contributor

Expected Behavior

The configuration values for IP-Adresses and ports should be validated/automatically trimmed, so that an invalid configuration is not possible.

Current Behavior

If the Callback-IP contains one or more blanks at the beginning or the end the thing goes online, but there occours an error on the CCU3 and no values are updated any more in openHAB.

Possible Solution

  • Validate, that IP and Port does not contains white-Spaces
  • remove whitespaces from ip and configuration before usage.

Steps to Reproduce (for Bugs)

  1. Create CCU Thing
  2. Configure Callback-URL with Whitespace
  3. Thing States will not be updated

Context

I've some homematic components, for example a sensor that shows, if the garage door is closed.
But the values for this won't be updated any more, when the configuration is invalid.

Your Environment

`runtimeInfo:
version: 4.1.3
buildString: Release Build
locale: de-DE
systemInfo:
configFolder: /etc/openhab
userdataFolder: /var/lib/openhab
logFolder: /var/log/openhab
javaVersion: 17.0.5
javaVendor: Eclipse Adoptium
javaVendorVersion: Temurin-17.0.5+8
osName: Linux
osVersion: 6.1.39-v7l+
osArchitecture: arm
availableProcessors: 4
freeMemory: 58138160
totalMemory: 456130560
uptime: 3261
startLevel: 100
addons:

  • automation-jsscripting
  • binding-astro
  • binding-avmfritz
  • binding-denonmarantz
  • binding-deutschebahn
  • binding-ecovacs
  • binding-exec
  • binding-heos
  • binding-homematic
  • binding-icalendar
  • binding-modbus
  • binding-mqtt
  • binding-netatmo
  • binding-network
  • binding-ntp
  • binding-tankerkoenig
  • binding-tradfri
  • persistence-influxdb
  • persistence-rrd4j
  • transformation-jsonpath
  • transformation-map
  • transformation-regex
  • transformation-scale
  • ui-basic
    clientInfo:
    device:
    ios: false
    android: false
    androidChrome: false
    desktop: true
    iphone: false
    ipod: false
    ipad: false
    edge: false
    ie: false
    firefox: false
    macos: false
    windows: true
    cordova: false
    phonegap: false
    electron: false
    nwjs: false
    webView: false
    webview: false
    standalone: false
    os: windows
    pixelRatio: 1.5
    prefersColorScheme: light
    isSecureContext: true
    locationbarVisible: true
    menubarVisible: true
    navigator:
    cookieEnabled: true
    deviceMemory: 8
    hardwareConcurrency: 8
    language: de-DE
    languages:
    • de-DE
    • de
    • en-US
    • en
      onLine: true
      platform: Win32
      screen:
      width: 2560
      height: 1440
      colorDepth: 24
      support:
      touch: false
      pointerEvents: true
      observer: true
      passiveListener: true
      gestures: false
      intersectionObserver: true
      themeOptions:
      dark: light
      filled: true
      pageTransitionAnimation: default
      bars: filled
      homeNavbar: default
      homeBackground: default
      expandableCardAnimation: default
      userAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML,
      like Gecko) Chrome/126.0.0.0 Safari/537.36
      timestamp: 2024-06-26T12:03:40.950Z
      `
@soenkekueper soenkekueper added the bug An unexpected problem or unintended behavior of an add-on label Jun 26, 2024
@soenkekueper
Copy link
Contributor Author

Stack Trace (in homematic) looks like this

2024-06-26 13:39:03,016 io.vertx.core.impl.ContextImpl ERROR [vert.x-worker-thread-19] Unhandled exception
java.lang.IllegalArgumentException: Illegal character in authority at index 7: http:// 192.168.XXX.XXX:9125
        at java.net.URI.create(Unknown Source) ~[?:?]
        at org.apache.http.client.methods.HttpPost.<init>(HttpPost.java:76) ~[HMIPServer.jar:?]
        at de.eq3.cbcs.legacy.communication.rpc.internal.transport.http.HttpTransport.sendRequest(HttpTransport.java:104) ~[HMIPServer.jar:?]
        at de.eq3.cbcs.legacy.communication.rpc.internal.rpc.RpcClient.sendRequest(RpcClient.java:94) ~[HMIPServer.jar:?]
        at de.eq3.cbcs.legacy.communication.rpc.internal.rpc.RpcClient.invoke(RpcClient.java:82) ~[HMIPServer.jar:?]
        at com.sun.proxy.$Proxy39.listDevices(Unknown Source) ~[?:?]
        at de.eq3.ccu.virtualdevice.service.internal.rega.BackendUpdateDevicesCommand.updateDevicesForClient(BackendUpdateDevicesCommand.java:34) ~[HMIPServer.jar:?]
        at de.eq3.ccu.virtualdevice.service.internal.rega.BackendUpdateDevicesCommand.run(BackendUpdateDevicesCommand.java:29) ~[HMIPServer.jar:?]
        at de.eq3.ccu.virtualdevice.service.internal.rega.BackendWorker.handle(BackendWorker.java:27) ~[HMIPServer.jar:?]
        at de.eq3.ccu.virtualdevice.service.internal.rega.BackendWorker.handle(BackendWorker.java:11) ~[HMIPServer.jar:?]
        at io.vertx.core.impl.AbstractContext.dispatch(AbstractContext.java:100) ~[HMIPServer.jar:?]
        at io.vertx.core.impl.WorkerContext.lambda$emit$0(WorkerContext.java:59) ~[HMIPServer.jar:?]
        at io.vertx.core.impl.WorkerContext.lambda$execute$2(WorkerContext.java:104) ~[HMIPServer.jar:?]
        at io.vertx.core.impl.TaskQueue.run(TaskQueue.java:76) ~[HMIPServer.jar:?]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) ~[?:?]
        at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) ~[HMIPServer.jar:?]
        at java.lang.Thread.run(Unknown Source) ~[?:?]
Caused by: java.net.URISyntaxException: Illegal character in authority at index 7: http:// 192.168.XXX.XXX:9125
        at java.net.URI$Parser.fail(Unknown Source) ~[?:?]
        at java.net.URI$Parser.parseAuthority(Unknown Source) ~[?:?]
        at java.net.URI$Parser.parseHierarchical(Unknown Source) ~[?:?]
        at java.net.URI$Parser.parse(Unknown Source) ~[?:?]
        at java.net.URI.<init>(Unknown Source) ~[?:?]
        ... 18 more

soenkekueper added a commit to soenkekueper/openhab-addons that referenced this issue Aug 4, 2024
… in CCU, values won't be updated any more in openhab.

Signed-off-by: Sönke Küper <[email protected]>
@soenkekueper soenkekueper self-assigned this Aug 4, 2024
soenkekueper added a commit to soenkekueper/openhab-addons that referenced this issue Aug 27, 2024
soenkekueper added a commit to soenkekueper/openhab-addons that referenced this issue Aug 27, 2024
digitaldan pushed a commit to digitaldan/openhab-addons that referenced this issue Aug 29, 2024
…hab#17206)

* openhab#16940: Added check in handler for invalid configuration values.

Signed-off-by: Sönke Küper <[email protected]>
pgfeller pushed a commit to pgfeller/openhab-addons that referenced this issue Sep 29, 2024
…hab#17206)

* openhab#16940: Added check in handler for invalid configuration values.

Signed-off-by: Sönke Küper <[email protected]>
Signed-off-by: Patrik Gfeller <[email protected]>
joni1993 pushed a commit to joni1993/openhab-addons that referenced this issue Oct 15, 2024
…hab#17206)

* openhab#16940: Added check in handler for invalid configuration values.

Signed-off-by: Sönke Küper <[email protected]>
matchews pushed a commit to matchews/openhab-addons that referenced this issue Oct 18, 2024
…hab#17206)

* openhab#16940: Added check in handler for invalid configuration values.

Signed-off-by: Sönke Küper <[email protected]>
@openhab-bot
Copy link
Collaborator

This issue has been mentioned on openHAB Community. There might be relevant details there:

https://community.openhab.org/t/openhab-4-2-2-binding-to-homematic-not-updating-polling-values/160337/3

cipianpascu pushed a commit to cipianpascu/openhab-addons that referenced this issue Jan 2, 2025
…hab#17206)

* openhab#16940: Added check in handler for invalid configuration values.

Signed-off-by: Sönke Küper <[email protected]>
Signed-off-by: Ciprian Pascu <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An unexpected problem or unintended behavior of an add-on
Projects
Development

Successfully merging a pull request may close this issue.

2 participants