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!

 

Regards,

Smart Home Forum by FIBARO Team


  • 0

Set Fibaro Alarm On or Off through Virtual device


mbnn

Question

Hello all,

 

Does anyone happen to know how to set a fibaro alarm (Zone) to on or off with a quick app/vd? :)

Through the blocks does not work.

 

Edit, fixed this as follows:

- Create a virtual device in HC3 called Alarm , with 2 buttons and the following code:
 

Please login or register to see this code.

Make sure you replace XXXXXX with the device ID of the alarm Zone you want to arm or disarm. (you can find this by going to http://ipofyourhc3/api/devices)

- After that, When you press this virtual device it will arm the alarm (satel or whatever you have assigned in HC3 as alarm)

Edited by mbnn
Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

I had a similar situation this is how I have fixed it 

   I am reading json via http from an ESP8266 status of garage door and on same phisycal device a relay module ... quite cheap devices

 

 I wanted to have alarm sensor and push button to open the gate so I used the following :

 

    1 . quick app type binary switch ( can be also door lock with other functions calls )

if (previousValue~= newReadValue then
                 previousValue = newReadValue  <--- this is to avoid flip o value or update if not needed ( also to avoid debugging a lot for the turn on / off of deviceIDGarageDoorssensor)
          

 

 

if readturnON then
           
                      self:updateProperty("value"true)
                      fibaro.call(deviceIDGarageDoorssensor,"turnOn")   <--- I do this in order not to read again status from ESP 
                    else
                        self:updateProperty("value"false)
                         fibaro.call(deviceIDGarageDoorssensor,"turnOff")
                 end
end

 

 

    2. quick app with door sensor to be included in alarm zones 

 

function QuickApp:turnOn()
     self:updateProperty("value"true)
end

 

function QuickApp:turnOff()
     self:updateProperty("value"false)
end

 

function QuickApp:onInit()
    --self:debug("onInit")
end

 

Edited by vifefref45
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...