Page 3 of 7 FirstFirst 1234567 LastLast
Results 41 to 60 of 126

Thread: Ness D8X / D16X Serial Comms

  1. #41
    Junior Member
    Join Date
    May 2013
    Posts
    9
    Thanks
    0
    Thanked 1 Time in 1 Post
    Rep Power
    0
    Reputation
    20

    Default

    Thanks Matt

    Always happy to share my progress and ideas with anyone else who's also interested.

    At a high level, I think that the following functionality is required, feel free to comment with your views, while I've been in ICT for 10 years, that's been infrastructure, I'm a n00b to programming so here goes...

    1. Parse the event into from the panel into a table on a mySQL server, making them into decimal(I believe most of the string is hex as its output) or as close so something user readable as possible, each with a timestamp from the Rpi. This could be interesting to both learn a bit about mySQL, and also give me some statistics about household usage, given that the panel seems to output every single zone changing from secure to non secured, with a timestamp. Because i believe that the Rpi does not have a very good clock, I will have a crontab job run an NTP timesync each hour(if that's suitably frequent)
    2. Using email first, maybe SMS secondly, recieve a message each time the alarm is armed and disarmed, and knowing which code was used to do so
    3. Make a php page which has a number of red/green lights which will allow me to visualise each zones' state on a live basis
    4. Give myself the ability to send keypresses via another page to the panel, including activate one of the AUX outputs, which is hooked into my garage door motor.
    5. Add functionality as inspiration or requirement dawns upon me, or as interesting and achievable suggestions are made.


    So that's at least my starting point.

    Also I have to work out a way of stopping my downlight transformers(Osram Redbacks) from causing what seems to be a ~300MHz wall of noise which prevents the Ness remotes from working, while that's not a serial interfacing related issue, it's probably something I'd like to find a workable solution for.

    Cheers,
    Stephen



  • #42
    Junior Member
    Join Date
    May 2013
    Posts
    9
    Thanks
    0
    Thanked 1 Time in 1 Post
    Rep Power
    0
    Reputation
    20

    Default

    Here's an update for anyone who's interested:

    • I got my USB wifi adapter(Cirago BTA7300) from the internet so that my Rpi has networking connectivity where the D16X panel is located(buys me time until I cable it up with CAT6).
    • Still waiting on delivery of my Rpi compatible RS232 USB adapter so I can work with live data.
    • I've jumped head first into PHP and have got it to read the table on the SQL DB and split up the bytes according to their meaning.
    • For those who have seen the manual which outlines the ASCII data the panel spits out (there was a post from ady at the beginning of this thread which has an example) you will know that meaning of the DATA message is based on combination of values in a table as they match up with a bunch of decimal and hex values that the panel outputs.
    • I've initially approached the task of interpreting the DATA message with a whole lot of nested if and else statements, so that at the end of it I'll be able to display them in plain english on a page.
    • I'd also like to ultimately maintain a state table of the panel so that I can log in and see exactly what state things are in such as zones etc.. but that's probably phase 2 or more.
    • Also once I get the interpretation of events from the DATA message all sorted out, I'll be able to pick which ones get sent via email or Google push(we're an android phone household, so while that may be phase 3 or so, if it's possible it has good potential)


    This coding stuff is strangely addictive....

  • #43
    Junior Member
    Join Date
    May 2008
    Age
    40
    Posts
    55
    Thanks
    16
    Thanked 10 Times in 9 Posts
    Rep Power
    197
    Reputation
    135

    Default Ness D8X / D16X Serial Comms

    Quote Originally Posted by zoog View Post
    Here's an update for anyone who's interested:

    • I got my USB wifi adapter(Cirago BTA7300) from the internet so that my Rpi has networking connectivity where the D16X panel is located(buys me time until I cable it up with CAT6).
    • Still waiting on delivery of my Rpi compatible RS232 USB adapter so I can work with live data.
    • I've jumped head first into PHP and have got it to read the table on the SQL DB and split up the bytes according to their meaning.
    • For those who have seen the manual which outlines the ASCII data the panel spits out (there was a post from ady at the beginning of this thread which has an example) you will know that meaning of the DATA message is based on combination of values in a table as they match up with a bunch of decimal and hex values that the panel outputs.
    • I've initially approached the task of interpreting the DATA message with a whole lot of nested if and else statements, so that at the end of it I'll be able to display them in plain english on a page.
    • I'd also like to ultimately maintain a state table of the panel so that I can log in and see exactly what state things are in such as zones etc.. but that's probably phase 2 or more.
    • Also once I get the interpretation of events from the DATA message all sorted out, I'll be able to pick which ones get sent via email or Google push(we're an android phone household, so while that may be phase 3 or so, if it's possible it has good potential)


    This coding stuff is strangely addictive....
    Just in case you didn't see it, there is a control statement SWITCH that works like this:

    switch ($i) {
    case 0:
    echo "i equals 0";
    break;
    case 1:
    echo "i equals 1";
    break;
    case 2:
    echo "i equals 2";
    break;
    }

    It might allow you to not have to use nested IFs.

  • #44
    Junior Member
    Join Date
    May 2013
    Posts
    9
    Thanks
    0
    Thanked 1 Time in 1 Post
    Rep Power
    0
    Reputation
    20

    Default

    Hi Jimmyc

    Thanks for that tip.

    Just trying to better understand SWITCH, is that likely to be better because it will better compartmentalise the classification process or are there other benefits?

    Just reading a bit up on SWITCH, I'm not sure I have my head around it fully.

    Cheers,
    Stephen

  • #45
    Junior Member
    Join Date
    May 2008
    Age
    40
    Posts
    55
    Thanks
    16
    Thanked 10 Times in 9 Posts
    Rep Power
    197
    Reputation
    135

    Default Ness D8X / D16X Serial Comms

    PM Sent

  • #46
    Junior Member
    Join Date
    Feb 2013
    Posts
    14
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    Reputation
    10

    Default

    Quote Originally Posted by auMatt View Post
    Thanks for the response, at the time of my coding this program the IPhone app wasnt released. I run my own server anyways for mail, web and energy monitoring so adding the alarm functionality wasnt an issue. I havent played with it too much recently but I wanted to add an Arm function to it, so I can atleast arm it if I forget to. The code is still very bugger, doesnt handle error gracefully and still doesnt process everything correctly but im hoping to get some time in the near future to get it up to a much higher standard.
    Hi Matt,

    Its been a while since I downloaded your NESS Server app. It took me a long time to test the app properly as I need to run cables between the alarm panel and my home server and also need to buy a Serial Device Server but I'm up and running now and have been playing with the app.

    Any chance you have done any improvements since your last post?

    I'm getting missing page errors when I try to go to the Alarm History and don't seem to be able to make the index page work.

    There are a few problems that I've experienced that you might have already fixed.

    Unfortunately I don't have the skills to try and program myself so would be really pleased if you are able to post an update to your excellent software.

    Venturis.

  • #47
    Junior Member
    Join Date
    Mar 2010
    Posts
    30
    Thanks
    4
    Thanked 1 Time in 1 Post
    Rep Power
    173
    Reputation
    30

    Default

    Sorry I havent touched it since I uploaded it. What particular problems are you encountering? I could probably do some more work for it.

    Matt

  • #48
    Junior Member
    Join Date
    Feb 2013
    Posts
    14
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    Reputation
    10

    Default

    Quote Originally Posted by auMatt View Post
    Sorry I havent touched it since I uploaded it. What particular problems are you encountering? I could probably do some more work for it.

    Matt
    Mi Matt.....give me a couple of days and I'll try to be more specific about the issues I'm having.

    Most likely just my lack of understanding but I'll come back to you with a list of issues.

  • #49
    Junior Member
    Join Date
    Feb 2013
    Posts
    14
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    Reputation
    10

    Default

    First thing first....I have been playing around with your program and web pages trying to work out what I might be doing wrong.

    I have come to the conclusion that I don't have the php scripting set up properly so when I load the index.htm or history.htm pages I get a blank screen.

    I have been googling for information on how to set up php scripting on Windows 7 and as yet haven't been able to get this working.

    I guess there are a few more per-requisites that are assumed when installing NESS Server that I haven't got right.

    Would you mind giving me the short version on what I need to do assuming a plain vanilla version of Window 7 is installed?

    I've installed IIS and can get the Live.htm page to show current status but neither the History or Index pages work.

    Installed php 5.5.12 to "c:\php" as well but don't think its installed correctly.

  • #50
    Junior Member
    Join Date
    Feb 2013
    Posts
    14
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    Reputation
    10

    Default

    I'm still struggling to get the php to work but in the interim I can run the Live.htm page directly and get live status which in itself is useful.

    Just to put things in perspective, my system is a D16X running Ver 5.8 firmware.

    First problem I encountered is that the system status does not always update. After disarming the alarm the system status still shows "ARMED". Disconnecting and re-connection seems to update the status.

    Tonight I was trying a few more things and noticed that Zone 9 was unsealed. To be honest, I didnt know when the RED/GREEN indicators were supposed to change state. I assumed only if the triggered zone caused the alarm to trip. Maybe you can clarify that for me. It does not change state if the alarm is disarmed.

    As a test I deliberately triggered the alarm by tripping one of the zones but the zone status indicator didn't change colour for me.

    Further, I noticed tonight that for some reason Zone 9 indicator was RED. A quick look at the alarm panel confirmed that Zone 9 was highlighted for some reason but when I looked at the Live.htm web page zones 9, 10, 11 and 12 were all indicating RED status. The alarm was disarmed at the time. Disconnecting and reconnecting didn't change their status nor did ARMING/DISARMING the alarm panel. (see attached image)



    Finally, would it be too much trouble to put the Zones in ascending order with the LHS column with Zone 1 to 8 and the RHS column with 9 - 16? It matches the layout of the NESS Server app and looks more logical than having Zones numbers alternating LHS and RHS columns.

    I'm still doing more testing and hope I can solve the php issue.
    Last edited by Venturis; 06-05-14 at 10:56 PM.

  • #51
    Junior Member
    Join Date
    Feb 2013
    Posts
    14
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    Reputation
    10

    Default

    One last request.....is it possible to make the "Ness Tester.EXE" helper app connect to the panel automatically on startup?

    Reason I ask is that my server is set up to reboot once every week to refresh the operating system.

    I can start up the helper app without any issue but haven't figured out a way to get it to connect to the pane without using some kind of macro program to press the "connect" button after startup.

  • #52
    Junior Member
    Join Date
    Nov 2008
    Posts
    101
    Thanks
    7
    Thanked 9 Times in 3 Posts
    Rep Power
    192
    Reputation
    55

    Default

    Hi guys,

    Would this app work with the Ness IP232 to Ethernet adapter? If so... Where do I put the IP address in the ini?

    I'm interested in the app purely for the email notification side of things. The iphone/andriod apps dont do live notifications. So if your alarm
    gets triggered you wont know. I have not yet setup my voip phone line to the Ness yet. So I know I'll get notifications via phone when setup. Would be good just to receive events via email.

    Cheers

  • #53
    Junior Member
    Join Date
    May 2013
    Posts
    9
    Thanks
    0
    Thanked 1 Time in 1 Post
    Rep Power
    0
    Reputation
    20

    Default Checksum Calculations

    Hi Matt

    I'm working on a similar type of comms program, but on a Raspberry pi(running raspbian/debian) with python to talk via serial to the D16X and keeping the panel output in a MySQL/MariaDB table. The event notification will by done by python and the UI(if built) willl be in PHP.

    I can read the info from the panel, and interpret it correctly, but I can't understand how to calculate the checksum based on the instructions provided in the ASCII protocol document, as below.

    CHK. The checksum byte HEX character results in the LSB being zero when all the message
    bytes are summed. This is done before the message is converted to ASCII and excludes the
    FINISH bytes.
    I'm stuck from a mathematical perspective, and so I wondered if your program writes back to the panel, and if so, how you performed the calculations of the checksum to transmit to the panel?
    As I understand after calling Ness' tech suppory, they said these checksums are mandatory, the panel will drop any lines without them, and this can't be disabled. Even if your code is in a different language to Python, at the lowest level, the checksum is a mathematical problem, not a programatic one.

    Thanks for any pointers you might have.

    Quote Originally Posted by auMatt View Post
    Ive uploaded my test for you guys to play around with



    Unrar the files, move the alarm folder to where you have your webroot, the others file (exe, ocx, ini etc) move somewhere where you can run the program.

    Edit the ini file to match your config.

    Launch the program and away you go.

    It will poll the alarm on start up to try and figure out which zones are current active, then it will sit there monitoring the alarm serial port for data. Will send an email if system is armed and a zone is triggered.

    Let me know any criticism or improvements you would like to see.

    Matt

  • #54
    Junior Member
    Join Date
    Dec 2009
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    Reputation
    10

    Default Checksums

    Hi Zoog,

    Hard to believe this thread is still alive!

    To get the calculation, add up all the bytes in the message and get the difference to the next 0x100. Better expressed as checksum = 0x100 - (sum MOD 0x100).

    As an example, if the message is a request for arming status: "8300360S14" - to get the checksum, we sum the message characters as ascii:
    56 (8) + 51(3) + 48 (0) + 48(0) + 51(3) + 54(6) + 48(0) + 83(S) + 49(1) + 52(4) = 540 (or 0x21C).

    So the next multiple of 0x100 after 0x21C is 0x300. 0x300 - 0x21C is 0xE4.
    Or to use the equation above - Chk = 0x100 - (0x21C MOD 0x100) = 0x100 - 0x1C = 0xE4.

    Thus we transmit "8300360S14E4".

    My C# code for this is:

    // msg is message formatted for sending without the checksum or finish bytes
    private int ComputeChecksum(string msg)
    {
    int sum = 0;
    int checksum;
    char[] charmsg = msg.ToCharArray();

    foreach (char c in charmsg)
    {
    sum += (int)c;
    }

    checksum = 0x100 - (sum % 0x100);
    return checksum;
    }

    Make sense? Not that hard in the end....Let us know if anything does not make sense.

    Ady.

  • #55
    Junior Member
    Join Date
    Mar 2010
    Posts
    30
    Thanks
    4
    Thanked 1 Time in 1 Post
    Rep Power
    173
    Reputation
    30

    Default

    Quote Originally Posted by ady View Post
    Hi Zoog,

    Hard to believe this thread is still alive!

    To get the calculation, add up all the bytes in the message and get the difference to the next 0x100. Better expressed as checksum = 0x100 - (sum MOD 0x100).

    As an example, if the message is a request for arming status: "8300360S14" - to get the checksum, we sum the message characters as ascii:
    56 (8) + 51(3) + 48 (0) + 48(0) + 51(3) + 54(6) + 48(0) + 83(S) + 49(1) + 52(4) = 540 (or 0x21C).

    So the next multiple of 0x100 after 0x21C is 0x300. 0x300 - 0x21C is 0xE4.
    Or to use the equation above - Chk = 0x100 - (0x21C MOD 0x100) = 0x100 - 0x1C = 0xE4.

    Thus we transmit "8300360S14E4".

    My C# code for this is:

    // msg is message formatted for sending without the checksum or finish bytes
    private int ComputeChecksum(string msg)
    {
    int sum = 0;
    int checksum;
    char[] charmsg = msg.ToCharArray();

    foreach (char c in charmsg)
    {
    sum += (int)c;
    }

    checksum = 0x100 - (sum % 0x100);
    return checksum;
    }

    Make sense? Not that hard in the end....Let us know if anything does not make sense.

    Ady.
    Thanks Ady,

    Ive been away for a week, and was preparing a response then realised that you had already explained it.

    Matt

  • #56
    Junior Member
    Join Date
    Mar 2010
    Posts
    30
    Thanks
    4
    Thanked 1 Time in 1 Post
    Rep Power
    173
    Reputation
    30

    Default

    Ive been working on my program over the past couple of days, I have now implement Prowl Notifications, so you get instantaneous notifications of problems. Im also looking at implementing some of the features that have been requested. Anything that you would like please post it here so I can try and add it.

    Matt

  • #57
    Junior Member
    Join Date
    Mar 2010
    Posts
    30
    Thanks
    4
    Thanked 1 Time in 1 Post
    Rep Power
    173
    Reputation
    30

    Default

    OK so, ive completed the last bit of coding and need some beta testers. If you are interested in testing this program let me know.

    Features include
    Auto Connecting to Panel
    Retrieves current zone and arming status on connection.
    Configurable Email and Prowl Instant Notifications
    Logging facility
    Webpage etc



    Matt

  • #58
    Junior Member
    Join Date
    Feb 2013
    Posts
    14
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    Reputation
    10

    Default

    I'm please you haven't given up on developing this program.

    I've been using your first version for some time now but have issues with the status' not updating but I think it comes down to my D16x firmware being too old.

    Would love to try your new and improved version.

  • #59
    Junior Member
    Join Date
    Mar 2010
    Posts
    30
    Thanks
    4
    Thanked 1 Time in 1 Post
    Rep Power
    173
    Reputation
    30

    Default

    I'll send you an updated version soon, I want to add one small feature in the next week or so then Ill send you a link.

    Cheers

    Matt

  • #60
    Junior Member
    Join Date
    Apr 2015
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    Reputation
    10

    Default

    @auMatt - I'd be interested in trying out/beta testing your software if that's a possibility ? My goal is to get a similar thing going under Linux to what @zoog has mentioned

  • Page 3 of 7 FirstFirst 1234567 LastLast

    Similar Threads

    1. "Comms fail route1" on Bosch Solution 16+
      By autertip in forum Security Alarms
      Replies: 8
      Last Post: 02-06-18, 10:40 PM
    2. Replies: 1
      Last Post: 17-09-09, 11:25 PM
    3. Comms,networking machine linking ????
      By redmick in forum Networking - Wireless and Cabled
      Replies: 1
      Last Post: 23-04-09, 07:55 PM
    4. Comms Receiver WTB
      By Variable in forum Buy Sell and Trade
      Replies: 0
      Last Post: 25-02-09, 09:55 PM
    5. Ness D16x Questions
      By 7polly7777 in forum Security Alarms
      Replies: 1
      Last Post: 26-03-08, 02:11 AM

    Tags for this Thread

    Bookmarks

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •