Jump to content

Welcome to Smart Home Forum by FIBARO

Dear Guest,

 

as you can notice parts of Smart Home Forum by FIBARO is not available for you. You have to register in order to view all content and post in our community. Don't worry! Registration is a simple free process that requires minimal information for you to sign up. Become a part of of Smart Home Forum by FIBARO by creating an account.

 

As a member you can:

  •     Start new topics and reply to others
  •     Follow topics and users to get email updates
  •     Get your own profile page and make new friends
  •     Send personal messages
  •     ... and learn a lot about our system!

 

Regards,

Smart Home Forum by FIBARO Team


  • 3

[SCENE] Main scene FTBE v1.3.4


Sankotronic

Question

Main scene FTBE v 1.3.4

 

Hello everyone!

 

NEW version is OUT!

 

More about scene and download you can find here:

 

WHAT'S NEW:

 

  • Main scene FTBE 1.3.4 - changed function for time of day calculation and added use of SleepState global to set time of day to morning when Awake  regardless of current time
  • Main scene FTBE 1.3.0 - cleaned some bugs, added some more checks to prevent scene from stop running due to errors. Optimized and compacted code, removed unnecessary comments. DemoMode only stops changing timers while user code and scheduled events will continue to execute. Darkness can now be changed by measured lux level or global variable that is set to lux value measured by light measuring devices placed outside. Scene is now running on setTimeout function instead on sleep for better timing and also aligns to 0 seconds or exact minute.
  • Sunrise & Sunset VD v1.4.0 - Modified main loop code to better handle global variables. Variables are now automatically repaired and are not reset to default settings after HC2 reboot. Added variable SunriseIcon to store VD icon ID and now when main icon for VD is set also all button icons are set automatically.
  • Home Status VD v1.1 - Added variable HomeStatIcon to store VD icon ID and now when main icon for VD is set also all button icons are set automatically. Added label that shows most important values on VD when closed.
  • Home Timers VD v1.1 - Added variable HomeTimersIcon to store VD icon ID and now when main icon for VD is set also all button icons are set automatically. Added label that shows most important values on VD when closed.

 

 

Please login or register to see this attachment.

 

 

NOTE - This version is compatible with previous versions so need to do any changes in your current code of other scenes and VD's.

 

REQUEST - If you like my work and found it useful please give me support by rating and writing short review. Thank you! :-)

 

PS

Dear friends from Slovakia you can find this scene and VD translated to your language here: 

Please login or register to see this link.

 

 

Edited by Sankotronic
Updated to new version
  • Like 17
  • Thanks 6
Link to comment
Share on other sites

Recommended Posts

  • 0

Another icon for day/night.

Please login or register to see this image.

/monthly_2017_01/daynight.png.b68163284bf18bef84977bfce9845630.png" alt="daynight.png" />

 

Maybe not the right place, but if your ever looking for icons, just go to google -> pictures -> color transparant -> exact size 128x128, pretty much always find something. Just don't take any black icons, they are hardly visible.

Link to comment
Share on other sites

  • 0
  • Inquirer
  • 3 minutes ago, riemers said:

    Another icon for day/night.

    Please login or register to see this link.

     

    Maybe not the right place, but if your ever looking for icons, just go to google -> pictures -> color transparant -> exact size 128x128, pretty much always find something. Just don't take any black icons, they are hardly visible.

     

    Thank you!!! :) 

    Link to comment
    Share on other sites

    • 0

    @Sankotronic need some help

    I get the event time correct, it add the "event" text to label but then it does not pressbutton 1 at my scheduled time.

     

    Please login or register to see this code.

    Please login or register to see this code.

     

    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • On 1/23/2017 at 2:05 PM, jompa68 said:

    @Sankotronic need some help

    I get the event time correct, it add the "event" text to label but then it does not pressbutton 1 at my scheduled time.

     

    Please login or register to see this code.

    Please login or register to see this code.

     

     

    Hi @jompa68,

     

    I tested your settings and code that prepares time and it is working ok as you can see from my debug window:

     

     

    Exec time is debugged runVDSchedHour[1][1]. So, to me all looks good except maybe wrong VD ID or button order number? Did you get debug message that Scheduled VD is executed like me? All I did is copy/pasted your code to function extraUserCodeFirst(), removed line that calls TTS and adjusted time in local event to my time of testing. I didn't even changed my settings for time that is

     

    runVDSchedHour = {{"02:00"}};

     

    This is time when I run HC2 time synchronization VD.

     

     

    Edited by Sankotronic
    Attachment quota filled up / deleting older stuff sorry :-(
    Link to comment
    Share on other sites

    • 0
    9 minutes ago, Sankotronic said:

    Exec time is debugged runVDSchedHour[1][1]. So, to me all looks good except maybe wrong VD ID or button order number? Did you get debug message that Scheduled VD is executed like me? All I did is copy/pasted your code to function extraUserCodeFirst(), removed line that calls TTS and adjusted time in local event to my time of testing. I didn't even changed my settings for time that is

    Hmm if i did add time manually it did work, so then i must be my calTime that are not correct

    local runVDSchedHour     = {{"15:26"}};

    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • @jompa68,

     

    As long as you can get properly formatted time from global variable Event1 it should work. 

    Link to comment
    Share on other sites

    • 0
    21 minutes ago, Sankotronic said:

    @jompa68,

     

    As long as you can get properly formatted time from global variable Event1 it should work. 

    Yeah! i found the "error". Was the return value that causing it. Now it works. Can i continue with the rest of my code :-D
    Thanks

    Link to comment
    Share on other sites

    • 0

    Hi, I installed this scene and you Netatmo VD/scene the same day.

    My first issue was that all the "main" devices was unhidden in my system.

    Also it seems that some of mye scenes are not working any more, I belive it`s the scenes based on global values.

     

    Every time I restart the HC2 the hidden "main devices" comes up as not configured.

     

    Any idea what went wrong here?

     

    This is the message for 39 devices in notifications:

    Device start-up initialization failed. Check if device is operational. Otherwise reconfigure the device or restore the backup. Please contact support for more information.

     

     

    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • 12 minutes ago, kimstoroy said:

    Hi, I installed this scene and you Netatmo VD/scene the same day.

    My first issue was that all the "main" devices was unhidden in my system.

    Also it seems that some of mye scenes are not working any more, I belive it`s the scenes based on global values.

     

    Every time I restart the HC2 the hidden "main devices" comes up as not configured.

     

    Any idea what went wrong here?

     

    This is the message for 39 devices in notifications:

    Device start-up initialization failed. Check if device is operational. Otherwise reconfigure the device or restore the backup. Please contact support for more information.

     

     

     

    @kimstoroy,

     

    The problem you have with devices has nothing to do with scenes and VD that you installed. That has something to do with z-wave database get corrupted. I hope that you have backup to restore to get rid of that problem. If not, then you will have to contact Fibaro support so they can check your system and find out what caused this problem.

     

    Link to comment
    Share on other sites

    • 0
    5 minutes ago, Sankotronic said:

     

     

    Quote

    @kimstoroy,

     

    The problem you have with devices has nothing to do with scenes and VD that you installed. That has something to do with z-wave database get corrupted. I hope that you have backup to restore to get rid of that problem. If not, then you will have to contact Fibaro support so they can check your system and find out what caused this problem.

     

    Thank you, will try to restore now. I thought it maybe had a connection, sorry about that.

    Edited by kimstoroy
    Link to comment
    Share on other sites

    • 0

    here comes an example how you can use function extraUserCodeFirst() in this scene

    This will update 1 label with info from a calendar event in a google cal, 1 minute later it will pressButton on same vd to start TTS to my Musaic player or Sonos player

    Please login or register to see this code.

    and here is the setup in scheduled vd section

    Please login or register to see this code.

    @Sankotronic

    can runVDSchedPushMessage have the event info pushed to smartphone?

    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • @jompa68,

     

    Very nice solution! But I also have question: how you get event from Google calendar to HC?

    Link to comment
    Share on other sites

    • 0
    1 minute ago, Sankotronic said:

    @jompa68,

     

    Very nice solution! But I also have question: how you get event from Google calendar to HC?

    Haha i did wait for that :-D

    It is a google script with an VD from steven at the french forum and for TTS i use Sébastien Jauquet VD from same forum

    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • 54 minutes ago, jompa68 said:

    @Sankotronic i can use below to have the calendar value sent to smartphone :-P

    Please login or register to see this code.

     

     

    Hi @jompa68,

     

    I try it and it works! :) You don't need empty string, just put getGlobal function: 

    Please login or register to see this code.

     

    Link to comment
    Share on other sites

    • 0
    7 hours ago, Sankotronic said:

     

    Hi @jompa68,

     

    I try it and it works! :) You don't need empty string, just put getGlobal function: 

    Please login or register to see this code.

     

    Hmm not for me, if i don't use empty string in beginning, scene will stop with red info that something is wrong

    same with chgGlobalValue

     

    Please login or register to see this code.

     

    Edited by jompa68
    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • 2 hours ago, jompa68 said:

    Hmm not for me, if i don't use empty string in beginning, scene will stop with red info that something is wrong

    same with chgGlobalValue

     

    Please login or register to see this code.

     

     

    Hi @jompa68,

     

    it is not working for you because you are trying to send multiple messages for one scheduled VD on multiple buttons and I didn't provide that possibility in code. I can change that thou, but for now you can send message for one scheduled VD no matter how many buttons are defined to be pressed for it. So above code line will not work anyway with scheduled VD except if I missed concept?

     

    Proper setting for scheduled VD is like bellow example:

    Please login or register to see this code.

    So first VD jT.settings.synctime has two buttons that are pressed, "3"  at 02:00 and "2" at 04:00 every day of the week and same "message1" is sent when each of the button is pressed. Second VD jT.settings.check has only one button scheduled to be pressed at sunrise time only on weekends and "message2" is sent.

     

    For first VD you can still program that different messages are sent if you add some code to function extraUserCodeFirst() where you can check time and put other message content:

    Please login or register to see this code.

    Sorry if I missed the point, but you didn't provide me with enough info to actually see where problem is ;) 

     

    Link to comment
    Share on other sites

    • 0
    40 minutes ago, Sankotronic said:

    Sorry if I missed the point, but you didn't provide me with enough info to actually see where problem is

    Naaa, it is me that should say sorry that i did not provide you with more and right info. Thanks m8 for clarifying this, cheers :-)

    Link to comment
    Share on other sites

    Join the conversation

    You can post now and register later. If you have an account, sign in now to post with your account.

    Guest
    Answer this question...

    ×   Pasted as rich text.   Paste as plain text instead

      Only 75 emoji are allowed.

    ×   Your link has been automatically embedded.   Display as a link instead

    ×   Your previous content has been restored.   Clear editor

    ×   You cannot paste images directly. Upload or insert images from URL.

    ×
    ×
    • Create New...