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

GV delay???


Question

Posted

Hi Guys,

I noticed something weird the scene is as below. Let me explain I have a program to control our heater. It is running 5 different temperature levels at this moment.

GV   Dagdelen Avond>>Evening

        Stookseizoen ja>>> Heater season Yes

       LocatieGezin aanwezig >>family Present

   351 Door

 

At 6 "o clock, start of the evening this scene was executed!!!!!!!!! Door value is actual 0(Unfortuanally I changed some text in the scene  thats why I lost the actual Debug window where was shown the call by Sonos and the http order. I checked it in the heater. This was fast overwritten by the scene I have if door goes open.

In my believing the scene should stop is one argument is not present.

This happends more yesterday another scene where something got executed while the argument was not according the trigger

How is this possible?

Still running 4.53 affraid to update

Please login or register to see this image.

/monthly_2019_04/image.png.d121c07d5a86269e8dc7dbbea7349bc5.png" alt="image.png.d121c07d5a86269e8dc7dbbea7349bc5.png" />

 

--[[
%% properties
351 value
%% weather
%% events
%% globals
Dagdelen
Stookseizoen
LocatieGezin
--]]
--

function debug(color, message)
     fibaro:debug(string.format('<%s style="color:%s;">%s</%s>', "span", color, message, "span"));
end

function traceFibaro(name)
  local orgFun=fibaro[name]
  fibaro[name]=function(f,...)
    local args={...}
    local res={orgFun(f,table.unpack(args))}
    print(string.format("fibaro:%s(%s)%s",name,json.encode(args):sub(2,-2),#res>0 and "="..json.encode(res):sub(2,-2) or ""))
    return table.unpack(res)
  end
end

traceFibaro("getValue")
traceFibaro("getSourceTrigger")
traceFibaro("getGlobalValue")

debug("orange","scene start, Verwarming op nachtstand als deur eetkamer naar serre is geopend")
local DeurnaarSerre = 351
local startSource = fibaro:getSourceTrigger();

if
 ( fibaro:getGlobalValue("Dagdelen") == "Avond" )
and
 ( fibaro:getGlobalValue("Stookseizoen") == "Ja" )
and
 ( fibaro:getGlobalValue("LocatieGezin") == "Aanwezig" )  
  and
 ( tonumber(fibaro:getValue(351, "value")) == 0 )

 

then
        --aanroepen http request
local http = net.HTTPClient()

function call(url)
  http:request(url, {
      options = { method = 'GET' },
      success =function() fibaro:debug(url.." ,done.") end,
      error = function(errorcode) fibaro:debug("error=" .. errorcode) end
    })
end


call("http://192.168.1.101/data.json?heater=0&setpoint=171&thermostat=0")

------
  -- 279 is the Virtual Device ID
-- 28 is the Process button ID
local sid, bid = 249, 28
-- Create TTS params object
local params = {
  -- TTS Message
  message = "Hallo, Saartje zet de verwarmingsthermostaat naar comfort avond 22,1 °C",  
  duration = 'auto',    -- Duration: "auto", xx seconds
  language = "nl-nl",    -- Language: fr-FR
  volume = 50            -- Volume
}
local _f = fibaro
local _x ={root="x_sonos_object",load=function(b)local c=_f:getGlobalValue(b.root)if string.len(c)>0 then local d=json.decode(c)if d and type(d)=="table"then return d else _f:debug("Unable to process data, check variable")end else _f:debug("No data found!")end end,set=function(b,e,d)local f=b:load()if f[e]then for g,h in pairs(d)do f[e][g]=h end else f[e]=d end;_f:setGlobal(b.root,json.encode(f))end,get=function(b,e)local f=b:load()if f and type(f)=="table"then for g,h in pairs(f)do if tostring(g)==tostring(e or"")then return h end end end;return nil end}
-- Make a request to the remote to process params object instantly
_x:set(tostring(sid), { tts = params })
_f:call(sid, "pressButton", bid)
----
end
debug("orange","scene beeindigt")

 

 

 

0 answers to this question

Recommended Posts

There have been no answers to this question yet

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