-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
[hueemulation] Migrate to bnd #5243
Conversation
The build seems unhappy |
Yup, I have added the wip label. I'm also extending this service atm to support rooms, scenes and rules. |
1211cab
to
1157c4c
Compare
Because 9k lines of code is hard to review, how should I proceed here? The service is very modular, so I could make multiple pull requests introducing one feature at a time? 1/4 of the code is also tests only. To make the review process easier I have:
I will also try to find 2 people that can confirm it works for them. |
1157c4c
to
11ec316
Compare
This pull request has been mentioned on openHAB Community. There might be relevant details there: https://community.openhab.org/t/hue-emulation-only-color-temperature-light/71832/4 |
This pull request has been mentioned on openHAB Community. There might be relevant details there: |
11ec316
to
8e6b8ba
Compare
I'm testing the .jar you linked above but it fails to start: any suggestions? (as part of issue #5419) |
8e6b8ba
to
6d7b30f
Compare
I have updated the jar file and fixed that particular problem |
6d7b30f
to
7be736d
Compare
7be736d
to
221e781
Compare
I have the exact same problem with V5 jar from above. Do I need to add something else? Im on 2.5.0~S1566-1 from apt. |
Are you sure that it is the exact error? Because |
Sorry David, my fault. Youre right, Rule Engine was missing! Is there any change in using the hue emulation? I added a Lighting tag to one of my dimmers and connect a harmony hub. It finds multiple (really many) devices, but it seems that I did not add the one with the tag. Are the tags obsolete? |
I still get an error during startup with V5 using 2.5.0 M1 from the debian repo. The experimental rule engine is installed. Error while starting bundle: file:/usr/share/openhab2/addons/org.openhab.io.hueemulation-2.5.0-SNAPSHOT.jar |
The readme file of this pull request might shed some light into which items are exposed. Tags are not obsolete, but hue emulation will also expose items based on other criteria like the category and item type. Regarding the unresolved requirement: |
The startup indeed works with the Snapshot-version. But now I have problems discovering my devices. I'm still on it. |
…io/hueemulation/internal/RuleUtils.java Co-Authored-By: davidgraeff <[email protected]>
…io/hueemulation/internal/dto/changerequest/HueChangeRequest.java Co-Authored-By: davidgraeff <[email protected]>
I'm currently reworking "org.openhab.core.io.rest.core". It's a mess. So can't work on this bundle atm, but should be able to address review comments by end of the week. |
Signed-off-by: David Graeff <[email protected]>
Signed-off-by: David Graeff <[email protected]>
Jenkins fails on AmazonEchoControl, but succeed with this service. |
David, I will try to test between now and this weekend. Thank you for your efforts! |
sorry a) I think it only finds "Lighing" tags but not "Switchable" tagged items best |
If your group items are tagged as Lighting (or whatever you have configured) that should actually work otherwise it's a bug. Group items are per default exposed as Hue Groups. |
When you guys find undefined, unclear behaviour or bugs in the implementation, please open new Issues so that I can keep track of them. |
How stable are the 2.5 snapshot builds? I didn't appreciate that the bundle was incompatible with the 2.4 release. |
Unfortunately that had to be done because of #4602. I couldn't even add a migration routine, because the hue id sequence numbers were gone after stopping openHAB. The current implementation is expected to be stable. The sequence numbers are stored as item metadata which is managed by the core. |
I tried updating to the latest 2.5 snapshot available through the openhabian repos, but openhab fails to start for unknown reasons -- nothing in the log. I apologize for being unable to test the changes at this time. |
* [HueEmulation] Migrate to bnd * [hueemulation] Use JAX-RS for hue emulation * Split RESTapi class into logical units (ConfigurationAccess, UserManagement, LightsAndGroups) * rules support * scenes support * schedule support * New self-test page under /api/status * Refactor tests: Use jersey JAX-RS server to test without requiring the framework (non OSGi tests) * Worked around doube-activate problem. Signed-off-by: David Graeff <[email protected]>
This pull request has been mentioned on openHAB Community. There might be relevant details there: |
1 similar comment
This pull request has been mentioned on openHAB Community. There might be relevant details there: |
This pull request has been mentioned on openHAB Community. There might be relevant details there: |
* [HueEmulation] Migrate to bnd * [hueemulation] Use JAX-RS for hue emulation * Split RESTapi class into logical units (ConfigurationAccess, UserManagement, LightsAndGroups) * rules support * scenes support * schedule support * New self-test page under /api/status * Refactor tests: Use jersey JAX-RS server to test without requiring the framework (non OSGi tests) * Worked around doube-activate problem. Signed-off-by: David Graeff <[email protected]> Signed-off-by: Pshatsillo <[email protected]>
* [HueEmulation] Migrate to bnd * [hueemulation] Use JAX-RS for hue emulation * Split RESTapi class into logical units (ConfigurationAccess, UserManagement, LightsAndGroups) * rules support * scenes support * schedule support * New self-test page under /api/status * Refactor tests: Use jersey JAX-RS server to test without requiring the framework (non OSGi tests) * Worked around doube-activate problem. Signed-off-by: David Graeff <[email protected]> Signed-off-by: Maximilian Hess <[email protected]>
Fixes #5419
Fixes #5424
The Hue emulation service now provides about 95% of a real Hue bridge with firmware 1.22 and 100% of a Hue bridge with firmware 1.12.
Some details like https access and recurring timers with random element cannot be expressed by current openHAB means.
File statistics:
Jar (works on OH 2.5 snapshots only)
V29
org.openhab.io.hueemulation-2.5.0-SNAPSHOT-v29.zip
Do not use this on your production system, as it does not respect former item <--> hue id mappings.
Head to http://your-ip:8080/api/status for the self test status page: