I get the following WARN every time my Http binding receives the webpage.
Transformation service JS for pattern Heizoel.js not found!
The Transformation Service is installed and i have other bindings witch use it successfully
Here is my Thing Code
UID: http:url:1bf89b2603
label: Heizöl24
thingTypeUID: http:url
configuration:
authMode: BASIC
headers:
- ""
ignoreSSLErrors: false
baseURL: https://www.heizoel24.de/api/kalkulation/berechnen
delay: 0
stateMethod: POST
refresh: 600
commandMethod: GET
contentType: text/plain
timeout: 3000
bufferSize: 2048
channels:
- id: UnitPrice
channelTypeUID: http:number
label: Preis
description: ""
configuration:
mode: READONLY
stateContent: #other Contend
unit: €/100l
stateTransformation: JSONPATH:$.Items[0].UnitPrice ∩ JS:Heizoel.js
Here is the Heizoel script:
(function(i) {
result = Math.round(i.replace('.',',')
return (result);
})(input)
The Jsonpath Transformation works for a String because it returns [123.456] in the JSONPath Online Evaluator and sets a String to 123.456 but not the Number Item so i have to Transform it a second time.
I have also tried it with REGEX there is the same Problem as stated above it dos not find the Transformation service.
Please help me
Greetings Markus