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

How to check if a device is disconnected / not available? (lua, HC3)


Question

Posted

I have an Aeotec Multisensor 6 which is temporarily not connected. If I read out the temperature using fibaro.getValue I get the last value measured when the sensor was still connected, which is of course not the current temperature. I’m reading a bunch of sensors to get the maximum temperature, so I’d like to ignore sensors which are disconnected / not available. How do I test if a sensor is available?

4 answers to this question

Recommended Posts

  • 0
  • Inquirer
  • Posted

    I wrote a little function to check if a sensor is dead or inactive for too long:

     

    Please login or register to see this code.

     

    • 0
    Posted

    no how.

    dead devices - devices what do not respond on some action within some period.

    just disconnected devices never detected as dead. only after some period HC3 can mark this device as dead.

     

    if you asking how to detect?

    ok this is example (not full code for use)

     

    Please login or register to see this code.

     

    • Like 2
    • 0
  • Inquirer
  • Posted

    Thanks @10der!

     

    In the meanwhile I found a different solution: using fibaro.get instead of fibaro.getValue and check how old the data is. Since I’m measuring temperature and humidity in a place where a lot of fluctuation is to be expected (a corridor/staircase with glass roof, a kitchen and two bathrooms), I just ignore data older than 3 hours:

     

    Please login or register to see this code.

     

    • Thanks 1
    • 0
    Posted (edited)

    @HarmLammers check dead prop

     

    Please login or register to see this code.

    Please login or register to see this image.

    /monthly_2021_08/image.png.c7c571ba659d5323932e67952b0aa153.png" />

    Edited by 10der

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