Advertisement
MODs please see this information notice in the mod's forum. Thanks!
Boards Golf Society are looking for new members for 2022...read about the society and their planned outings here!
How to add spoiler tags, edit posts, add images etc. How to - a user's guide to the new version of Boards

Aritech Alarm Internet Dialler

1567911

Comments



  • Hello Ozmo, thanks a lot for your efforts to build this great tool for the Aritech panel. I have build the additional circuit with an Arduino Uno but i am not able to get the Arduino circuit recognized by the CD91 panel as an additional keypad. The LED on the Arduino is flashing and it sends mails to my account. Some error messages appear during compiling as well.




  • Post the compilation error messages, it will help us find the issue for you




  • Of course but how to do that...i cannot save it




  • Can you cut and paste it from the Arduino IDE (the section at the bottom?)




  • Hi Spocker, it took a while to find out but i am a new user and i cannot paste images etc., according to Boards.Ie messages.
    Not sure how to become a regular user...
    Anyway i uploaded the software again and this time it was successful without errors.
    However, the Arduino RKP is still not visible in the CD91.
    The Aritech RKP has address 0000, the Arduino RKP 0001.


  • Advertisement


  • Sorry, also text copied from the Arduino IDE is not accepted by Boards.IE, not even plain text....




  • Hans1960 wrote: »
    Sorry, also text copied from the Arduino IDE is not accepted by Boards.IE, not even plain text....

    Copy to notepad first and then copied here?




  • Hello, I uploaded the software again to the Arduino and this time it was successful without errors.
    However, the Arduino RKP is still not visible in the CD91.
    The Aritech RKP has address 0, the Arduino RKP 1, also tried 2.
    I use exactly the same components as described in Ozmo's article except the NPN transistors are a different type (BC547).
    It should not make a difference, they are general purpose like the 2N2222.
    Also tried the direct connection to the CD91 chip but also this chip method did not work, i prefer to use the RKP method.
    The on-board LED of the Arduino Uno is flashing, so it receives data from the Aritech RKP bus.
    Is there any other suggestion to check hardware and/or software ?
    The CD91 panel has a Dutch software version but i think that does not matter...




  • Hello, today i have connected the Arduino RKP to another CD91 control panel but also this one does not recognizes Ozmo's circuit at all. It does sends an email to my mailbox.




  • Hi, the following error message appear when uploading to my Arduino Uno.





    sketch\SMTP.cpp: In static member function 'static void SMTP::SendEmailProcess()':

    sketch\SMTP.cpp:116:91: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]

    WebSocket::base64_encode(WebSocket::htmlline, SMTP_USER, strlen(SMTP_USER)); //reuse htmlline buffer

    ^

    sketch\SMTP.cpp:124:91: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]

    WebSocket::base64_encode(WebSocket::htmlline, SMTP_PASS, strlen(SMTP_PASS)); //reuse htmlline buffer

    ^

    In file included from C:\Program Files (x86)\Arduino\libraries\Ethernet\src\Dns.cpp:8:0:

    C:\Program Files (x86)\Arduino\libraries\Ethernet\src\Dns.cpp: In member function 'uint16_t DNSClient::BuildRequest(const char*)':

    C:\Program Files (x86)\Arduino\libraries\Ethernet\src&#0;ty/w5100.h:457:25: warning: result of '(256 << 8)' requires 18 bits to represent, but 'int' only has 16 bits [-Wshift-overflow=]

    #define htons(x) ( (((x)<<8)&0xFF00) | (((x)>>8)&0xFF) )

    ~~~^~~

    C:\Program Files (x86)\Arduino\libraries\Ethernet\src\Dns.cpp:164:18: note: in expansion of macro 'htons'

    twoByteBuffer = htons(QUERY_FLAG | OPCODE_STANDARD_QUERY | RECURSION_DESIRED_FLAG);

    ^~~~~

    Sketch uses 18590 bytes (57%) of program storage space. Maximum is 32256 bytes.
    Global variables use 1127 bytes (55%) of dynamic memory, leaving 921 bytes for local variables. Maximum is 2048 bytes.


  • Advertisement


  • Hans1960 wrote: »
    Hi, the following error message appear when uploading to my Arduino Uno.

    Not sure - but the error is suggesting you might have entered 256 as the network mask in the config? The usual value is 255.255.255.0 ?
    Try compile a fresh copy from github?


    Re: CD91 - I have tested the CD91 here- and it did work - but I do remember the timing was very tight because that Alarm panel can have so many keypads to communicate with and so to keep things responsive the panel doesn't wait as long for a response as the other Aritech panels.
    Can you try this version of the code with slightly different timing?-> here

    “Roll it back”





  • Hi Ozmo,
    Thanks for your suggestions, i will check the network mask and download the new code this week and keep you informed about the result.




  • Hi Ozmo,
    Well, first of all, where do i set the netmask in the config, i did not find anything.
    Secondly, i downloaded the version refering to your link but had no result, even worse..
    The arduino does not send emails and i cannot connect to the RKP webpage.
    Also the CD91 does not find the Arduino RKP.
    See below error message when uploading to the Arduino Uno.



    In file included from C:\Program Files (x86)\Arduino\libraries\Ethernet\src\Dns.cpp:8:0:

    C:\Program Files (x86)\Arduino\libraries\Ethernet\src\Dns.cpp: In member function 'uint16_t DNSClient::BuildRequest(const char*)':

    C:\Program Files (x86)\Arduino\libraries\Ethernet\src&#0;ty/w5100.h:457:25: warning: result of '(256 << 8)' requires 18 bits to represent, but 'int' only has 16 bits [-Wshift-overflow=]

    #define htons(x) ( (((x)<<8)&0xFF00) | (((x)>>8)&0xFF) )

    ~~~^~~

    C:\Program Files (x86)\Arduino\libraries\Ethernet\src\Dns.cpp:164:18: note: in expansion of macro 'htons'

    twoByteBuffer = htons(QUERY_FLAG | OPCODE_STANDARD_QUERY | RECURSION_DESIRED_FLAG);

    ^~~~~

    Sketch uses 20690 bytes (64%) of program storage space. Maximum is 32256 bytes.
    Global variables use 1043 bytes (50%) of dynamic memory, leaving 1005 bytes for local variables. Maximum is 2048 bytes.




  • Hi Ozmo, do you have any additional suggestion for me to solve this issue ?




  • Hans1960 wrote: »
    Hi Ozmo,
    Well, first of all, where do i set the netmask in the config, i did not find anything.


    in WebSocket.cpp it looks like you can set the subnet & gateway here.
    you can see 254 has been set here with the other ip address numbers coming from IP_A, B & C which were set in config.h.

    IPAddress ip( IP_A, IP_B, IP_C, IP_D);	    //Give the device a unique IP
    IPAddress gateway( IP_A, IP_B, IP_C, 254 );   //Gateway (your Router)
    IPAddress subnet( 255, 255, 255, 0 );	            //typically dont need change
    

    I'm having difficulty in getting emails to work myself, setup a gmx account, used an old eircom account both with no joy. I'll keep trying...




  • Hi all, ozmo,

    Sorry for the question but I have uploaded your CastleHKCArduinoRKP code to the Arduino Uno and Ethernet Shield. I do not have the HKC panel or the circuit built just yet.

    I can see the web interface on port 8383 so thats working! :)

    However I'm trying to test if the e-mail is working and according to your code it should send out an

    SMTP::Init();
    SMTP::QueueEmail(START);

    which should send an e-mail to say that the The House Alarm has just started

    But i'm not getting any e-mail?

    In fact when I load up WireShark and monitor traffic, I can see ping requests and web traffic on 8383 when i load the web page or ping the Arduino. But if I don't see any traffic at all to suggest an e-mail is being sent or attempted.

    Am I missing something? Everything in your config.h and other files otherwise looks correct.




  • Update:

    Ah, I can see that Chrome doesn't work with the sockets perhaps, tried "Pale Moon" browser and I'm getting a Not Connected??? message which is better. Also capturing this on WireShark shows it's trying to send data each time you press a number key on the web page. This is more than was working with Chrome so don't use Chrome....

    Still cant get e-mails to work. It's like it's not even trying to send an email or getting that far in the code. I dont know....

    I'm beginning to wonder with Chrome not working are other things just not working with the Arduino libraries as the code is a good few years old now.

    I wish I had a way to debug this.




  • It works for me with Chrome and Safari on an IPhone still - that's the way I've always used it.

    You cannot use gmail and many smtp servers anymore as more and more require a type of encryption that will not fit in the arduino - you could set up your own smtp server using an rpi?

    How the email works: The code has to reply to the panel really quickly (within a few milliseconds) so there is no time to send an email - instead it flags that it needs to send one.
    An email is queued at power up (SMTP::QueueEmail(START);) and if an alarm happens -
    If one is queued - the email is actually sent from the main loop SMTP::SendEmailProcess() - there are several steps to sending an email - log in etc - this sees what step is needed next to get the email sent and does that.

    I wish I had a way to debug this.

    If you have an arduino with two serial ports (eg. Leonardo) you can print messages back to the pc while its running.

    But best way is to download the trial version of Visual Studio Micro (link) - it will allow you to step through, place breakpoints in the code and examine variables etc. Its really good.

    “Roll it back”





  • Hi Ozmo,

    Thanks for reply!

    Perfect, so you need to have it connected to the Alarm Panel before it will send the email, is there any way around this? a flag I could use?

    I am just waiting on a few cables & connectors for the Arduino before I can wire it into the panel so was hoping to test as much as i could before hand.


    on a seperate note:
    Have you used Home Assistant before? I have wired in some of the PIR's and Door sensors already into a raspberry pi and am sending any change events to Home Assistant over MQTT. In addition then monitoring the alarm panel using your Arduino over ethernet is the icing on the cake. home-assistant.io along with some PC817 4 channel boards on ebay can interface directly from 12V to 3.3v




  • home assistant attached snapshot showing alarm panels PIR's and Door sensor history & current state...

    The window titled "Arduino" is an iFrame of your Arduino script. Which i hoped would have shown the keypad but for some reason it's blank. I think this has something to do with you using websockets?


  • Advertisement


  • Press F12 to enter debug mode in Chrome- look at the console tab for any errors- and look for any red lines in the network tab.

    https://javascript.info/debugging-chrome

    “Roll it back”





  • looks like the latest chrome on Android/PC doesn't like websockets?




  • I had trouble too running this in Chrome - @darkonethree try Firefox instead, it worked a treat for me




  • Sound! Yes, it works on alternate browser!
    Must just be Chrome throwing its weight around.... ;-/
    Spocker wrote: »
    I had trouble too running this in Chrome - @darkonethree try Firefox instead, it worked a treat for me




  • Hi
    First, many thanks for the project.
    I am trying to make it myself but unfortunately I got stuck and I don't know where I am making the mistake. I will send a photo of my reserve and connection to uno r3 and connection to hkc pael. Hkc just does not detect the additional panel and not why. In my project I replaced the BC109 trasistors with 2N2222.

    As a Newbie I cannot add photos or links.
    But on the original project page, I posted the same help request along with the pictures.




  • I got mine to work with generic transistors. However I ended up disconnecting it from the alarm as it kept giving false alarms for some reason, I can't remember why.... I found running the arduino wasn't stable enough for interfacing directly to the alarm panel, but it was a good few months back and i can't remember exactly what was the issue. I also had a big job to remove it from the alarm and at the time the other alarm keypads stopped working also. Anyway, I scrapped this project and decided to take a different approach.

    1. I run an instance of Home Assistant on Raspberry Pi #1 (HA Pi) and in that I am able to receive MQTT transmissions on my network.

    2. I have a Raspberry Pi #2 (Alarm Pi) and via an optical isolator interface board (aliexpress €2 https://bit.ly/2X5lujA) I can interface directly to each of the sensors I use (doors, PIR, window etc.) both the alarm and to the Pi at the same time!

    3. On Alarm Pi #2 I run a simple Python script to poll the GPIO's connected to the 4 channel interface PCB's and then via MQTT send data to Ha Pi #1 to let it know the status of each sensor every minute, or any time it changes.

    4. The Ha Pi #1 then automatically sends alerts via TELEGRAM any time I am away from home and lets me know what sensor has changed eg: front door open. You can setup rules here to decide when to alert you.

    5. Also using this method it's easy to integrate it to Google home or Alexa and have it tell you if a window is open or door is open or indeed close a door eg: garage door as you now know its state.

    happy automating ;)

    tldr, I gave up on the arduino interface to do a different method which i find more adaptable and convenient for my needs.

    oh and it didnt work on chrome either or my android phone browsers, so the web interface was pointless (see previous post) so all you can get is an e-mail alert. I wanted to be able to view all my sensors and their states. this arduino project can't do that!




  • kolp wrote: »
    I am trying to make it myself but unfortunately I got stuck and I don't know where I am making the mistake....

    Can you check the pinout of the transistors you are using- they look like they may be In the wrong way round to me.
    Also you could trim all the wires shorter to make everything flush with the board so there is less chance of anything getting knocked out or shorting.

    Chrome has changed a lot since I wrote this but it works on some phones And browsers still - Safari (Apple phone) still works fine. I must look at it again.

    “Roll it back”





  • Hi,

    Gread addition to a old alarm pannel.

    However it took some time to work in my installation i use a i/o remote cd9031.
    when this remote is connected it looses te connection when the arduino is connected and prevents the arduino of showing data.

    Is this know and is there a work around so i can use both the arduino and the i/o on the same pannel.
    both have diverend adresses.

    the pannel i use is a cd91 dutch version.


    hope you can find some time to help.

    greetings jasper.




  • Yes, the transistors in the picture are reversed because I could not find the specification, I tried it in reverse and nothing. should the browser display anything except the keyboard and a blank screen if it is not connected to the panel in HKC?

    As for browsers, I tried: Firefox , Chrome , Opera , Internet Explorer , Firefox /Android ,Samsung Browser on Android .
    Also, I tried to do this in Incognito mode on some to exclude plugins.


  • Advertisement


  • if i use the direct connection to the pannel all works ok.
    I have placed the goo.gl/m3GB3M file on my local webserver and this works.
    Having it on the sd card is prably the best option no neet for a internetconnection on a local lan.

    Alterd the brouser with some color, i like some help with te folowing line.
    "<tr><td><button>*</button></td><td><button>0</button></td><td><button>#</button></td></tr>"

    this produces a * 0 # buttons and i like to rename the * # to arrows like so <button>&#8593</button>
    But the broblem is now &#8593 is sent and not * does some one know how to alter the name of this button but not its value ?.


Advertisement