Jump to content

Welcome to Smart Home Forum by FIBARO

Dear Guest,


as you can notice parts of Smart Home Forum by FIBARO is not available for you. You have to register in order to view all content and post in our community. Don't worry! Registration is a simple free process that requires minimal information for you to sign up. Become a part of of Smart Home Forum by FIBARO by creating an account.


As a member you can:

  •     Start new topics and reply to others
  •     Follow topics and users to get email updates
  •     Get your own profile page and make new friends
  •     Send personal messages
  •     ... and learn a lot about our system!



Smart Home Forum by FIBARO Team

LOQED Touch Smart Lock Virtual Device for FIBARO Home Center 2 0.1

   (0 reviews)

1 Screenshot

About This File

What features does the LOQED Touch Smart Lock offer with Fibaro?

The LOQED Touch Smart Lock & Fibaro integration is done via the local bridge API.

Currently, the following functionalities are supported:

  • Send real-time status changes of the lock (open, unlock, lock) and battery, Wi-Fi, Bluetooth state to the Fibaro HC2 gateway.

  • Receive commands from the Fibaro HC2 gateway to change the lock state (open, unlock, lock).

  • Only English language supported, however you can edit the VD code to add your own language.

  • Currently this VD can’t decode json data POSTed by the bridge, as FIBARO API simply ignores any unknown data and accept only JSON key args:[{}]. Therefore, one can’t decode who opened/closed the LOQED via App (or if it was manually, with knob).

  • Security consideration: the LOQED bridge sends any status change (e.g. "the door was opened") to Fibaro over an unsecure HTTP connection in your Wi-Fi network. There is no way to add digital signature (like used by LOQED QuickApp on e.g. Home Center 3) into the Home Center 2 VD. Note that this does not affect opening/locking the door, it is only concerns the status information.




Step 1: create API key

Go to https://app.loqed.com/API-Config and log in with your LOQED app e-mail address and password (note that you will be logged out of the LOQED app). Click on the “API Configuration tool" button. Click the “Add new API key” button. Set any name and create the API key. It is normal the “Remove unlocking/locking checkbox is greyed out.

After the key is created, click on the "view / edit" button. Leave this screen open.


Step 2: Install the Loqed VD on the Fibaro HC2 gateway

Login into your Fibaro gateway.

Download the VD, unzip the content, go to "Devices" -> "Add or Remove Device"->"Import virtual device" and click "select file".
Select the "LOQED.vfib" file and upload it.

Once uploaded, few things need to be set in the VD, go to advanced tab of the VD:

  • enter the LOQED Bridge IP Address into the VD "IP Address" field
  • enter 80 for the VD "TCP Port" field
  • in each every Button (Lock, Unlock and Open) code window, change these two variables:
    local loqed_key_id = 0
    local loqed_key = 'TE9RRUQgVkQgdi4wMSBmb3IgSG9tZSBDZW50ZXIgMiAoYykgdGlubWFu'
    to the values from the LOQED API Config website

    loqed_key_id is LOQED API Config -> "API Keys (incoming webhooks)" -> "Local Key ID"
    loqed_key is LOQED API Config -> "API Keys (incoming webhooks)" -> "Key"

Save the VD.

You should get now some values displayed in the VD,


if this is working please change the loop value in VD mail loop window to something like e.g. 10 minutes 


instead of the 10 seconds



which are fine for test, but not daily use.




Step 3: Setup Variables on the Fibaro HC2 gateway

Go to "Panels" -> "Variables Panel"
Scroll down to "Predefined variables"
Click on "Add"
For variable name use "LOQED"
Add two extra values, you need totally 4 of them
For the values use following values:

  • open
  • unlocked
  • locked
  • unknown

Click on save.

Later, you will be able to run your own block and LUA scenes, based on the LOQED variable values.


Step 4: Create webhook scenes on the Fibaro HC2 gateway

Go to scenes, and click on create -> new -> LUA
You need totally 4 scenes, the scene name does not matter, the scene ID is only important (for LOQED webhook).
For the vd_id please use the LOQED VD device ID, which you previously wrote down.

for "Open State" scene

%% properties
%% events
%% globals

-- change the xxx below to the LOQED VD ID on your HC2
local vd_id = xxx 

fibaro:call(vd_id, "setProperty", "ui.LabelStatus.value", "Open")
fibaro:setGlobal("LOQED", "open")

for "Locked State" scene

%% properties
%% events
%% globals

-- change the xxx below to the LOQED VD ID on your HC2
local vd_id = xxx 

fibaro:call(vd_id, "setProperty", "ui.LabelStatus.value", "Locked")
fibaro:setGlobal("LOQED", "locked")

for "Unlocked State" scnene

%% properties
%% events
%% globals

-- change the xxx below to the LOQED VD ID on your HC2
local vd_id = xxx 

fibaro:call(vd_id, "setProperty", "ui.LabelStatus.value", "Unlocked")
fibaro:setGlobal("LOQED", "unlocked")

for "Unknwon Position" scene

%% properties
%% events
%% globals

-- change the xxx below to the LOQED VD ID on your HC2
local vd_id = xxx 

fibaro:call(vd_id, "setProperty", "ui.LabelStatus.value", "Unknown position")
fibaro:setGlobal("LOQED", "unknown")

Write down the scene IDs, you will need them in Step 7

Step 5: Test VD / Scenes

Go to "Your Home" on your HC2 webpage, to be able to see the VD and scenes together.


Clicking on the Open, Unlock and Lock buttons of the VD should controll your LOQED Lock, additionally you should see in the VD "Lock state" label some messages,
e.g. when you click on "Unlock" the status will be "Unlock clicked" right after you clicked, and "Unlock executed" right after your LOQED Lock recieved that command.


Executing (simply manually click on start) of the 4 scenes, should change the VD "Lock state" label to "open", "locked", "unlocked" and "unknown position".

If all these tests are successful, you can continue with the next step.


Step 6: Create a user and set access permissions on the Fibaro HC2 gateway

Go to Settings->Access Control
Create new local user, e.g. loqed
Setup password for the user, please don't use any special characters


Change the user Access Control rights, give the user full access to the LOQED VD and these 4 LUA webhook scenes






Step 7: Create webhooks on LOQED bridge

The LOQED bridge can send any status change of the lock to your gateway as soon as they happen. For this, you need to set some URL's on the LOQED Bridge.


You need to create 4 webhooks on the LOQED Bridge to inform the gateway about the 4 different lock statuses.


Go to https://app.loqed.com/API-Config --> "Outgoing Webhooks via LOQED Bridge" --> click the button "Add/delete webhooks".
On that page, add the following URLs:

(only for the night lock trigger, change the 123 to the ID of the "Locked State" scene)

(only for the latch trigger, change the 124 to the ID of the "Unlocked State" scene)

(only for the open trigger, change the 125 to the ID of the "Open State" scene)


(only for the unknown state trigger, change the 126 to the ID of the "Unknwon Position" scene)


Above, "gw_user" and "gw_password" is your gateway's username and password created in previous step, "gw_ip" is the IP of ypur Home Center 2






That's it! You can now control your LOQED Touch using Fibaro Home Center 2.





If you have any questions regarding this VD, comments or improvements requests, please send me PM







Edited by tinman
wrong picture

User Feedback

You may only provide a review once you have downloaded the file.

There are no reviews to display.

  • Create New...