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] HM-CC-TC Thermostat HANDLER_CONFIGURATION_PENDING due to invalid default parameters #13097

Closed
BifbofII opened this issue Jul 9, 2022 · 7 comments · Fixed by #13168
Labels
bug An unexpected problem or unintended behavior of an add-on

Comments

@BifbofII
Copy link

BifbofII commented Jul 9, 2022

The default configuration of things for the HM-CC-TC device seems to contain invalid parameter values.

Expected Behavior

Configuration files (thing files) that are correctly working in OH2.5 should load correctly in OH3.x

Current Behavior

Loading thing files with HM-CC-TC things results in them ending up in the UNINITIALIZED (HANDLER_CONFIGURATION_PENDING) instead of ONLINE.
Full message shown in the web UI is available here and hints at invalid default parameters being set when the thing is loaded.
If a HM-CC-TC thing is created via the web UI, the configuration fields mentioned in the error message are highlighted red and need to be manually corrected to a value larger than 10 for the user to be able to create a thing.

Possible Solution

From what I can tell, this issue is very similar to #12183, which was related to another component and fixed in February in #12192. I am not familiar with the code enough to provide more pointers or fix it myself and create a PR.

Steps to Reproduce (for Bugs)

Via the web UI or with a thing file, create a thing for a HM-CC-TC device, you should see that the default values are invalid.
An example thing config:

Bridge homematic:bridge:ccu [ gatewayAddress="192.168.xxx.xxx", callbackHost="192.168.xxx.xxx" ] {
  Thing HM-CC-TC JEQ0012660 "Name" @ "Location"
}

Context

My OpenHAB instance is still running on v2.5 since I didn't have time to spend the time on upgrading.
Now I was starting to play around with this an this seems to not work right now.
Is there any way to fix this that his not creating the things via the web UI and fixing all of the invalid parameters by hand?

Your Environment

  • OpenHAB 3.3.0
  • Homematic 3.3.0
  • OpenHAB Docker on Debian
@BifbofII BifbofII added the bug An unexpected problem or unintended behavior of an add-on label Jul 9, 2022
@openhab-bot
Copy link
Collaborator

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

https://community.openhab.org/t/update-to-openhab-3-1-0-breaks-homematic-binding/124095/28

@MHerbst
Copy link
Contributor

MHerbst commented Jul 12, 2022

I think this problem is caused by a change in OH core that checks configuration settings for valid values.

The Homematic binding sends a request to the CCU to receive possible values and also a default value. It seems that for some devices the returned data is maybe not correct. I have tried to find out the allowed values for this devices but they are not documented in the official documentation from EQ3.

Maybe you can help me with a trace logging: please set the log level for the Homematic binding to TRACE and then restart OH. After the restart and loading the thing definitions openhab.log should contain information about the retrieved information. I would need this information.

@BifbofII
Copy link
Author

Thanks for looking into this. This should be the log you asked for. openhab.log. I'll gladly provide more log traces if necessary.

@MHerbst
Copy link
Contributor

MHerbst commented Jul 13, 2022

Thanks for the log file. It is the suspected cause. The returned configuration information for the TIMEOUT data points contain these values:

HmDatapoint[name=TIMEOUT_THURSDAY_4,value=null,defaultValue=0,type=INTEGER,minValue=10,maxValue=1440,options=null,readOnly=false,readable=true,unit=minutes,description=TIMEOUT_THURSDAY_4,info=null,paramsetType=MASTER,virtual=false,trigger=false]

The binding expects a minimum value of "10", but the default value is "0" and this is outside the allowed range. I will have to look into the code. I think the validity check can be modified that default values are accepted if they are outside the allowed range.

@MHerbst
Copy link
Contributor

MHerbst commented Jul 16, 2022

@BifbofII I think, I have solved the problem but I don't have device that I can use to verify the solution. I have uploaded a test version of the add-on here: https://github.com/MHerbst/openhab-addons-test (should also work with 3.3).

Please give it a try. If it works correct now, I will create a PR

@BifbofII
Copy link
Author

I just tested your updated version and it works. Thank you so much for your help.
If you create a PR now, will this become available with OH 3.4 or is the release of addons independent from OH itself?

@MHerbst
Copy link
Contributor

MHerbst commented Jul 24, 2022

If you create a PR now, will this become available with OH 3.4 or is the release of addons independent from OH itself?

I have created a PR but the solution will be officially available only with 3.4.

jlaur pushed a commit that referenced this issue Jul 25, 2022
Resolves #13097

Signed-off-by: Martin Herbst <develop@mherbst.de>
leifbladt pushed a commit to leifbladt/openhab-addons that referenced this issue Oct 15, 2022
andan67 pushed a commit to andan67/openhab-addons that referenced this issue Nov 6, 2022
andrasU pushed a commit to andrasU/openhab-addons that referenced this issue Nov 12, 2022
…ab#13168)

Resolves openhab#13097

Signed-off-by: Martin Herbst <develop@mherbst.de>
Signed-off-by: Andras Uhrin <andras.uhrin@gmail.com>
psmedley pushed a commit to psmedley/openhab-addons that referenced this issue Feb 23, 2023
nemerdaud pushed a commit to nemerdaud/openhab-addons that referenced this issue Feb 28, 2023
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
None yet
Development

Successfully merging a pull request may close this issue.

3 participants