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


  • 0

Can we catch the system restart?


Question

Posted

Hi

Can we somehow catch if the system was restarted? 

Is there any LUA approach for it?

Thanks for any help

13 answers to this question

Recommended Posts

  • 0
Posted

You can check uptime of the system and conclude that it was restarted.

  • 0
Posted
1 hour ago, Neo Andersson said:

Hi

Can we somehow catch if the system was restarted? 

Is there any LUA approach for it?

Thanks for any help

Please login or register to see this code.

For EV5

  • 0
Posted

you can create a message rule in QA if restart. On this way you are informed QA restart.

If you do this by each QA than you know if you get a few messages your HC* is restarted.

Please login or register to see this code.

 

  • 0
  • Inquirer
  • Posted

    Thanks guys.

    @jgab Jan is the 

    Please login or register to see this code.

    from Christians post a built in feature of ER5, or i should get it from some api call?

    BTW does ot act as a trigger, or we should poll it in intervals, because in @ChristianSogaard example it seems as it triggers an event.

    • 0
    Posted

    I use the following scene trigger:

     

    {

      description = "@Restart Homecenter",

      isTrigger = true,

      operator = "==",

      property = "start",

      type = "se-start",

      value = true

    }

    • 0
    Posted (edited)
    23 minutes ago, Neo Andersson said:

    Thanks guys.

    @jgab Jan is the 

    Please login or register to see this code.

    from Christians post a built in feature of ER5, or i should get it from some api call?

    BTW does ot act as a trigger, or we should poll it in intervals, because in @ChristianSogaard example it seems as it triggers an event.

    It's a built-in numeric variable in ER5.

    @ChristianSogaard first rule runs when QA starts and checks if uptime is less than 5min, and if so it's post an event, #HC3_restart, that the other 2 rules trigger on.

    Please login or register to see this code.

     

    There is also uptimeMinutesStr that returns the uptime as days, hours,minutes string

    Edited by jgab
    • 0
    Posted
    3 minutes ago, Alex de Bruin said:

    I use the following scene trigger:

     

    {

      description = "@Restart Homecenter",

      isTrigger = true,

      operator = "==",

      property = "start",

      type = "se-start",

      value = true

    }

    Yes, I have had some issues to catch it from a QA with refreshStates - maybe the QA starts too late.

    In principle we should be able to do

    rule("{type='se-start', property='start', value=true} => log('System restarted')")

    but as I said, limited success...

    In ER5 we can simulate the trigger with

    Please login or register to see this code.

    • Like 1
    • 0
  • Inquirer
  • Posted

    And is it too much to await, to catch somehow the loss of internet?

    • 0
    Posted
    14 minutes ago, Neo Andersson said:

    And is it too much to await, to catch somehow the loss of internet?

    I believe that there is a trigger for that

    Please login or register to see this code.

    I'm not sure how quick you get it though...

    • 0
    Posted

    ...and then the questions is, without connection, how do you report it?

    • 0
  • Inquirer
  • Posted

    Good one😁

    • 0
  • Inquirer
  • Posted
    On 12/6/2023 at 2:14 PM, jgab said:

    I believe that there is a trigger for that

    Please login or register to see this code.

    I'm not sure how quick you get it though...

    Jan, this doesnt seem to fire, can you check on the code i am using?

    Please login or register to see this code.

     

    • 0
    Posted
    18 hours ago, Neo Andersson said:

    Jan, this doesnt seem to fire, can you check on the code i am using?

    Please login or register to see this code.

     

     However, I guess it can take some time before the hC3 decides that there is no connection and triggers the event,

    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...