[quote=“guessed, post:2, topic:185656”]Your transform will either be of the form:
[tt]…,in:XPATH(/rootNode/next/next2/stuffToExtract),…[/tt] OR;
[tt]…,in:XSLT(yourFile.xsl),…[/tt] OR;
[tt]…,in:JS(yourFile.js),…[/tt]
…depending upon the complexity of the data-extraction. I would guess that running XPath is going to be the easiest for most simple cases, with XSLT and JS just being a preference (and potentially performance, but I’ve never measured their cost)[/quote]
Ok, I tried with XPath after adjusting a little my Vera plugin.
Here is my item definition in openHAB:
String FreeboxTeleviseur "T?l?viseur [%s]" (GVera) {mios="unit:house,device:437/service/urn:freebox-fr:serviceId:Freebox1/PeripheriquesReseau, in:XPATH(/net_devices/device[@mac=\"XX:XX:XX:XX:XX:XX\"])"}
At openHAB, I get this error:
2014-12-23 11:06:06.585 [ERROR] [i.internal.GenericItemProvider] - Binding configuration of type 'mios' of item ?FreeboxTeleviseur? could not be parsed correctly.
org.openhab.model.item.binding.BindingConfigParseException: Config for item 'FreeboxTeleviseur' could not be parsed. Bad general format 'unit:house,device:437/service/urn:freebox-fr:serviceId:Freebox1/PeripheriquesReseau, in:XPATH(/net_devices/device[@mac="00:1B:D3:D2:65:02"])'
Any idea ? Is my declaration wrong ?
Edit: I tried with that item definition too but no better result:
String FreeboxTeleviseur "T?l?viseur [%s]" (GVera) {mios="unit:house,device:437/service/urn:freebox-fr:serviceId:Freebox1/PeripheriquesReseau, in:XPATH(/net_devices/device[@mac='XX:XX:XX:XX:XX:XX'])"}
Edit2: fixed by suppressing the space in the mios string 8)