HI
I have a doorbird intercom with which I can open the gate, in fibaro HC2 I could open the gate via a virtual device by clicking twice on a light button. I understand that I need to use quick app instead of virtual device in HC3. I was told to make a quick app with which I can open the relay, I found an LUA code on line which I used, but I can I see if this quick app will work and how can I make a scene with it. Is there anyone that uses doorbird and can open a gate (relay) with fibaro who can share this with me, so I can try to make it. I have no knowledge of lua and currently only work with blockscenes
this is what I found online (copilot), in which I changed the local url in my own url for the gate. I do not know of this is correct and how to check if this is working. I do not see this quick app when I want to make a scene. Sorry for these "stupid" questions but this is a bridge too far for me, but I would still like to learn and get it fixed. Thanks for your help
local http = require("http")
-- Function to turn on the relay
local function turnOnRelay()
local url = "https://your-relay-ip/api/relay/on"
local response = http.request(url, nil, {["Content-Type"] = "application/json"})
if response.status == 200 then
print("Relay turned on successfully")
else
print("Failed to turn on relay: " .. response.status)
end
end
-- Function to turn off the relay
local function turnOffRelay()
local url = "https://your-relay-ip/api/relay/off"
local response = http.request(url, nil, {["Content-Type"] = "application/json"})
if response.status == 200 then
print("Relay turned off successfully")
else
print("Failed to turn off relay: " .. response.status)
end
end
return {
turnOnRelay = turnOnRelay,
turnOffRelay = turnOffRelay
}