I have an OpenHab system working but I get an error everytime is called this kind of rules (and I have a lot of them, one for each device), anyhow the function runs. Can you help me?
rule "192.168.1.201 rec"
Item Sala_CPE_send changed
var String buffer= Sala_CPE_send.state.toString.split(",")
if (buffer.get(1).contains("ON"))postUpdate(Sala_CPE, ON )
if (buffer.get(1).contains("OFF")) postUpdate(Sala_CPE, OFF )