openhab / openhab-addons

Add-ons for openHAB
https://www.openhab.org/
Eclipse Public License 2.0
1.88k stars 3.58k forks source link

[exec] Demo code endless loop #5603

Closed Coernel82 closed 3 years ago

Coernel82 commented 5 years ago

The demo.rules on https://www.openhab.org/addons/bindings/exec/ results in an endless loop:


  while(yourcommand.state != OFF){
         Thread::sleep(500)
      }
9037568 commented 5 years ago

Did you write that without all of the code that's supposed to go with it?

Coernel82 commented 5 years ago

No, no! I used the complete set of files (things, items, rules etc.!). After changing the three lines above to Thread::sleep(2000) without the loop the demo worked.

I debugged the demo.rules by placing a console-log message at each line to see where the rule stopped.

Rossko57 commented 5 years ago

See also https://github.com/openhab/openhab2-addons/pull/5669

9037568 commented 3 years ago

Closing because this loop no longer exists in the docs.