FORUM FIBARO
Forum systemu FIBARO

| FAQ |  Search |  Memberlist |  Usergroups |
| Register |  Log in |

Previous topic «» Next topic
Scene not doing what i want...
Author Message
TANE 
hashop.nl


Age: 50
Joined: 16 Apr 2012
Posts: 617
Location: Nieuwegein, Holland
Posted: 2013-03-11, 23:06   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


Unlock.png
92 Time(s) 34.06 KB

_________________
Enver Tanriverdi
TANE Domotica Advies
 
 
Adv.Usr.deraaij 

Age: 35
Joined: 19 Jul 2012
Posts: 379
Location: Netherlands
Posted: 2013-03-11, 23:31   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?
_________________
Regards,

Mark
 
 
TANE 
hashop.nl


Age: 50
Joined: 16 Apr 2012
Posts: 617
Location: Nieuwegein, Holland
Posted: 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?

Lock.png
76 Time(s) 65.18 KB

_________________
Enver Tanriverdi
TANE Domotica Advies
 
 
Adv.Usr.deraaij 

Age: 35
Joined: 19 Jul 2012
Posts: 379
Location: Netherlands
Posted: 2013-03-12, 21:28   

Hi Tane,

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

Mark
 
 
TANE 
hashop.nl


Age: 50
Joined: 16 Apr 2012
Posts: 617
Location: Nieuwegein, Holland
Posted: 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
_________________
Enver Tanriverdi
TANE Domotica Advies
 
 
Adv.Usr.deraaij 

Age: 35
Joined: 19 Jul 2012
Posts: 379
Location: Netherlands
Posted: 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
_________________
Regards,

Mark
 
 
TANE 
hashop.nl


Age: 50
Joined: 16 Apr 2012
Posts: 617
Location: Nieuwegein, Holland
Posted: 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?
_________________
Enver Tanriverdi
TANE Domotica Advies
 
 
Adv.Usr.deraaij 

Age: 35
Joined: 19 Jul 2012
Posts: 379
Location: Netherlands
Posted: 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.
_________________
Regards,

Mark
 
 
TANE 
hashop.nl


Age: 50
Joined: 16 Apr 2012
Posts: 617
Location: Nieuwegein, Holland
Posted: 2013-03-13, 22:33   

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

Thanks.
_________________
Enver Tanriverdi
TANE Domotica Advies
 
 
Adv.Usr.deraaij 

Age: 35
Joined: 19 Jul 2012
Posts: 379
Location: Netherlands
Posted: 2013-03-13, 22:54   

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

Thanks.


You are welcome.
_________________
Regards,

Mark
 
 
jompa68 

Age: 46
Joined: 14 Jan 2013
Posts: 351
Location: Sweden
Posted: 2013-03-14, 06:28   

TANE

what kind of doorlock do you have?
_________________
Regards Jonny
---------------------------------
Global moderator on Zwaveforum.se
 
 
TANE 
hashop.nl


Age: 50
Joined: 16 Apr 2012
Posts: 617
Location: Nieuwegein, Holland
Posted: 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..
_________________
Enver Tanriverdi
TANE Domotica Advies
 
 
SDeath 

Age: 33
Joined: 01 Mar 2013
Posts: 69
Location: Netherlands
Posted: 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 
hashop.nl


Age: 50
Joined: 16 Apr 2012
Posts: 617
Location: Nieuwegein, Holland
Posted: 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.
_________________
Enver Tanriverdi
TANE Domotica Advies
 
 
Adv.Usr.deraaij 

Age: 35
Joined: 19 Jul 2012
Posts: 379
Location: Netherlands
Posted: 2013-03-15, 09:31   

I would go for: Nemef Radaris Evolution Doorcontrol. (I will also when the time is right)
_________________
Regards,

Mark
 
 
Display posts from previous:   
Reply to topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum
Add this topic to your bookmarks
Printable version

Jump to:  

Powered by phpBB modified by Przemo © 2003 phpBB Group
Theme created by kemustek from Forum PC
Page generated in 0.12 second. SQL queries: 16