Hello,
I have a rule in which I process a fixed length string (coming from an arduino mqqt gateway and representing humidity, temperature and RSSI [from RFM69W radio] in the form 58.35:20.12:29.00)
The rule splits the string into 3 parts with substring and are connected with Items. This seems to work well but I get an error in the log and don’t know why ?
Any hints greatly appreciated.
My rule (where can i find the tags for code insertion btw ?)
var String buffer
var String humid
var String temp
var String rfm69RSSI
rule "weerstation rule"
when
Item weerstation_hum received update
then
buffer=weerstation_hum.state.toString
humid=buffer.substring(0,5)
temp=buffer.substring(6,11)
rfm69RSSI=buffer.substring(12,14)
logInfo("weerstation",buffer)
logInfo("humidity ",humid)
logInfo("temp ",temp)
logInfo("RSSI ",rfm69RSSI)
weerstation_hum.postUpdate(humid)
weerstation_temp.postUpdate(temp)
weerstation_rssi.postUpdate(rfm69RSSI)
end