Main scene FTBE v1.3.4
UPDATE (30 December 2019)
Changed only Main scene FTBE code. Changed function for time of day calculation and added use of SleepState global to set time of day to morning when Awake and current time is between midnight and sunrise time.
KNOWN ISSUES v1.3.4
Sunrise and Sunset VD will not show correctly default sunrise and sunset time set by user in Main scene in case that that times are used due to problem with HC settings.
If sunset time is before sunrise time then user must check that night time is not set to start after sunrise. Sunrise & Sunset VD does not check this time automatically.
Main scene FTBE is the beating heart of the HA system. It is the only scene necessary to loop endlessly because it is the source of most important events generated on our gateways and that are time based events! It is looping once every minute making sure that our gateways are aware of the current time, part of the day, week, month and season of the year. Many actions done by our gateways are depending on current time like raising or lowering blinds, lighting control, waking up of our home and us, brewing coffee at proper time (this is extremely nice!), reminding us of important events and many other things. This scene will take care of that by changing various global variables at appropriate time thus activating other scenes triggered by them and the user can even configure it to start other scenes or press buttons on VD's at predefined intervals or at scheduled times.
Fibaro Home Center 2 with firmware 4.110 or greater
Consists of scene and three VD's. Main scene FTBE loops and takes care of all timers like darkness, time of day, week days, month and season. Can also be setup to run other scenes, activate buttons on VD's or change global variables value at predefined times. VD's are used to set values of timers and show them on HC2 interface
Can be setup to send push messages for scheduled execution of scenes and VD's
Can track users location and calculate distance from home
Darkness can be changed either by user set sunrise and sunset times or by light level measured by devices
Part of the used global variables are automatically added to the system by Sunrise & Sunset VD and are automatically repaired
INSTALLATION & UPGRADE
Please check provided User Manual where all steps are explained in detail and check video from @MarcoTorino71:
Main scene FTBE v1.3.4
Sunrise & Sunset VD v1.4.0
Home Status VD v1.0
Home Timers VD v1.0.1
Icons for scene and VD's
User Manual EN v1.3
Many thanks to many Fibaro forum users for help with testing and suggestions for improvements.
TERMS AND CONDITIONS
Permission to use, copy, modify and distribute this software and its documentation for educational, research, personal use and non-profit purposes, without fee and without a signed licensing agreement is hereby granted, provided that the copyright notice, with "Terms and conditions" and "Disclaimer" appear in all copies, modifications and distributions.
It is strictly forbidden to sell, rent, lease and/or lend this software for profit without prior consent from the Author.
This software is provided by copyright owner "as is" and any express or implied warranties, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose are disclaimed. In no event shall the author and distributor be liable for any direct, indirect, incidental, special, exemplary, or consequential damages (including, but not limited to, procurement of substitute goods or services; loss of use, data, or profits; or business interruption) however caused and on any theory of liability, whether in contract, strict liability, or tort (including negligence or otherwise) arising in any way out of the use of this software, even if advised of the possibility of such damage.
Fibar Group S.A. and their employees are not responsible for support of the Main scene FTBE. Please contact the author Sankotronic, on the Fibaro Forum, for any questions or support required.