Openhabian * Rules related to the issue:
I’ve spend a better part of the day pouring over docs and examples attempting to see why won’t select any case? So I’ve been running from a related issue for some time and that is logging. I’m sort of used to the concept of a console and the old “printf” but I guess we don’t have so we use logs. I’m sure this is a really easy answer, but I just don’t get it. Even after reading all the docs on logs.
I’m able to see events in the /var/events log file and get something similar when I tail from the console. Problem is I can’t seem to send a log entry to anything I can look at and see a value.
For example, I’d like to see if trigevent below is some value. Even seeing I’ve hit the case would be good. I’ve seen where they mention setting a package in log:set, and I tried scripts in rules, but nothing ever shows up for INFO, WARN, DEBUG, etc. Maybe I need to create my own log file and activate it, but don’t see how.
Can someone just tell me how I can get to an equivalent of printf for debugging. I can get to the console, and change debug levels. I’m just thinking all the stuff I see are events and the log* is not going there?
thanks
/* hue dimmer switch test */
var string trigevent = receivedEvent.getEvent()
switch (trigevent ) {
case "1000.2": {sendCommand(CliffOfc_Wall_Light,100) }
case "1004.2": {sendCommand(CliffOfc_Wall_Light,30) }
case "2004.2": { sendCommand(CliffOfc_Wall_Light,0) }