HTTP-Binding - Regex

Hi all,

just trying to move from my old and well working OH 1.8 to OH2 and check what’s running and what is not.
I do have a number of Arduino’s running here, which promote the info about their connected sensors via HTTP. So in OH1.8 i’m using often the HTTP-binding with RegEx to import this info into OH.
It looks like reading from HTTP and RegEx is ether not working or at least different in OH2. I also use the HTTP-Binding to post info to the Arduino’s, this is working well without changes.

BTW: I’m using the cache-functionality, setup in openhab.cfg for reading with this binding. Maybe this is the not or different working part?? (But i don’t think so, it looks like the whole content of the HTTP is filled into the OH2-item. I saw the same behaviour in 1.x, when the RegEx fit’s everything.)

See my example in item-definition:
Reading is working well in OH 1.x and NOT working in OH2:
String A51_HK1C “Heizkreis WoZi West [%s]” (A5x,HKreis,EG_Wohnzimmer) {http=<[A51chache:60000:REGEX(.?HK1: (.?)
.*)]" }

This one to send data via the binding; it is working in in OH1.8 as well as OH2
Switch A51_HK1S “Heizkreis EG1” (A5x,HKreis,EG_Wohnzimmer) {http=">[ON:POST:http://192.168.0.51/HK1ON] >[OFF:POST:http://192.168.0.51/HK1OFF]" }

Any hint would be very kind.
Thanks,
andreas

With OH2, make sure you have the RegEx Transformation installed too! Since it is off by default.

Otherwise, do you get any related errors in the /var/logs/openhab.logs ?

Works now. So many thanks. Typical noob-issue, sorry :wink:

No problem, I made the same mistake with the MAP Transformation when I transitioned from 1.8 to 2 so it’s easily done! :wink: