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

Disable Things via MainUI not working in latest SNAPSHOT (30.08.2021) #1150

Closed
t2000 opened this issue Aug 30, 2021 · 3 comments · Fixed by #1151
Closed

Disable Things via MainUI not working in latest SNAPSHOT (30.08.2021) #1150

t2000 opened this issue Aug 30, 2021 · 3 comments · Fixed by #1151
Labels
bug Something isn't working main ui Main UI

Comments

@t2000
Copy link
Contributor

t2000 commented Aug 30, 2021

I have just updated my openHAB installation to the latest SNAPSHOT: openHAB3-Distribution number 2477
see https://ci.openhab.org/job/openHAB3-Distribution/2477/

Unfortunately I cannot disable a Thing via the Main UI anymore. (Doesn't matter if the thing was created as a JSON file via the UI or text based via a .things file)

It works on the console, hence I think its a bug in the UI

openhab> things disable tradfri:gateway:ikeagw
tradfri:gateway:ikeagw successfully disabled.

The error I get is: "Error while disabling or enabling: Unsupported Media Type", see Screenshot.

disableThing

I am using Chromium Version 92.0.4515.159 (Official Build) Arch Linux (64-bit)

@t2000 t2000 added bug Something isn't working main ui Main UI labels Aug 30, 2021
@lolodomo
Copy link
Contributor

Possible link with this API change from yesterday?
openhab/openhab-core#2469

@lolodomo
Copy link
Contributor

@ghys : can you please check what content type you are using when passing the value.
I set it to text/plain in the API.

@t2000
Copy link
Contributor Author

t2000 commented Aug 30, 2021

@lolodomo Bingo thats the issue:

this.$oh.api.putPlain('/rest/things/' + this.thingId + '/enable', enable.toString(), 'application/json', 'application/json').then((data) => {

The UI sends application/json.

But what should be the correct type now? Since its just a String the text/plain is probably correct, so it should be changed in the WebUI, correct?

t2000 added a commit to t2000/openhab-webui that referenced this issue Aug 30, 2021
Fixes openhab#1150

Signed-off-by: Stefan Triller <github@stefantriller.de>
ghys pushed a commit that referenced this issue Aug 31, 2021
Fixes #1150.

Signed-off-by: Stefan Triller <github@stefantriller.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working main ui Main UI
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants