FORUM FIBARO
Forum systemu FIBARO

Configuration and management FIBARO System - Scene not doing what i want...

TANE - 2013-03-11, 23:06
Post subject: Scene not doing what i want...
The scene will run automatically when the front door opens..
and send a picture by mail.
this works fine.

At the the and I like to set the status of the frontdoor to Unlock.
This part is not working..When converting to Lua it's looks a bit different…like the 2 seconds in the camera line..this not set in the blocks.


Code:
--[[
%% properties
44 value
%% globals
--]]

local startSource = fibaro:getSourceTrigger();
if (
 ( tonumber(fibaro:getValue(44, "value")) > 0 )
or
startSource["type"] == "other"
)
then
    fibaro:call(91, "sendPhotoToUser", "2");
    fibaro:setGlobal("Status Voordeur", "Unlock");
end

deraaij - 2013-03-11, 23:31
Post subject: Re: Scene not doing what i want...
TANE wrote:
The scene will run automatically when the front door opens..
and send a picture by mail.
this works fine.

At the the and I like to set the status of the frontdoor to Unlock.
This part is not working..When converting to Lua it's looks a bit different…like the 2 seconds in the camera line..this not set in the blocks.


Code:
--[[
%% properties
44 value
%% globals
--]]

local startSource = fibaro:getSourceTrigger();
if (
 ( tonumber(fibaro:getValue(44, "value")) > 0 )
or
startSource["type"] == "other"
)
then
    fibaro:call(91, "sendPhotoToUser", "2");
    fibaro:setGlobal("Status Voordeur", "Unlock");
end


LUA looks ok. The 2 is not seconds but i think the user/email which should receive the email. Can you check it with an variable without spaces?

TANE - 2013-03-12, 21:20

Thx Mark,

That was the solution...

Some strage things are happening in scenes when they are time controlled.

The fallowing scene looks fine..

If Door is not locked And
Door is closed And
times is 22:30

Then
Lock the Door
Set the status to Locked

Do I need to start with time and then the other conditions?

deraaij - 2013-03-12, 21:28

Hi Tane,

Just to be sure you have "Start when Home Center 2 starts" checked?

TANE - 2013-03-12, 21:40

Yes that one was checked and also the active scene.
both are not checked now since the door was going crazy.
looks like there are soem problems in Time and Sunset Scenes


LUA conversion looks fine...need to understand that first before converting


Code:
--[[
%% properties
44 value
%% globals
StatusVoordeur
--]]

local sourceTrigger = fibaro:getSourceTrigger();
if (sourceTrigger["type"] == "autostart") then
while true do

local currentDate = os.date("*t");
local startSource = fibaro:getSourceTrigger();
if (
 ( fibaro:getGlobalValue("StatusVoordeur") == "Unlock" )
and
 ( ((currentDate.wday == 1 or currentDate.wday == 2 or currentDate.wday == 3 or currentDate.wday == 4 or currentDate.wday == 5 or currentDate.wday == 6 or currentDate.wday == 7) and string.format("%02d", currentDate.hour) .. ":" .. string.format("%02d", currentDate.min) == "22:30")  and  tonumber(fibaro:getValue(44, "value")) == 0 )
)
then
    fibaro:call(98, "turnOn");
    fibaro:setGlobal("StatusVoordeur", "Lock");
end

fibaro:sleep(60*1000);
end
else

local currentDate = os.date("*t");
local startSource = fibaro:getSourceTrigger();
if (
 ( fibaro:getGlobalValue("StatusVoordeur") == "Unlock" )
and
 ( (currentDate.wday == 1 or currentDate.wday == 2 or currentDate.wday == 3 or currentDate.wday == 4 or currentDate.wday == 5 or currentDate.wday == 6 or currentDate.wday == 7)  and  tonumber(fibaro:getValue(44, "value")) == 0 )
or
startSource["type"] == "other"
)
then
    fibaro:call(98, "turnOn");
    fibaro:setGlobal("StatusVoordeur", "Lock");
end

end

deraaij - 2013-03-12, 22:25

Could you try:

Code:
--[[
%% autostart
%% properties
%% globals 
--]]

while true do
local currentDate = os.date("*t");
if fibaro:getGlobalValue("StatusVoordeur") == "Unlock"
and string.format("%02d", currentDate.hour) .. ":" .. string.format("%02d", currentDate.min) == "22:30"
and tonumber(fibaro:getValue(44, "value")) == 0
then
    fibaro:call(98, "turnOn");
    fibaro:setGlobal("StatusVoordeur", "Lock");
end
fibaro:sleep(59*1000);
end

TANE - 2013-03-12, 23:28

Hi Mark,

Thanks going to test that one...looks fine..
the sleep means that the script will run every minute?

deraaij - 2013-03-13, 07:13

TANE wrote:
Hi Mark,

Thanks going to test that one...looks fine..
the sleep means that the script will run every minute?


Correct.

TANE - 2013-03-13, 22:33

LUA script for the lock did work fine this evening..

Thanks.

deraaij - 2013-03-13, 22:54

TANE wrote:
LUA script for the lock did work fine this evening..

Thanks.


You are welcome.

jompa68 - 2013-03-14, 06:28

TANE

what kind of doorlock do you have?

TANE - 2013-03-14, 23:13

At the moment I'm using the Dutch system Loxx www.loxx.nl
It's running about 4 years...Loxx is no longer producing products.

Loxx is zwave enabled via 2 X Fibaro switches and the Loxx Maxi Interface.
Looking for a new systeem..

SDeath - 2013-03-14, 23:31

TANE wrote:
At the moment I'm using the Dutch system Loxx www.loxx.nl
It's running about 4 years...Loxx is no longer producing products.

Loxx is zwave enabled via 2 X Fibaro switches and the Loxx Maxi Interface.
Looking for a new systeem..

Zoek je zoiets: http://robbshop.nl/overig...andgreep-detail

TANE - 2013-03-14, 23:48

I have that one also in my own shop.
http://www.hashop.nl/Webw...e-Deurslot.html
For sure not looking for that one.


I'm looking for a good system...what can close a 3 point system without turning the cilinder
Vision is nice but can't do that.

deraaij - 2013-03-15, 09:31

I would go for: Nemef Radaris Evolution Doorcontrol. (I will also when the time is right)
TANE - 2013-03-15, 10:34

Nemef is a nice one but is not battery controlled and will cost about 2500
I going to investigate the possibilities of the openingcontrols.nl


Powered by phpBB modified by Przemo © 2003 phpBB Group