I want to get the value ETHEUR.last out of here:
https://apiv2.bitcoinaverage.com/indices/global/ticker/short?crypto=ETH&fiat=EUR
the json is:
{
"ETHEUR": {
"last": 937.7577893018137,
"timestamp": 1516477208,
"averages": {
"day": 782.0905275642145
}
}
}
I tested it here:
And the json-string should be:
$.ETHEUR.last
But this gives me an error
Number nuEthereum "Ethereum: [%.2f °C]" { http="<[http://apiv2.bitcoinaverage.com/indices/global/ticker/short?crypto=ETH&fiat=EUR:60000:JSONPATH($.ETHEUR.last)]" }
2018-01-20 21:03:07.397 [WARN ] [.core.transform.TransformationHelper] - Cannot get service reference for transformation service of type JSONPATH
2018-01-20 21:03:07.397 [WARN ] [ab.binding.http.internal.HttpBinding] - Couldn't transform response because transformationService of type 'JSONPATH' is unavailable
If I use this, I get to much, looks like json does not work
String stEthereum "Ethereum: [%s]" { http="<[https://apiv2.bitcoinaverage.com/indices/global/ticker/short?crypto=ETH&fiat=EUR:60000:JSONPATH($.ETHEUR)]" }
2018-01-20 20:58:39.496 [vent.ItemStateChangedEvent] - stEthereum changed from {
"ETHEUR": {
"averages": {
"day": 782.5499795844371
},
"last": 937.8747521049567,
"timestamp": 1516478252
}
} to {
"ETHEUR": {
"last": 937.7548494130491,
"timestamp": 1516478309,
"averages": {
"day": 782.5760137173403
}
}
}
Whatever I do I cannot get the value of last. Any idea what I’m doing wrong?