Homematic Binding: "Channel not found for datapoint" errors for definitely existing channels

Maybe we should also test the variant that does not add the channels to the thing types to see whether it has any negative effects.

I think the binding needs a larger refactoring. E.g. I would like to add a function that gives the user more control about the creation of the channels (and their types) by adding an additional configuration file. For some devices currently more than 100 channels are created that will never be used.

I use text based configs as well, but there is a similar system at my brotherā€™s house (also OH3, installed on raspbian/debian, no homegear but with raspberrymatic) but he has all his configs done via gui. Currently in both homes the homematic binding fails every now and then. In most cases only a openhab restart solves the issues.
If I (text based configs) only restart the bundle via console, the channel list in the gui stays empty.

Does your brother also has the problem with ā€œChannel not foundā€ or is it a different problem?

Same at his, errors in the log and no more updates for (some or most) homematic items.

After the release of 3.1 I have fixed a problem in the binding. I am not sure whether it can also cause these types of problem, but you can test it if you like: https://github.com/MHerbst/openhab-addons-test (I am not absolutely sure whether it runs with 3.1 or whether you need a 3.2 milestone version).

A version of the binding with the fix mentioned above is available here: https://cloud.flole.de/s/36eNgZGDnWA7qeS

This version is creating the channels for the thing aswell as the thing type.

:+1: I will set-up a test environment and perform some regression tests tomorrow or thursday.

As promised, I did a regression tests (on Windows) with several device types (HmIP, Group. Single device).

Tested with an existing JSONDB and with a fresh one. Everything worked as expected. :+1:

Hello guys,
I have also problems with the homematic binding since I updated to openhab 3.
With openhab 2 everything worked well, but with the new openhab 3 installation the homematic binding works for a few hours or sometimes a day, but then it stops working and I have to reboot to make it work again.

I have an original CCU3. Openhab runs on a raspberry pi 3b. Actually i have the lastest 3.2 Milestone installed, but I also tried it with openhab 3.1. The binding is set up via the UI.

Here is what my log shows. Maybe you can help me.

2021-09-15 22:02:46.803 [DEBUG] [nal.communicator.client.XmlRpcClient] - XmlRpcMessage failed, sending message again 1/3


==> /var/log/openhab/openhab.log <==

2021-09-15 22:03:01.807 [DEBUG] [nal.communicator.client.XmlRpcClient] - XmlRpcMessage failed, sending message again 2/3


==> /var/log/openhab/openhab.log <==

2021-09-15 22:03:16.810 [DEBUG] [nal.communicator.client.XmlRpcClient] - XmlRpcMessage failed, sending message again 3/3


==> /var/log/openhab/openhab.log <==

2021-09-15 22:03:31.813 [DEBUG] [ommunicator.AbstractHomematicGateway] - Unable to release the connection to the gateway with id '3014F711A0001F98A9A6E6CE': java.util.concurrent.TimeoutException

java.io.IOException: java.util.concurrent.TimeoutException

	at org.openhab.binding.homematic.internal.communicator.client.XmlRpcClient.send(XmlRpcClient.java:122) ~[bundleFile:?]

	at org.openhab.binding.homematic.internal.communicator.client.XmlRpcClient.sendMessage(XmlRpcClient.java:77) ~[bundleFile:?]

	at org.openhab.binding.homematic.internal.communicator.client.RpcClient.release(RpcClient.java:102) ~[bundleFile:?]

	at org.openhab.binding.homematic.internal.communicator.AbstractHomematicGateway.stopServers(AbstractHomematicGateway.java:267) [bundleFile:?]

	at org.openhab.binding.homematic.internal.communicator.AbstractHomematicGateway$ConnectionTrackerThread.handleInvalidConnection(AbstractHomematicGateway.java:933) [bundleFile:?]

	at org.openhab.binding.homematic.internal.communicator.AbstractHomematicGateway$ConnectionTrackerThread.run(AbstractHomematicGateway.java:912) [bundleFile:?]

	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) [?:?]

	at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305) [?:?]

	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305) [?:?]

	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]

	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]

	at java.lang.Thread.run(Thread.java:829) [?:?]

Caused by: java.util.concurrent.TimeoutException

	at org.eclipse.jetty.client.util.FutureResponseListener.get(FutureResponseListener.java:109) ~[bundleFile:9.4.40.v20210413]

	at org.openhab.binding.homematic.internal.communicator.client.XmlRpcClient.send(XmlRpcClient.java:112) ~[bundleFile:?]

	... 11 more

2021-09-15 22:03:46.819 [DEBUG] [ommunicator.AbstractHomematicGateway] - Unable to release the connection to the gateway with id '3014F711A0001F98A9A6E6CE': java.util.concurrent.TimeoutException

java.io.IOException: java.util.concurrent.TimeoutException

	at org.openhab.binding.homematic.internal.communicator.client.XmlRpcClient.send(XmlRpcClient.java:122) ~[bundleFile:?]

	at org.openhab.binding.homematic.internal.communicator.client.XmlRpcClient.sendMessage(XmlRpcClient.java:77) ~[bundleFile:?]

	at org.openhab.binding.homematic.internal.communicator.client.RpcClient.release(RpcClient.java:102) ~[bundleFile:?]

	at org.openhab.binding.homematic.internal.communicator.AbstractHomematicGateway.stopServers(AbstractHomematicGateway.java:267) [bundleFile:?]

	at org.openhab.binding.homematic.internal.communicator.AbstractHomematicGateway$ConnectionTrackerThread.handleInvalidConnection(AbstractHomematicGateway.java:933) [bundleFile:?]

	at org.openhab.binding.homematic.internal.communicator.AbstractHomematicGateway$ConnectionTrackerThread.run(AbstractHomematicGateway.java:912) [bundleFile:?]

	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) [?:?]

	at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305) [?:?]

	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305) [?:?]

	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]

	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]

	at java.lang.Thread.run(Thread.java:829) [?:?]

Caused by: java.util.concurrent.TimeoutException

	at org.eclipse.jetty.client.util.FutureResponseListener.get(FutureResponseListener.java:109) ~[bundleFile:9.4.40.v20210413]

	at org.openhab.binding.homematic.internal.communicator.client.XmlRpcClient.send(XmlRpcClient.java:112) ~[bundleFile:?]

	... 11 more


==> /var/log/openhab/openhab.log <==

2021-09-15 22:04:01.825 [DEBUG] [ommunicator.AbstractHomematicGateway] - Unable to release the connection to the gateway with id '3014F711A0001F98A9A6E6CE': java.util.concurrent.TimeoutException

java.io.IOException: java.util.concurrent.TimeoutException

	at org.openhab.binding.homematic.internal.communicator.client.XmlRpcClient.send(XmlRpcClient.java:122) ~[bundleFile:?]

	at org.openhab.binding.homematic.internal.communicator.client.XmlRpcClient.sendMessage(XmlRpcClient.java:77) ~[bundleFile:?]

	at org.openhab.binding.homematic.internal.communicator.client.RpcClient.release(RpcClient.java:102) ~[bundleFile:?]

	at org.openhab.binding.homematic.internal.communicator.AbstractHomematicGateway.stopServers(AbstractHomematicGateway.java:267) [bundleFile:?]

	at org.openhab.binding.homematic.internal.communicator.AbstractHomematicGateway$ConnectionTrackerThread.handleInvalidConnection(AbstractHomematicGateway.java:933) [bundleFile:?]

	at org.openhab.binding.homematic.internal.communicator.AbstractHomematicGateway$ConnectionTrackerThread.run(AbstractHomematicGateway.java:912) [bundleFile:?]

	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) [?:?]

	at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305) [?:?]

	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305) [?:?]

	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]

	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]

	at java.lang.Thread.run(Thread.java:829) [?:?]

Caused by: java.util.concurrent.TimeoutException

	at org.eclipse.jetty.client.util.FutureResponseListener.get(FutureResponseListener.java:109) ~[bundleFile:9.4.40.v20210413]

	at org.openhab.binding.homematic.internal.communicator.client.XmlRpcClient.send(XmlRpcClient.java:112) ~[bundleFile:?]

	... 11 more

2021-09-15 22:04:01.829 [DEBUG] [nal.communicator.server.XmlRpcServer] - Stopping XML-RPC server

2021-09-15 22:04:01.842 [DEBUG] [nal.communicator.server.XmlRpcServer] - Initializing XML-RPC server at port 9125

==> /var/log/openhab/openhab.log <==

2021-09-15 22:04:46.858 [DEBUG] [nal.communicator.client.XmlRpcClient] - XmlRpcMessage failed, sending message again 1/3


==> /var/log/openhab/openhab.log <==

2021-09-15 22:05:01.861 [DEBUG] [nal.communicator.client.XmlRpcClient] - XmlRpcMessage failed, sending message again 2/3

==> /var/log/openhab/openhab.log <==

2021-09-15 22:05:16.864 [DEBUG] [nal.communicator.client.XmlRpcClient] - XmlRpcMessage failed, sending message again 3/3

This problem has nothing to do with this thread. Please create a new thread. This type of error message probably occur because of some firewall settings or other network connectivity problems.

You tested with 3.2 Milestone and with @Flole 's jar?
Because currently the ā€œconnectionā€ is lost every night or maybe is not even established correct after restarting anymoreā€¦

Exactly, thatā€™s what I did. The connection problem is something different. I think, I have found a solution but it needs more testing until I can create a PR for it.

Iā€™ve opened a PR with my changes: [Homematic] Fix "Channel not found for Datapoint"-Errors by Flole998 Ā· Pull Request #11493 Ā· openhab/openhab-addons Ā· GitHub

So if someone tested it and confirmed that itā€™s solving the issue and not causing any regressions (@MHerbst I think you have done that?) please leave a comment there.

Yes, I did a short test without any problems

Hi,
after updating to Openhab 3.2 (where the fix should be included), I still get the error messages:

2021-12-23 18:19:20.516 [WARN ] [ternal.handler.HomematicThingHandler] - Channel not found for datapoint ā€˜002C1BE999698A:2#PRESS_LONG_STARTā€™
2021-12-23 18:19:20.518 [WARN ] [irtual.ButtonVirtualDatapointHandler] - Unexpected vaule ā€˜LONG_STARTā€™ for PRESS virtual datapoint
2021-12-23 18:19:21.105 [WARN ] [ternal.handler.HomematicThingHandler] - Channel not found for datapoint ā€˜002C1BE999698A:2#PRESS_LONG_RELEASEā€™
2021-12-23 18:19:22.521 [WARN ] [ternal.handler.HomematicThingHandler] - Channel not found for datapoint ā€˜002C1BE999698A:2#PRESS_LONG_STARTā€™
2021-12-23 18:19:23.108 [WARN ] [ternal.handler.HomematicThingHandler] - Channel not found for datapoint ā€˜002C1BE999698A:2#PRESS_LONG_RELEASEā€™

Interestingā€¦ Do your thing-types have channels? Are there any channels for your things or are all of them missing?

There are channels - and they are working.

//Homematic Schalter1
Switch HMSchalter11kurz "HMSchalter1-1 kurz"  {channel="homematic:HmIP-WRCC2:3014F711A0001F5A4993EAD1:002C1BE999698A:1#PRESS_SHORT", expire="2s,command=OFF"} //, expire="2s,command=OFF"
Switch HMSchalter11lang "HMSchalter1-1 lang" {channel="homematic:HmIP-WRCC2:3014F711A0001F5A4993EAD1:002C1BE999698A:1#PRESS_LONG", expire="2s,command=OFF"}
Switch HMSchalter12kurz "HMSchalter1-2 kurz" {channel="homematic:HmIP-WRCC2:3014F711A0001F5A4993EAD1:002C1BE999698A:2#PRESS_SHORT", expire="2s,command=OFF"}
Switch HMSchalter12lang "HMSchalter1-2 lang" {channel="homematic:HmIP-WRCC2:3014F711A0001F5A4993EAD1:002C1BE999698A:2#PRESS_LONG", expire="2s,command=OFF"}

Hi,
unfortunaly I have the error with 3.2 too.
The devices that are affected seems to be randomly selected. Every startup a couple of another device lost their datapoints.

When I deactivate my manuel written *.things files & add the homematic bridge via this clicke-di-click JSON Config UI-Tool it seems to be stable.

Feels a bit like the beginning of the end of the config files. :frowning:

Kind regards,
Fabu

That was not the question. The question is, if your thing-types have channels and if the actual things have channels. It doesnā€™t matter if you define them or not, if the thing doesnā€™t have them for some reason thatā€™s worth nothing.

If there are channels and just those are missing then the fix probably wonā€™t help youā€¦

Same question for @Fabu.

At least for me my fix solved the issues, I know itā€™s not perfect but the entire stuff is so messed up that this is the only fix I could think about. It might be necessary to completely throw out the channel generation for thing-types and only do it at the thing level if there are now only some channels missing and the thing itself has some channels (although Iā€™m wondering how that could happen with this race condition, I expected it to be ā€œall or nothingā€ and my fix catches the ā€œnothingā€). Iā€™m not sure what happens if there is no connection during thing creation and when the connection is established later on. Thatā€™s all something that someone who still has the issue now needs to investigate.

@flole,
not sure i get your question - does the attached screenshot answer it?