Logic Machine Forum
W4K sunrise sunset - Printable Version

+- Logic Machine Forum (https://forum.logicmachine.net)
+-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1)
+--- Forum: Scripting (https://forum.logicmachine.net/forumdisplay.php?fid=8)
+--- Thread: W4K sunrise sunset (/showthread.php?tid=2370)



W4K sunrise sunset - d.r soutras - 27.11.2019

   

Hello fellows!

Can you help me with the following issue?
30’ after the sunrise I would like to switch off 2/2/6 and 2/2/7.
30’ before the sunrise I would like to switch on 2/2/6 and 2/2/7.
The error I get is the following: No event to run the selected block funvction


RE: W4K sunrise sunset - Erwin van der Zwart - 27.11.2019

Hi,

Why do you make it so complex? Just create a scheduler with sunrise and sunset event and use the build-in offset..

BR,

Erwin

PS: You get the error because you use event elements as the final output, use normal elements for the output of the not equal block, and you need to add a timer to your sunrise/sunset element to trigger them on a given interval.


RE: W4K sunrise sunset - d.r soutras - 28.11.2019

Dear Erwin, thank you for your reply.
As you suggest, I create two schedulers. One for sunrise and one for sunset.
I would like to energize the sunrise/sunset mode only if the home button is active.
Should i make a fbd script with lock out function so only when the home button is active to run the specific GA from the sunrise/sunset scheduler?
Is there any manual for W4K in order to learn more for the scripts and the fbd, because the manual of homelynk is very poor on scripting.


RE: W4K sunrise sunset - Erwin van der Zwart - 28.11.2019

Hi,

Yes there is not a lot of scripting documented in the manual, we use in-class training for that. there is a scripting reference document here:

https://openrb.com/docs/lua.htm

A lot of this document is also embedded in the FW (on the right side of your script editor container panel).

For the logic, yes you should create a internal object for the scheduler output and make a "AND" logic with the button and attach the output to your load.
This can be done by FB or script, up to you what to use.

BR,

Erwin


RE: W4K sunrise sunset - d.r soutras - 28.11.2019

Thank you very much. Witch in class training do you mean?


RE: W4K sunrise sunset - Erwin van der Zwart - 28.11.2019

Hi,

You have to ask this to SE in your country, i give them on a regular base in the Netherlands, tomorrow i give another one (:

i know our Excellence Center is also giving training for our Global organization, your SE sales rep should be able to give you this info.

What country do you come from?

BR,

Erwin


RE: W4K sunrise sunset - d.r soutras - 29.11.2019

Thank you very much Erwin! Greece!