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

Question
MiZ 0
I have a while-loop in a LUA-scene
where I want to send a HTTP request when:
1) I enter the loop
and
2) When the loop is exited
The request is executed in both situation, but the output from the code is:
[2024-06-27] [12:29:53] [DEBUG] [SCENE55]: -START---------------------------
[2024-06-27] [12:29:54] [DEBUG] [SCENE55]: 6
[2024-06-27] [12:29:56] [DEBUG] [SCENE55]: 5
[2024-06-27] [12:29:57] [DEBUG] [SCENE55]: 4
[2024-06-27] [12:29:58] [DEBUG] [SCENE55]: 3
[2024-06-27] [12:29:59] [DEBUG] [SCENE55]: 2
[2024-06-27] [12:30:00] [DEBUG] [SCENE55]: 1
[2024-06-27] [12:30:00] [DEBUG] [SCENE55]: -END---------------------------
[2024-06-27] [12:30:01] [DEBUG] [SCENE55]: Text to send when starting!
[2024-06-27] [12:30:01] [DEBUG] [SCENE55]: Text to send when done!
Everything is working, except that both texts are send simultaneously when the loop exits?
Why is the bold line above (12:30:01) written first upon exit of the loop??? What can be done to solve this?
I hope you guys understand and can guide me!
7 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.