Java Runtime Environment: which java platform is used and what version
openHAB version: 2
I have a installation on Openhab but I am not sure where to start. Currently I am using a raspberry PI to run a script daily at a particular time of day based on a file. This time in the file will change almost daily since it is calculated based on complex mathematical calculation from a website, The time are referred as solat time where it corresponds to 5 daily prayer eg zohor, asar, maghrib, isya and subuh. An example for zohor the time will be 13:10. I will then use unix at command to execute the script based on offset of the zohor time where it will do a set trigger on ptzoptics camera. The current time trigger is only support for cron but not supporting “at” command. I have also tried creating a binding but my java skill is basic, prove a little bit complex to me, but I am good at unix scripting.
What do you want to do?
If you want to execute the script from openHAB, use the executeCommandLine action
At every prayer time, for example, the adhan gets player on speakers, the tv pauses and display an image. Before and after Maghrib, the lights get turned on and off…
What a surprise, did not expect someone had done it before. I want to be able to execute some tasks based on the prayer time with some time offsets and trigger.
Turn on light at Jumaat Zohor, perform a script to turn on camera at 10 minutes after Zohor and turn to a different angle after the Imam move from mimbar. The activity is a mix of sonoff tasmota activation , PIR detection and time offset action which calls a URL (I am using lynx to call in command line)
Will you be able to share your codes? The solat time in our country follows calculation from the JAKIM (a govt body that regulates the falaq time) . Maybe I can get some ideas from it. Thank you.
I used node-red to do the calculation and send the notifications to openHAB
When are you available so that I can help you set it up on a private chat.
That way we can do it step by step without clogging up the forum. When we are finished, I’ll publish a tutorial. You can be my tester!!
Let me know when you have a couple of hours available
Thank you. I will build a new RAspberry Pi 3 with openhab and node red and let you know when I am ready. Can you PM me? I am unable to PM and let me know which time slot you are available , your time is GMT right? my time is GMT+8
This is true but the equivalent of the at command is Timers. In your rules, as I suspect you will see as you work with Vincent, you can schedule a chunk of code to execute at a certain time. So if you can get the time then you can schedule your actions to take place at that time or at that time plus or minus an offset.
And to both of you, I wouldn’t worry too much about clogging up the forum. The back and forth conversation when building up something like this is very informative and helps new and even experienced users learn more.
It may just be a lot of trial and errors with step by steps and pictures and a lot of back and fro.
I was planning to make a tutorial for it anyway. It will give me a “bigger picture” on how to present it succinctly and accurately the first time around.