Getting String Item Status from OpenHAB 3 to use in own Android App

Hi,

I am currently trying to get the current Status of a String Item that I created, to use the information in my own Android App (in Android Studio) via the REST API. But at the moment I am getting an access related error: E/Rest Response: com.android.volley.NoConnectionError: java.net.SocketException: socket failed: EACCES (Permission denied)

I followed this tutorial: https://www.youtube.com/watch?v=DpEg_UVkv6E which is not for OpenHAB 3 in specific and I am guessing that I am missing some kind of authentification. I have created an API Token to use for the usecase, but I don’t really know what to do with it.

Can Someone help me get the String from my Item to use in my app?

Thank you in advance!

Leo

Have you tried it this way?


https://{user of myopenhab.org}:{password of myopenhab.org}@{Base URL}:443/rest/items/YourItem

In this case I get this ERROR: E/Rest Response: com.android.volley.VolleyError: java.lang.SecurityException: Permission denied (missing INTERNET permission?)

This seems to me like there is something wrong in my manifest?

I am using this command:
<uses-permission android:name="com.android.alarm.permission.INTERNET/>"

outside the application parameters in my manifest file.

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.