Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Aritech Alarm Internet Dialler

Options
1246712

Comments

  • Registered Users Posts: 3,846 ✭✭✭ozmo


    Thanks to Altor for the HKC keypad (and the Astec) - Much appreciated.

    So an update - made very good progress with the HKC Securewatch SW8/12 panel.
    I was able to code my arduino to emulate a hkc keypad, attaching to the panel and listening and sending data.

    Running an Add keypad scan - the Arduino is now passing itself off as if a second regular HKC keypad is attached. yay!

    And I am able to send key presses to the panel.

    So bit of tiding up to do - a few more buttons to the web page - hook up the Ethernet card again and lots of testing to do- but so far its gone very well :)


    For anyone interested in details - here some info on how a part of it works (see attached).
    The serial protocol used is kinda unusual - ~1650 baud(varies a little bit) - 3 wire (+12 0v power and one shared data wire: 0v idle, 0v=1 12v=0 logic). Its 9 bit data - with 9th bit set to indicating the first byte of the message. This posed some problems as the standard Arduino Libraries are 8bit.
    I got to use a new bit of hardware I acquired - a logic probe - you can see the scan it produces attached(the decode message is above the traces) - top trace is what the panel sees - middle is what the keypad is outputting - bottom is what my Arduino keypad is saying (when I have got it right - the arduino trace should match exactly the middle trace).
    There are several type of messages - In this case its a message from the keypad to the panel responding to the request if anyone has pressed any keys..
    (Byte0 is the keypad - byte 1 is showing command 0 (there are about 6 commands like display this etc.) - byte 2..4 are up to three keys pressed(you can see FF - that's no key pressed)..last byte is a checksum.

    Electrically - I'm using the very same two transistor board I made for the Aritech except a couple resistor substitutions as more power is needed to transmit on this system and the PanelRX and PanelTX are connected together - HKC transmits and receives on the one wire.

    Ill keep you posted...

    “Roll it back”



  • Registered Users Posts: 11,643 ✭✭✭✭altor


    ozmo wrote: »
    Thanks to Altor for the HKC keypad (and the Astec) - Much appreciated.

    Glad I could help :) Have you looked at the Astec system yet?


  • Registered Users Posts: 3,846 ✭✭✭ozmo


    altor wrote: »
    Glad I could help :) Have you looked at the Astec system yet?

    I did thanks - and the hardware might be a little too weird to do that one though. The signal and power share the only two wires - this would make any keypad emulator more complex to make compatible electronics wise. I will keep it mind though once I finish the hkc though. cheers.

    “Roll it back”



  • Moderators, Home & Garden Moderators, Technology & Internet Moderators Posts: 24,789 Mod ✭✭✭✭KoolKid


    Without the standard TX RX the Astec is always going to be a little more difficult.
    Would you be better going for a connection straight to the panel?


  • Registered Users Posts: 11,643 ✭✭✭✭altor


    ozmo wrote: »
    I did thanks - and the hardware might be a little too weird to do that one though. The signal and power share the only two wires - this would make any keypad emulator more complex to make compatible electronics wise. I will keep it mind though once I finish the hkc though. cheers.

    Yeah its a two wire system, with all the good work you have done with the other systems this should be a welcome challenge :D


  • Advertisement
  • Moderators, Home & Garden Moderators, Technology & Internet Moderators Posts: 24,789 Mod ✭✭✭✭KoolKid


    ozmo wrote: »
    I did thanks - and the hardware might be a little too weird to do that one though. The signal and power share the only two wires - this would make any keypad emulator more complex to make compatible electronics wise. I will keep it mind though once I finish the hkc though. cheers.

    If you need any help with it give me a shout.
    I can put you in contact with the software developer of the Astec system. As far as I remember it was written in C+


  • Registered Users Posts: 9 usertech321


    Ozmo (and others),

    Last week I got it installed and it's now working with the latest code.

    My remarks:
    - Sometimes the arduino webserver cannot be reached at all. The webserver seems to be unavailable;
    - Sometimes it can be reached but no panel data returns to the browser;
    - Firefox on android is an issue. This does not work with the aiduino code;
    - Would it not be nice when the remote panel (from the webserver) html page could be resized or this can be changed using a parameter on the first parameter page? To operate properly things now are really tiny (but yes it works!). Now it seems that resizing somehow is not supported for this html code. It can be enforced in the android browser but when the page refreshed automatically it will become small again. While typing your panel code this is not a good idea..
    - e-mail gives trouble. When making an alarm on the system and the e-mail option in sourcecode is on then the panel will be unavailable for 2 seconds and causes a remotepanel failure in the system; All remote panels seem to reset by the alarmsystem. Also no mail will be delivered to the smtp host (nothing to find in the unix logs of my server, no connection nothing). Could you check this? I like really would like to use this mail feature.
    - As I'm not so technical I had some issues with understanding the wire diagrams. Maybe some other deal with the same.
    - Why is the webpage connecting to http:// goo.gl/ m3GB3M ? Does it need this jQuery JavaScript Library v1.4.2 code?

    Security
    As security is an important aspect of this alarmsystem I would advise the users of this code not to connect your virtual panel directly to the internet. You can do it but it can be risky. Make use a decent VPN connection to access your alarmsystem. VPN or OPENVPN is nowadays installed on many wifi home routers. Openvpn can also be installed on android. Another option is to install a raspberry PI and let is act as a VPN router. Search for raspberry and vpn and you will find a manual to implement. At least do not allow the whole world to access your system using a software/hardware firewall unit in front of it. :-)

    Looking forward to hear if you deal with the same e-mail issue on the latest code.
    Regards!


  • Registered Users Posts: 5,366 ✭✭✭DublinDilbert


    Ozmo (and others),

    Last week I got it installed and it's now working with the latest code.

    My remarks:
    - Sometimes the arduino webserver cannot be reached at all. The webserver seems to be unavailable;
    - Sometimes it can be reached but no panel data returns to the browser;
    - Firefox on android is an issue. This does not work with the aiduino code;
    - Would it not be nice when the remote panel (from the webserver) html page could be resized or this can be changed using a parameter on the first parameter page? To operate properly things now are really tiny (but yes it works!). Now it seems that resizing somehow is not supported for this html code. It can be enforced in the android browser but when the page refreshed automatically it will become small again. While typing your panel code this is not a good idea..
    - e-mail gives trouble. When making an alarm on the system and the e-mail option in sourcecode is on then the panel will be unavailable for 2 seconds and causes a remotepanel failure in the system; All remote panels seem to reset by the alarmsystem. Also no mail will be delivered to the smtp host (nothing to find in the unix logs of my server, no connection nothing). Could you check this? I like really would like to use this mail feature.
    - As I'm not so technical I had some issues with understanding the wire diagrams. Maybe some other deal with the same.
    - Why is the webpage connecting to http:// goo.gl/ m3GB3M ? Does it need this jQuery JavaScript Library v1.4.2 code?

    Security
    As security is an important aspect of this alarmsystem I would advise the users of this code not to connect your virtual panel directly to the internet. You can do it but it can be risky. Make use a decent VPN connection to access your alarmsystem. VPN or OPENVPN is nowadays installed on many wifi home routers. Openvpn can also be installed on android. Another option is to install a raspberry PI and let is act as a VPN router. Search for raspberry and vpn and you will find a manual to implement. At least do not allow the whole world to access your system using a software/hardware firewall unit in front of it. :-)

    Looking forward to hear if you deal with the same e-mail issue on the latest code.
    Regards!

    I've seen similar problems with the whiznet chip on a range of projects, wouldn't trust it.

    Some of the other problems your seeing is probably due to only one thread of execution.

    My plan over the summer is to port the c++ code onto a beagle bone and design a 3.3v level shifter.


  • Registered Users Posts: 3,846 ✭✭✭ozmo


    Ozmo (and others),
    Last week I got it installed and it's now working with the latest code.
    Thanks for the feedback -
    You seem to be having some network card issues - it just could be a faulty or just different ethernet card. The emails are sent asynchronously - so should not cause any delays - but Im looking into if there is anything the arduinos watchdog or timers can do in these circumstances. Email works fine for me though (via upc).

    The http code is written to be as generic as possible - Ive tried it on all the modern browsers, but there is always going to be one combination that causes issues - pm me the problem you are seeing.
    Resizing- there is code in there to block resizing - you could try removing the "viewport" command in the html and see if you prefer that.

    Security - Im not keen on RPi for anything for continuous use - but other options could be installed if you require. Shared out on a randomly selected 5 or more digit port number, a good alarm password and Aritech code tamper left enabled (panel blocks for a minute each 5 or so bad password attempts) would help a lot.

    ".. understanding the wire diagrams.". I'll try getting round to doing up a layout for a shield. But you could use the alternative method that needs no circuit at all (just one diode).

    "- Does it need this jQuery JavaScript Library v1.4.2 code from goo.gl?"
    Yes - this is for the websockets. Websockets is complex to implement but allow the panel to send display changes to the phone without doing a constant polling for display changes- the html code is much more responsive using this method..

    “Roll it back”



  • Registered Users Posts: 3,846 ✭✭✭ozmo


    My plan over the summer is to port the c++ code onto a beagle bone and design a 3.3v level shifter.

    Sounds great :) let me know how you get on.

    “Roll it back”



  • Advertisement
  • Registered Users Posts: 3,846 ✭✭✭ozmo


    HKC is mostly working now :) just the email alarms to implement.
    Alarm panel accepts the Arduino as one of its own keypads and arduino is accessable via internet.

    I've updated git hub (link) with the latest code- and the circuit to make.

    It needed three transistors but as you can see below - it can be made very small. I have it on a mini breadboard here which is fine - but I plan to solder it up permanently.

    2s9rpcm.jpg

    23uaiv5.png

    Parts list:
    1 Arduino Uno or compatible - $6
    1 Ethernet card - $7 link
    1 12 to 5V DC-DC convertor - $2 link
    Mini breadboard - $2 link
    Transistors, Resistors and wire - $2 aprox

    :)

    “Roll it back”



  • Registered Users Posts: 47 Redwid


    What a great thread.
    Just wondering how everybody here found an engineering code for their alarm?

    Called to Lara (who is recently serviced my alarm) and they told me that not giving their engineering code to the customers :-(


  • Moderators, Home & Garden Moderators, Technology & Internet Moderators Posts: 24,789 Mod ✭✭✭✭KoolKid


    Most panels can be defaulted. What panel do you have?


  • Registered Users Posts: 47 Redwid


    There are nothing on it, only Aritech logo.


  • Registered Users Posts: 8,738 ✭✭✭degsie


    Redwid wrote: »
    There are nothing on it, only Aritech logo.

    That's just a keypad, is there a controller box?


  • Registered Users Posts: 47 Redwid


    degsie wrote: »
    That's just a keypad, is there a controller box?
    Ah, sorry it's CS350


  • Moderators, Home & Garden Moderators, Technology & Internet Moderators Posts: 24,789 Mod ✭✭✭✭KoolKid


    There will be a control panel in the hot press, utility room or under the stairs more than likely.
    Those panels can be defaulted & reprogrammed if you want engineer access. What do you want to do?


  • Registered Users Posts: 47 Redwid


    KoolKid wrote: »
    There will be a control panel in the hot press, utility room or under the stairs more than likely.
    Those panels can be defaulted & reprogrammed if you want engineer access. What do you want to do?
    I'd like to add extra keypad by using arduino to get notifications from my alarm over internet.


  • Registered Users Posts: 3,846 ✭✭✭ozmo


    Redwid wrote: »
    I'd like to add extra keypad by using arduino to get notifications from my alarm over internet.

    Well the project is tested compatible with that alarm panel (CS350) - should you wish to proceed - defaulting the panel to reset the engineer code, and what you will need do after, is described in post 75 of this thread.

    “Roll it back”



  • Registered Users Posts: 3,846 ✭✭✭ozmo


    Update: code for HKC Secure watch is now complete and checked into github.
    It Emails you now when the alarm goes off.
    If anyone tries it - let me know any issues. I've tested it on Uno and Leonardo Arduinos. With the three transistor interface above. Circuit details are in the github docs folder as well as a description of the comms protocol if anyone is curious.

    Notes:
    1) I used some great info sent to me from mrkayak(thanks) from this thread about logging onto the SMTP servers - so you can use any SMTP Email Server now - not just your own ISPs.

    2) I have implemented the RKP comms as interrupts - this improves further the speed the arduino can reply to the panel. Should help with usertech321's issue.

    I will port this improved Communications code back into the Aritech version.

    all the best....

    “Roll it back”



  • Advertisement
  • Registered Users Posts: 9 usertech321


    Thanks OZMO.
    First to say again you really did do a great job with creating a connection between the Aritech CD alarm panel and the Arduino webserver!
    I will try to test your new code today and report if it works.


  • Registered Users Posts: 9 usertech321


    Ozmo (and others),

    Code seems to work on my Adruino Leonardo.
    A few remarks or questions from my side:
    - Mailserver accepts the message from the arduino. The message I get is the following alarm message:
    Subject: House Calling. Alarm.
    From: TheHouse <alarm @ domain.com>
    To: alarm @ domain.com


    The House Alarm has gone off

    EndEmail
    Maybe it would be nice to replace the name of the sender with the mail address configured insteat of "TheHouse". Same for the subject. It would be nice to define it yourself.

    Some other quiestions:
    - The Arduino script does (only) mail me when there is an alarm:
    >It does not say what zone has been triggered. Would it be possible to receive a message with the name of the triggered zone?
    >To sent a message as soon as the alarm has been DIS/ARMED (including the username and time)? Maybe this information is only available using the printerport but this would make it even more complete.

    According to the code I should also receive an e-mail when the alarm was started:
    "if(SMTP::nMsgToSend == START)
    SMTP::client.println("The House Alarm has just started\r\n");"
    It looks like it doesn't wants to.......


    > Making this as an option switch in the config.h ?

    - I do not realy understand the part of the code:
    //Set to 1 for normal operation - comment out will debug print useful logs - Only Useful for Leonardo
    #define QUIET 1 //NOTE - For Arduino UNO - THIS MUST BE DEFINED (as we need the only Serial port for panel comms)

    What will hapen if I change it for my leonardo to "QUIET 0"? Where will the debug print be sent to? Mail? On what moment? I will try myself but this is not clear to me based on your code.

    - The webserver HTML page has a better response and does not resizes on a script refresh. On my smartphone I now can increase the size of the softpanel (html) page even with the refresh. This works great!

    Again... your work is much appriciated!


  • Registered Users Posts: 9 usertech321


    I now received a message that the alarm panel has been started when plugged in the powercable.... :-)
    But no message when the alarm is dis/armed... but yes this seems not be available in not in the code.

    What for me should would work is to sent "information level" messages such as arming and disaming to a differen "logging" mailbox such as to alarm.logging @ domain.com. The alarm message then would be sent to an address which is read all day long such as work e-mail :-)

    According to the code I should also receive an e-mail when the alarm was started:
    "if(SMTP::nMsgToSend == START)
    SMTP::client.println("The House Alarm has just started\r\n");"
    It looks like it doesn't wants to.......


  • Registered Users Posts: 3,846 ✭✭✭ozmo


    Thanks for the testing and feedback-

    With the leonardo arduino its possible send back messages to the pc through the usb cable- press ctrl+m in the arduino ide to see the window. Its just stuff like a display of everything happening on the panel comms- useful while debugging only.

    About sending logs- that would be great- but as the arduino is emulating a keypad it only has the information a keypad would know at that point- when the alarm goes off the information as to what zone triggered it is not sent to the keypad until the alarm is disarmed.

    If you would like personalise the message the text should be easily readable near the top of the websockets.cpp file. Edit as you wish.
    I think it would be good here to work out the ip and email a link so you can login easily- maybe next version.

    You should get an email each time the arduino is powered up or reset.
    I could add one for set and unset also... As long as the option in the panel to display the clock always is not set.

    Amy other ideas? I was thinking also of pinging a remote site and activating a (lid)tamper if the alarm is set and the ethernet is down for a set length of time?

    “Roll it back”



  • Registered Users Posts: 9 usertech321


    I now understand the limitations.
    I changed the e-mail text and this seems to work.

    The set and unset message would be a great idea. Using a parameter in the config.h to enable or disable would be nice.

    I also noticed the Leonardo has a microsd card slot.
    Would it be possible that to create a "easy to edit" config file on the microsd card that will be reading out the config each startup or if not present reading the default "hardcoded" parameters on the uploaded arduino code?
    Now we are highly dependent on the compatibility of the arduino compiler and your sourcecode for parameter changes (such as mailserver, IP address, e-mail address).

    Pinging or an http request would both be an option. Checking the internet connection before setting the alarm would give some extra assurance that eg. a VOIP line is available. Doesn't this creates a new issue that the alarm cannot be set until a internet connection is back online?
    Would be nice to only report this to the codepanel so this information is available when setting the alarm and it can be bypassed.


  • Registered Users Posts: 205 ✭✭Bazsutto


    ozmo wrote: »
    Update: code for HKC Secure watch is now complete and checked into github.
    It Emails you now when the alarm goes off.
    If anyone tries it - let me know any issues. I've tested it on Uno and Leonardo Arduinos. With the three transistor interface above. Circuit details are in the github docs folder as well as a description of the comms protocol if anyone is curious.

    Notes:
    1) I used some great info sent to me from mrkayak(thanks) from this thread about logging onto the SMTP servers - so you can use any SMTP Email Server now - not just your own ISPs.

    2) I have implemented the RKP comms as interrupts - this improves further the speed the arduino can reply to the panel. Should help with usertech321's issue.

    I will port this improved Communications code back into the Aritech version.

    all the best....

    Great work Ozmo. Very detailed write-up.

    Just purchased the parts required to setup with my HKC Secure-watch and hope to receive next week.:)

    Quick question regarding the setup. If I am happy with the outcome on my system, I am going to install it in my folks house also. They have 2 keypads installed in their system. Will this configuration still allow for the addition of the Arduino Uno?

    Thanks

    Barry


  • Registered Users Posts: 1,724 ✭✭✭tnegun


    You can have up to 4 keypads on the SW812 so you should be ok


  • Registered Users Posts: 205 ✭✭Bazsutto


    tnegun wrote: »
    You can have up to 4 keypads on the SW812 so you should be ok

    Thanks for update.


  • Registered Users Posts: 205 ✭✭Bazsutto


    ozmo wrote: »
    Update: code for HKC Secure watch is now complete and checked into github.
    It Emails you now when the alarm goes off.
    If anyone tries it - let me know any issues. I've tested it on Uno and Leonardo Arduinos. With the three transistor interface above. Circuit details are in the github docs folder as well as a description of the comms protocol if anyone is curious.

    Notes:
    1) I used some great info sent to me from mrkayak(thanks) from this thread about logging onto the SMTP servers - so you can use any SMTP Email Server now - not just your own ISPs.

    2) I have implemented the RKP comms as interrupts - this improves further the speed the arduino can reply to the panel. Should help with usertech321's issue.

    I will port this improved Communications code back into the Aritech version.

    all the best....

    Hi Ozmo

    Once again, great work on doing up this. Brilliant project.

    I got all my components and have it set up and running with my HKC Securewatch812. I even used Veroboard for the circuit to make it a bit more reliable.

    ?ui=2&ik=2230ab9944&view=fimg&th=14ebbab0628b9c9d&attid=0.1&disp=inline&safe=1&attbid=ANGjdJ9GkKgThPtfHwuc6xtS-GXIvXQqQJJO-T8UGb1Mr3uRw6bMoDIMGzo9JUvSh23dvuTa0mWBNsu8mqhKxOGMpPmALnHMibXAxlQf4pAy_zrr23jM0H5aFIJZ0NA&ats=1437667741357&rm=14ebbab0628b9c9d&zw&sz=w1877-h793

    One issue with the code I think. When I do a part set (0#7) I get an email informing me that alarm is going off as it activates. If the alarm then does go off during the part set, I don't get any further alerts until it is unactivated and reactivated again.

    Full set is working great and so is the remote access to the keypad.

    On a separate note, is it possible to include in the email what zone is activated or does this require a lot of coding that would use up to much resources?

    Thanks again

    Barry

    Note: Error in below pics. I have the +5V line powering the veroboard circuit. This was since corrected to be powered by +12V from alarm panel keypad terminal.

    Arduino HKC1.JPG

    Arduino HKC2.jpg


  • Advertisement
  • Registered Users Posts: 1,724 ✭✭✭tnegun


    I haven't looked at the code so this is just a guess. the keypad alarm led blinks on part set I'm wondering if this is how the code interprets an alarm event? If so I believe it can be configured not to.


Advertisement