DSC binding not connecting to IT-100

I can’t seem to get openHAB to connect to my IT-100. My IT-100 is connected to a TCP serial adapter and does currently work with a DSClink-ISY99 connection.

Here are the steps I took to set up openHAB:

  1. Extract openHAB 1.8.1 to a directory
  2. Extract org.openhab.action.dscalarm-1.8.1.jar and org.openhab.binding.dscalarm-1.8.1.jar to Addons directory
  3. Copied openhab_default.cfg to openhab.cfg
  4. Edited the following items in the openhab.cfg file
    dscalarm:deviceType=it100
    dscalarm:ip=192.168.0.100
    dscalarm:tcpPort=2401
  5. Created item (named dsc.item) and sitemap (named dsc.sitemap) files from the examples at https://github.com/openhab/openhab/wiki/DSC-Alarm-Binding
  6. Started openHAB using the start.bat (start_debug.bat)

When I connect to the openHAB in a web browser at http://localhost:8080/openhab.app?sitemap=dsc the alarm items are there and clickable but the alarm status are not shown. When I click on Panel Commands > Poll or Status Report, nothing happens. The log file shows the following and nothing else

14:59:26.238 [DEBUG] [.o.b.d.i.DSCAlarmActiveBinding:211 ] - internalReceiveCommand(): Item Name: PANEL_COMMAND Command: 0 Item Device Type: PANEL
14:59:29.564 [DEBUG] [.o.b.d.i.DSCAlarmActiveBinding:211 ] - internalReceiveCommand(): Item Name: PANEL_COMMAND Command: 1 Item Device Type: PANEL

Hello Brian,

I’ve done some basic testing and there seems to be a bug in the binding with handling the configuration parameter ‘deviceType’. The binding will work if you leave ‘deviceType’ blank. The only problem with that is the binding will consider it an Envisalink connection and not an IT-100 connection. The only way to get the binding to consider it a IT-100 connection, at this point, is to connect via a serial port. Sorry for the problem. I will look into the bug as soon as I can. Thank you.

Thanks for looking into this Russell! :smiley:

Hello Brian,

I have made some changes to the DSC Alarm binding to fix this problem. Would you be willing to try it and let me know how it goes? Here is a link to the .jar file: DSC Alarm Binding. Just replace the current binding in the Addons folder with this one. Thanks!

Thanks Russell, I will test this weekend :slight_smile:

Hi Russell
could you advise if anything I’m doing wrong as still getting IT-100 not to work?

story:
I have an IT-100 RS232 module connected to my panel, working fine (indicator is blinking good).
Connected my RS232 to USB adapter on Ubuntu 14/04 TLS [Manufacturer: Prolific Technology Inc., idVendor=067b, idProduct=2303]. installed the PL2303 drivers, did modprobe things etc, installed “minicom”, configured as per IT100 developers guide (baud 9600 8n1 NO NO).
when I run serial console I can see the module works fine with my Ubuntu, see below:
root@box:~# cu -l /dev/ttyUSB1 -s 9600
Connected.
90100032 Date Time MAR 18/16 6:44p23
60900332
6100032A
… Those two lines after a Date actually shows my PIR open/close status changes. all looks fine so far.

Created a basic OpenHAB config as follows:

openhab.cfg
dscalarm:serialPort=/dev/ttyUSB0
dscalarm:usercode=1234

my.items
/* DSC Alarm Panel Items */
Number PANEL_CONNECTION “Panel Connected: [%d]” (DSCAlarmPanel) {dscalarm=“panel:panel_connection”}
DateTime PANEL_TIME “Time [%1$tH:%1$tM %1$ta, %1$tY.%1$tm.%1$td]” (DSCAlarmPanel) {dscalarm=“panel:panel_time”}

my.sitemap
Frame label=“Alarm System” {
Text label=“DSC Alarm” icon=“shield-1” {
Frame label=“Panel info” {
Switch item=PANEL_CONNECTION label=“STATUS” icon=“shield-2” mappings=[1=“Connected”, 0=“Disconnected”]
Text item=PANEL_TIME } } }

NOW THE FUN:
when I start openhab, I get the following error:

openhab.log:
2016-03-18 22:03:45.020 [ERROR] [.d.i.connector.SerialConnector] - write(): {}
java.io.IOException: Input/output error in writeArray
at gnu.io.RXTXPort.writeArray(Native Method) ~[nrjavaserial-3.9.3.jar:na]
at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1211) ~[nrjavaserial-3.9.3.jar:na]
at sun.nio.cs.StreamEncoder.writeBytes(StreamEncoder.java:221) ~[na:1.8.0_72]
at sun.nio.cs.StreamEncoder.implFlushBuffer(StreamEncoder.java:291) ~[na:1.8.0_72]
at sun.nio.cs.StreamEncoder.implFlush(StreamEncoder.java:295) ~[na:1.8.0_72]
at sun.nio.cs.StreamEncoder.flush(StreamEncoder.java:141) ~[na:1.8.0_72]
at java.io.OutputStreamWriter.flush(OutputStreamWriter.java:229) ~[na:1.8.0_72]
at org.openhab.binding.dscalarm.internal.connector.SerialConnector.write(SerialConnector.java:76) ~[bundlefile:na]
at org.openhab.binding.dscalarm.internal.protocol.API.sendCommand(API.java:403) [bundlefile:na]
at org.openhab.binding.dscalarm.internal.DSCAlarmActiveBinding.execute(DSCAlarmActiveBinding.java:136) [bundlefile:na]
at org.openhab.core.binding.AbstractActiveBinding$BindingActiveService.execute(AbstractActiveBinding.java:156) [org.openhab.core_1.8.1.jar:na]
at org.openhab.core.service.AbstractActiveService$RefreshThread.run(AbstractActiveService.java:173) [org.openhab.core_1.8.1.jar:na]
2016-03-18 22:03:50.027 [ERROR] [.o.b.d.i.DSCAlarmActiveBinding] - execute(): Not Connected to the DSC Alarm!

and after running “dmesg” ->
[13989.668226] usb 8-3: new full-speed USB device number 7 using ohci-pci
[13989.835527] usb 8-3: New USB device found, idVendor=067b, idProduct=2303
[13989.835545] usb 8-3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[13989.835554] usb 8-3: Product: USB 2.0 To COM Device
[13989.835562] usb 8-3: Manufacturer: Prolific Technology Inc.
[13989.875585] usbcore: registered new interface driver usbserial
[13989.875810] usbcore: registered new interface driver usbserial_generic
[13989.882676] usbserial: USB Serial support registered for generic
[13989.888133] usbcore: registered new interface driver pl2303
[13989.888171] usbserial: USB Serial support registered for pl2303
[13989.888230] pl2303 8-3:1.0: pl2303 converter detected
[13989.911931] usb 8-3: pl2303 converter now attached to ttyUSB0
[14164.497180] pl2303 ttyUSB0: pl2303_get_line_request - failed: -32
[14165.923162] pl2303 ttyUSB0: pl2303_get_line_request - failed: -32
[14166.237853] pl2303 ttyUSB0: pl2303_get_line_request - failed: -32

after the message “[INFO ] [.service.AbstractActiveService] - DSC Alarm Monitor Service has been started” in the openhab.log file the last 3 “pl2303_get_line_request-failed” appears.

nothing seems to work from that moment.

if I do stop openhab and run serial console - I can see good communication signs from my pc to the panel again.

could openhab binding cause it? any thoughts please?

thanks
Antanas

Further to that, I’ve enabled some DEBUG stuff, see the output once openhab is started:

[ignore the sitemap name change - when I wrote a comment just changed it]

:~$ tail -f /var/log/openhab/openhab.log
2016-03-18 23:01:17.559 [DEBUG] [d.internal.protocol.APIMessage] - parseAPIMessage(): Message Received (610060) - Code: 610, Name: Zone Restored, Description: 610: General status of the zone - restored., Data: 060
2016-03-18 23:01:17.559 [DEBUG] [.d.i.connector.SerialConnector] - handleIncomingMessage(): Message recieved: 23:02:00 6100602D - Code: “610”, Name: “Zone Restored”, Description: “610: General status of the zone - restored.”, Time Stamp: 23:02:00, Zone: 60, Data: 060
2016-03-18 23:01:17.559 [DEBUG] [.o.b.d.i.DSCAlarmActiveBinding] - setTimeStampState(): Time Stamp: 23:02:00
2016-03-18 23:01:17.559 [DEBUG] [.o.b.d.i.DSCAlarmActiveBinding] - updateTriggerItem(): Item Name: Partition: 0 Zone: 0
2016-03-18 23:01:17.560 [DEBUG] [.o.b.d.i.DSCAlarmActiveBinding] - setTimeStampState(): Changed state to ‘OFF’.
2016-03-18 23:01:17.560 [DEBUG] [.o.b.d.i.DSCAlarmActiveBinding] - updateTriggerItem(): Item Name: Partition: 0 Zone: 60
2016-03-18 23:01:17.560 [DEBUG] [.o.b.d.i.DSCAlarmActiveBinding] - dscAlarmEventRecieved(): Event received! Looking for item: ZONE_GENERAL_STATUS
2016-03-18 23:01:17.596 [INFO ] [c.internal.ModelRepositoryImpl] - Refreshing model 'Namai.sitemap’
2016-03-18 23:01:19.883 [DEBUG] [.o.b.d.i.DSCAlarmActiveBinding] - DSC Alarm Execute
2016-03-18 23:01:24.884 [DEBUG] [.o.b.d.i.DSCAlarmActiveBinding] - DSC Alarm Execute
2016-03-18 23:01:29.884 [DEBUG] [.o.b.d.i.DSCAlarmActiveBinding] - DSC Alarm Execute
2016-03-18 23:01:34.886 [DEBUG] [.o.b.d.i.DSCAlarmActiveBinding] - DSC Alarm Execute
2016-03-18 23:01:39.622 [DEBUG] [d.internal.protocol.APIMessage] - parseAPIMessage(): Message Received (610061) - Code: 610, Name: Zone Restored, Description: 610: General status of the zone - restored., Data: 061
2016-03-18 23:01:39.623 [DEBUG] [.d.i.connector.SerialConnector] - handleIncomingMessage(): Message recieved: 23:02:00 6100612E - Code: “610”, Name: “Zone Restored”, Description: “610: General status of the zone - restored.”, Time Stamp: 23:02:00, Zone: 61, Data: 061
2016-03-18 23:01:39.623 [DEBUG] [.o.b.d.i.DSCAlarmActiveBinding] - setTimeStampState(): Time Stamp: 23:02:00
2016-03-18 23:01:39.624 [DEBUG] [.o.b.d.i.DSCAlarmActiveBinding] - updateTriggerItem(): Item Name: Partition: 0 Zone: 0
2016-03-18 23:01:39.624 [DEBUG] [.o.b.d.i.DSCAlarmActiveBinding] - setTimeStampState(): Changed state to ‘OFF’.
2016-03-18 23:01:39.624 [DEBUG] [.o.b.d.i.DSCAlarmActiveBinding] - updateTriggerItem(): Item Name: Partition: 0 Zone: 61
2016-03-18 23:01:39.624 [DEBUG] [.o.b.d.i.DSCAlarmActiveBinding] - dscAlarmEventRecieved(): Event received! Looking for item: ZONE_GENERAL_STATUS
2016-03-18 23:01:39.645 [DEBUG] [d.internal.protocol.APIMessage] - parseAPIMessage(): Message Received (610062) - Code: 610, Name: Zone Restored, Description: 610: General status of the zone - restored., Data: 062
2016-03-18 23:01:39.646 [DEBUG] [.d.i.connector.SerialConnector] - handleIncomingMessage(): Message recieved: 23:02:00 6100622F - Code: “610”, Name: “Zone Restored”, Description: “610: General status of the zone - restored.”, Time Stamp: 23:02:00, Zone: 62, Data: 062
2016-03-18 23:01:39.646 [DEBUG] [.o.b.d.i.DSCAlarmActiveBinding] - setTimeStampState(): Time Stamp: 23:02:00
2016-03-18 23:01:39.647 [DEBUG] [.o.b.d.i.DSCAlarmActiveBinding] - updateTriggerItem(): Item Name: Partition: 0 Zone: 0
2016-03-18 23:01:39.647 [DEBUG] [.o.b.d.i.DSCAlarmActiveBinding] - setTimeStampState(): Changed state to ‘OFF’.
2016-03-18 23:01:39.647 [DEBUG] [.o.b.d.i.DSCAlarmActiveBinding] - updateTriggerItem(): Item Name: Partition: 0 Zone: 62
2016-03-18 23:01:39.647 [DEBUG] [.o.b.d.i.DSCAlarmActiveBinding] - dscAlarmEventRecieved(): Event received! Looking for item: ZONE_GENERAL_STATUS
2016-03-18 23:01:39.667 [DEBUG] [d.internal.protocol.APIMessage] - parseAPIMessage(): Message Received (610063) - Code: 610, Name: Zone Restored, Description: 610: General status of the zone - restored., Data: 063
2016-03-18 23:01:39.668 [DEBUG] [.d.i.connector.SerialConnector] - handleIncomingMessage(): Message recieved: 23:02:00 61006330 - Code: “610”, Name: “Zone Restored”, Description: “610: General status of the zone - restored.”, Time Stamp: 23:02:00, Zone: 63, Data: 063
2016-03-18 23:01:39.668 [DEBUG] [.o.b.d.i.DSCAlarmActiveBinding] - setTimeStampState(): Time Stamp: 23:02:00
2016-03-18 23:01:39.668 [DEBUG] [.o.b.d.i.DSCAlarmActiveBinding] - updateTriggerItem(): Item Name: Partition: 0 Zone: 0
2016-03-18 23:01:39.668 [DEBUG] [.o.b.d.i.DSCAlarmActiveBinding] - setTimeStampState(): Changed state to ‘OFF’.
2016-03-18 23:01:39.668 [DEBUG] [.o.b.d.i.DSCAlarmActiveBinding] - updateTriggerItem(): Item Name: Partition: 0 Zone: 63
2016-03-18 23:01:39.668 [DEBUG] [.o.b.d.i.DSCAlarmActiveBinding] - dscAlarmEventRecieved(): Event received! Looking for item: ZONE_GENERAL_STATUS
2016-03-18 23:01:39.689 [DEBUG] [d.internal.protocol.APIMessage] - parseAPIMessage(): Message Received (610064) - Code: 610, Name: Zone Restored, Description: 610: General status of the zone - restored., Data: 064
2016-03-18 23:01:39.690 [DEBUG] [.d.i.connector.SerialConnector] - handleIncomingMessage(): Message recieved: 23:02:00 61006431 - Code: “610”, Name: “Zone Restored”, Description: “610: General status of the zone - restored.”, Time Stamp: 23:02:00, Zone: 64, Data: 064
2016-03-18 23:01:39.690 [DEBUG] [.o.b.d.i.DSCAlarmActiveBinding] - setTimeStampState(): Time Stamp: 23:02:00
2016-03-18 23:01:39.690 [DEBUG] [.o.b.d.i.DSCAlarmActiveBinding] - updateTriggerItem(): Item Name: Partition: 0 Zone: 0
2016-03-18 23:01:39.690 [DEBUG] [.o.b.d.i.DSCAlarmActiveBinding] - setTimeStampState(): Changed state to ‘OFF’.
2016-03-18 23:01:39.691 [DEBUG] [.o.b.d.i.DSCAlarmActiveBinding] - updateTriggerItem(): Item Name: Partition: 0 Zone: 64
2016-03-18 23:01:39.691 [DEBUG] [.o.b.d.i.DSCAlarmActiveBinding] - dscAlarmEventRecieved(): Event received! Looking for item: ZONE_GENERAL_STATUS
2016-03-18 23:01:39.712 [DEBUG] [d.internal.protocol.APIMessage] - parseAPIMessage(): Message Received (609008) - Code: 609, Name: Zone Open, Description: 609: General status of the zone - open., Data: 008

I would say the module is communicating with openhab, however I cannot see any data once I launch the openhab app or website.

thanks
Antanas

Hello @ArC,

It looks like you may have read permission only on that port. You may need to enable write permission also. Hope this helps.

Hi Russell

did that:
root@box:~# ls -la /dev/ttyUSB0
crwxrwxrwx 1 root dialout 188, 0 Kov 19 13:05 /dev/ttyUSB0

re-created the items/sitemap file with only the example provided in:

Seems that all messages and commands works now. I’m thinking that I did something wrong with the order or structure when amending these to fit my needs/look in the overall sitemap structure.

thanks for an advice, will dig more from here.

Antanas

Hello Brian,

By any chance were you able to test the binding?

Thanks,
Russell

Hi Russell,
Yes, the updated binding is allowing TCP communications to the IT-100. :slight_smile: However, not all binding items are working as it should. It may be due to some binding items only work IT100 vs Envisalink, not exactly sure. At the moment, I’m able to see the alarm status and arm/disarm the system which is all I need for now. I’ll troubleshoot into the issues more when I have time.

That is good to hear that it is working. Yes, there are differences in the protocols for the IT100 and the Envisalink, so some items may not work, but most should. Thanks for testing this Brian.

Thank you very much!

Its working now, after I started with a clean install from latest online snapshot, and only added the manual downloaded dscalarm binding from the above link, and adding my .things file back in.

Now the panel and everything else is online, and the logs look good.

2016-04-24 10:56:24.418 [DEBUG] [rm.handler.DSCAlarmBaseBridgeHandler] - DSC Alarm Polling Task - 'dscalarm:it100:ttyUSB0'
2016-04-24 10:56:24.422 [DEBUG] [.dscalarm.handler.IT100BridgeHandler] - write(): Message Sent: 00090

2016-04-24 10:56:24.423 [DEBUG] [rm.handler.DSCAlarmBaseBridgeHandler] - sendCommand(): 'Poll' Command Sent - 00090

2016-04-24 10:56:24.423 [DEBUG] [rm.handler.DSCAlarmBaseBridgeHandler] - Checking Things!
2016-04-24 10:56:24.424 [DEBUG] [rm.handler.DSCAlarmBaseBridgeHandler] - ***Checking 'dscalarm:panel:ttyUSB0:panel' - Status: ONLINE, Refreshed: true
2016-04-24 10:56:24.424 [DEBUG] [rm.handler.DSCAlarmBaseBridgeHandler] - ***Checking 'dscalarm:partition:ttyUSB0:partition1' - Status: ONLINE, Refreshed: true
2016-04-24 10:56:24.425 [DEBUG] [rm.handler.DSCAlarmBaseBridgeHandler] - ***Checking 'dscalarm:zone:ttyUSB0:zone1' - Status: ONLINE, Refreshed: true
2016-04-24 10:56:24.425 [DEBUG] [rm.handler.DSCAlarmBaseBridgeHandler] - ***Checking 'dscalarm:keypad:ttyUSB0:keypad' - Status: ONLINE, Refreshed: true
2016-04-24 10:56:24.430 [DEBUG] [ng.dscalarm.internal.DSCAlarmMessage] - parseAPIMessage(): Message Received (501) - Code: 501, Name: Command Error, Description: 501: A command has been received with a bad checksum., Data:

2016-04-24 10:56:24.431 [DEBUG] [rm.handler.DSCAlarmBaseBridgeHandler] - handleIncomingMessage(): Message received: 10:56:00 50196 - Code: "501", Name: "Command Error", Description: "501: A command has been received with a bad checksum.", Time Stamp: 10:56:00
2016-04-24 10:56:24.431 [DEBUG] [rm.handler.DSCAlarmBaseBridgeHandler] - findThing(): Thing Found - org.eclipse.smarthome.core.thing.internal.ThingImpl@4ac97c65, org.openhab.binding.dscalarm.handler.PanelThingHandler@7a133517, PANEL
2016-04-24 10:56:24.432 [DEBUG] [rm.handler.DSCAlarmBaseBridgeHandler] - handleIncomingMessage(): Thing Search - 'org.eclipse.smarthome.core.thing.internal.ThingImpl@4ac97c65'
2016-04-24 10:56:24.432 [DEBUG] [g.dscalarm.handler.PanelThingHandler] - setTimeStampState(): Already Set!
2016-04-24 10:56:24.433 [DEBUG] [g.dscalarm.handler.PanelThingHandler] - dscAlarmEventRecieved(): Thing - dscalarm:panel:ttyUSB0:panel   Command - CommandError
2016-04-24 10:56:24.433 [DEBUG] [g.dscalarm.handler.PanelThingHandler] - updateProperties(): Panel Channel UID: dscalarm:panel:ttyUSB0:panel:panel_message
2016-04-24 10:56:24.433 [DEBUG] [g.dscalarm.handler.PanelThingHandler] - updateChannel(): Panel Channel UID: dscalarm:panel:ttyUSB0:panel:panel_message

Will need to check out that bad checksum line, but at least now it is getting somewhere.

That is strange, because that is the correct checksum for the poll command - 90. I’ve checked the logic and it seems to be correct. Not sure what else could be happening here. Let me know if you find anything.

Hi.

I see now I accidentally replied on the wrong topic, was supposed to be on Dscalarm binding with it100 serial device - thing stays offline