Hello, does somebody have a working rule to enable or disable a thing?
Cannot be done through Rules DSL except through the REST API and the sendHttpXRequest actions.
Cannot be done in Blockly except through the REST API and the HTTP block or the “inline script” block using the JS below.
In JS Scripting: things.getThing('UID:OF:THE:THING').setEnabled(false);
jRuby has a similarly simple one liner I’m sure.
Thank you, this works perfect!!!
Gesendet von Mail für Windows
Jruby
things["uid:of:the:thing"].disable
things["uid:of:the:thing"].enable