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

[lgwebos] Fix representation property #17588

Merged
merged 4 commits into from
Oct 19, 2024
Merged

Conversation

lsiepel
Copy link
Contributor

@lsiepel lsiepel commented Oct 18, 2024

Currently the representation property deviceId is only set when the device is added by auto-discovery (managed thing). When the device is configured by a file based configuration the property is not set.

This PR grabs this deviceId a.k.a UUID when performing the hello procedure similar to osVersion etc. This prevents the Thing to be added to the inbox while it already exists.

Also fixes some null annotations and compiler warnings while at it.

Signed-off-by: Leo Siepel <leosiepel@gmail.com>
Signed-off-by: Leo Siepel <leosiepel@gmail.com>
@lsiepel lsiepel added the enhancement An enhancement or new feature for an existing add-on label Oct 18, 2024
@lsiepel lsiepel requested a review from sprehn as a code owner October 18, 2024 17:41
@lsiepel lsiepel changed the title [lgwebsos] Fix representation property [lgwebos] Fix representation property Oct 18, 2024
@lsiepel lsiepel added rebuild Triggers Jenkins PR build and removed rebuild Triggers Jenkins PR build labels Oct 18, 2024
Signed-off-by: Leo Siepel <leosiepel@gmail.com>
Signed-off-by: Leo Siepel <leosiepel@gmail.com>
@@ -494,6 +498,7 @@ public void onMessage(String message) {
map.put(PROPERTY_DEVICE_OS, jsonPayload.get("deviceOS").getAsString());
map.put(PROPERTY_DEVICE_OS_VERSION, jsonPayload.get("deviceOSVersion").getAsString());
map.put(PROPERTY_DEVICE_OS_RELEASE_VERSION, jsonPayload.get("deviceOSReleaseVersion").getAsString());
map.put(PROPERTY_DEVICE_ID, jsonPayload.get("deviceUUID").getAsString());
Copy link
Contributor Author

@lsiepel lsiepel Oct 18, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the deviceId / representationproperty fix, the rest of the changes are compiler/null annotation fixes.

Copy link
Member

@wborn wborn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@wborn wborn merged commit 6ec28a8 into openhab:main Oct 19, 2024
5 checks passed
@wborn wborn added this to the 4.3 milestone Oct 19, 2024
@lsiepel lsiepel deleted the lgwebos-discoveryfix branch October 19, 2024 16:16
KaaNee pushed a commit to KaaNee/openhab-addons that referenced this pull request Nov 8, 2024
* Fix representation property
* Null annotations and compiler fixes
* Fix lowercase

Signed-off-by: Leo Siepel <leosiepel@gmail.com>
matchews pushed a commit to matchews/openhab-addons that referenced this pull request Dec 16, 2024
* Fix representation property
* Null annotations and compiler fixes
* Fix lowercase

Signed-off-by: Leo Siepel <leosiepel@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement An enhancement or new feature for an existing add-on
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants