Welcome to Smart Home Forum by FIBARO
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!
Smart Home Forum by FIBARO Team
I have a problem. I´m trying to measure the difference time between the change state of the S1 channel of a double switch.
Therefore, in my scene is using the hub.get () command to extract "lastmodificationtime" of the value of the channel (see the picture below):
Please login or register to see this image./monthly_2022_07/image.png.77bd4874ca813d326643c0acb802d17d.png" />
After to extract the "lasttime1" value i compare the os.time() value with "lasttime1" value (to compare the time from high state to low state) (see picture below)
The problem is the if(tonumber(os.time() - lasttime1) sentence. I´m not sure if the problem is the data type used or not. But i can´t do that the if(tonumber(os.time() - lasttime1) sentence ejecute correctly. Could anybody help me? Thanks in advance. Best regard.
Link to comment
Share on other sites
6 answers to this question
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.