Amazon Alexa Doorbell skill by IJPUK.COM

Would you like to integrate the Amazon Alexa Echo with your existing Home Automation solution? With the service you can create as many doorbells as you like, then get the Amazon Alexa Echo device to announce and or chime when your doorbell is pressed.

Perhaps your doorbell is not loud enough? Or, you sometimes find you can not hear your doorbell in certain rooms of your house? Use your Amazon Alexa as an extension and make sure you never miss your doorbell ring again!

Once you have linked your Alexa device, created a door bell or two, you can test them out to ensure that they sound your chosen chime, all free of charge.

The Amazon Alexa system can go further than this through the use of Alexa Routines. These are scenes (as shown below) that you can easily create to run when something triggers them, a doorbell press is just one of the many trigger inputs available, you could think of this, not as creating doorbells, but as creating triggers.

Trigger Actions

When you are ready to embed this into your home automation controller,you can make use of their API service

How to set up your Alexa device

Below I present the method found and successfully tested on the Fibaro Home Center 3.
It was possible thanks to Ian (

  • Open “Settings -> Devices -> Other”
  • Click “+” (add device)
  • Create a Quick App as a ‘Generic Device
  • Copy and paste the code and set your credentials accordingly.:
    -- Fibaro HC3 edition - Donated by Tony - Thank you
    function QuickApp:onInit()
        baseUrl = ""
        -- Visit to create an account and get your doorbell key
        local ijpukUserName = "Your login"
        local ijpukPassword = "Your password"
        local doorbellKey = "Your doorbell key"
        ---------------------- Please dont change below this line  ----------------------
        local http = net.HTTPClient({timeout=2000})
        -- Utility function to send requests to email bridge
        function sendRequest(url, method, headers, data, next, fail)
            http:request(baseUrl .. url, 
                options = {
                    method = method,
                    headers = headers,
                    data = data,
                    timeout = 5000,
                    checkCertificate = false 
                success = function(response)
                    local status = response.status
                    if (status == 200 and next ~= nil) then
                    elseif (status ~= 200 and fail ~= nil) then
                error = function(err)
                    if (fail ~= nil) then
        function decode(d)
            local isError, err = pcall(
                    error({ data = json.decode(d) }) 
            if isError then
                local badData = json.encode(d)
        -- Utility function to encode a string into Base64
        local b='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/' 
        function base64Enc(data) 
            return ((data:gsub('.', function(x) 
                local r, b='', x:byte() 
                for i=8, 1, -1 do r=r..(b%2^i-b%2^(i-1)>0 and '1' or '0') end 
                return r; 
            end)..'0000'):gsub('%d%d%d?%d?%d?%d?', function(x) 
                if (#x < 6) then return '' end 
                local c=0 
                for i=1,6 do c=c+(x:sub(i,i)=='1' and 2^(6-i) or 0) end 
                return b:sub(c+1,c+1) 
            end)..({ '', '==', '=' })[#data%3+1]) 
        local userNamePasswordBase64Encoded = base64Enc(ijpukUserName .. ":" .. ijpukPassword)
        sendRequest("/api/v1/Doorbell/" .. doorbellKey, "POST", {
            ['Authorization'] = "Basic " .. userNamePasswordBase64Encoded
        }, "", function(response)        
                local result = decode(        
                if result ~= nil and result.success == true then
                    self:debug("Success response received") 
                elseif result ~= nil and result.success == false then
                    self:debug("Error occured: " .. result.error)
                self:debug("An error occurred")
                local status = response.status
                if status == 401 then
                    self:debug("Username or password were invalid")
                elseif status == 403 then
                    self:debug("Missing or expired Premium subscription")
                    self:debug("An unknown error occurred : " .. status)

  • Note the QA Id (Id device) which you will need later.
  • Create a global variable ‘Alexa_Key’. This is used when calling the QA.
  • “Open “Settings->Scenes->Add Secene->Choose type of scene -> Lua Scene”
  • Copy the following code the left side of the Scene Lua
    --Copy in triggers/conditions (left side of script page)
      conditions = { {
          isTrigger = true,
          operator = "!=",
          property = "Alexa_Key",
          type = "global-variable",
          value = " Dummy " 
        } },
      operator = "any"
  • Copy the following code the right side of the Scene Lua
QA_ID = your QA id.
debug = false
function log(message)
  if debug then
--TTS message and clear it after reading
message= fibaro.getGlobalVariable("Alexa_Key")
if message ~= nil and message ~= "Dummy" then, "onInit") --Id QA TTS read
    fibaro.setGlobalVariable("Alexa_Key", "Dummy") --Reset global variable
else log("Unvalid message")

If you want to make more notifications (DoorBell – you need to correct the value of “Alexa_key” to the new value “Alexa_kay1” in Quick App and Lua Scene

    1. The last task is to create a block scene that will trigger a given notification.


If you don’t want Alexa to hear “Someone is on …” before every notification, use the routine function in Amazon Alexa. You could create a routine that makes an Announcement, and then set this Announcement to be whatever you want.


Many thanks to Ian from for support and help