Monitor CSV file from heatpump

I actually don’t think this would be too hard to work within OH rules.

val csv = sendHttpGetRequest("url to heat pump").split("\n")
val lastLine = cvs.get(csv.size-1).split(";")

val T = lastLine.get(0).trim
val TimeStamp = lastLine.get(1).trim
val Te_Amb = lastLine.get(2).trim
...

if(Te_Amb_Item.state.toString != Te_Amb) Te_Amb_Item.postUpdate(Te_Amb)

I’m assuming you only care about the last row in the CSV.

I really don’t see this as being any harder than the other recommendations. Obviously, the best approach is the one that uses the tools the developer is most familiar with. But in this particular case, the data is structured enough to easily be managed using the standard String manipulation functions.

1 Like