OilFox Binding for OH4 and OH5

I’ve forked the OilFox binding from here. Many thanks to the author for his work. Unfortunately, there hasn’t been an update to current APIs in 6 years.

I adapted the fork to the current OpenHAB API and the new Oilfox API. These are the informations provided by the new OilFox API (German screenshot):

You can find the OilFox binding on GitHub.
If you want to build the binding yourself use the Branch 4.3.x for openHAB 4.3.x and the branch master for openHAB 5.0.0.

You can download the .jar file from GitHub Releases (sorry, as a new user I am only allowed to post max 2 links) .

If you encounter any issues with the binding, please enable debug log in Karaf console
log:set DEBUG org.openhab.binding.oilfox
and post the debug log as new issue on GitHub.
There are no private data (email…) in the log.

Your feedback is appreciated.

regards
Thomas

1 Like

Hello Thomas, this sounds great! I will test it soon :slight_smile: since some years i am runing on this solution Fox Oil Sensor - Curl API ... How?
It works well reading the data once a day.
Best regards

Hello Simon,
I had a bash script that set the items once a day via the REST API. It worked, but it wasn’t already integrated.
You can test in parallel with the Curl API. My binding handles it if the tokens becomes invalid due to access from another application with the same user.
Best regard
Thomas

The marketplace is the best place to post a binding like this. Then users can install the binding from the Add-on store like any official binding.

If it won’t let you create a post there because of your status let me know and I can bump you up to a regular user.

Originally, I wanted to wait for positive feedback. But you’re right, this way I can reach more interested users.

My status seems to have been sufficient, I posted the new binding on the marketplace.
OilFox on marketplace

I hope I have provided all the necessary information.

1 Like

Are there any documentation how the build from marketplace works ?
I installed my binding from marketplace on OH4 and OH5. On OH5 it worked but on OH4 the binding are not loaded.

2025-05-05 16:25:56.143 [WARN ] [rketplace.MarketplaceBundleInstaller] - The marketplace bundle was successfully installed but doesn’t start: Could not resolve module: org.openhab.binding.oilfox [269]
Unresolved requirement: Import-Package: com.google.gson; version=“[2.11.0,3.0.0)”

openhab> bundle:list | grep OilFox
269 x Installed x 80 x 5.0.0.202505041734 x openHAB Add-ons :: Bundles :: OilFox Binding

I fixed it for OH4 by removing the download link for the OH5 jar file.
Is it not possible to provide different jar files for OH4 and OH5 ?

Right now, you have to create separate posts for different versions of the binding. You’ll notice most of the posts have a version range as part of the title: (e.g. [4.0.0;5.0.0)). This controls which versions of OH “see” the post . You’ll need to create one post for OH 4 and another for OH 5 and set the version ranges for each.

1 Like

I have just installed the binding as addon.
Downloaded the latest 4.3.6 binding from GitHub

But it says BRIDGE_UNINITIALIZED

bridge is defined as
Bridge oilfox:account:myaccount [ email=“personal@mail”, password=“password”, refresh=6 ]
Thina as
Thing oilfox:device:myaccount:mydevice “OilFox Device” (oilfox:account:myaccount) @ “Oiltank” [ hwid=“ONxxxxxxxxxx” ]

any hints what is missed to initialize the bridge ?

If you’re using the binding for version 4.x, please also refer to the README of version 4.x. There were changes between 4.x and 5.x.

README 4.x

Necessary change: Replace “account” → “bridge”

Thanks for the hint, I missed that in the selection for OH4.3
Bridge and Thing are ONLINE but still no values.
Do I have to wait for the interval to pass, that data are updated?

You can find it here.

No, you should get values ​​immediately. Is there an error message in the openhab.log?

If not: disable bridge, turn on debug for oilfox binding, enable bridge and post all oilfox messages from openhab.log.

Let me know if you need further explanation.

Disable bridge and enable did the job

I have now correct values (same as in the App)

Thanks a lot for your help