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

Hacking the HKC SW812

Options
2»

Comments

  • Registered Users Posts: 60 ✭✭dauhee


    tnegun wrote: »
    I'm using a Raspberry Pi with a USB to Serial connection (One of these http://www.ebay.ie/itm/271496772949 as you can connect it directly to the JP2 headers on the panel board.

    The panel pin out is From top
    1 Vcc (12v)
    2 Tx
    3 Rx
    4 Gnd




    It would be great if you got a chance to check. I've no electrical skills and can't get my head around the USB to Serial being rated for 5v but the Vcc on JP2 is 12v as you mentioned. Does the PL2303HX chip in the USB To RS232 cable do some shifting of signal voltage?

    reading the serial events would be perfect for me, as tapping into the keypad solution on another thread gives me palpitations with all the wiring.


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


    Just opened the panel and all I have connected is the Ground and TX pins so 2nd from the top and the last. It makes sense as we don't need the Vcc or the RX pins as we're only passively monitoring it.


  • Registered Users Posts: 60 ✭✭dauhee


    much appreciated for that. Yeah that makes sense reading passively Tx pin and not taking 12v. I'm on ver 7.39 panel, so might have to raise a dummy event on the panel each time a message comes through (as you mentioned appears to be sending messages realtime -1), but should be good to go now, thanks.

    for anyone interested, my planned config will be:
    -raspberry pi zero w
    -Raspbian Buster Lite configured for power save (might have a play round with other minimal OSs like piCore or give windows IoT a go)
    -python app
    -controlled not by web page but watsapp message (wanted to use telegram but integration to siri not great)
    -https web site used as local command and control for all my sonoff stuff (paired to my web site and not the itlead hosted site)
    -gsm stick to notify of mains power failure (will be using running of the 12v battery)


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


    Post back how you get on I haven't looked at this in years as it's been so stable and just works but upgrading from email notifications to whatsapp I'd be very interested in!


  • Registered Users Posts: 60 ✭✭dauhee


    got a little delivery in the post yesterday (RS232 TTL UART PL2303HX cable) so am going to start on this now. going to take the 12v and have a dc stepper (actually its a UBEC) for 5v which will power on the Pi pins direct - it bypasses the polyfuse but the supply is good from the panel

    I'm just dumping out some stuff in case it is of interest to anyone:

    Whatsapp was a bit hacky to automate so am using a telegram bot, more secure and functionality anyhow, just doesn't play ball with siri. I give it markup so essentially created my custom buttons that the bot picks up and actions. Its great and works very well. I don't have any external ports on my internet so its my only way to get in. I did evaluate hosted MQTT brokers and looked at various options to connect to my pi. I tried the azure implementation which isn't full adherance from what I can remember, but it was in my opinion the best for being free and low chance of it being decommissioned in a year or 2. In the end though, I didn't want my system to be paralized if the internet went down, and also have a few different things going on and wanted flexibility

    So I have my internal website on lighttd, I might see about getting a port opened up so can access externally, use noIP.

    I have RCSwitch library to control my 433.92Mhz switches for lights, for some more serious stuff that needed to be sure they were going on/off (like heating), am using sonoff switches - the pysonofflanr3 pythong library works great for those. Is great as can get full control of heating without need to buy nest/climote/etc device (with no yearly maintain fee also).

    I also use RCSwitch for a CAME gate (card is Za3) - had to add a new protocol for RCSwitch to understand the CAME timings- I was planning to use an ESP chip with relay, which I might still do, to watch IR break beam and set off an alert if the gate doesn't open within 30 seconds, and/or turn on lights when gate opens if its dark. there is a mix of 24v DC and AC for some reason, so the solution requires optocoupler to detect 24v DC which works well, relay to open gate (24v AC), and hall current sensor (I think) to detect when when a 24v AC signal is on

    I also pull XML from Met Eireann to monitor short term forecast for rain, temp, cloud etc

    I used python lib suntime to get sunrise/set

    So I have good control over the home and can do different things based on times/values/events

    I'm also looking to purchase pv solar panels - the ginlong inverter seems to be the one uses which is good as there are a couple python scripts to obtain data from it, so will be able to detect if is on grid/battery/panel and take action by turning stuff on/off

    The security system will be a big piece of the puzzle, so hopefully can get to grips with serial data. electronics isn't my strong point, so the hooking up as keypad in the panel isn't my first choice. Hopefully I will be able to report some success in the next week


  • Advertisement
  • Registered Users Posts: 60 ✭✭dauhee


    The power from the board is well sufficient for a pi, and runs fine when mains is removed. I will configure an unused zone for "Mains Dly" output so that if the system goes on battery, it will use GSM stick to send a text (also using that in case telegram/internet is down) - using gsmmodem.modem python library

    The serial port is singing a merry tune and I've been getting all the alerts from arming and disarming manually etc. Its actually very handy as can print out the HKC config and keep as a backup in case need to resetup again in future.

    Am going to set an unused zone as key (with pulse) so that can remotely arm/disarm. One thing I couldn't figure out to do is do "part set" as key zone is just a full arm. I was having a crisis and thinking I had to go with the key bus hack, but think what can do is put another relay on the landing in NO, but close it which will effectively disable it and get the same result as part set.

    again, just jotting stuff down in case anyone ever has any use for it


  • Registered Users Posts: 21 Vasarbob


    Hi tnegun,

    Could you tell me what the baud rate is for the printer port on the hkc panel. does it show zones open etc. on the printer port. Did you try to use and arduino or esp to read the port or have you just used a pi .thank you



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


    Serial port setup I'm using is 2400 8n1, its a PI with a USB2Serial adapter plugged straight into the board. Its doesn't report zone status just unset/set events, alarm events and triggers, mains faults etc.



  • Registered Users Posts: 980 ✭✭✭Kenny Powers


    Did anyone get this fully working with arm disarm or even panic alarm? Would you mind sharing the code etc? Wouldn't mind giving this a try on my HKC alarm


    Thank you



Advertisement