Hue Emulation - After restart all devices „new“

Hello, i have the hue_emulation 2.5.0M1 and if i change something in the knx.items file some of the well known lights in the Alexa App are marked as unreachable, if i search for new devices i find the „unreachable devices“ once again - now i have the devices as dublicate devices (one reachable and one unreachable)
If i restart the openhab2 Service all my devices are unreachable - i can only search and re-add them and have to delete the old devices.

Is this a Known „Feature“ (bug) :wink:
BR Goofy

I believe you are experiencing this…

1 Like

yes, you right - thats exact my problem :slight_smile:

THX

ok, maybe i need a little bit more help :blush:
i downloaded the org.openhab.io.hueemulation-2.5.0-SNAPSHOT.zip

but if i put the jar file in the /usr/share/openhab2/addons folder, i get this error

2019-04-09 20:47:44.779 [WARN ] [org.apache.felix.fileinstall        ] - Error while starting bundle: file:/usr/share/openhab2/addons/org.openhab.io.hueemulation-2.5.0-SNAPSHOT.jar
org.osgi.framework.BundleException: Could not resolve module: org.openhab.io.hueemulation [218]
  Unresolved requirement: Import-Package: io.swagger.annotations; version="[1.5.0,2.0.0)"; resolution:="optional"
  Unresolved requirement: Import-Package: org.openhab.core.automation

	at org.eclipse.osgi.container.Module.start(Module.java:444) ~[?:?]
	at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:383) ~[?:?]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundle(DirectoryWatcher.java:1260) [10:org.apache.felix.fileinstall:3.6.4]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundles(DirectoryWatcher.java:1233) [10:org.apache.felix.fileinstall:3.6.4]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.doProcess(DirectoryWatcher.java:520) [10:org.apache.felix.fileinstall:3.6.4]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:365) [10:org.apache.felix.fileinstall:3.6.4]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:316) [10:org.apache.felix.fileinstall:3.6.4]

it looks like the org.openhab.core.automation is missing - but can you tell me, how to install this package :smirk:

Thank you so much :+1:

That is installed when you install the “experimental” rule engine. I wonder though why that is not installed automatically.

1 Like

ok, i installed the package “Rule Engine (Experimental)”, but still this error ?
Actual i have the Version 2.4.0 - should i go to 2.5.0~M1-1 ?

2019-04-09 21:19:10.677 [INFO ] [.internal.GenericScriptEngineFactory] - Activated scripting support for ECMAScript
2019-04-09 21:19:10.862 [INFO ] [.internal.GenericScriptEngineFactory] - Activated scripting support for ECMAScript
2019-04-09 21:20:12.342 [INFO ] [core.karaf.internal.FeatureInstaller] - Uninstalled 'openhab-misc-hueemulation'




2019-04-09 21:24:25.986 [WARN ] [org.apache.felix.fileinstall        ] - Error while starting bundle: file:/usr/share/openhab2/addons/org.openhab.io.hueemulation-2.5.0-SNAPSHOT.jar
org.osgi.framework.BundleException: Could not resolve module: org.openhab.io.hueemulation [231]
  Unresolved requirement: Import-Package: io.swagger.annotations; version="[1.5.0,2.0.0)"; resolution:="optional"
  Unresolved requirement: Import-Package: org.openhab.core.automation

	at org.eclipse.osgi.container.Module.start(Module.java:444) ~[?:?]
	at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:383) ~[?:?]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundle(DirectoryWatcher.java:1260) [10:org.apache.felix.fileinstall:3.6.4]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundles(DirectoryWatcher.java:1233) [10:org.apache.felix.fileinstall:3.6.4]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.doProcess(DirectoryWatcher.java:520) [10:org.apache.felix.fileinstall:3.6.4]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:365) [10:org.apache.felix.fileinstall:3.6.4]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:316) [10:org.apache.felix.fileinstall:3.6.4]



openhab> bundle:list
START LEVEL 100 , List Threshold: 50
 ID │ State     │ Lvl │ Version                │ Name
────┼───────────┼─────┼──
.
.
.
231 │ Installed │  80 │ 2.5.0.201904082133     │ openHAB Add-ons :: Bundles :: Hue Emulation Service

But without functionality - the URL /api/testuser/lights?debug=true gives me a 404 Not Found

It looks like you will need to upgrade to a snapshot build due to the packages being moved after the ESH reintegration. It would be an interesting test to remove the new rule engine bfore upgrading to see if it installs automatically when resolving dependencies.

OK, i updated to the Version 2.5.0-M1-1 than i uninstalled all packages.
after this i update to the version from the testing repo (Version: 2.5.0-SNAPSHOT (#1566))
than i put the org.openhab.io.hueemulation-2.5.0-SNAPSHOT.jar in the /usr/share/openhab2/addons and chown openhab:openhab ./org.openhab.io.hueemulation-2.5.0-SNAPSHOT.jar

but still the same issue ?

2019-04-09 22:14:08.487 [WARN ] [org.apache.felix.fileinstall        ] - Error while starting bundle: file:/usr/share/openhab2/addons/org.openhab.io.hueemulation-2.5.0-SNAPSHOT.jar
    org.osgi.framework.BundleException: Could not resolve module: org.openhab.io.hueemulation [201]
      Unresolved requirement: Import-Package: io.swagger.annotations; version="[1.5.0,2.0.0)"; resolution:="optional"
      Unresolved requirement: Import-Package: org.openhab.core.automation

    	at org.eclipse.osgi.container.Module.start(Module.java:444) ~[?:?]
    	at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:383) ~[?:?]
    	at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundle(DirectoryWatcher.java:1260) [10:org.apache.felix.fileinstall:3.6.4]
    	at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundles(DirectoryWatcher.java:1233) [10:org.apache.felix.fileinstall:3.6.4]
    	at org.apache.felix.fileinstall.internal.DirectoryWatcher.doProcess(DirectoryWatcher.java:520) [10:org.apache.felix.fileinstall:3.6.4]
    	at org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:365) [10:org.apache.felix.fileinstall:3.6.4]
    	at org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:316) [10:org.apache.felix.fileinstall:3.6.4]

after i installed the Rule Engine (Experimental) manual - i got this

2019-04-09 22:19:26.185 [INFO ] [io.hueemulation.internal.ConfigStore] - No unique ID assigned yet. Assigning acba7963-4a77-4a0e-bc28-eed2588344a4 and restarting...
2019-04-09 22:19:26.286 [INFO ] [hueemulation.internal.PairingTimeout] - Hue Emulation pairing disabled. Service available under /api
2019-04-09 22:19:26.354 [INFO ] [hueemulation.internal.PairingTimeout] - Hue Emulation pairing disabled. Service available under /api
2019-04-09 22:19:31.101 [WARN ] [ish.jersey.server.ApplicationHandler] - Component of class class org.openhab.io.hueemulation.internal.HueEmulationService$StatusResource cannot be instantiated and will be ignored.
2019-04-09 22:19:31.820 [INFO ] [ulation.internal.HueEmulationService] - Hue Emulation service started
2019-04-09 22:19:32.558 [INFO ] [.internal.GenericScriptEngineFactory] - Activated scripting support for ECMAScript
2019-04-09 22:19:32.657 [INFO ] [.internal.GenericScriptEngineFactory] - Activated scripting support for ECMAScript

Now i looks a little bit better … but my devices are missing :slight_smile:

[{"error":{"address":"testuser/lights","description":"Not Authorized","type":1}}]

restart the service give me this messages

2019-04-09 22:26:44.031 [INFO ] [ebuilder.internal.HomeBuilderServlet] - Started Home Builder at /homebuilder
2019-04-09 22:26:44.424 [INFO ] [openhab.ui.paper.internal.PaperUIApp] - Started Paper UI at /paperui
2019-04-09 22:26:44.792 [INFO ] [panel.internal.HABPanelDashboardTile] - Started HABPanel at /habpanel
2019-04-09 22:26:50.662 [WARN ] [ish.jersey.server.ApplicationHandler] - Component of class class org.openhab.io.hueemulation.internal.HueEmulationService$StatusResource cannot be instantiated and will be ignored.
2019-04-09 22:26:51.379 [INFO ] [ulation.internal.HueEmulationService] - Hue Emulation service started
2019-04-09 22:26:51.725 [INFO ] [.internal.GenericScriptEngineFactory] - Activated scripting support for ECMAScript
2019-04-09 22:26:51.849 [INFO ] [.internal.GenericScriptEngineFactory] - Activated scripting support for ECMAScript



201 │ Active │  80 │ 2.5.0.201904082133    │ openHAB Add-ons :: Bundles :: Hue Emulation Service
....
219 │ Active │  80 │ 1.14.0.201904020715   │ openHAB KNX Binding
220 │ Active │  80 │ 2.5.0.201904040200    │ openHAB Add-ons :: Bundles :: KNX Binding
221 │ Active │  80 │ 2.5.0.201904040206    │ openHAB Add-ons :: Bundles :: TRÅDFRI Binding
222 │ Active │  80 │ 2.5.0.201904010600    │ openHAB Core :: Bundles :: 1.x Compatibility Layer
223 │ Active │  80 │ 2.5.0.201904010610    │ openHAB Core :: Bundles :: Configuration USB-Serial Discovery
224 │ Active │  80 │ 2.5.0.201904010611    │ openHAB Core :: Bundles :: Configuration USB-Serial Discovery for Linux using sysfs scanning
225 │ Active │  80 │ 2.5.0.201904010611    │ openHAB Core :: Bundles :: Configuration Serial
226 │ Active │  80 │ 2.5.0.201904010604    │ openHAB Core :: Bundles :: Serial Transport
227 │ Active │  80 │ 2.5.0.201904010609    │ openHAB Core :: Bundles :: Serial Transport for RXTX
228 │ Active │  80 │ 2.5.0.201904010609    │ openHAB Core :: Bundles :: Serial Transport for RFC2217
229 │ Active │  80 │ 2.5.0.201904040208    │ openHAB Add-ons :: Bundles :: Java Sound Support
230 │ Active │  80 │ 2.5.0.201904040208    │ openHAB Add-ons :: Bundles :: Web Audio Support
231 │ Active │  80 │ 2.5.0.201903170912    │ Basic UI
232 │ Active │  80 │ 2.5.0.201903170921    │ openHAB HomeBuilder UI
233 │ Active │  80 │ 2.5.0.201903170906    │ Classic Icon Set
234 │ Active │  80 │ 2.5.0.201903170926    │ Paper UI
235 │ Active │  80 │ 2.5.0.201903170919    │ HABPanel user interface
236 │ Active │  80 │ 2.5.0.201904010547    │ openHAB Core :: Bundles :: Automation
237 │ Active │  80 │ 2.5.0.201904010612    │ openHAB Core :: Bundles :: Automation Media Modules
238 │ Active │  80 │ 2.5.0.201904010612    │ openHAB Core :: Bundles :: Automation Script Modules
239 │ Active │  80 │ 2.5.0.201904010612    │ openHAB Core :: Bundles :: Automation Script RuleSupport
240 │ Active │  80 │ 2.5.0.201904010612    │ openHAB Core :: Bundles :: Automation REST API

Interesting… the dependencies didn’t install the rule engine…

I just realized the PR that I linked to is not merged yet, so the fix is not yet in the snapshot build of the binding. IIRC, when the fix is in there, yoiu will need to delete and rediscover your Alexa devices. So, I think you’re just a little early, but should be all set when it’s out.

Ups. I’ll fix that tomorrow and provide a new zip file. Without the status component you can’t troubleshoot (eg. the /api/status page does not work)

Oh, right… there’s a jar in GH!

did you have a new zip for testing :slight_smile:

I have just created a new zip.
Unfortunately I have found out that my provided zips will work on OH 2.5 snapshot only.

Will it work with 2.5.0 m1?
Nm the question saw that it does.not work with m1. I’ll install the latest snapshot to try it out.
Regards s