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

After updating to 4.018 no longer work the following scenes


Question

Posted

After updating to 4.018 no longer work the following scenes, WHY???

--[[

%% autostart

%% properties

161 valueSensor

143 valueSensor

%% globals

--]]

fibaro:sleep(10000);

local delayedCheck0 = false;

local tempDeviceState0, deviceLastModification0 = fibaro:get(161, "power");

if (( tonumber(fibaro:getValue(161, "power")) < 10 ) and (os.time() - deviceLastModification0) >= 10) then

delayedCheck0 = true;

end

local startSource = fibaro:getSourceTrigger();

if (

( delayedCheck0 == true )

or

startSource["type"] == "other"

)

then

fibaro:call(161, "turnOff");

end

fibaro:sleep(10000);

local delayedCheck0 = false;

local tempDeviceState0, deviceLastModification0 = fibaro:get(143, "power");

if (( tonumber(fibaro:getValue(143, "power")) < 30 ) and (os.time() - deviceLastModification0) >= 10) then

delayedCheck0 = true;

end

local startSource = fibaro:getSourceTrigger();

if (

( delayedCheck0 == true )

or

startSource["type"] == "other"

)

then

fibaro:call(143, "turnOff");

end

-----------------------------------------------------------------------------------------

--[[

%% properties

145 valueSensor

%% globals

--]]

local id = 145

local wallplug1 = fibaro:getValue(id, "power")

local value = 30; -- 30watt

fibaro:debug ("Wall Plug Samsung Tv C8000 sta consumando:"..wallplug1.." watt");

if tonumber(wallplug1) < tonumber(value) then

--protection before autoturn off on start (wait 25s before will check again power and will turn off it)

fibaro:sleep(60*1000);

if (tonumber(fibaro:getValue(id, "value")) == 1 and tonumber(fibaro:getValue(id, "power")) < tonumber(value)) then

fibaro:call(id, "turnOff")

fibaro:debug("Consumo energia sotto 30 watt, spengo Wall Plug Samsung Tv C8000")

end

end

-------------------------------------------------------------------------------------------------

-- Controllo Rete Elettrica –-

--[[

%% autostart

%% properties

161 valueSensor

%% globals

--]]

fibaro:sleep(30000);

local delayedCheck0 = false;

local tempDeviceState0, deviceLastModification0 = fibaro:get(161, "power");

if (( tonumber(fibaro:getValue(161, "power")) < 0.3 ) and (os.time() - deviceLastModification0) >= 10) then

delayedCheck0 = true;

end

local startSource = fibaro:getSourceTrigger();

if (

( delayedCheck0 == true )

or

startSource["type"] == "other"

)

then

fibaro:debug("Controllo Rete Elettrica ");

fibaro:call(193, "sendPush", "Rete elettrica Assente ");

fibaro:call(205, "sendPush", "Rete elettrica Assente ");

fibaro:call(2, "sendEmail", "Messaggio da FIBARO", "Rete Elettrica Assente");

end

[ Added: 2014-10-29, 23:11 ]

HC2 no controls the nodes dead, WHY ???

4 answers to this question

Recommended Posts

  • 0
Posted
After updating to 4.018 no longer work the following scenes, WHY???

THis does not really belong in the "developer" category. You should use the "power user" category.

  • 0
Posted
--[[

%% properties

145 valueSensor

%% globals

--]]

local id = 145

local wallplug1 = fibaro:getValue(id, "power")

local value = 30; -- 30watt

fibaro:debug ("Wall Plug Samsung Tv C8000 sta consumando:"..wallplug1.." watt");

if tonumber(wallplug1)

--protection before autoturn off on start (wait 25s before will check again power and will turn off it)

fibaro:sleep(60*1000);

if (tonumber(fibaro:getValue(id, "value")) == 1 and tonumber(fibaro:getValue(id, "power"))

fibaro:call(id, "turnOff")

fibaro:debug("Consumo energia sotto 30 watt, spengo Wall Plug Samsung Tv C8000")

end

end

there is no valueSensor in 4.018 so scene never start, should be power

--[[

%% autostart

%% properties

161 valueSensor

%% globals

--]]

fibaro:sleep(30000);

local delayedCheck0 = false;

local tempDeviceState0, deviceLastModification0 = fibaro:get(161, "power");

if (( tonumber(fibaro:getValue(161, "power")) = 10) then

delayedCheck0 = true;

end

local startSource = fibaro:getSourceTrigger();

if (

( delayedCheck0 == true )

or

startSource["type"] == "other"

)

then

fibaro:debug("Controllo Rete Elettrica ");

fibaro:call(193, "sendPush", "Rete elettrica Assente ");

fibaro:call(205, "sendPush", "Rete elettrica Assente ");

fibaro:call(2, "sendEmail", "Messaggio da FIBARO", "Rete Elettrica Assente");

end

Value sensor + autostart + chenge fibaro:get on fibaro:getValue and it will work

  • 0
  • Inquirer
  • Posted

    A.Socha, I'm sorry, but I did not understand how I have to change the code, what do I put in place of autostart sensor + Value + chenge fibaro, ??? Make me an example please.

    Tthanks

    • 0
    Posted
    --[[

    %% properties

    145 power

    %% globals

    --]]

    local id = 145

    local wallplug1 = fibaro:getValue(id, "power")

    local value = 30; -- 30watt

    fibaro:debug ("Wall Plug Samsung Tv C8000 sta consumando:"..wallplug1.." watt");

    if tonumber(wallplug1)

    --protection before autoturn off on start (wait 25s before will check again power and will turn off it)

    fibaro:sleep(60*1000);

    if (tonumber(fibaro:getValue(id, "value")) == 1 and tonumber(fibaro:getValue(id, "power"))

    fibaro:call(id, "turnOff")

    fibaro:debug("Consumo energia sotto 30 watt, spengo Wall Plug Samsung Tv C8000")

    end

    end

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