Hey guys. I have a rule to basically make two tplink switches a three way switch. I have a rule to make the two mirror each other’s state. The rule has worked for several months. I had one little hiccup where the rule stopped working randomly, but a restart of the DiskStation that i have OH2 installed on seemed to get it working again. Here is the rule.
rule "CPkitchen1" when Item CP_Kitchen_Lights changed then val LightsState = CP_Kitchen_Lights.state CP_Kitchen_Slave.sendCommand(LightsState) end rule "CPkitchen2" when Item CP_Kitchen_Slave changed then val SlaveState = CP_Kitchen_Slave.state CP_Kitchen_Lights.sendCommand(SlaveState) end
A few more months pass and the rule stops working again, and this time a restart was not helpful. I take a look at the log files and I noticed this error. Obviously it has something to do with the “sendCommand” part of the rule but I don’t know enough to figure out the details. Any help would be greatly appreciated!
2018-10-25 11:10:28.887 [ERROR] [ntime.internal.engine.RuleEngineImpl] - Rule 'CPkitchen2': An error occurred during the script execution: Could not invoke method: org.eclipse.smarthome.model.script.actions.BusEvent.sendCommand(org.eclipse.smarthome.core.items.Item,java.lang.Number) on instance: null