kk7ds / pynx584

Python library and server for talking to NX584/NX8E interfaces
GNU General Public License v3.0
29 stars 26 forks source link

Any help with NX-8E? #40

Closed rayzorben closed 4 years ago

rayzorben commented 4 years ago

I'm not sure what I am doing wrong here.

I have an NX-8E which has the built in DB9-RS232 module. I purchased a DB9 to RS232 cable with 10 wires/holes on the end https://www.amazon.com/gp/product/B001EHFV02/

Plugged it into the NX-8E. I have a USB Serial Cable, and the kernel see is on /dev/ttyUSB0

/dev/ttyUSB0 - Prolific_Technology_Inc._USB-Serial_Controller

I am using this guide as a manual. https://static.interlogix.com/library/I-NX8E-IM%20Rev%20C%20Installation%20Manual.pdf

For Module 0 I have set the following locations and options

  1. 1 - serial printer enabled
  2. 2 - 9600 baudrate (I also tried 38400)
  3. Option 1 - ON (ASCII)
  4. Both Segment 1 and 2, turned on anything that wasn't Reserved
  5. Segments 1, 2, 3, 4 turned on anything that wasn't Reserved

I also tried on 210/211 to set it to what matches in the guide here.

At the moment, it looks like I am receiving no data at all. To make sure I even just put a print in process_next after the read, and it is empty. I never get the LOG.debug('Parsing raw ASCII line %r' % data) even though I started with --debug

pi@raspberrypi:~/.local/bin $ ./nx584_server --debug --serial /dev/ttyUSB0 --baudrate 9600
2020-05-16 16:20:41,057 main INFO Ready
2020-05-16 16:20:41,074 controller INFO Loaded extensions []
 * Serving Flask app "nx584" (lazy loading)
 * Environment: production
   WARNING: Do not use the development server in a production environment.
   Use a production WSGI server instead.
 * Debug mode: off
2020-05-16 16:20:41,093 _internal INFO  * Running on http://127.0.0.1:5007/ (Press CTRL+C to quit)
2020-05-16 16:20:42,334 controller DEBUG Sending queued [59, 20, 5, 16, 16, 20, 7]
2020-05-16 16:20:43,587 controller DEBUG Sending queued [35, 0]
2020-05-16 16:20:44,839 controller DEBUG Sending queued [35, 1]
2020-05-16 16:20:46,092 controller DEBUG Sending queued [35, 2]
2020-05-16 16:20:47,344 controller DEBUG Sending queued [35, 3]
2020-05-16 16:20:48,597 controller DEBUG Sending queued [35, 4]
2020-05-16 16:20:49,849 controller DEBUG Sending queued [35, 5]
2020-05-16 16:20:51,102 controller DEBUG Sending queued [35, 6]
2020-05-16 16:20:52,355 controller DEBUG Sending queued [35, 7]
2020-05-16 16:21:06,492 _internal INFO 127.0.0.1 - - [16/May/2020 16:21:06] "GET /zones HTTP/1.1" 200 -
2020-05-16 16:21:06,499 _internal INFO 127.0.0.1 - - [16/May/2020 16:21:06] "GET /partitions HTTP/1.1" 200 -
i@raspberrypi:~/.local/bin $ ./nx584_client summary
+------+------+--------+--------+
| Zone | Name | Bypass | Status |
+------+------+--------+--------+
+------+------+--------+--------+

/var/log/syslog

May 16 16:19:29 raspberrypi kernel: [ 1843.298741] usb 1-1.1: new full-speed USB device number 5 using xhci_hcd
May 16 16:19:29 raspberrypi kernel: [ 1843.435030] usb 1-1.1: New USB device found, idVendor=067b, idProduct=2303, bcdDevice= 3.00
May 16 16:19:29 raspberrypi kernel: [ 1843.435047] usb 1-1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
May 16 16:19:29 raspberrypi kernel: [ 1843.435060] usb 1-1.1: Product: USB-Serial Controller
May 16 16:19:29 raspberrypi kernel: [ 1843.435073] usb 1-1.1: Manufacturer: Prolific Technology Inc.
May 16 16:19:29 raspberrypi kernel: [ 1843.439792] pl2303 1-1.1:1.0: pl2303 converter detected
May 16 16:19:29 raspberrypi kernel: [ 1843.448951] usb 1-1.1: pl2303 converter now attached to ttyUSB0
rayzorben commented 4 years ago

Tried a Windows laptop just in case it was an issue with my Raspberry Pi 4. Windows laptop had the same issue (had to modify some code to make it work with Windows).

I am certain this cable works too, I unplugged it from another Raspberry Pi (3B) that I was using to automate my Onkyo serial.

The only thing I can think of is the DB9 to RS232 cable, I inspected it to see if it looked like there might be any issues, but it looks really well built.

rayzorben commented 4 years ago

OK. I guess there are 2 types of IDC to DB-9 cables. One is AT-EVEREX which is the cable I bought. This straight maps pins 1 to 1, 2 to 2, and so on.

The NX-8E requires a DTK/INTEL IDC to DB-9 cable which maps pin 1 to 1, 2 to 6, etc..

So I guess I bought the wrong cable. :(

Pre10der commented 4 years ago

Thanks for sharing your solution @rayzorben.

danTHAman152000 commented 1 year ago

Is this the correct adapter https://www.amazon.com/gp/product/B001EHFV02/ , one of the comments says it's the INTEL version and not EVEREX. I wish I could just buy a damn Caddx P-0003 adapter and be done with it. I cannot find one anywhere to connect to my NX-8E. Any more tips on what is needed to get this communicating with a raspberrypi with Home Assistant?

rayzorben commented 1 year ago

Is this the correct adapter https://www.amazon.com/gp/product/B001EHFV02/ , one of the comments says it's the INTEL version and not EVEREX. I wish I could just buy a damn Caddx P-0003 adapter and be done with it. I cannot find one anywhere to connect to my NX-8E. Any more tips on what is needed to get this communicating with a raspberrypi with Home Assistant?

Yes that is the exact adapter I bought