Hello I created other scenes for DoorBell, maybe this aren't great for you. I know there must be another way to do it, but this working for me.
Used the DoorBell for 2 functions, 1.- when the wireless button are being pushed by someone. or 2.- when the fron door is open.
for case 1.- the doorbell active the scene and send photos and e mail and active the video gate.
--[[
%% properties
140 value
%% globals
--]]
local sourceTrigger = fibaro:getSourceTrigger()
if (sourceTrigger["type"] == "property") then
if ( tonumber(fibaro:getValue(140, "value")) > 0)then
fibaro:call(136, "sendPhotoToUser", "2")
fibaro:call(135, "sendPhotoToUser", "2")
fibaro:call(2, "sendDefinedEmailNotification", "7");
end
end
for case 2.- the doorbell active the scene only for say the recorded message in the memory doorbell.
--[[
%% properties
20 value
%% events
%% globals
--]]
local startSource = fibaro:getSourceTrigger();
if (
( tonumber(fibaro:getValue(20, "value")) > 0 )
or
startSource["type"] == "other"
)
then
fibaro:call(7, "setColor", "0","255","0","0")
fibaro:call(141,"pressButton","1")
fibaro:call(141,"pressButton","3")
fibaro:sleep(3000)
fibaro:call(7,"turnOff")
end
I used 2 escenes and 1 DV (with 3 button)
1 button DV
C2 = Net.FHttp("127.0.0.1", 11111)
jtable = '{"properties":{"parameters":[{"id":6,"size":1,"value":0},{"id":80,"size":1,"value":0}]}}'
HC2:PUT("/api/devices/140",jtable)
2 button DV
HC2 = Net.FHttp("127.0.0.1", 11111)
jtable = '{"properties":{"parameters":[{"id":6,"size":1,"value":1},{"id":80,"size":1,"value":2}]}}'
HC2:PUT("/api/devices/140",jtable)
3 button DV
HC2 = Net.FHttp("127.0.0.1", 11111)
jtable = '{"properties":{"parameters":[{"id":6,"size":1,"value":6},{"id":80,"size":1,"value":0}]}}'
HC2:PUT("/api/devices/140",jtable)
when the door is close
--[[
%% properties
20 value
%% events
%% globals
--]]
local startSource = fibaro:getSourceTrigger();
if (
( tonumber(fibaro:getValue(20, "value")) == 0 )
or
startSource["type"] == "other"
)
then
fibaro:call(141,"pressButton","2")
end
As you can see, I play with the parameter 80 and 6 to the DoorBell.