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
Marti 0
Hello,
I made the following scene in LUA (to start ventilation when CO2 level is getting high and to stop it when it has gone back down). See code below.
It uses Netatmo device for CO2 reading (polling frequency 10 minutes).
I noticed that the scene is acting strangely - every 10 minutes (the time the new CO2 reading arrives from Device 24), the fans (devices 40 and 42) are switched on very briefly, for 1...3 seconds, and then back off.
CO2 reading has all the time I'm testing been around 600, so well below the threshold levels.
What can cause this anomaly?
=========================
--[[
%% autostart
%% properties
24 value
%% weather
%% events
%% globals
--]]
local startSource = fibaro:getSourceTrigger();
if (
( tonumber(fibaro:getValue(24, "value")) > 900 )
or
startSource["type"] == "other"
)
then
fibaro:call(40, "turnOn");
fibaro:call(42, "turnOn");
else if (
( tonumber(fibaro:getValue(24, "value")) <= 800 )
or
startSource["type"] == "other"
)
then
fibaro:call(40, "turnOff");
fibaro:call(42, "turnOff");
end
end
========================
5 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.