the more I play around with openhab and the more devices I integrate, the happier I get about this great opensource software! Thanks again for this great piece of immense work!!!
I integrated today a rule to trigger an outdoor switch as soon as dusk starts.
How can I trigger the even for this astro binding for instance to debug and troubleshoot the rule when I am implementing it? Is there any guide, anything I oversaw on how to debug and test rules and things that one freshly implements?
No there’s no such guide.
You should 1) enable debugging for rules to see if there’s syntax errors (reported in openhab.log if so),
2) insert logDebug() lines in your rules to see if processing reaches them
3) you can use smarthome:send item state from Karaf console to artificially create events to trigger your rules you want to test. You can also add more astro things or trigger channels through Karaf, see Rule not firing - sun setting (thanks @Dim for the pointer).
the rule I would like to test triggers for an event called from a channel:
Channel 'astro:sun:local:civilDawn#event' triggered END
thanks to your link, I triggered it manually and it worked. But I don´t know why it didn´t work today when the event should have been sent. How can I debug to see wether this even was even sent by the channel, maybe that´s the problem?
That is great if you need to debug the content of the rule but not the trigger condition itself… you could even define a time to trigger the rule, that´s what I normally do…
Hmm it said in the item that civilDusk should have started at 16:38 but I did not find any event log from 16:38 to 16:39 containing this astro binding. Is there any other way to see why this thing isn`t triggering correctly?