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
1678911

Comments

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


    Oh - I see the issue - I had fixed this in the Aritech version - Chrome changed the way it does websockets - so it needs the same HTML change I'd done previously to the Aritech version to be made to the HKC version-

    Can you try get the latest "Websocket.cpp" from github - and see if that fixes the issue - pm me if it still doesnt work and we can try find whats wrong.

    “Roll it back”



  • Registered Users Posts: 21 Vasarbob


    Cheers Ozmo that worked . I am getting messages now. I have 3 keypads on my panel and a panel extender for extra zones. its shows on the alarm that it has found 4 keypads . rpk id 1 has an id , rpk2 and rpk 3 also , but rpk 4 (Arduino i think has no id ? when i leave the engineer log it says on the Arduino screen Connection closed. Is there a way to set the Id of the Arduino in the code or is it assigned by the panel ?




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


    In the Aritech version - you can specify an ID - but in HKC - each device found is assigned an id when you scan for new devices.

    I don't have that many keypads to recreate your issue - maybe remove some keypads to test and add them back one at a time? See if the issue is caused by other keypad?


    The keypad does have a serial number though - might be worth altering a number in the line below - this is the unique serial number of the keypad - eg. try change the 0x08 in this line to 0x09 - see if having a different serial number helps? Its in the file: RKP.cpp

    static byte RKPSerial[] = {0x41, 0xC7, 0x08};

    Post edited by ozmo on

    “Roll it back”



  • Registered Users Posts: 21 Vasarbob


    Changed the code as you said but no joy. it will relay the screen as long as i'm in assign id menu but if i leave then i loose connection.i used an arduino mega to print out the log and i see it registers the arduino to ID#2..... here is the screen grab of the log




  • Registered Users Posts: 21 Vasarbob


    one more thing . if i refresh the page a few times there can be a chance that READY TO ARM shows on the screen when i am out of engineer mode here is a screen shot of what happens in the log when this occurs




  • Advertisement
  • Registered Users Posts: 21 Vasarbob


    Does the unique serial number of the keypad show up in the log .Maybe i could use it in the arduino , as i have a keypad that i do not use.



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



    It was printed on a sticker stuck to the microprocessor chip inside the keypads I have here.

    I have two keypads and the serial both starts with 08Cxxx - so they are probably all sequential and so unique as they were made. Any number worked for me as long as it was different to the other two keypads I had connected.

    “Roll it back”



  • Registered Users Posts: 2 Edhi48


    I really like this project! I just finished "refurbishing" all the yellowed parts of the alarm system by spray painting them.

    Every item can be taken apart completely so repainting is easy and it makes everything fresh again.

    Now that the alarm is up and running again I would really like to do this project!

    I would like to use the ESP version but unfortunately I've run into errors when trying to verify/compile from Arduino IDE.

    The steps I took:

    1.install latest version of Arduino IDE 1.8.19

    2.Installed the ESP boards with the following link: hXXps://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json

    3.Installed library: esp32_https_server by FHessel v1.0.0

    4.Installed library: ESP8266 and ESP32 OLED driver by ThingPulse v4.3.0

    5.Only touched the IP address setting and WiFi setting in Config.h

    Initially when trying to verify/compile I would receive an error hwcrypto/sha.h could not be found. After googling for a while I read that modifying the file httpconnection.hpp: include "hwcrypto/sha.h" should be changed to include "esp32/sha.h"

    Now compiling goes a bit further but I'm receiving all kinds of UART errors which I have absolutely no clue what to do about :(

    I really hope someone could push me in the right direction as adding the ESP to the alarm system would be a very nice upgrade!

    C:\Users\test\Downloads\CastleAritechArduinoESP32-master\CastleAritechArduinoESP32\RKP.cpp: In static member function 'static void RKPClass::SerialInit()':

    RKP.cpp:70:5: error: 'UART_RXFIFO_FULL_INT_ENA_M' was not declared in this scope

      | UART_RXFIFO_FULL_INT_ENA_M

        ^~~~~~~~~~~~~~~~~~~~~~~~~~

    C:\Users\test\Downloads\CastleAritechArduinoESP32-master\CastleAritechArduinoESP32\RKP.cpp:70:5: note: suggested alternative: 'UART_BUFFER_FULL_ERROR'

      | UART_RXFIFO_FULL_INT_ENA_M

        ^~~~~~~~~~~~~~~~~~~~~~~~~~

        UART_BUFFER_FULL_ERROR

    RKP.cpp:71:5: error: 'UART_RXFIFO_TOUT_INT_ENA_M' was not declared in this scope

      | UART_RXFIFO_TOUT_INT_ENA_M

        ^~~~~~~~~~~~~~~~~~~~~~~~~~

    C:\Users\test\Downloads\CastleAritechArduinoESP32-master\CastleAritechArduinoESP32\RKP.cpp:71:5: note: suggested alternative: 'UART_FIFO_OVF_ERROR'

      | UART_RXFIFO_TOUT_INT_ENA_M

        ^~~~~~~~~~~~~~~~~~~~~~~~~~

        UART_FIFO_OVF_ERROR

    RKP.cpp:72:5: error: 'UART_FRM_ERR_INT_ENA_M' was not declared in this scope

      | UART_FRM_ERR_INT_ENA_M

        ^~~~~~~~~~~~~~~~~~~~~~

    C:\Users\test\Downloads\CastleAritechArduinoESP32-master\CastleAritechArduinoESP32\RKP.cpp:72:5: note: suggested alternative: 'GPIO_PIN26_INT_ENA_M'

      | UART_FRM_ERR_INT_ENA_M

        ^~~~~~~~~~~~~~~~~~~~~~

        GPIO_PIN26_INT_ENA_M

    RKP.cpp:73:5: error: 'UART_RXFIFO_OVF_INT_ENA_M' was not declared in this scope

      | UART_RXFIFO_OVF_INT_ENA_M

        ^~~~~~~~~~~~~~~~~~~~~~~~~

    C:\Users\test\Downloads\CastleAritechArduinoESP32-master\CastleAritechArduinoESP32\RKP.cpp:73:5: note: suggested alternative: 'UART_FIFO_OVF_ERROR'

      | UART_RXFIFO_OVF_INT_ENA_M

        ^~~~~~~~~~~~~~~~~~~~~~~~~

        UART_FIFO_OVF_ERROR

    RKP.cpp:74:5: error: 'UART_BRK_DET_INT_ENA_M' was not declared in this scope

      | UART_BRK_DET_INT_ENA_M

        ^~~~~~~~~~~~~~~~~~~~~~

    C:\Users\test\Downloads\CastleAritechArduinoESP32-master\CastleAritechArduinoESP32\RKP.cpp:74:5: note: suggested alternative: 'GPIO_PIN26_INT_ENA_M'

      | UART_BRK_DET_INT_ENA_M

        ^~~~~~~~~~~~~~~~~~~~~~

        GPIO_PIN26_INT_ENA_M

    RKP.cpp:75:5: error: 'UART_PARITY_ERR_INT_ENA_M' was not declared in this scope

      | UART_PARITY_ERR_INT_ENA_M

        ^~~~~~~~~~~~~~~~~~~~~~~~~

    C:\Users\test\Downloads\CastleAritechArduinoESP32-master\CastleAritechArduinoESP32\RKP.cpp:75:5: note: suggested alternative: 'UART_PARITY_ERR'

      | UART_PARITY_ERR_INT_ENA_M

        ^~~~~~~~~~~~~~~~~~~~~~~~~

        UART_PARITY_ERR

    Multiple libraries were found for "WiFi.h"

     Used: C:\Users\test\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.4\libraries\WiFi

     Not used: C:\Program Files (x86)\Arduino\libraries\WiFi

    Multiple libraries were found for "Preferences.h"

     Used: C:\Users\test\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.4\libraries\Preferences

     Not used: C:\Users\test\Documents\Arduino\libraries\Preferences

    exit status 1

    'UART_RXFIFO_FULL_INT_ENA_M' was not declared in this scope



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


    I will try recompile with the latest esp32 sdks and see whats needed- something must have changed with the latest ESP libraries.

    “Roll it back”



  • Registered Users Posts: 2 Edhi48




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


    Hi - I've updated all my code libraries to latest (Still using Arduino 1.8.13 though) - but with no change to code it all compiles with no errors or warnings - I cannot replicate those message you are getting....

    Can you make sure you have selected an ESP32 Board - eg. "D1 R32", "WEMOS LOLIN32" - you will need install ESP32 Board support via the Arduino IDE if you havent already.

    Also - you may need install "esp8266-oled-ssd1306" and "esp32_https_server" as described in the header of the main ino file.

    If you are not using an ESP32 board - eg. an UNO - there is another project in git for that board.


    pm me if you are stuck.. with details of the esp32 board you are using - versions of software etc. all the best...

    Post edited by ozmo on

    “Roll it back”



  • Registered Users Posts: 980 ✭✭✭Kenny Powers


    Only found this thread today, great project and thanks for a the time and effort put into it. I've a HKC panel does the esp32 code work for this with the Alexa intergration? Would be great to trigger lights and things when the alarm goes off.


    If Arduino is the only option for HKV and email no longer works is there any other way to send a notification maybe connect to a different WiFi Alexa enabled door sensor so you get a push notification the alarm has activated.



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


    @ozmo Any plans to do an ESP version of the HKC project? I've been using a Raspberry PI to monitor the serial out of an HKC812 for the last 7 years or so but it's starting to give trouble so was thinking of upgrading over the Christmas holidays!



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


    I have the Arduino side up and running with an ethernet shield and can connect to the web keypad but have had no luck connecting the web keypad. It just displays "Not Connected" I've attached a couple of picutre if anyone can see anything wrong with the circuit I built as I'm very much an amateur. I've run through the add and ID devices step too with no luck. It just says RKP 2 has no ID.




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


    Troubleshooting I measured the voltage at the Arduino RX/TX pins and RX is 6v and TX5v. I think this means the circuit appears to be working? I've tried a different Arduino clone too but not luck getting it recognised.



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


    I had a ESP32 version almost complete I think - I might have some time over Christmas I can have a look see whats needed to complete it - if you want to help me test it pm me and Ill send the code as I have it..

    the rx and tx will be a rapidly changing on/off 0v/5v signal many times a second - you wont be able see it with a multimeter unfortunately but the leds should blink on the arduino to show activity - 6v sounds a little high...maybe double check those resistors in the circuit?

    I would recommend trying connect using the diode first - no circuit needed - see the docs - just use a couple very short wires (under 30 cm) and 1 diode.

    pm me and we can discuss it off thread and post the outcome here later...

    “Roll it back”



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



    oh also - Can you double check those transistors are the correct way around? In each case they should be in the order of EBC from left to right in your photo.

    “Roll it back”



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


    I have an updated version of this now on ESP32.

    ​This is a simpler build with fewer components - eg. doesn't needing ethernet cards, power board and a easier to build circuit.

    It also adds extra features like LCD screen.. shortly I will have Alexa and Https support and support for more modern email servers.

    I've tested so far on HKC SWB/12 and it works very well.

    ​Github link:

    https://github.com/OzmoOzmo/CastleHKCArduinoESP32

    “Roll it back”



  • Registered Users Posts: 10 altopal


    @ozmo Inspired by your work for the remote keypad for the SecureWatch panel, I intended to set this up at home and bought a panel back in June 2021. Unfortunately I bought a SecureWave panel by mistake, which uses a different protocol.

    Determined not to have wasted my money, I spent a couple of weeks analysing the protocol for that panel, and implemented a working keypad with an ESP32. Your documentation & circuits were a great help, I wouldn't have attempted a project like this if I hadn't seen them!

    I intended to tidy it up and share it, but never got around to it. I finally put a more time into it at the end of last year and actually installed the panel / sensors etc. Now that I've had it working for a few weeks and it seems stable, I've pushed the code up to github:

    https://github.com/altopal/VKP-ESP32

    It has a basic web-based keypad embedded to control it via a WebSocket, but doesn't have any fancy Alexa integration or anything.



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


    That's great - really nicely done. Nice webpage - and I like how you even got the beep sound to work on the web pages - I must add that :)

    How did you handle the electrical connection of the ESP to the panel? You say tx and rx is on the same wire - that makes it tricky all right.

    “Roll it back”



  • Advertisement
  • Registered Users Posts: 10 altopal


    I added some images to the doc/ directory in github showing the circuit I'm using.

    The TX & RX on one wire was awkward. At an electrical level, some googling suggested there was a risk of a short circuit if the two were just connected directly together. This document described the problem, I think section 3.1 is what I based the circuit on:

    https://ww1.microchip.com/downloads/en/AppNotes/USART-in-One-Wire-Mode-ApplicationNote-DS00002658.pdf

    On the software side, every time I sent a response frame back to the panel I ended up seeing that frame and have to discard it. I'm tracking the counter that's in each frame to know what I've processed already.



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




    That's great you got it working, its a little like my circuit(link) except I don't use one wire on the esp side but separate RX and TX.

    - from what you describe I think yours is likely RS485 - you can get some really cheap converters that will automatically convert these 2 A&B differential signals to ESPs RX and TX pins.

    I tried to use them in my circuit, to simplify making it - but the voltages in HKC and Aritech data lines are 15V - too high for these but look like they might suit your alarm panels more standard voltage data bus.

    https://www.amazon.co.uk/DollaTek-Adapter-Serial-Converter-Module/dp/B07DJ4TGY3 or slower delivery from here - https://www.aliexpress.com/item/1005003741000503.html


    Nice that the SecureWave seems to be standard 8 bit and good fast speed too.

    - the HKC is n,9,1 - and the ESP's UART doesn't do 9 bits (the Arduino UNO could) - so I had use software serial - and there were bugs in the HKC serial comms,

    it erroneously sends an extra half width bit at the start of the first byte of some, but not all, messages - took me ages to spot that - nasty.


    >on the software side, every time I sent a frame back to the panel I ended up seeing that frame repeated and have to discard it. 

    Yes.. I also get that echoed message - but as every message is marked as coming from a keypad or panel - I just discard anything that is not from the panel - so it ignores its own echo as well as other keypads.

    :)

    “Roll it back”



  • Registered Users Posts: 980 ✭✭✭Kenny Powers


    Thanks for sharing, what would be involved in adding a telegram bot notification or signal messages or something instead of email?



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



    Sure - That's possible - I've done some tests and can get notification message to appear on a private bot on Telegram from the device to my phone...

    What you think would be useful features of Telegram to implement?

    “Roll it back”



  • Registered Users Posts: 980 ✭✭✭Kenny Powers


    Not sure about what features telegram offers, I was just looking at it for notifications from the panel as I usually leave email notifications off and just check every so often. With Telegram or some other service you could potentially get notified quicker depending on your set up.



  • Registered Users Posts: 10 altopal


    Thanks for the pointer toward RS485, I would probably have saved myself a lot of time and confusion if I'd posted here for help sooner! What I have is working now and seems stable, I'll stick with it unless I ever get around to doing a v2 of the board.

    > That's great you got it working, its a little like my circuit(link) except I don't use one wire on the esp side but separate RX and TX.

    I definitely started with your circuit, but thought at first I wouldn't need similar as the voltages from the panel and expected by the ESP32 were the same (3.3V). I ended up back with something very similar after reading about the risk of short circuit when connecting the RX/TX wires.

    > it erroneously sends an extra half width bit at the start of the first byte of some, but not all, messages - took me ages to spot that - nasty.

    Ouch!

    I recall seeing the problem with the lack of 9-bit UART on the ESP32 (back when I thought I was buying a SecureWatch panel), frustrating to have hardware serial on the ESP32 but not being able to use it.

    If I find some time in the future the next thing I was going to look at was to add mobile backup if WiFi is down. I have a basic push & SMS notifications via a cloud backend, but ideally I'd like something to ring my phone if an alarm goes off (too easy to miss notification on phone), and something that can still notify me if the power goes off.

    Post edited by altopal on


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


    Telegram is implemented now in the ESP32 HKC version if anyone wants to give it a try...

    If enabled in the config - it sends a message to your private telegram account (bot) at power up and if there is an alarm - red or yellow warning light. Kinda like a text message alert on your phone.

    Pretty cool - thanks for the idea.

    “Roll it back”



  • Registered Users Posts: 9 joevpt


    Hi Ozmo,

    This is a really great project. I've just had a new HKC panel (SW1070/SW12070) installed and have the HKC app to remotely monitor/set/unset the panel. The issue of couse is, that this convenience comes at a monthly cost (justified by the lads at HKC by the cost of providing the comms and cloud service, and software upgrades blah, blah blah). There was a time when their focus was on building panels and making money on those. Now you pay for the panel, and over 10 years pay another 200%-300% of the initial cost for a notification service (of course you can choose not to have it, but being able to reset the panel remotely is useful - though not at the cost of a Netflix subscription per month !!)

    Your project is a potential workaround, and once the functionality is all incuded, would be a much more cost effective alternative.

    Enough preample, here's the techie question bit:

    I'm wondering whether the keypad bus is the same bus that is presented to the digi board. If it is, then I think the design could be condensed down to an ESP based chip placed on a new daughterboard with a small number of additional components. If that were the case, the potential would be there to use some free online services to provide at least the same useful features as the paid service provides (acknowledging that some services such as firmware upgrades should not be replicated). I only just have the App so, hopefully after a few months I will know whats useful to me (right now I'm thinks the state of each zone, the logs, the ability to set/unset, the ability to see the current panel state ).

    It's a pity we are at the start of the summer, because this sounds like a good winter time project.... I'm book-marking for now, but intend coming back to this later in the year.

    Well done. The work you've done thus far is really great showing that in principle it can be done.



  • Registered Users Posts: 21 Vasarbob


    Class Ozmo. See you got HKC crossed over to an ESP32 . Will give this a go now and get back to let you know how it goes. Cheers



  • Advertisement
  • Registered Users Posts: 3,956 ✭✭✭mp3guy


    Has anyone gotten this running on a SW-1070? I'm confused as it has four ports for the RKP, + - A B.



Advertisement