Hello Openhab community,
Is there an addon that can show the OS name/version?
The systeminfo binding doesnt have a channel for that…unless I missed it
Hello Openhab community,
not sure why a addon is needed
but from MainUi Help and About Technical Information gives you
User data folder
Azul Systems, Inc.
curl api systeminfo and you get this.
"javaVendor": "Azul Systems, Inc.",
and from Karaf CLI you type info and it also provides all the OS and other information.
So not understanding why an add on would be required.
Thank you very much
@justaoldman maybe I am missing something but why when I try to pass the request URL below to my browser I get the authentication required error?
You need to replace bearer with the actul tokenstring you need to create first in MainUI (click on the side bar on your profile icon)
OK got the key but I am not trying to use CURL - I am trying to understand the correct syntax for the URL to pass to my browser so I can see the Json response. Ultimately I will be using the HTTP binding and transform the JSON response. When I use
http://192.168.1.84:8080/rest/systeminfo/ I get the error below. so not sure where and how to append the key in the URL
You can’t do it in a browser like this. You need to make a http/post request - but browser are not able to send http/post
according to the REST API a GET request is required.
What is not working by using the browser URL entry bar is to add the authentication header in the URL entry bar.
Btw. browsers also send POST request as long as they use an action form - but again not by using the URL entry field.
ah ok interesting . Apologies no expert here I thought this was possible with openhab …
There are also other ways of achieving this.
In a rule you can use executeCommandline action to issue an OS command which returns the OS version. Once you assign it to a variable you can do whatever you like.
yes that’s true I used the exec binding successfully to play sound files so it can be applied here for sure. I thought this was possible because I have a similar setup calling a URL that returns a json response which i further transform. But I guess it’s not possible with openhab. What confused me is when I saw the Request URL field in the API explorer I thought you can just paste the URL into a browser and it will return the same Json response…
let’s step back for a second.
You run a URL which returns a JSON which you cannot proceed?
It is better if you describe your real problem so that we can start helping you solving it.
Have you reviewed the documentation?
There is an entire section that fully explains how to use the rest API.
So back to what @Oliver2 has asked what is the real problem you are trying to solve for?