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
Hi all! We have been experiencing an issue on site where threads have been missing the latest postings. The platform host Vanilla are working on this issue. A workaround that has been used by some is to navigate back from 1 to 10+ pages to re-sync the thread and this will then show the latest posts. Thanks, Mike.
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Aritech Alarm Internet Dialler

245678

Comments

  • Registered Users Posts: 32 mrkayak


    If arduino is disconnected and only abcd connected to breAdboard, then keypad does double reset.

    If ab and panel Rx connected, then keypad does double reset.

    If a and b and panel Tx connected, then no problem.

    This is without any connection at all to arduino.

    Only when panel Rx connected to breadboard, then keypad does double reset

    So does that mean there's something wrong with the panel Rx, Ard Tx circuit?

    On your setup, can you have just abcd breadboard connected to keypad (no arduino at all). Does that work for you without keypad double reset?

    Thanks


  • Registered Users, Registered Users 2 Posts: 3,876 ✭✭✭ozmo


    That is correct - the TX Off state (Arduino not transmitting) is 5V - so with the Arduino missing - the ArdTX to the circuit is 0v - which sends a High 12+ voltage to the panel - this prevents the real keypad from transmitting until the Arduino is replaced (or you connect the circuit ArdTX to 5v).

    Attached is my test panel with the breadboard - the yellow Leonardo Led flashes each time a packet is sent (3 or so a second)

    mucq3m.jpg

    “Roll it back”



  • Registered Users, Registered Users 2 Posts: 3,876 ✭✭✭ozmo


    Congratulations to mrkayak who PMed me to say he got the above working as well on an Aritech CS350 :D

    “Roll it back”



  • Registered Users Posts: 32 mrkayak


    ozmo wrote: »
    Congratulations to mrkayak who PMed me to say he got the above working as well on an Aritech CS350 :D


    Many thanks to Ozmo for all your help.
    It was my first breadboard circuit, and first time with Arduino.

    Hoping to make this wireless too - I've ordered TL-WR702N.


  • Registered Users Posts: 178 ✭✭maurice1


    Well done Ozzo, looks good.
    I did something similar 2 years ago with aritech 10 zone panel cs450 and has been working fine since
    I Connected the 16 input/outputs through resistors into the leonardo arduino inputs, Think they were 1k
    eg:
    int input0 = 0; //D0 GREE Armed/UnArmed
    int input1 = 1; //D1 YELL Alarm
    int input2 = 2; //D2 BLUE P.A.
    int input3 = 3; //D3 ORNG FIRE
    int input4 = 5; //D5 RED Internal Siren
    int input5 = 7; //D7 BLCK Ext Bell
    int input6 = 10; //D10 WHT Doorbell
    int input7 = 11 ; //D11 BRN OR testswitch for input0
    int Led1 = 13;
    int analog0 = A0; //A0 W/O Entry/exit
    int analog1 = A1; //A1 O/W Hall+lounge
    int analog2 = A2; //A2 W/B Cloak+Laundry
    int analog3 = A3; //A3 B/W Patio+Kit
    int analog4 = A4; //A4 W/G Bed123+enS
    int analog5 = A5; //A5 G/W Bed4+Bath
    int analog6 = A8; //D6 W/B PIR Hall+Kit
    int analog7 = A9; //D8 B/W PIR Patio

    When their values changed providing input 0 was low (armed) it sent an email from smtp.upcmail.ie to me@eircom.net.
    This seemed to work fine for a week or 2 but then forgot to send them.

    I then made it that everytime the hall door opened I got an email so that kept it awake.

    I also bought 100 texts from txtlocal.co.uk for about £5,
    so when outside bell goes on I get a text, showing which sensors are open at the time.
    I also get an email showing every sensors state.

    I prefer your system of just 6 wires, but my system only requires a resistor on the input.

    I ran the ethernet to the panel, as wifi is only another thing to go wrong

    For ease I got a piece of veroboard and mounted the pins on it backwards with a resistor on the inputs and the wiring on it. I nomorenails it to the alarm box with the pins sticking out so it is stationary and the ethernet shield just pushes onto it and the leonardo just pushes onto it.

    Butchered a 1A usb car cigarette adaptor fed from 12v battery to power it up and grounded the negative.

    I coded it so that led13 flashes like a strobe to show that it is alive and when sending an email it goes on for a second or 2. This made it easier to test.

    In engineering mode / output test and i make output 0 low, I can go around the house and test the whole alarm, via eircom emails


  • Registered Users, Registered Users 2 Posts: 3,876 ✭✭✭ozmo


    Some good ideas in that - thanks for sharing them - a setup like that should work on any make of alarm panel. I like the idea of the text alerts.

    Its kinda similar to the first project I listed here allright - it used one wire to the printer port for monitoring the panel status - but it seems very few panels have this printer port.

    The second (4 wire) project gives you full remote access to the panel and engineer menus - lets you set/unset/partset and view the logs etc. I'm using the single diode trick, so no circuit/bread board needed just 2 wires to panel and 2 wires for power
    - I found it very useful last week when I was away and put my mind at ease when I could see why the alarm had gone off. ta.

    ea3z1t.png

    “Roll it back”



  • Closed Accounts Posts: 3,601 ✭✭✭cerastes


    I've been terribly slow out of the starting blocks, got sidetracked as usual.
    I'll have to re-read the thread and get cracking ordering stuff, I've a voucher for maplins but I think I'll use that for something else as I was looking at their stuff and they seem pricey for items.


  • Registered Users Posts: 2 cnijboer


    Dear OZMO,

    great project, i love it for enhancing my CD34 panel with internet access!
    When using your code, i encountered a problem while compiling it. I received
    the following errors:

    D:\arduino_NIEUW\arduino-1.0.2\libraries\CastleRKP\RKP.cpp: In static member function 'static bool RKPClass::loop_PanelMon()':
    D:\arduino_NIEUW\arduino-1.0.2\libraries\CastleRKP\RKP.cpp:105: error: 'Serial1' was not declared in this scope
    D:\arduino_NIEUW\arduino-1.0.2\libraries\CastleRKP\RKP.cpp: In static member function 'static void RKPClass::SendToPanel(int, bool)':
    D:\arduino_NIEUW\arduino-1.0.2\libraries\CastleRKP\RKP.cpp:412: error: 'Serial1' was not declared in this scope
    D:\arduino_NIEUW\arduino-1.0.2\libraries\CastleRKP\RKP.cpp: In static member function 'static void RKPClass::Init(byte)':
    D:\arduino_NIEUW\arduino-1.0.2\libraries\CastleRKP\RKP.cpp:435: error: 'Serial1' was not declared in this scope

    I think something went wrong with the libraries, although i'm not sure what. I'm hoping you're willing to check ;-)

    Best regards from the Netherlands!

    Christiaan


  • Registered Users, Registered Users 2 Posts: 3,876 ✭✭✭ozmo


    cnijboer wrote: »
    D:\arduino_NIEUW\arduino-1.0.2\libraries\CastleRKP\RKP.cpp:435: error: 'Serial1' was not declared in this scope

    Hi, thanks for the comments :D

    I only have a couple "Leonardo" arduino here - I believe the "Uno" arduino does not have "Serial1." - Instead "Serial." is connected to pins 0 and 1 instead.

    So make sure the Leonardo board is selected in the compiler if you are using a Leonardo
    or just rename all "Serial1.xxxx" to "Serial.xxxx" if you are using a UNO- .

    ie. just drop the 1.


    Good luck - and keep us updated on how you get on with the project... :)

    “Roll it back”



  • Advertisement
  • Registered Users Posts: 2 cnijboer


    hey Ozmo,

    You were right about the Arduino Uno, i changed the Serial1.xxx in Serial in the library files.
    This did the trick: the system works!! really super. I can connect to my panel online, a CD34 system.

    Now it's time to make a neat system with a PCB connected to Arduino instead of a prototyping breadboard, and put the whole
    system in a box near my router.

    many thanks Ozmo for all the hard work on this project!!

    Best Regards,

    Christiaan


  • Registered Users, Registered Users 2 Posts: 3,876 ✭✭✭ozmo


    cnijboer wrote: »
    hey Ozmo,

    You were right about the Arduino Uno, i changed the Serial1.xxx in Serial in the library files.
    This did the trick: the system works!! really super. I can connect to my panel online, a CD34 system.

    Great you have it working now - Thanks for the feedback :) - I'll update the code to auto-detect if its an UNO or Arduino being used so this renaming for UNO wont be necessary.

    “Roll it back”



  • Registered Users, Registered Users 2 Posts: 8,749 ✭✭✭degsie


    Bit late to the party here :). Would like to attempt this also. Is there a 1 stop shop to get all the required parts? I have an Aritech CS350.

    Great project!


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


    Most of the suppliers in the sticky would be able to sort you out.


  • Registered Users, Registered Users 2 Posts: 8,749 ✭✭✭degsie


    KoolKid wrote: »
    Most of the suppliers in the sticky would be able to sort you out.

    Thanks. I guess you can remove Peats from that list ;)


  • Registered Users Posts: 9 usertech321


    Great project OZMO. This a awesome!
    Yesterday I ordered all the hardware on ebay for which I will see what I exactly need for the build. I pasted it here as this will help others people to collect the hardware. This is what I ordered:

    - Leonardo R3 Pro Micro ATmega32U4 Board Arduino Compatible IDE + free USB cable
    - 50PCS 1N5819 5819 1A 40V SCHOTTKY DIODE GOOD QUALITY
    - Ethernet Shield W5100 For Arduino Main Board 2009 UNO ATMega 328 1280 MEGA2560
    - DC-DC Buck Converter Step Down Module LM2596 Power Supply Output 1.23V-30V
    - 65Pcs Male to Male Solderless Flexible Breadboard Jumper Cable Wires For Arduino
    - 10pcs x 74 HC32 Logic Grid Electrode Inverter Straight Pin DIP-14
    - Yellow Solderless Prototype Breadboard 170 SYB-170 Tie-points for Arduino

    Regarding the following I have doubts if I bought the correct hardware as this is not specified in your topic.:
    - 1N5819 5819 1A 40V SCHOTTKY DIODE GOOD QUALITY
    - 74 HC32 Logic Grid Electrode Inverter Straight Pin DIP-14

    Could you please confirm if I bought the right stuff? Looking forward to your response.


  • Advertisement
  • Closed Accounts Posts: 673 ✭✭✭GekkePrutser


    Wow, this project is JUST what I'm looking for!

    Thanks Ozmo for all your information. Saved me a world of trouble figuring all this out. I'm going to build something similar, just going to use a raspberry pi instead of an arduino I think (this will allow me to hook up a camera as well). I'm good with electronics and programming so I can work it out but you saved me so much work.

    I have a CD34 (I think CD3403) alarm with CD3008 keypad here, it was already installed when I moved in. I never used it before because I was worried of false alarms ringing for hours on end without me knowing about it (Some of the PIRs have visibility at windows and I'm afraid of people walking by triggering them).

    But a couple weeks ago the neighbours got broken into and it seems to be a trend in the area so I was looking for a way to monitor the system.

    One thing I was wondering: This CD34 box, is there a tamper switch by any chance? I have the documentation for the CD3008 panel (was in the house) which shows it has a tamper switch, but I have nothing for the alarm box itself. I'm afraid I'll trigger it when I open it up even when it's in disarmed state. I suppose I could just disconnect the mains + battery to silence it though. But I'm not sure if I could use it again without the engineer's code (not sure if they changed it).

    One more thing: What was the issue with the printer output? You said the voltages were all over the place? This was what I was hoping to use, I don't really want to replace the existing keypad, and connecting to the keypad itself is not an option due to its placement, I will need to connect to the alarm box itself.


  • Registered Users, Registered Users 2 Posts: 3,876 ✭✭✭ozmo


    Hi,
    If you enter engineer mode before removing the alarm panel cover it will not cause the panel tamper.

    There are two projects described in this thread.

    Both can be connected hidden inside the alarm box.

    1) monitor alarms using the printer port. Just make sure the panel has a printer port! This works well. The invertor chip I mentioned is to make the voltage levels compatible with the arduino.

    2) the keypad emulator becomes the panels second keypad with the display being the ethernet rather than an lcd. You can connect this anywhere on the 4wire keypad bus - connected to keypad is handy when testing but much better to connect to the other end of the cable (directly to the screw terminals inside the panel box).
    I also give a reduced part count version using just one diode if you dont mind not using the panel screwterminals- this must go inside the panel box.

    Use a good quality 12v to 5v like the one I suggest. Very cheap car ones can crash the arduino.

    I use arduino because it uses less power and is faster booting and im sure it can run for years without needing a reboot. I would be very interested in hearing your experience with the pi for this project. The communications baud rate is very unusual so you would need make sure you can do that with the pi.

    I really must split them up maybe as an instructable or something...

    Good luck let me know if there is anything i can help with.

    “Roll it back”



  • Registered Users Posts: 9 usertech321


    Gekkeprutser: The engineer mode can be entered by using the "installateurscode" (Dutch wording). Don't mix this up with a usercode :-) or the siren will be triggered. What I always do is that I temporary remove the external siren to make sure nobody will notice a false alarm.

    Yesterday I received all the hardware. I started to install the basic Windows drivers and Arduino compiler software.

    @ozmo While compiling I receive many failures. I use a Lenonardo R3 board. I tested the board and the flash led (script) test works.

    I followed your instructions but something goes wrong :-( :
    - I downloaded the package as a zip from htt p s: / / github.com/OzmoOzmo/CastleAritechArduinoRKP
    - Extracted the files in a C:\Users\----\Documents\arduino\libraries\CastleRKPfolder\CastleAritechArduinoRKP
    - Stored the ino file and libraries in the identical named folder
    - performed an import of the libraries
    - In your post from 09-05-2014, 21:08 you mention 10 files....
    - When I run the action to check the script it gets stuck.
    - I notice that all the libraries have been loaded automatically in the tabs when compiling.

    I get the following error:
    Arduino: 1.0.6 (Windows 7), Board: "Arduino Leonardo"
    ......................(a lot of logging without error's)
    SMTP.cpp:32: error: conversion from 'int' to 'String' is ambiguous
    C:\Program Files\Arduino\hardware\arduino\cores\arduino/WString.h:61: note: candidates are: String::String(const __FlashStringHelper*)
    C:\Program Files\Arduino\hardware\arduino\cores\arduino/WString.h:59: note: String::String(const char*)
    In details this refers to:
    SMTP.cpp:32: error: conversion from 'int' to 'String' is ambiguous: CODE COPY/PASTE: String msEmail=NULL;

    Why can I not compile the project using the files on Github? What am I doing wrong? I'm using a new install from the software. Please advice. Thanks in advance.


  • Closed Accounts Posts: 673 ✭✭✭GekkePrutser


    Thanks Ozmo and Usertech321!

    I was looking at it today but I don't think I have the engineers code :( There is a bunch of documentation on the alarm system but it only offers the default engineers code (0xxxx) which is not valid on my system, so it must have been changed by the installer (And anyway, it would have been stupid not to change it as it's printed in every user's manual)

    I notice the installer is still around, I can call them but I don't know if they'd be willing to give it to me, and they'd probably want to talk to the landlord. And I don't really want to bother him, he made it clear he just wants the rent money and no hassle unless it's absolutely necessary. That's also why I wanted to make as little modifications as possible, ideally I'd just like to monitor the system remotely so I know what's going on when I'm not home. I'm hoping to put the raspberry inside the alarm panel, from what I saw online there's loads of free space in there.

    Maybe I can let the backup battery run dead when I remove the mains - I notice it's very low anyway. I can't remove the alarm bell before opening the case as there is no exposed wiring.

    But the second keypad thing is also interesting, that way I could clear any false alarms remotely. But I think I'll start with the printer port. And you're right Ozmo, the raspberry does not work well with for 'bit banging' protocols, especially ones that require strict timing like you said this one does. Linux is just not a realtime OS. So I think I'll just go with the printer port at first.

    I think I'll just use a mains powered interface rather than a 12->5V downconverter, I see the Aritech can only supply 800mA@12V and that's pushing it for a raspberry with Ethernet, even with a very efficient DC-DC converter.

    And yes I'm Dutch Usertech321! You too?

    PS that 50 pound scope looks amazing, I might get one too


  • Registered Users, Registered Users 2 Posts: 3,876 ✭✭✭ozmo


    Oh - There is a problem with the latest version of Arduino IDE :(
    Arduino broke some code - even their sample code on the website gives the same errors. (That line thats giving an error - is correct according to the documentation here: http://arduino.cc/en/Reference/ServerAvailable but even their sample code fails to compile...)


    I've just checked and my app compiles perfectly on Arduino IDE 1.0.5.
    So you could use that version...

    You can get 1.0.5 on their site here (you can have both versions installed to different folders without issue):
    http://arduino.cc/en/Main/OldSoftwareReleases

    I will try get to convert those two lines to the new 1.0.6 and repost to GitHub, but it wont be tonight as I have the spare hardware packed away to test it.

    Leonardo hardware works fine.

    Those scopes are really good - I use mine a lot - I upgraded the firmware on it to BenF custom firmware - nicer UI and makes it more accurate.

    Oh - and you really need the engineer code to do either of these modifications. By default the printer Interface is OFF (Menu called "Event Print") - you need turn it on in the engineering menu. You need to be in Engineer Mode also to enter the "Install RKP" menu to get the panel to recognise the Arduino RemoteKeyPad when you have it hooked up.

    “Roll it back”



  • Advertisement
  • Closed Accounts Posts: 673 ✭✭✭GekkePrutser


    ozmo wrote: »
    Oh - and you really need the engineer code to do either of these modifications. By default the printer Interface is OFF (Menu called "Event Print") - you need turn it on in the engineering menu. You need to be in Engineer Mode also to enter the "Install RKP" menu to get the panel to recognise the Arduino RemoteKeyPad when you have it hooked up.

    Thanks, that's a shame :( I looked at the menus but I can't get into any of them. When I enter the code it just straight up arms/disarms. They did provide the programmer's manual and it says this is the case with certain flags so it sounds like intended behaviour. I can't even change the (incorrect) time/date.

    Thanks anyway, I'll see if I can find this out somewhere.


  • Closed Accounts Posts: 673 ✭✭✭GekkePrutser


    Just one more question: If I do trip the tamper alarm on the main unit, will it automatically clear itself on after I remove power and disconnect the battery? Or will it remain stuck in tamper mode even after a power down, until the engineer's code is entered?

    I was reading in the manual about this reset jumper that may or may not work depending on whether some code lock is enabled. So I'd like to try it out but I won't be able to do so without at least triggering the tamper once (or letting the battery run flat but I assume the results will be similar).


  • Registered Users, Registered Users 2 Posts: 3,876 ✭✭✭ozmo


    I was reading in the manual about this reset jumper....

    Resetting the code will remove all programming - like the text names for each zone etc. That feature may be disabled as you say anyway.

    I think the user password should be enough to silence any tamper if you trigger one by removing the cover.
    Without the engineer code - the only option you may have would be to make your own internet dialler similiar to what maurice1 in post 56 suggests. You could use some of the code from my project for the webpage and emailing etc.


    Oh - and I reported the error with the Arduino Compiler not compiling and the nice guys at Arduino confirmed it was a bug in their latest Arduino Ethernet Libraries and they have fixed it on their side. I have not verified if there are other issues with my code and the latest ide - so best stick with the 1.0.5 compiler for this project until I get all my test panels set up so I can work again on it.

    “Roll it back”



  • Closed Accounts Posts: 673 ✭✭✭GekkePrutser


    ozmo wrote: »
    Resetting the code will remove all programming - like the text names for each zone etc. That feature may be disabled as you say anyway.

    Thanks!! Luckily it wasn't engineer-locked. :D I removed the jumper and it was reset to the standard codes (and alarms blaring because I forgot to put some tape over the tamper spring before I turned it back on) :D

    I did indeed have to replace the programming which was nice anyway because there were a few things I always wanted to change. And it's good to know how it works. It wasn't hard to figure out anyway.

    But unfortunately, there was no printer option, so there goes that idea :( I might use your code then and run it on an arduino, or I'll look at the dialler option. But at least I've got full access to the unit now! I'll let you know how I get on. Thanks again for all the help!


  • Closed Accounts Posts: 673 ✭✭✭GekkePrutser


    Sorry another question if you don't mind: I notice in one of your comments that the timing on the arduino is very critical. I was wondering what happens if the arduino stops communicating (correctly) on the panel bus. Would that cause a tamper alarm or cause the other panel to start beeping?

    I think I'm going with your remote keypad way, however I'm thinking of using a different arduino (trinket, attiny85-based) and then using that to interface to a raspberry pi. That way I can still use the raspberry (which I wanted to have in that area anyway), and I can also take advantage of the more powerful processing for better security (https, VPN etc). And of course the camera. Also, I just happen to have those parts in stock so I don't have to wait ;)

    So due to the raspberry not handling realtime tasks well I'm planning to offload that to the arduino, and just passing the i/o back/forth to the pi on a normal async rs232 bus. I think I'll use a logic level shifter for the TTL->12V part, BSS138-based.

    But because I have to modify the arduino code pretty heavily for this, I'm afraid what will happen if I make a mistake, my GF wouldn't be happy if some programming messup triggers the alarm while I'm away because it thinks an alarm panel is missing :)


  • Registered Users, Registered Users 2 Posts: 3,876 ✭✭✭ozmo


    .. the timing on the arduino is very critical. I was wondering what happens if the arduino stops communicating (correctly) on the panel bus.

    The CD72 especially expects a response very quickly - so in the current version of the code the arduino receives the message and responds with as little processing inbetween -
    After it has responded, you have plenty time that you could send the message onto the RPi if you wish especially on the CD34 you have.

    Any Arduino should do - just make sure its runs same speed and has same memory as an uno or leonardo - the ones I've tested. Unos are really cheap now at about 6 euros from china.

    If the panel misses one message - it wont mind - but after several missed messages in a row (like you've removed the arduino) - yes - you do get a tamper fault if you are not in Engineer mode - and "Remote Keypad Error" gets displayed on the working remote. Entering the user code clears the tamper.


    Let me know how you get on with the RPi - I didn't use it because I wasn't sure of the relying on the SD card as a 24/7 server (link).

    I'm working on an Intel Galileo board at the moment - still testing how well it will work - its half Arduino half pc on one board - so you can run arduino and also run webservers (python/node.js) in its Linux half of the board at the same time - and both sides communicate with each other fairly easily. Plus its designed in Ireland :)
    Free book all about it here

    339343.jpg

    “Roll it back”



  • Closed Accounts Posts: 673 ✭✭✭GekkePrutser


    Thanks again for the feedback, that sounds a bit worrying though :) I wish I just had a printer interface as all I really want to do is to monitor it so I know about false alarms etc. But I don't want it to cause one :P

    But I'll build it anyway, and get a sense of the reliability when I'm around.

    By the way, now that I think of it, perhaps I could just passively monitor the comms between the existing keypad and the panel? If I use a high impedance it shouldn't know I'm snooping. Did you ever try that? If I ever need to arm/disarm I can just use the key contact then.

    And yeah the SD card is definitely a liability on the pi, this is also a big reason to have an arduino in between with this kind of real-time stuff going on. Also you need to update it sometimes, and it won't be responding straight away when it comes on.

    The new B+ and raspberry 2 models are much better by the way because they don't have a friction-based SD card holder that bends the card over time. But still there is a good chance it will hang/reboot sometimes.

    And yes the Galileo is cool! I ordered one when they were giving them away but I didn't make the lottery :) Maybe I'll get one someday but they are kind of expensive.


  • Registered Users Posts: 9 usertech321


    Ozmo (and others),

    Apologise for the long time not visiting this topic and not answering back on your response yet.
    The reason was that after some days I did not expected anyone more to answer on my request and also was not by mail informed of the response by the forum software itself.

    So I have been downloading version 1.05 and had some errors with compiling. Line 113 this time but I resolved this with some .... luck. It looks like that the .ino file (159 line) on github was different than the one I opened before with only 127 lines of code. Seems to be an older version of the code? It's ease to mix them up when you have a little of experience with compiling code. I also noticed that when I opened the libraries I get an error while compiling.
    I tried many times and decided to restarted the compiler and only opened the .ino file. This did to the trick! Very strange. Any explanation? In the log it's mentioning: "Using previously compiled" where it previously gave errors . Will this work?

    So now I have been able to compile and upload the code to the Arduino and to access the webserver with the keypad.
    Next step is to build all components and connect it to the Aritech system.

    Hoping the best. :-) Keep you updated, hope you will also do so.


  • Registered Users, Registered Users 2 Posts: 3,876 ✭✭✭ozmo


    Thats great you got it running ok. Nice one.

    The latest version of the Arduino compiler changed a lot of stuff-
    I keep meaning to get my test alarm out again and make it compatible- but its all on github, so if anyone wants to suggest a fix I can merge in the changes...

    For making the hardware- you have two choices- i had both working fine but currently im using the simple circuit of just the arduino, the 12v to 5v convertor, and the one diode only. Everything housed in the alarm panel box.

    “Roll it back”



  • Registered Users Posts: 9 usertech321


    ozmo wrote: »
    Thats great you got it running ok. Nice one.

    The latest version of the Arduino compiler changed a lot of stuff-
    I keep meaning to get my test alarm out again and make it compatible- but its all on github, so if anyone wants to suggest a fix I can merge in the changes...

    For making the hardware- you have two choices- i had both working fine but currently im using the simple circuit of just the arduino, the 12v to 5v convertor, and the one diode only. Everything housed in the alarm panel box.

    I will implement your second solution and hope it will work. Thanks.


  • Advertisement
  • Registered Users Posts: 1 nicom


    Hello everyone,
    first of all thanks a lot @ozmo for this project, I appreciate very much your work!
    I'm trying to implement your second solution, with the 2 transistors.
    The arduino receives perfectly messages from the panel, but the transmission part is not working. Because of this, the configuration of a new keyboard doesn't work, but if I set the ID of the arduino with a used one (by a real keyboard) I can see the screen in the web page, but I can't use buttons.

    I have an arduino mega 2560 with ethernet shield.
    I have tested it on CD72 and CD95 panels, but the issue is the same.

    The code on github has some issues, like capital letters or the progmem instruction, I will suggest fixes on github!


  • Registered Users, Registered Users 2 Posts: 1,741 ✭✭✭tnegun


    Hi ozmo,

    I'm starting something similar with a HKC SW812 panel and Raspberry Pi but am just reading from the printer output for now using a USB to Serial converter and a perl script running on the Pi. Next step is to emulate a keypad just as you have done you project has given me plenty to think about I've a couple of Arduino clones to make use of :) Can I ask how you went about figuring out the baud rate and reverse engineered the comms protocol to the keypad?

    thanks,
    tnegun


  • Registered Users, Registered Users 2 Posts: 3,876 ✭✭✭ozmo


    nicom wrote: »
    Hello everyone,
    first of all thanks a lot @ozmo for this project, I appreciate very much your work!
    I'm trying to implement your second solution, with the 2 transistors.
    The arduino receives perfectly messages from the panel, but the transmission part is not working.

    Update:
    Hi - I've made the changes asked for.


    * Its updated now to compile with the latest Arduino 1.63 (from arduino.cc)
    * Its tested with IE11, Chrome on Windows and on IPhone Safari and Chrome on my test CD34.
    * Easier installation - no library needed anymore - just place all the files in the one folder and open the .ino file (see the attached screenshot for what it will look like)
    * No hardware changes needed
    * Ive tested on Leonardo and UNO Arduinos - when running, both are functionally the same.
    - But Leonardo is best for debugging as there are 2 serial ports - one for panel connection and one for PC Arduino IDE connection and debugging.
    With UNO you need disconnect from Alarm panel while uploading software and debug logs are not currently possible.



    All the code is in GitHub (link)

    346847.png

    @nicom: Can you try the latest version of the software if you are having problems. Maybe also have another check of the wiring also - could be a bad transistor.

    @tnegun Re: HKC SW812 -
    Be interested in seeing how far you get with a RPi -
    To determine the baud rate I looked at the chip specs and tried all it supported - you can use this method to get close if you have a scope.

    ...

    “Roll it back”



  • Registered Users, Registered Users 2 Posts: 1,741 ✭✭✭tnegun


    Thanks Ozmo I've access to an old scope I'll see if I can figure anything out from it. I've an 812 Panel without Keypad though in Dublin/Kildare I'd happy donate if you want it?


  • Registered Users, Registered Users 2 Posts: 3,876 ✭✭✭ozmo


    tnegun wrote: »
    Thanks Ozmo I've access to an old scope I'll see if I can figure anything out from it. I've an 812 Panel without Keypad though in Dublin/Kildare I'd happy donate if you want it?

    Cool thanks :) any donations of hardware most welcome - and Ill update the thread with the possibility of using this project with these other alarm panels.

    “Roll it back”



  • Registered Users, Registered Users 2 Posts: 3,876 ✭✭✭ozmo


    Thanks tnegun for the HKC 812 SecureWatch panel !

    The HKC has a lot of similarities with the Aritech panel - but the protocol used is very different.

    I have made some progress on it: I was able to capture the panel comms and have figured out much of the protocol. I am currently reading the data off the line - next step is to get the hardware in place for an Arduino to send some messages to the panel and see if the Arduino can be accepted as a keypad.

    Hopefully this will mean the Aritech Internet Keypad Project can be made to support HKC as well.

    Ill leave my findings here (in the docs folder) and update as I figure out more.
    https://github.com/OzmoOzmo/CastleHKCArduinoRKP

    :)

    “Roll it back”



  • Registered Users, Registered Users 2 Posts: 1,741 ✭✭✭tnegun


    Wow that was quick Ozmo I was thinking not having a keypad to go with the panel might slow you down! Let me know if I can contribute to testing/dev in any way.


  • Registered Users, Registered Users 2 Posts: 5,390 ✭✭✭DublinDilbert


    ozmo wrote: »
    Thanks tnegun for the HKC 812 SecureWatch panel !

    The HKC has a lot of similarities with the Aritech panel - but the protocol used is very different.

    I have made some progress on it: I was able to capture the panel comms and have figured out much of the protocol. I am currently reading the data off the line - next step is to get the hardware in place for an Arduino to send some messages to the panel and see if the Arduino can be accepted as a keypad.

    Hopefully this will mean the Aritech Internet Keypad Project can be made to support HKC as well.

    Ill leave my findings here (in the docs folder) and update as I figure out more.
    https://github.com/OzmoOzmo/CastleHKCArduinoRKP

    :)

    Yea the hardware designs were done by the same guys as far as I know...

    How reliable is anyone finding the arduino Ethernet shield, always find them a bit hit and miss?


  • Registered Users, Registered Users 2 Posts: 1,741 ✭✭✭tnegun


    I've never used one for more than a few days at a time but never had any issue once I set a static IP.


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 11,767 ✭✭✭✭altor


    If you need a keypad for the HKC just let me know as have a load floating around here :D


  • Registered Users, Registered Users 2 Posts: 3,876 ✭✭✭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, Registered Users 2 Posts: 11,767 ✭✭✭✭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, Registered Users 2 Posts: 3,876 ✭✭✭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, Registered Users 2 Posts: 11,767 ✭✭✭✭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, Registered Users 2 Posts: 5,390 ✭✭✭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, Registered Users 2 Posts: 3,876 ✭✭✭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, Registered Users 2 Posts: 3,876 ✭✭✭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
Advertisement