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

Comments/Testers to HC2 to DSC integration code wanted


Question

Posted (edited)

Hi

 

I was posting here earlier regarding HC2 integration with the DSC alarm. After tricky research with a lot of needed info missing and testing of the Fibaro alarm plugin, I decided to start to write my own integration code. No need to use the crappy EnvisaLink plugin in HC2.

 

I have used EnvisaLink 4 and used the API to it (95% is same as IT-100 API). You do not need to allow traffic to Internet från the EnvisaLink to Eyezon or so.

 

Just plug in the EnvisaLink, power it up and you are ready to go directly (well,  maybe change password..). The code is running in a virtual device. The code is working very well, has different debug levels and also has log to syslog implemented.

 

Scenes can use the “traps” from the alarm sensors through global variables. Extending it to read and write anything to/from the DSC alarm is very easy from here. I do however wonder if there is a better way than using global variables (that cannot be created from lua). I mean… there should be a way to directly talk between scenes and VD:s… But I haven’t found any…

 

 

Comments and feedback to the code is very much appreciated before I give the code its final touch… But don’t be to hard on me. I am rather new to Lua and HC2. And it is a beta after all that I have spent a day on… The API poll function is used to have control of the TCP socket. Documentation of the code is in the top of the lua file. Right now the code it is rather basic. I will implement buttons and writing to the alarm as well from scenes and also implement more stuff from the API. But as said... I would very much appreciate some feedback before I continue the work.

 

Please login or register to see this link.

 

Here are a few log output screenshots:

 

Please login or register to see this image.

 

Screen%20Shot%202017-02-25%20at%2018.14.

 

Screen%20Shot%202017-02-25%20at%2018.14.

 

 

 

 

Edited by pos

Recommended Posts

  • 0
  • Inquirer
  • Posted

    @devfern24

    You cannot send codes to Envisalink that way. I have mentioned the card can have only one connection at a time. Otherwise I would have done it.

     

    Regarding doing stuff from VDs versus scenes, the available socket tools differs and needs different coding. And zero documentation from Fibaro course... :)  I think the Net.FHttp won't work in in a scene. But maybe Net.FTcpSocket. I have done most stuff I VDs, so I am not 100% sure without testing myself.

     

    I have some from my point of view, cool features coming.... I am just finishing it as we speak....

     

    • 0
  • Inquirer
  • Posted

    I have now released 1.17. With this release most stuff is automatic and the install and configure is even easier. Now the scene DSC zone triggers can be chosen by yourself in the gui among other things.

     

    Please login or register to see this link.

     

    Feedback appreciated. I am pretty satisfied with it for my own use.. :)

     

    Will now look into arm/disarm buttons in the VD for release 1.18

     

    Peo

    • 0
    Posted

    @devfern24 would you mind posting your LUA and how you setup the panel? I am new to LUA and Fibaro so having examples really helps.

     

    Thank you

    • 0
  • Inquirer
  • Posted (edited)

    New release 1.18 on its way later today... Of course this device is auto created and auto configured..

     

    Just waiting for test feedback from @smprofx before publishing it.

     

    Please login or register to see this image.

     

    Peo

    Edited by pos
    • 0
  • Inquirer
  • Posted

    From my point of view a have started a new thread with the new code at 

    Please login or register to see this link.

     

    /Peo

    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...