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

First awakes


Seraphim
 Share

Question

Dear Community,

 

I have a small issue with creating a script to my logic. I have three beds with a sleep sensor in each. Now I want to trigger something if the first person awakes and leaves the bed.

Well I know about time delay if this person is going to drink something at night etc. but that is not my issue.

 

I have created a variable "var_sleep" which counts from 0 (no one is sleeping) to 3 (everybody is sleeping).

I also have a variable "var_home" which counts from 0 (no one at home) to 3 (everybody at home).

 

If var_home = var_sleep, my house starts the night mode.

 

My issue starts in the morning when the first persona awakes: How to realise this? The variable var_sleep reaches the state 2 two times

1. 3 sleeping - 1 awakes = 2

2. 1st sleeping + 2nd goes sleeping = 2

 

Maybe this is the completely wrong way to "measure" it, if you have a better way, let me know.

 

In the end I want to know, when the first person leaves the bed.

 

Any Ideas?

 

Regards

Andreas

 

 

Edited by Seraphim
Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

I have some idea for change the logic.
Can you input some "idle time" before activate sensors?
This solve direction - go to sleep/ wake up 

eM.
 

Link to comment
Share on other sites

  • 0
  • Inquirer
  • Dear Martin_N,

     

    for sure I do work with an idle timer, otherwise the state would change if I need to drink something at night in the moment I get up. But that was not the question, I wanted to know how to realise the first person is awake, especially if I compare the sleeping persons to the ones that are home (in case of business travels, there is on person less at home than usually for example).

     

    Regards

    Andreas

     

    Link to comment
    Share on other sites

    • 0
    This is an interesting task. I have a new idea.
    You must use additional sensors to solve their sequence.
    For example - motion detection, door sensor.
    Then you can think of some composite condition.
    For example, when one gets up, first it activates your sleep sensor, next motion detection, next opens the door = confirmation: two sleeping, one standing up.
    ...etc.
    eM.
    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.

     Share

    ×
    ×
    • Create New...