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

Using QuickApp to trigger alarm


Question

Being completely new to Fibaro (just bought a HC3)  but not to domotica and programming I am not able to find the info I need to do the following:

Receive a http request from my Synology Surveillance Station telling HC3 that camera movement has occurred and then set a zone to breached and trigger an alarm.

 

I was thinking of creating a QuickApp device of type binary sensor and turn that on with an http GET request from the surveillance station. This part works fine: when I send the request I can catch it in Quickapp:turnOn() Can see that by checking a debug message.

But now.... How do I get this device to set the zone to breached? I've tried to test it in a scene, using state "Detected" but that doesn't react to the turnOn.  The updateProperty("state", true) or updateProperty("state", "Detected") methods also didn't work.

 

Big problem here is imo the lack of documentation (at least I can't find it) E.g. where can I find a list of properties and built-in methods of the QuickApp class? The page at 

Please login or register to see this link.

 certainly does not contain all these properties and methods, doesn't it?

Can anyone point me in the right direction?

Link to post
Share on other sites

4 answers to this question

Recommended Posts

  • 0
  • Inquirer
  • Thanks! Almost. Instead of arming I would like to the zone to active or set the zone to breached, whatever is more appropriate. 

    So, instead of the "arm" in

    Quote

    fibaro.call(XXXXXX,"arm")

     

    I would need something like fibaro.call(XXXX, "activated"). But  I don't know (and cannot find) what I should use as the second argument instead of "activate".

    Link to post
    Share on other sites
    • 0
  • Inquirer
  • One step further down the road:

     

    I created a QuickApp of type door sensor and, like mentioned in the header of the QuickApp's editor I used 

    Please login or register to see this code.

    This effectively sets the breached status on the device when I make the http request from my Synology. When I check the device (

    Please login or register to see this link.

    X) I can also see the lastBreached time. But... strangely enough that doesn't breach the zone it is in. The device is added to the zone, like I also did with "real" sensors, but this one doesn't trigger the zone breached. 

     

    Is there a way to set the zone to "breached" directly from the QuickApp's code?

    Link to post
    Share on other sites
    • 0
  • Inquirer
  • Eureka! What a little bit of experimenting can do. Found out that the device I created, of type door sensor, keeps its value at true, once set. Thus, apparently, it only triggers the zone once. During my experimenting I did not reset the value to false, hence its failure to breach the zone. Changed the code a bit and now it works!

    Please login or register to see this code.

    Sorry to have bothered you. Hope this maybe helps others who like me, are struggling to find some info on properties and methods.

    Link to post
    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...