Dear all,
some weeks ago i installed a FoxRadar Sensor by Fox Insights to monitor the level of my heater oil tank. Since then i do receive the values in the FoxOil App. However, of course i also want to import them into openhab. I found some old topics and solutions at google, but they seemed to change the API since then. Now they do have a official documented API: customer-api/docs/v1 at main · foxinsights/customer-api · GitHub
But i am a beginner and dont know how to use this API. I google “openhab curl” and found the HTTP Binding. I just tried to add the information in a HTTP Binding thing, but this doesn’t seem to work …
How to setup the thing to send this command:
curl https://api.oilfox.io/customer-api/v1/login -H 'Content-Type: application/json' --data '{"password":"mySafePassword","email":"myUser@someMailProvider.com"}'
The response should be an access token which should be used for the data request:
{
"token_type": "Bearer",
"access_token": "eyJ0eXAiOiJKV[...]wXdfjS9g7P7XAt6GnOQ",
"refresh_token": "eyJ0eXAiOiJKV[...]mFpd7W2RmOx0XGvEAIg"
}
The data will then be received by such a command:
curl https://api.oilfox.io/customer-api/v1/device/ON0123456789 -H 'Authorization: Bearer eyJ0eXAiOiJKV1[...]wXdfjS9g7P7XAt6GnOQ'
Is the HTTP Binding the right way to do this?
Can someone give me a hint how to configure the thing/channel/item?
Thank you!!