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

New integration code for DSC alarm with HC2


pos

Question

Ok here is my 2.0 of DSC <-> HC 2 integration

 

(creating a new thread here and will terminate the other old thread at 

Please login or register to see this link.

 )

 

scene trigger for:

  • All zones
  • AC power
  • What user armed or disarmed the partition
  • ARM/DISARM/STAY and the rest of the options :)
  • Panel battery status
  • Tell if a partition is in alarm

 

Presentation device with:

  • Presentation device auto created
  • Buttons for arming AWAY or STAY independantly for partition1 or 2
  • Buttons for DISARMING partition 1 or 2
  • Info of AC power status
  • Info of Panel power battery status
  • Panic buttons for Fire/Ambulance/Police
  • Info with time, arm state and the user who did it for partition 1 and 2

 

 

The whole config is mostly automatic.

 

For those not interested in the DSC itself, my code solves and show solutions for a few issues where Fibaro has no docs.. Included in the code is..

  • Auto creation of global variables
  • Auto creation of VD
  • Auto creation of VD labels and buttons
  • Upload of Icons to HC2
  • Raw Sockets handling against Envisalink plus against syslog

And more...

 

 

 

 

Please login or register to see this link.


Please login or register to see this link.

 

 

Attaches a little screenshot of the presenter device

 

DSC_presenter_work_in_progress-20170512-

 

 

Peo

Edited by pos
Link to comment
Share on other sites

Recommended Posts

  • 0
  • Inquirer
  • 2 hours ago, Chrisjcbt said:

    Thanks for putting this together @pos. This is a great plugin, and will really helping me make decisions about occupancy in the house, without having to use battery draining GPS options. I'll be able to make decisions based on the alarm state (Away, Stay or Off), or by using breach triggers on the PIRs.

     

    I have Scenes built based on Partition 1 Alarm State, but I cannot get the Partition 1 to Arm/DisArm using the DSCpartition1 VD. If I click the Arm button, I get an error in the Logger stating "Code required! A command was used that requires a code". But I have configured a code in the alarm panel, as well as specifying "ARMING_FLAG_P1:033" and "DSC_INTERFACE:0" in "DCFG_SETUP".

     

    What am I missing?

     

    @Chrisjcbt You have probably not upgraded according to the documentation. A short version 3.4 to 3.5 upgrade is in the release notes. Please confirm how you did the upgrade.

     

     

    Edited by pos
    Link to comment
    Share on other sites

    • 0

    But I installed from scratch, using version 3.5 - the docs say that should be ok?

     

    --[[
    ....[Cut Text]
    Documentation:

    Please login or register to see this link.


    --]]
    DSCengine_version = "3.5"

     

    I can delete and re-install, or follow the upgrade process to see if that solves it - I'm guessing I should try the upgrade process. That sound reasonable?

    Just to double check the upgrade steps, the notes are below:

     

    "Delete the DSCpartition1 and DSCpartition2 devices. You must also either delete the DCFG_SETUP variable OR manually add

    the values ARMING_FLAG_P1:033 and ARMING_FLAG_P2:033 to it. After that you can replace the DSCengine code and start the service by saving it"

     

    Just so I'm 100%. I would:

     

    1. Logon to HC2 and Choose "Devices".

    2. Delete "DSCpartition"1 and "DSCpartition1".

    3. Click "Panels"

    2. Choose "Variables Panel"

    3. Add a new variable, with a Name of "ARMING_FLAG_P1", and a Value of "033"

    4. I leave DCFG_SETUP as is, with no changes.

    5. Save and re-test.

     

    Does that sound right?

    Chris 

    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • No...

     

    What you refer to is the upgrade description from  3.4 to 3.5 only. But an important part i missing. You must also paste in the new lua code in the DSCengine VD (with a unicode compliant ediitor). And then restart the DSCengine by clicking "save" after pasting the code in the main code window at the DSCengine VD. Also you must add the ARMING variable for P2 first. Doing what you wrote and add these instructions in the last sentences, you should be fine. IF.... you had a working 3.4 before you started.

     

    It seems that part to "add the new code to VD" is missing :-| from the PDF for 3.4 to 3.5 upgrade . I have that info in older upgrade instructions for older releases. Sorry... It is ok to mail me directly. Address is in the PDF. Then you can post back here in the forum the final result.

     

     

    Of course you could blow most stuff away and do a clean install. But that should not be necessary. If you have 3.4 an upgrade takes 2 minutes... However.... Doing a clean install if you have an earlier one is:

    1 - DELETE

    VD:s # DSCengine, DSCloggger, DSCpartition1 DSCpartition2

    Predef Vars # DCFG_SETUP, DCFG_USERMAP, DCFG_ZONEMAP, DCFG_ICONS

    (No need to delete your global zone variables as they will be re-created later on anyway if they are added to the DCFG_ZONEMAP predef variable.  And the  DCFG_USERMAP, DCFG_ZONEMAP, DCFG_ICONS does not have to be removed as nothing has ever been done that requires these to be re-created. DCFG_SETUP however needs to be deleted between some upgrades as it has had additions. But as you see, if you know what you should manually add to it (see notes 3.4->3.5), you do not have to delete that either.... )

     

    2 - IMPORT 
    HC2_DSCengine-3.5.vfib 

     

    3 - MODIFY these to your needs

    DCFG_SETUP, DCFG_USERMAP, DCFG_ZONEMAP, DCFG_ICONS

     

    4 - DELETE

    All zone variables that came from my system during first start of DSCengine

     

    The above process for a clean install is hopefully clear in the install PDF though.

     

     

    Just a little explanation if you are interested:

    As all other VDs than DSCengine itself are auto created from the DSCengine main VD during its startup if they does not exist. Eventual new code that should be in these VDs child VDs cannot easily come in there if the DSCengine cannot re-create them. And DSCengine only re-creates them if they does not exist. Auto inject eventual new code in the child VDs takes to much coding. And the code space is limited for a Fibaro VD. The same thinking applies for new variables inside the "predef" variables. Therefor the DCFG_SETUP had to be deleted so it could be auto re-created by the DSCengine when it is updated. OR.... DCFG_SETUP could be manually updated if you know what to add. 

     

     

    /Peo

    Edited by pos
    Link to comment
    Share on other sites

    • 0

    Just to close this thread out.

     

    It turned out that the problem was that my DSC Alarm was set to require a code when you set the ARM-STAY mode (this is where only sensors downstairs are active). Thanks @pos for spotting this. I spoke to my alarm installer who helped with the necessary routine to remove the code requirement for ARM-STAY (I think this is otherwise known as 'Quick Arm'). The steps for my DSC Power Series (using the LCD Keypad) are below:

     

    Press *6 then put in [User Code].
    Scroll to System Serv/DLS and press *
    Press #
    Then *8 and put in [Installer Code]
    Enter 015 and use the right arrow to scroll to Quick Arming.
    If it says Disabled press the * to change it to Enabled.
    Press ### to come out of programming.
     
    Obviously disarming still needs a code as normal, but with Quick Arming enabled my DSC based triggers for Scenes are now all working as expected. 
    Link to comment
    Share on other sites

    • 0
    On 1/2/2018 at 4:00 AM, pos said:

    Now 3.0 is out of DSCengine with a few new features, fixes plus support DSC IT-100 over Global cache. The IT-100 is tested out by Chris Swan.

     

    Please login or register to see this link.

     

    /Peo

     

    hi @pos,

     

    I bought IT-100 for DSC

    I couldn't understand why we should use DSC IT-100 with Global cache ?

    Can I use IT-100 without Global cache ?  is global cache necessary ? Should I buy it also too.

     

    thanks al lot,

     

     

     

    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • 17 minutes ago, malitan said:

     

    hi @pos,

     

    I bought IT-100 for DSC

    I couldn't understand why we should use DSC IT-100 with Global cache ?

    Can I use IT-100 without Global cache ?  is global cache necessary ? Should I buy it also too.

     

    thanks al lot,

     

     

     

     

    It-100 is pure serial interface. So HC2 cannot communicate TCP/IP with it. Therefor the DSC alarm must be TCP/IP enabled. This can be done by using an Envisalink card inserted to the DSC alarm (preferred) OR by adding a global cache TCP/IP to serial box. Envisalink has a login process that must be used to access it, whereas the setup with global cache together with IT-100 has no login and is less secure.

     

    ! have added support for Global cache with IT-100 by communication with an external person. So direct questions of that, I can maybe not answer. When I started myself, I evaluated both Envisalink and the IT-100/G-cache solution and chose Envisalink. Also note that Envisalink draw only 50-60 mA, so it can be powered by the DSC alarm itself inside the box. So no need to have stuff outside the DSC alarm box... But don't miss there is two places to take out power with different specs (aux+ and bell+). Both can be used as the DSC is controlled by negative. So using bell+ for power means you take plus from bell+ and negative from system. Bell- is only active when sirens are active.


    If you have not bought it all. Go for the Envisalink and your life will be easier :) 

    Regards

    /Peo

    Just now, pos said:

     

    It-100 is pure serial interface. So HC2 cannot communicate TCP/IP with it. Therefor the DSC alarm must be TCP/IP enabled. This can be done by using an Envisalink card inserted to the DSC alarm (preferred) OR by adding a global cache TCP/IP to serial box. Envisalink has a login process that must be used to access it, whereas the setup with global cache together with IT-100 has no login and is less secure.

     

    ! have added support for Global cache with IT-100 by communication with an external person. So direct questions of that, I can maybe not answer. When I started myself, I evaluated both Envisalink and the IT-100/G-cache solution and chose Envisalink. Also note that Envisalink draw only 50-60 mA, so it can be powered by the DSC alarm itself inside the box. So no need to have stuff outside the DSC alarm box... But don't miss there is two places to take out power with different specs (aux+ and bell+). Both can be used as the DSC is controlled by negative. So using bell+ for power means you take plus from bell+ and negative from system. Bell- is only active when sirens are active.

     

    Have you downloaded the install guide from marketplace? I think there is a little more info there.


    If you have not bought it all. Go for the Envisalink and your life will be easier :) 

     

    Regards

    /Peo

     

    Link to comment
    Share on other sites

    • 0
    On 2/14/2019 at 1:01 PM, pos said:

     

    It-100 is pure serial interface. So HC2 cannot communicate TCP/IP with it. Therefor the DSC alarm must be TCP/IP enabled. This can be done by using an Envisalink card inserted to the DSC alarm (preferred) OR by adding a global cache TCP/IP to serial box. Envisalink has a login process that must be used to access it, whereas the setup with global cache together with IT-100 has no login and is less secure.

     

    ! have added support for Global cache with IT-100 by communication with an external person. So direct questions of that, I can maybe not answer. When I started myself, I evaluated both Envisalink and the IT-100/G-cache solution and chose Envisalink. Also note that Envisalink draw only 50-60 mA, so it can be powered by the DSC alarm itself inside the box. So no need to have stuff outside the DSC alarm box... But don't miss there is two places to take out power with different specs (aux+ and bell+). Both can be used as the DSC is controlled by negative. So using bell+ for power means you take plus from bell+ and negative from system. Bell- is only active when sirens are active.


    If you have not bought it all. Go for the Envisalink and your life will be easier :) 

    Regards

    /Peo

     

     

     

    Hi @pos,

     

    I listened to you and got a Envisalink card :)  I am trying to use it with DSC but I have some trouble :( 

    As shown in the pisture Debug says login has failed whereas My dsc alarm works perfectly.

    What Should I do ?

    thanks a lot,  

    Please login or register to see this attachment.

    Please login or register to see this attachment.

    Please login or register to see this attachment.

    Please login or register to see this attachment.

    Edited by malitan
    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • @malitan

     

    Hi

     

    - Make sure HC2 and EVL4 sits on the same IP network (They say EVL4 have implemented a firewall that comes into play if not on the same network)

    - Log in to EVL4 web gui (with a browser) and set a password of your choice

    - Install DSCengine

    - Configure DCFG_SETUP variable in HC2. To make DSCengine able to login you have to: #1 Set EVL4 IP #2 The login password of EVL4 #3 Choose EVL4 or IT-100. Then restart DSCengine by enter the VD main code window and click save.

     

    Now it should work... I also recommend to read the quick guide.

     

    Tell us how it goes

     

     

    PS

    The last picture with your output from a "2.lua" scene. Where did that come from?

     

     

    /Peo

    Edited by pos
    Link to comment
    Share on other sites

    • 0
    40 minutes ago, pos said:

    @malitan

     

    Hi

     

    - Make sure HC2 and EVL4 sits on the same IP network (They say EVL4 have implemented a firewall that comes into play if not on the same network)

    - Log in to EVL4 web gui (with a browser) and set a password of your choice

    - Install DSCengine

    - Configure DCFG_SETUP variable in HC2. To make DSCengine able to login you have to: #1 Set EVL4 IP #2 The login password of EVL4 #3 Choose EVL4 or IT-100. Then restart DSCengine by enter the VD main code window and click save.

     

    Now it should work... I also recommend to read the quick guide.

     

    Tell us how it goes

     

     

    PS

    The last picture with your output from a "2.lua" scene. Where did that come from?

     

     

    /Peo

     

    Hi @pos

    Still problem is continue.

     

    - Make sure HC2 and EVL4 sits on the same IP network :   Yes using the same network. No firewall.

    HC2 İP is :  192.168.8.126 -------  EVL4 İP is : 192.168.8.133

     

    - Log in to EVL4 web gui (with a browser) and set a password of your choice  : I did already. I posted picture abouth it.

     

    - Install DSCengine  : Did you mean VD ? I have already install it from marketplace.

     

    - Configure DCFG_SETUP variable in HC2. To make DSCengine able to login you have to: #1 Set EVL4 IP #2 The login password of EVL4 #3 Choose EVL4 or IT-100.

    I also posted pictured abouth them. I did EVL4 IP,  Login password, but I couldn't find #3 ? where can I choose EVL4 ?

     

    thanks a lot,

     

    Please login or register to see this attachment.

    Please login or register to see this attachment.

    Please login or register to see this attachment.

    Please login or register to see this attachment.

    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • DSC_INTERFACE attribute choses between EVL and IT100.

     

    Don't forget to restart DSCengine after changing settings.

     

     

    Also.. I don't get it why you sent a screenshot of the eye-zon gui. It has nothing to do with this... I was referring to the web interface in the EVL itself. I.e http://192.168.8.133 The password to log in there need to be put in the DCFG_SETUP variable "PASSWORD". Search for DCFG_SETUP in HC2_DSCengine-QuickGuide.pdf. The detailed description is there.

     

    You must have done something special. It is as easy as I wrote. Just as few bullets. If "IP", "PASSWORD" and "DSC_INTERFACE" are correct, it will work. If it will not work, one of those three is not correct or you have not restarted DSCengine after changing them.

     

     

    B t w... How did you install DSCengine? copy/pasted the ".lua" code or by importing the ".vfib" file?

     

    /Peo

    Link to comment
    Share on other sites

    • 0
    32 minutes ago, pos said:

    DSC_INTERFACE attribute choses between EVL and IT100.

     

    Don't forget to restart DSCengine after changing settings.

     

     

    Also.. I don't get it why you sent a screenshot of the eye-zon gui. It has nothing to do with this... I was referring to the web interface in the EVL itself. I.e http://192.168.8.133 The password to log in there need to be put in the DCFG_SETUP variable "PASSWORD". Search for DCFG_SETUP in HC2_DSCengine-QuickGuide.pdf. The detailed description is there.

     

    You must have done something special. It is as easy as I wrote. Just as few bullets. If "IP", "PASSWORD" and "DSC_INTERFACE" are correct, it will work. If it will not work, one of those three is not correct or you have not restarted DSCengine after changing them.

     

     

    B t w... How did you install DSCengine? copy/pasted the ".lua" code or by importing the ".vfib" file?

     

    /Peo

     

    hi, 

    I install DSCengine lua code imported to the devices and copy to the scenes.

    Should I use the lua code as a device or scenes. ??? or both ?

     

    IP, PASSWORD, AND  INTERFACE ARE CORRECT. I checked twice.

     

     

    But in the scenes section I have a DSCengine when I push the debug and then ''2.lua'' attenions. You can see the pictures.

     

     

     

    Please login or register to see this attachment.

    Please login or register to see this attachment.

    Edited by malitan
    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • Why do you show me a scene? We are talking about a virtul device named DSCengine, not a scene.

     

     

    Link to comment
    Share on other sites

    • 0
    3 minutes ago, pos said:

    Why do you show me a scene? We are talking about a virtul device named DSCengine, not a scene.

     

     

     

    Because I copy the your  lua code also as a scenes. I think it will be only device.

    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • It does not work as a scene. It would also be meaningless

    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • Just skip all other stuff. Import the DSCengine .vfib so the DSCengine is created. Then update and set correct values in DCFG_SETUP. If you after that restart the DSCengine VD, it will work... By sending med output from scenes that is not related to the issue of DSCengine, you make it harder to help.

     

    When it is running, you have to adjust and add your zones and users. That is easy. It is also described in the quick guide.

     

    Regards

    Peo

    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • Did it work out for you after our team viewer session?

     

    It was an easy solved problem :) Wrong password used...

     

    Regards

    /Peo

    Link to comment
    Share on other sites

    • 0
    On 3/2/2019 at 1:16 AM, pos said:

    Did it work out for you after our team viewer session?

     

    It was an easy solved problem :) Wrong password used...

     

    Regards

    /Peo

     

     

    Thanks for everthing. I learned lots of things from you.

     

    by the way; Some of my zone appears red question mark looks. why ?

     

     

     

    Please login or register to see this attachment.

    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • The question mark is explained in the quick quide. I *really* suggest you read the quick guide.....

     

    --snip--

    Please login or register to see this attachment.

    --snip--

     

     

    /Peo

     

     

    Regards

    Peo

    Link to comment
    Share on other sites

    • 0
    6 minutes ago, pos said:

    The question mark is explained in the quick quide. I *really* suggest you read the quick guide.....

     

    --snip--

    Please login or register to see this attachment.

    --snip--

     

     

    /Peo

     

     

    Regards

    Peo

     

    Thanks I got it.

     

    What abouth syslog server,

     

    I want to install a syslog service as you mentioned. How Can I install ?? what is the requirements ?? and what is the addinitional info ?

    For example; for the syslog service I need a pc and then ? what should I do ? which software should I use for the syslog service.??

     

    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • If you use Linux or UNIX, you have a syslog service build in. If you use windows you can install *any* syslog software service running on windows. I suggest you install a free syslog service. If you install it on your computer, make sure the local firewall accept incoming syslog traffic and that the syslog service autostart at boot. Then... In DSCengine:s config variable DCFG_SETUP, set the syslog IP variable to the IP of your windows computer running the syslog service. Also enable syslog (this is another DCFG_SETUP variable) See quick guide.... Then restart DSCengine so it pick up the changes and it works...

     

    This is what it could look like with basic debug level...

    Please login or register to see this attachment.

    /Peo

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