-
-
Notifications
You must be signed in to change notification settings - Fork 428
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
Sitemaps defined in UI do not load anymore in 4.1M2 #3846
Comments
Sorry I am not familiar at all with the MainUI generator. And I had not in mind there was a specific JSON behind! |
I will see what I can do the next few days. I first need to understand exactly what is happening here. |
This issue has been mentioned on openHAB Community. There might be relevant details there: https://community.openhab.org/t/openhab-4-1-milestone-discussion/149502/69 |
It is 4.1M2, not 4.0M2 ? |
Yes, 4.1M2. Sorry. |
@lolodomo I am afraid the impact of these changes is very big for user defined rules. So far, in UI defined rules, the conditions for color and visibility are just passed as a single field, including the resulting state. It is then analyzed using a regex in the UIComponentSitemapProvider. This mechanism will not work anymore, as there can be multiple conditions with an AND in between, and a single argument at the end. |
Maybe the REGEX could be updated to match several AND conditions? |
I looked into changing the REGEX, but didn't see an obvious way to do it. The main issue is that the UI strips quotes from the conditions when creating the JSON config format. That same format ends up in the JSONDB. So quotes can no longer be used as a separator in the REGEX to identify strings. The REGEX relies on the comparison characters to split out parts again. AND would just be interpreted as part of a string. |
See connected PR's #3846 and openhab/openhab-webui#2145. I believe I now have a workable solution for this. Remains to be done in separate webui PR: support for configuring buttongrid elements. |
This issue has been mentioned on openHAB Community. There might be relevant details there: https://community.openhab.org/t/update-from-3-to-4-no-sitemap-works/150471/8 |
I updated my install to 4.1M2. I have all my sitemaps defined in the UI. They are still confirmed to be valid in the UI, but don't load anymore. Also saving them again does not solve the issue.
Putting them in text files makes them work again.
Below is the log.
@lolodomo I suspect it is caused by #3819, converting an single condition to a collection of conditions. Therefore the logic expects a different json format. The UI sitemap creation support will need to be enhanced with the new functionality, and sitemaps will have to be resaved. Sitemaps in the saved json db do not have the correct syntax anymore.
The text was updated successfully, but these errors were encountered: