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

The scene is not performed continuously.


Question

Guest pablotibis
Posted

I have this scene that I copy below it takes to send a push when the washing machine has finished its work, the problem is that for some time (I think somewhere update) does not work anymore, if I Start from inside the scene works and values correct, but by itself does not work, it is as wrong in loop to continuously monitor the consumption value of the washing machine. Any idea?

 

 

--[[ 

%% properties 
53 valueSensor 
%% globals 
--]] 
-- Cambiare id 53 per il dispositivo da monitorare
 
local currentDate = os.date("*t");
local power = fibaro:getValue(53, "power") -- unità da monitorare 
local LavaOn = "LavaInEsecuzione" -- creare la variabile LavaInEsecuzione 
local LavaFerma = "LavaFerma" -- create a variable with name LavaFerma 
local push = "LavaPush" -- variable for push 
 
if (fibaro:countScenes() > 1) then 
  fibaro:debug("TROPPE SCENE");
  fibaro:abort();
end
 
fibaro:debug("HC2 wash script stated: " .. os.date()); 
fibaro:debug("Consumption="..power.." Watt") 
 
if (tonumber(power) > 100) then  -- change to wanted value in watt 
    fibaro:setGlobal(LavaOn, "1")  -- sets variable to 1 if machine is running 
      fibaro:setGlobal(LavaFerma, "0") -- sets variable LavaFerma to 0 
      fibaro:setGlobal(push, "0") -- sets variable push to 0 
      fibaro:debug("Lavatrice funzionando")  -- lite debug text

Please login or register to see this image.

/emoticons/default_smile.png" alt=":)" srcset="https://forum.fibaro.com/uploads/emoticons/[email protected] 2x" width="20" height="20" /> 
 
elseif (tonumber(power) < 3) then 
  fibaro:debug("Lavatrice non sta funzionando.") 
  fibaro:setGlobal(LavaOn, "0")  
  fibaro:setGlobal(LavaFerma, "1") -- Lavaggio completo! 
 
end 
if (tonumber(power) < 3)  and fibaro:getGlobalValue(LavaFerma) == "1" and fibaro:getGlobalValue(push) == "0" then 
  fibaro:setGlobal(push, "1") 
  fibaro:debug("Send push message") 
  fibaro:call(151, "sendPush", "La lavatrice ha finito alle: " .. string.format("%02d", currentDate.hour) .. ":" .. string.format("%02d", currentDate.min)); 
  fibaro:call(152, "sendPush", "La lavatrice ha finito alle: " .. string.format("%02d", currentDate.hour) .. ":" .. string.format("%02d", currentDate.min));
end 
 

3 answers to this question

Recommended Posts

  • 0
Posted

Change valueSensor to value...

  • 0
Guest pablotibis
  • Inquirer
  • Posted

    Hi boomx, I did not understand very well, tell me if I have to change as you see below:

     

     

    --[[ 

    %% properties 
    53 value
    %% globals 
    --]] 

     

    only in this part of the scene?

    • 0
    Posted

    I think it should be

    53 power

    That's what I use for some scenes at least.

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