- Hardware: Raspberry Pi 3b+ Processor: BCM2835; Linux 4.19.50-v7+ armv7l
- OS: Raspbian GNU/Linux 10 (buster); Firmware #896
- Java Runtime Environment: (build 11.0.8+10-post-Raspbian-1deb10u1); Version 11.0.8" 2020-07-14
- openHAB version: 2.5.9 Release Build
Please post configurations (if applicable):
Issue of the topic: please be detailed explaining your issue:
After setting up my openHAB successfully on the above mentioned environment I am now getting in touch with my first rule:
The goal is to prepare my coffee machine in terms of power on and rinse action on a specific time in the morning with a delay of 2 minutes / 120 seconds between both actions.
- Power on coffee maker every Monday and Wednesday at 04:45am
- Wait 120 seconds
- Start mandatory rinse action
Both actions are successfully covered with two switch items using the http-binding which are stated above.
One approach could be covering both actions in two rules, the second rule is just postponed 2 minutes in the cron minute time:
Rule "Kaffeemaschine power on" when Time cron 0 45 4 ? * MON,WED * then Coffee_PowerOn.sendCommand(On) end Rule "Kaffeemaschine rinse" when Time cron 0 47 4 ? * MON,WED * then Coffee_Rinse.sendCommand(On) end
Is my general understanding of the syntax correct? To have this task combined into one rule, my preferred approach would be the following:
Rule "Kaffeemaschine preparation" when Time cron 0 45 4 ? * MON,WED * then Coffee_PowerOn.sendCommand(On) createTimer(now.plusSeconds(120), [ Coffee_Rinse.sendCommand(On) ]) end
Same question here: Is my general understanding of the syntax correct? Right now I am not able to check the openHab logs/events for testing because the logging seems to be broken. I will create another thread for this issue.
Therefore this request to you is just to make sure that I heading into the right direction. Any approvals, advices and improvements are appreciated. Thanks!
PS: Sorry for the formatting
Edit: Code fencing