HTTP binding - openHAB 3 version

Excuse the ignorance: does this mean that those on OH 2.5.x can’t use this binding anymore? Or are the earlier versions available somewhere?

Exactly. There is no version for 2.5.x available because this is a new binding and these will not be backported.

HTTP binding - openHAB 2 version 

…in that case, probably worth changing the title of this thread to avoid confusion.

Given OH3 isn’t available yet (and for quite some people it’s even_farther_ away because they have specific issues to cover in their production that the day 1 release will not meet, think those to use v1 bindings that no v2 replacement is available for), it would be a kind and helpful move of yours to provide a 2.5.9 jar.
So people can start migrating today.

1 Like

Unfortunately this is not possible. Since OH3 requires some refactoring, I can’t easily produce an OH2 compatible version any longer.

why not upload any of the older jars ?
Here’s the one I use org.openhab.binding.http-2.5.8-SNAPSHOT.txt (57.5 KB, rename to .jar)

1 Like

I’m using this one (rename to .jar).

I think it was the last one uploaded for OH2. It’s filesize is a bit larger.

org.openhab.binding.http-2.5.8-SNAPSHOT.txt (59.3 KB)

1 Like

HI,
I have an Item with http GET for the state and http POST for the command, how can I translate in http2 binding? Here is the http1:

{ http=">[*:POST:http://192.168.0.xx:2323/?password=xxx&cmd=setStringSetting&key=screenBrightness&value=%2$s] <[http://192.168.0.xx:2323/?password=xxx&cmd=deviceInfo&type=json:30000:JSONPATH($.screenBrightness)]" }

Thanks for your help

Anyone can help me?
As work around I create 2 things: one for the status and one for the command with a rule to update the status of the command item … but I am sure that it is possible to avoid this stupid thing since I have several items to migrate.

Thanks for your help

I can have a look later. But I think with the current Code this is the way to go.

The state is always GET, the command mode cam be changed. So it should work OOTB for you.

So far I use the snapshot version for both, OH 3 and the HTTP Binding.
Things and 4 channels have been created in UI, three of them are working well:

  • 1 x number and 2 x string channel

Each channel has its own JS script attached to it, I am pasring a local ics.file for the upcoming garbage dates.

The datetime channel is making some trouble, the log says:

2020-10-25 17:03:33.632 [WARN ] [iles.JavascriptTransformationProfile] - Could not transform state 'UNDEF' with function 'abfall_naechste_abholung_datum.js' and format '%s'
2020-10-25 17:04:03.802 [WARN ] [iles.JavascriptTransformationProfile] - Could not transform state 'UNDEF' with function 'abfall_naechste_abholung_datum.js' and format '%s'
2020-10-25 17:04:33.880 [WARN ] [iles.JavascriptTransformationProfile] - Could not transform state 'UNDEF' with function 'abfall_naechste_abholung_datum.js' and format '%s'
2020-10-25 17:05:03.448 [WARN ] [iles.JavascriptTransformationProfile] - Could not transform state 'UNDEF' with function 'abfall_naechste_abholung_datum.js' and format '%s'
2020-10-25 17:05:33.732 [WARN ] [iles.JavascriptTransformationProfile] - Could not transform state 'UNDEF' with function 'abfall_naechste_abholung_datum.js' and format '%s'

I understand, that the default setting is %s, so I tried allready some other settings like [%1$td.%1$tm.%1$tY], but the result is still the same.

Somebody else have seen this?

Can you please show the script, the input and the expected output? Thanks.

Hi Jan, thanks for helping.
Script (rename to abfall_naechste_abholung_datum.js)
abfall_naechste_abholung_datum.txt (6.3 KB)

Input file: (rename to abfall2020.ics)
abfall2020.txt (26.4 KB)

Thing config:
grafik

Channel config:

The output should be just the date, at least it is running like this within the OH 1.x Version.

channel profiles are unrelated to binding transformations.
At OH2, transform profiles were restricted to use with String type Items, I do not think that has been addressed yet.

Thanks for the hint, changed it to string… date is now visible. Since the output ist just being displayed in the sitemap and no further action will be done with it, this is fine for me as well.

It won’t be fixed in OH2, but is already implemented in OH3!

That’s good. :slight_smile:
I suppose it did not work in this case then, because the user’s transform does not output an ISO date string that can be parsed into a DateTime Item state,

Thanks Solved now.
Finally the problem was that I always need to clean the cache after any .things update …

That‘s Why I never use textual configuration.