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


network connection check in Lua


vskokosotthon

Recommended Posts

Hi Everyone,

 

I would like to ask help.

So , In one location, the internet connection is solved by two microwave antennas. Between two antenna changes, the HC3 loses the net connection and the HC3 must be restarted.

I would like to check the net connection with Lua code if it does not than restart HC3.

Can anyone help me how to do this with Lua code?

Thank you in advance for your help.

 

Link to comment
Share on other sites

Please login or register to see this code.

 

192.168.1.36 you can change on 127.0.0.1 if you run LUA

 

response

 

Please login or register to see this code.

 

Edited by 10der
Link to comment
Share on other sites

http://<HC-IP>/api/settings/network/connectivity

 

Response:

 

{

  • "internetConnectivity": true

}

Edited by cag014
  • Like 1
Link to comment
Share on other sites

  • Topic Author
  • Thanks for the help.

    I tried, but it didn't work. Maybe I wrote something wrong.
    Can you help?

     

    DECLARATIONS (Conditions/Triggers)

     
    {
      conditions = { {
          isTrigger = true,
          operator = "==",
          property = "state",
          type = "internetConnectivity",
          value = false
        } },
      operator = "all"
    }
    Link to comment
    Share on other sites

    • 3 months later...
    On 10/8/2021 at 7:33 PM, vskokosotthon said:

    Thanks for the help.

    I tried, but it didn't work. Maybe I wrote something wrong.
    Can you help?

     

    DECLARATIONS (Conditions/Triggers)

     
    {
      conditions = { {
          isTrigger = true,
          operator = "==",
          property = "state",
          type = "internetConnectivity",
          value = false
        } },
      operator = "all"
    }

     

    @vskokosotthonHave you succeeded with the trigger InternetConnectivity conditions?

    Edited by Viorel
    Link to comment
    Share on other sites

    • 1 year later...

    You can also download this simple QA:

    It remembers when HC3 was last time rebooted and also time from last successful connection :-)

     

    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
    Reply to this topic...

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