Skip to content
This repository has been archived by the owner on May 7, 2020. It is now read-only.

References to items in the Frame declaration, within a sitemap, block updates on icons! #2902

Closed
sailorsail opened this issue Jan 26, 2017 · 6 comments

Comments

@sailorsail
Copy link

In a clean install of openHAB 2.0 Release Build, I've used the following configuration:
file.items

Switch Light_WCSmall_Ceiling 	"Light Ceiling WC Small" 				
Switch Light_WCBig_Ceiling 	"Light Ceiling WC Big" 				
Number Temp_WCBig 		"Temperature WC Big [%.2f °C]" 	

file.sitemap

sitemap demo label="demo" {
	Text label="WC1" {
		Frame label="test" {
			Switch item=Light_WCBig_Ceiling
			}
		}
	Text label="WC2" {
		Frame item=Temp_WCBig {
			Switch item=Light_WCSmall_Ceiling
			}
		}
	}

When I toggle 'Light_WCBig_Ceiling', within “WC1” page, the update of the icon is performed; no refresh is necessary on the user interface (either iOS or Web Basic UI).
However if I toggle 'Light_WCBig_Ceiling', within “WC2” page, the update of the icon is not performed.
Nevertheless, if I refresh the page, navigate back, and in again, the change is then shown.
The only diference here is the use of item=Temp_WCBig in the Frame declaration.
Allegedly, the use of items in frame declarations is possible, but I wasn’t expecting the different behaviour. Shouldn’t the reaction to the toggle be consistent, or is this the expected behaviour?
Do you have any ideias about what's going on?

@kaikreuzer
Copy link
Contributor

Same question that I asked before: Did you identify this to be a problem with the Basic UI only? Does it work with the Classic UI and the native apps?

@sailorsail
Copy link
Author

I did, but I forgot to mention it here! Either Basic UI, Classic UI or native iOS present the same behaviour.

@lolodomo
Copy link
Contributor

lolodomo commented Apr 30, 2017

I can confirm this bug, I was able to reproduce it.
Maybe a problem with produced SSE events ?

@lolodomo
Copy link
Contributor

In fact, all items in such a frame are simply not updated, even when the update is triggered outside.

I should mention some validation errors of my sitemap at OH startup when using such a frame:

2017-04-30 20:24:01.924 [ERROR] [xtext.validation.CompositeEValidator] - Error executing EValidator
java.lang.IllegalArgumentException: The sources EClass 'Sitemap' does not expose the feature 'Widget.LabelColor'
        at org.eclipse.xtext.validation.FeatureBasedDiagnostic.<init>(FeatureBasedDiagnostic.java:33)
        at org.eclipse.xtext.validation.AbstractDeclarativeValidator.createDiagnostic(AbstractDeclarativeValidator.java:613)
        at org.eclipse.xtext.validation.AbstractDeclarativeValidator.acceptError(AbstractDeclarativeValidator.java:556)
        at org.eclipse.xtext.validation.AbstractDeclarativeValidator.error(AbstractDeclarativeValidator.java:441)
        at org.eclipse.xtext.validation.AbstractDeclarativeValidator.error(AbstractDeclarativeValidator.java:420)
        at org.eclipse.xtext.validation.AbstractDeclarativeValidator.error(AbstractDeclarativeValidator.java:408)
        at org.eclipse.smarthome.model.validation.SitemapValidator.checkFramesInWidgetList(SitemapValidator.java:53)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[:1.8.0_121]
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)[:1.8.0_121]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[:1.8.0_121]
        at java.lang.reflect.Method.invoke(Method.java:498)[:1.8.0_121]
        at org.eclipse.xtext.validation.AbstractDeclarativeValidator$MethodWrapper.invoke(AbstractDeclarativeValidator.java:118)
        at org.eclipse.xtext.validation.AbstractDeclarativeValidator.internalValidate(AbstractDeclarativeValidator.java:312)
        at org.eclipse.xtext.validation.AbstractInjectableValidator.validate(AbstractInjectableValidator.java:71)
        at org.eclipse.xtext.validation.CompositeEValidator.validate(CompositeEValidator.java:151)
...
        at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1476)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
        at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
        at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
        at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
2017-04-30 20:24:02.099 [INFO ] [el.core.internal.ModelRepositoryImpl] - Validation issues found in configuration model 'maison.sitemap', using it anyway:
Error executing EValidator

Maybe it is something not accepted.
I should admit that Eclipse Smarthome Designer does not mention an error.

@lolodomo
Copy link
Contributor

@lolodomo
Copy link
Contributor

I also fixed the problem for Basic UI.

@sjsf sjsf closed this as completed in c1270f0 May 22, 2017
cdjackson added a commit to cdjackson/smarthome that referenced this issue Jun 3, 2017
* master: (335 commits)
  Voice: send feedback to an item when listening for a command (eclipse-archived#3451)
  Scheduler: fix ConcurrentModificationException (eclipse-archived#3511)
  [Scheduler] Dropped usage of SimpleDateFormat for trace logging (eclipse-archived#3508)
  Use % sign as default for dimmer items (eclipse-archived#3525)
  updated ThingHandler javadoc
  added regression tests
  ensure thingUdpated cannot be called in parallel with initialize
  moving handler intiialization back to the caller thread
  use decicated locks instead of syncrhonization by object
  add PaperUI setup to IDE setup tasks, adopt documentation (eclipse-archived#3515)
  Bug fix: things not showing on control page (eclipse-archived#3517)
  remove "Type" postfix in item events, fixes 3282. (eclipse-archived#3494)
  use toFullString when creating GroupItemStateChangeEvent (eclipse-archived#3409)
  Made item’s state text consistent + refactored code (eclipse-archived#3466)
  Refactored CoreItemFactory: (eclipse-archived#3507)
  Add CoreItemFactoryTest, in addition to eclipse-archived#3507 (eclipse-archived#3509)
  fix ConcurrentModificationException in AbstractWatchServiceTest (eclipse-archived#3499)
  BasicUI: Treat Switch on NumberItem not as ON/OFF Switch (eclipse-archived#3493)
  An Interface method should not allow for throwing a generic Exception (eclipse-archived#3467)
  Fix eclipse-archived#2902 for Basic UI (eclipse-archived#3496)
  ...

# Conflicts:
#	bundles/io/org.eclipse.smarthome.io.transport.dbus/.classpath
#	bundles/io/org.eclipse.smarthome.io.transport.dbus/META-INF/MANIFEST.MF
#	extensions/binding/pom.xml
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants