Dscalarm binding with it100 serial device - thing stays offline

I have DSC IT-100 serial device, stuck in “OFFLINE” status on Openhab2 2016-04-17 snapshot.

Using both discovery method and manually configuring the bridge in demo.things it stays in offline mode. Then any other bindings, for the panel ect under that stays stuck in “Initializing” status. It was easier to see whats going on when using the Discovery method of setting it up, however I am not sure what is wrong. When I connect directly to the serial port myself (when openhab is shutdown) I can see the messages from the alarm system, also the fact that it gets discovered makes me think it is function as expected.

So the config looks like:

Thing:

Bridge dscalarm:it100:ttys1 [ serialPort="/dev/ttyS1", baud="9600", pollPeriod="1" ] { Thing panel panel Thing partition partition1 [ partitionNumber=1 ] Thing zone zone1 [ partitionNumber=1, zoneNumber=1 ] Thing zone zone2 [ partitionNumber=1, zoneNumber=2 ] Thing zone zone3 [ partitionNumber=1, zoneNumber=3 ] Thing zone zone4 [ partitionNumber=1, zoneNumber=4 ] Thing zone zone5 [ partitionNumber=1, zoneNumber=5 ] Thing zone zone6 [ partitionNumber=1, zoneNumber=6 ] Thing zone zone7 [ partitionNumber=1, zoneNumber=7 ] Thing zone zone8 [ partitionNumber=1, zoneNumber=8 ] Thing keypad keypad }

Items:
/* DSC Alarm Panel Items */ Switch PANEL_CONNECTION "Panel Connected: [%d]" (DSCAlarmPanel) {channel="dscalarm:panel:ttys1:panel:bridge_connection"} Number PANEL_COMMAND "Panel Commands" (DSCAlarmPanel) {channel="dscalarm:panel:ttys1:panel:panel_command"} String PANEL_MESSAGE "Panel Message: [%s]" (DSCAlarmPanel) {channel="dscalarm:panel:ttys1:panel:panel_message"} String PANEL_SYSTEM_ERROR "Panel System Error: [%s]" <"shield-1"> (DSCAlarmPanel) {channel="dscalarm:panel:ttys1:panel:panel_system_error"}

And then finally what I get in the logs:

016-04-18 12:06:49.385 [INFO ] [smarthome.event.ThingAddedEvent ] - Thing 'dscalarm:it100:ttys1' has been added. 2016-04-18 12:06:49.386 [INFO ] [me.event.ThingStatusInfoChangedEvent] - 'dscalarm:keypad:tcpbridge:keypad' changed from INITIALIZING to UNINITIALIZED (HANDLER_MISSING_ERROR) 2016-04-18 12:06:49.387 [INFO ] [smarthome.event.ThingAddedEvent ] - Thing 'dscalarm:panel:ttys1:panel' has been added. 2016-04-18 12:06:49.389 [INFO ] [me.event.ThingStatusInfoChangedEvent] - 'dscalarm:it100:ttys1' changed from UNINITIALIZED to INITIALIZING 2016-04-18 12:06:49.392 [ERROR] [rm.handler.DSCAlarmBaseBridgeHandler] - Not Connected to the DSC Alarm! 2016-04-18 12:06:49.393 [INFO ] [me.event.ThingStatusInfoChangedEvent] - 'dscalarm:it100:ttys1' changed from INITIALIZING to OFFLINE 2016-04-18 12:06:49.394 [INFO ] [smarthome.event.ThingAddedEvent ] - Thing 'dscalarm:partition:ttys1:partition1' has been added. 2016-04-18 12:06:49.395 [INFO ] [me.event.ThingStatusInfoChangedEvent] - 'dscalarm:panel:ttys1:panel' changed from UNINITIALIZED to INITIALIZING 2016-04-18 12:06:49.406 [INFO ] [me.event.ThingStatusInfoChangedEvent] - 'dscalarm:partition:ttys1:partition1' changed from UNINITIALIZED to INITIALIZING 2016-04-18 12:06:49.413 [ERROR] [rm.handler.DSCAlarmBaseBridgeHandler] - sendCommand(): Command Not Sent - Invalid! 2016-04-18 12:06:49.419 [INFO ] [me.event.ThingStatusInfoChangedEvent] - 'dscalarm:zone:ttys1:zone1' changed from UNINITIALIZED to INITIALIZING 2016-04-18 12:06:49.421 [INFO ] [smarthome.event.ThingAddedEvent ] - Thing 'dscalarm:zone:ttys1:zone1' has been added. 2016-04-18 12:06:49.421 [INFO ] [me.event.ThingStatusInfoChangedEvent] - 'dscalarm:zone:ttys1:zone3' changed from UNINITIALIZED to INITIALIZING 2016-04-18 12:06:49.422 [INFO ] [smarthome.event.ThingAddedEvent ] - Thing 'dscalarm:zone:ttys1:zone2' has been added. 2016-04-18 12:06:49.423 [INFO ] [smarthome.event.ThingAddedEvent ] - Thing 'dscalarm:zone:ttys1:zone3' has been added. 2016-04-18 12:06:49.423 [INFO ] [smarthome.event.ThingAddedEvent ] - Thing 'dscalarm:zone:ttys1:zone4' has been added. 2016-04-18 12:06:49.423 [INFO ] [me.event.ThingStatusInfoChangedEvent] - 'dscalarm:zone:ttys1:zone2' changed from UNINITIALIZED to INITIALIZING 2016-04-18 12:06:49.432 [INFO ] [me.event.ThingStatusInfoChangedEvent] - 'dscalarm:zone:ttys1:zone4' changed from UNINITIALIZED to INITIALIZING 2016-04-18 12:06:49.433 [INFO ] [me.event.ThingStatusInfoChangedEvent] - 'dscalarm:zone:ttys1:zone5' changed from UNINITIALIZED to INITIALIZING 2016-04-18 12:06:49.433 [INFO ] [smarthome.event.ThingAddedEvent ] - Thing 'dscalarm:zone:ttys1:zone5' has been added. 2016-04-18 12:06:49.437 [INFO ] [me.event.ThingStatusInfoChangedEvent] - 'dscalarm:zone:ttys1:zone6' changed from UNINITIALIZED to INITIALIZING 2016-04-18 12:06:49.438 [INFO ] [smarthome.event.ThingAddedEvent ] - Thing 'dscalarm:zone:ttys1:zone6' has been added. 2016-04-18 12:06:49.439 [INFO ] [smarthome.event.ThingAddedEvent ] - Thing 'dscalarm:zone:ttys1:zone7' has been added. 2016-04-18 12:06:49.451 [INFO ] [smarthome.event.ThingAddedEvent ] - Thing 'dscalarm:zone:ttys1:zone8' has been added. 2016-04-18 12:06:49.453 [INFO ] [me.event.ThingStatusInfoChangedEvent] - 'dscalarm:zone:ttys1:zone7' changed from UNINITIALIZED to INITIALIZING 2016-04-18 12:06:49.454 [INFO ] [me.event.ThingStatusInfoChangedEvent] - 'dscalarm:zone:ttys1:zone8' changed from UNINITIALIZED to INITIALIZING 2016-04-18 12:06:49.456 [INFO ] [smarthome.event.ThingAddedEvent ] - Thing 'dscalarm:keypad:ttys1:keypad' has been added. 2016-04-18 12:06:49.457 [INFO ] [me.event.ThingStatusInfoChangedEvent] - 'dscalarm:keypad:ttys1:keypad' changed from UNINITIALIZED to INITIALIZING 2016-04-18 12:06:54.448 [ERROR] [rm.handler.DSCAlarmBaseBridgeHandler] - Not Connected to the DSC Alarm! 2016-04-18 12:06:54.457 [ERROR] [rm.handler.DSCAlarmBaseBridgeHandler] - sendCommand(): Command Not Sent - Invalid! 2016-04-18 12:06:59.458 [ERROR] [rm.handler.DSCAlarmBaseBridgeHandler] - Not Connected to the DSC Alarm! 2016-04-18 12:06:59.470 [ERROR] [rm.handler.DSCAlarmBaseBridgeHandler] - sendCommand(): Command Not Sent - Invalid! 2016-04-18 12:07:04.471 [ERROR] [rm.handler.DSCAlarmBaseBridgeHandler] - Not Connected to the DSC Alarm! 2016-04-18 12:07:04.484 [ERROR] [rm.handler.DSCAlarmBaseBridgeHandler] - sendCommand(): Command Not Sent - Invalid! 2016-04-18 12:07:09.486 [ERROR] [rm.handler.DSCAlarmBaseBridgeHandler] - Not Connected to the DSC Alarm! 2016-04-18 12:07:09.495 [ERROR] [rm.handler.DSCAlarmBaseBridgeHandler] - sendCommand(): Command Not Sent - Invalid! 2016-04-18 12:07:14.497 [ERROR] [rm.handler.DSCAlarmBaseBridgeHandler] - Not Connected to the DSC Alarm! 2016-04-18 12:07:14.510 [ERROR] [rm.handler.DSCAlarmBaseBridgeHandler] - sendCommand(): Command Not Sent - Invalid! 2016-04-18 12:07:19.549 [ERROR] [rm.handler.DSCAlarmBaseBridgeHandler] - Not Connected to the DSC Alarm! 2016-04-18 12:07:19.559 [ERROR] [rm.handler.DSCAlarmBaseBridgeHandler] - sendCommand(): Command Not Sent - Invalid! 2016-04-18 12:07:24.560 [ERROR] [rm.handler.DSCAlarmBaseBridgeHandler] - Not Connected to the DSC Alarm! 2016-04-18 12:07:24.570 [ERROR] [rm.handler.DSCAlarmBaseBridgeHandler] - sendCommand(): Command Not Sent - Invalid! 2016-04-18 12:07:29.659 [ERROR] [rm.handler.DSCAlarmBaseBridgeHandler] - Not Connected to the DSC Alarm! 2016-04-18 12:07:29.666 [ERROR] [rm.handler.DSCAlarmBaseBridgeHandler] - sendCommand(): Command Not Sent - Invalid!.

2016-04-18 12:10:47.436 [INFO ] [ome.core.thing.internal.ThingManager] - Not delegating command '1' for item 'PANEL_COMMAND' to handler for channel 'dscalarm:panel:ttys1:panel:panel_command', because thing is not initialized (must be in status ONLINE or OFFLINE).

It definitely looks like somethings up with the module connecting over serial connection, and I cant find documentation on what I should be configuring for the serial device.

Any help will be appreciated.

Hello @tinuva,

The values for baud and pollPeriod are integers so they would need to be written without the quotes like this:

baud=9600, pollPeriod=1

Also, baud and pollPeriod default to those values already, so you really don’t need to include them as parameters unless you want them to be different values. Hope this helps.

Thank you.

I removed those after making the post. It however hasn’t resolved the issue and the logs are still the same.

Fairly certain it is something to do with the binding thinking the alarm is offline. Not 100% sure convinced its the configs though, because when using a clean install, and using discovery I even then get the same issues.

Perhaps I just need to find out if someone else with the IT-100 adapter has managed to get it working in OH2.

Also tested now with build 248 from a few hours ago.

A couple of things come to mind. Make sure that your .things file is removed from the things directory if using discovery. Also, make sure openHAB has read/write permissions on the serial port you are using.

Hmmm. I think you are right, permissions are my issue, except its a bit more offtopic than this topic.

I have a USB serial device on /dev/ttyUSB0 on a KVM host, which I passed through as /dev/ttyS1 on the KVM guest, which openhab is running on.

Will look into fixing the permissions first.

Alright so I changed to passing through the USB device instead, which works with cu command line, which run as the uucp user.

root@openhab ~ # cu -l /dev/ttyUSB0 -s 9600 Connected. 90100032 Date Time JUL 01/16 1:43a11 90100032 Date Time JUL 01/16 1:44a12

Then updated things to:
Bridge dscalarm:it100:TTYUSB0 [ serialPort="/dev/ttyUSB0", baud=9600, pollPeriod=1 ] { Thing panel panel Thing partition partition1 [ partitionNumber=1 ] Thing zone zone1 [ partitionNumber=1, zoneNumber=1 ] Thing zone zone2 [ partitionNumber=1, zoneNumber=2 ] Thing zone zone3 [ partitionNumber=1, zoneNumber=3 ] Thing zone zone4 [ partitionNumber=1, zoneNumber=4 ] Thing zone zone5 [ partitionNumber=1, zoneNumber=5 ] Thing zone zone6 [ partitionNumber=1, zoneNumber=6 ] Thing zone zone7 [ partitionNumber=1, zoneNumber=7 ] Thing zone zone8 [ partitionNumber=1, zoneNumber=8 ] Thing keypad keypad }

However it seems it still doesnt want to work.

Log:
2016-04-18 16:13:12.036 [INFO ] [arthome.ui.paper.internal.PaperUIApp] - Started Paper UI at /ui 2016-04-18 16:13:12.234 [INFO ] [.dashboard.internal.DashboardService] - Started dashboard at /start 2016-04-18 16:13:12.290 [ERROR] [.discovery.EnvisalinkBridgeDiscovery] - discoverBridge(): Illegal Argument Exception - java.lang.IllegalArgumentException: Value [64] not in range (0,32] 2016-04-18 16:13:12.377 [INFO ] [basic.internal.servlet.WebAppServlet] - Started Basic UI at /basicui/app 2016-04-18 16:13:12.392 [INFO ] [assic.internal.servlet.WebAppServlet] - Started Classic UI at /classicui/app 2016-04-18 16:13:12.498 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'demo.sitemap' 2016-04-18 16:13:12.706 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'arkansas.sitemap' 2016-04-18 16:13:12.795 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'dscalarm.things' 2016-04-18 16:13:13.026 [INFO ] [smarthome.event.ThingAddedEvent ] - Thing 'dscalarm:it100:TTYUSB0' has been added. 2016-04-18 16:13:13.074 [INFO ] [smarthome.event.ThingAddedEvent ] - Thing 'dscalarm:panel:TTYUSB0:panel' has been added. 2016-04-18 16:13:13.082 [INFO ] [me.event.ThingStatusInfoChangedEvent] - 'dscalarm:it100:TTYUSB0' changed from UNINITIALIZED to INITIALIZING 2016-04-18 16:13:13.099 [INFO ] [me.event.ThingStatusInfoChangedEvent] - 'dscalarm:panel:TTYUSB0:panel' changed from UNINITIALIZED to INITIALIZING 2016-04-18 16:13:13.125 [INFO ] [smarthome.event.ThingAddedEvent ] - Thing 'dscalarm:partition:TTYUSB0:partition1' has been added. 2016-04-18 16:13:13.126 [INFO ] [me.event.ThingStatusInfoChangedEvent] - 'dscalarm:it100:TTYUSB0' changed from INITIALIZING to OFFLINE 2016-04-18 16:13:18.852 [ERROR] [rm.handler.DSCAlarmBaseBridgeHandler] - Not Connected to the DSC Alarm! 2016-04-18 16:13:18.876 [ERROR] [rm.handler.DSCAlarmBaseBridgeHandler] - sendCommand(): Command Not Sent - Invalid! 2016-04-18 16:13:24.145 [ERROR] [rm.handler.DSCAlarmBaseBridgeHandler] - Not Connected to the DSC Alarm! 2016-04-18 16:13:24.167 [ERROR] [rm.handler.DSCAlarmBaseBridgeHandler] - sendCommand(): Command Not Sent - Invalid! 2016-04-18 16:13:28.590 [ERROR] [ernal.discovery.IT100BridgeDiscovery] - discoverBridge(): No Message Read from Serial Port '/dev/ttyS0' 2016-04-18 16:13:29.437 [ERROR] [rm.handler.DSCAlarmBaseBridgeHandler] - Not Connected to the DSC Alarm! 2016-04-18 16:13:29.456 [ERROR] [rm.handler.DSCAlarmBaseBridgeHandler] - sendCommand(): Command Not Sent - Invalid! 2016-04-18 16:13:34.725 [ERROR] [rm.handler.DSCAlarmBaseBridgeHandler] - Not Connected to the DSC Alarm! 2016-04-18 16:13:34.747 [ERROR] [rm.handler.DSCAlarmBaseBridgeHandler] - sendCommand(): Command Not Sent - Invalid!

Alright so to ensure I am doing everything right, and it is not permissions ect, I went back and installed Openhab 1.8.2 and now everything is working 100%. I have the 8 Zones defined ect and can arm/disarm and so on in 1.8.2.

So either I am doing something wrong with the configs in Openhab 2, or there is something not working currently for the dscalarm binding when it comes to serial IT-100.

@rsstephens - now that I confirmed that I am able to get it working in Openhab 1.8.2 with my usb serial device, how can I debug this further to help find out why I can’t get it to work in Openhab2?

Tried with latest snapshot downloaded on 21 April 2016, using config:

Bridge dscalarm:it100:ttyUSB0 [ serialPort="/dev/ttyUSB0", baud=115200, pollPeriod=1 ]
{
    Thing panel panel
    Thing partition partition1 [ partitionNumber=1 ]
    Thing zone zone1 [ partitionNumber=1, zoneNumber=1 ]
    Thing zone zone2 [ partitionNumber=1, zoneNumber=2 ]
    Thing zone zone3 [ partitionNumber=1, zoneNumber=3 ]
    Thing zone zone4 [ partitionNumber=1, zoneNumber=4 ]
    Thing zone zone5 [ partitionNumber=1, zoneNumber=5 ]
    Thing zone zone6 [ partitionNumber=1, zoneNumber=6 ]
    Thing zone zone7 [ partitionNumber=1, zoneNumber=7 ]
    Thing zone zone8 [ partitionNumber=1, zoneNumber=8 ]
    Thing keypad keypad
}

I have changed my baud rate to 115200 and that worked with this config in Openhab 1.8.2:

root@openhab ~ # cat /opt/openhab182/configurations/openhab.cfg | grep dsc
#dscalarm:deviceType=it100
dscalarm:serialPort=/dev/ttyUSB0
dscalarm:baud=115200
#dscalarm:ip=
#dscalarm:tcpPort=
#dscalarm:password=
dscalarm:usercode=<removed>
#dscalarm:pollPeriod=

With debugging on:

2016-04-22 12:05:10.194 [DEBUG] [rm.handler.DSCAlarmBaseBridgeHandler] - DSC Alarm Polling Task - 'dscalarm:it100:ttyUSB0'
2016-04-22 12:05:10.196 [ERROR] [rm.handler.DSCAlarmBaseBridgeHandler] - Not Connected to the DSC Alarm!
2016-04-22 12:05:10.197 [DEBUG] [rm.handler.DSCAlarmBaseBridgeHandler] - onDisconnected(): Bridge Disconnected!
2016-04-22 12:05:10.198 [DEBUG] [rm.handler.DSCAlarmBaseBridgeHandler] - setBridgeConnection(): Set Bridge to OFFLINE
2016-04-22 12:05:10.200 [DEBUG] [arm.handler.DSCAlarmBaseThingHandler] - onBridgeDisconnected(): Bridge 'dscalarm:it100:ttyUSB0' disconnected
2016-04-22 12:05:10.201 [DEBUG] [arm.handler.DSCAlarmBaseThingHandler] - onBridgeDisconnected(): Bridge 'dscalarm:it100:ttyUSB0' disconnected
2016-04-22 12:05:10.201 [DEBUG] [arm.handler.DSCAlarmBaseThingHandler] - onBridgeDisconnected(): Bridge 'dscalarm:it100:ttyUSB0' disconnected
2016-04-22 12:05:10.201 [DEBUG] [arm.handler.DSCAlarmBaseThingHandler] - onBridgeDisconnected(): Bridge 'dscalarm:it100:ttyUSB0' disconnected
2016-04-22 12:05:10.202 [DEBUG] [arm.handler.DSCAlarmBaseThingHandler] - onBridgeDisconnected(): Bridge 'dscalarm:it100:ttyUSB0' disconnected
2016-04-22 12:05:10.202 [DEBUG] [arm.handler.DSCAlarmBaseThingHandler] - onBridgeDisconnected(): Bridge 'dscalarm:it100:ttyUSB0' disconnected
2016-04-22 12:05:10.203 [DEBUG] [arm.handler.DSCAlarmBaseThingHandler] - onBridgeDisconnected(): Bridge 'dscalarm:it100:ttyUSB0' disconnected
2016-04-22 12:05:10.203 [DEBUG] [arm.handler.DSCAlarmBaseThingHandler] - onBridgeDisconnected(): Bridge 'dscalarm:it100:ttyUSB0' disconnected
2016-04-22 12:05:10.204 [DEBUG] [arm.handler.DSCAlarmBaseThingHandler] - onBridgeDisconnected(): Bridge 'dscalarm:it100:ttyUSB0' disconnected
2016-04-22 12:05:10.205 [DEBUG] [arm.handler.DSCAlarmBaseThingHandler] - onBridgeDisconnected(): Bridge 'dscalarm:it100:ttyUSB0' disconnected
2016-04-22 12:05:10.205 [DEBUG] [arm.handler.DSCAlarmBaseThingHandler] - onBridgeDisconnected(): Bridge 'dscalarm:it100:ttyUSB0' disconnected
2016-04-22 12:05:10.205 [DEBUG] [.dscalarm.handler.IT100BridgeHandler] - openConnection(): Connecting to IT-100
2016-04-22 12:05:10.235 [ERROR] [rm.handler.DSCAlarmBaseBridgeHandler] - sendCommand(): Command Not Sent - Invalid!
2016-04-22 12:05:10.236 [DEBUG] [.dscalarm.handler.IT100BridgeHandler] - closeConnection(): Closing Serial Connection!
2016-04-22 12:05:10.341 [DEBUG] [.dscalarm.handler.IT100BridgeHandler] - close(): Serial Connection Closed!

I noticed in your 1.8.2 config you have the user code set, but not in the 2.0 config. You could try setting that and see if that works. It would be something like this:

Thing panel panel [userCode="usercode"]

Ah was wondering where to add that. It was only needed though to be able to disarm the alarm in 1.8.2, I could see the zone activity ect without it.

Unfortunately it seems that setting didnt help me to get it to connect.

2016-04-22 12:58:50.417 [INFO ] [el.core.internal.ModelRepositoryImpl] - Refreshing model 'dscalarm.things'
2016-04-22 12:58:50.434 [DEBUG] [ernal.factory.DSCAlarmHandlerFactory] - createThing(): IT100_BRIDGE: Creating an 'dscalarm:it100' type Thing - ttyUSB0
2016-04-22 12:58:50.435 [DEBUG] [ernal.factory.DSCAlarmHandlerFactory] - createThing(): PANEL_THING: Creating 'dscalarm:panel' type Thing - panel
2016-04-22 12:58:50.442 [DEBUG] [ernal.factory.DSCAlarmHandlerFactory] - createThing(): PARTITION_THING: Creating 'dscalarm:partition' type Thing - partition1
2016-04-22 12:58:50.445 [DEBUG] [ernal.factory.DSCAlarmHandlerFactory] - createThing(): ZONE_THING: Creating 'dscalarm:zone' type Thing - zone1
2016-04-22 12:58:50.448 [DEBUG] [ernal.factory.DSCAlarmHandlerFactory] - createThing(): ZONE_THING: Creating 'dscalarm:zone' type Thing - zone2
2016-04-22 12:58:50.451 [DEBUG] [ernal.factory.DSCAlarmHandlerFactory] - createThing(): ZONE_THING: Creating 'dscalarm:zone' type Thing - zone3
2016-04-22 12:58:50.453 [DEBUG] [ernal.factory.DSCAlarmHandlerFactory] - createThing(): ZONE_THING: Creating 'dscalarm:zone' type Thing - zone4
2016-04-22 12:58:50.456 [DEBUG] [ernal.factory.DSCAlarmHandlerFactory] - createThing(): ZONE_THING: Creating 'dscalarm:zone' type Thing - zone5
2016-04-22 12:58:50.458 [DEBUG] [ernal.factory.DSCAlarmHandlerFactory] - createThing(): ZONE_THING: Creating 'dscalarm:zone' type Thing - zone6
2016-04-22 12:58:50.461 [DEBUG] [ernal.factory.DSCAlarmHandlerFactory] - createThing(): ZONE_THING: Creating 'dscalarm:zone' type Thing - zone7
2016-04-22 12:58:50.463 [DEBUG] [ernal.factory.DSCAlarmHandlerFactory] - createThing(): ZONE_THING: Creating 'dscalarm:zone' type Thing - zone8
2016-04-22 12:58:50.466 [DEBUG] [ernal.factory.DSCAlarmHandlerFactory] - createThing(): KEYPAD_THING: Creating 'dscalarm:keypad' type Thing - keypad
2016-04-22 12:58:50.475 [DEBUG] [rm.handler.DSCAlarmBaseBridgeHandler] - Stopping DSC Alarm Polling Task.
2016-04-22 12:58:50.475 [DEBUG] [.dscalarm.handler.IT100BridgeHandler] - closeConnection(): Closing Serial Connection!
2016-04-22 12:58:50.475 [DEBUG] [.dscalarm.handler.IT100BridgeHandler] - Initializing the DSC IT100 Bridge handler.
2016-04-22 12:58:50.476 [DEBUG] [.dscalarm.handler.IT100BridgeHandler] - IT100 Bridge Handler Initialized.
2016-04-22 12:58:50.477 [DEBUG] [.dscalarm.handler.IT100BridgeHandler] -    Serial Port: /dev/ttyUSB0,
2016-04-22 12:58:50.477 [DEBUG] [.dscalarm.handler.IT100BridgeHandler] -    Baud:        115200,
2016-04-22 12:58:50.477 [DEBUG] [.dscalarm.handler.IT100BridgeHandler] -    Password:    null,
2016-04-22 12:58:50.477 [DEBUG] [.dscalarm.handler.IT100BridgeHandler] -    PollPeriod:  1,
2016-04-22 12:58:50.477 [DEBUG] [rm.handler.DSCAlarmBaseBridgeHandler] - Starting DSC Alarm Polling Task.
2016-04-22 12:58:50.478 [DEBUG] [rm.handler.DSCAlarmBaseBridgeHandler] - DSC Alarm Polling Task - 'dscalarm:it100:ttyUSB0'
2016-04-22 12:58:50.478 [ERROR] [rm.handler.DSCAlarmBaseBridgeHandler] - Not Connected to the DSC Alarm!
2016-04-22 12:58:50.478 [DEBUG] [rm.handler.DSCAlarmBaseBridgeHandler] - onDisconnected(): Bridge Disconnected!
2016-04-22 12:58:50.478 [DEBUG] [rm.handler.DSCAlarmBaseBridgeHandler] - setBridgeConnection(): Set Bridge to OFFLINE
2016-04-22 12:58:50.478 [DEBUG] [arm.handler.DSCAlarmBaseThingHandler] - onBridgeDisconnected(): Bridge 'dscalarm:it100:ttyUSB0' disconnected
2016-04-22 12:58:50.479 [DEBUG] [arm.handler.DSCAlarmBaseThingHandler] - onBridgeDisconnected(): Bridge 'dscalarm:it100:ttyUSB0' disconnected
2016-04-22 12:58:50.479 [DEBUG] [arm.handler.DSCAlarmBaseThingHandler] - onBridgeDisconnected(): Bridge 'dscalarm:it100:ttyUSB0' disconnected
2016-04-22 12:58:50.479 [DEBUG] [arm.handler.DSCAlarmBaseThingHandler] - onBridgeDisconnected(): Bridge 'dscalarm:it100:ttyUSB0' disconnected
2016-04-22 12:58:50.479 [DEBUG] [arm.handler.DSCAlarmBaseThingHandler] - onBridgeDisconnected(): Bridge 'dscalarm:it100:ttyUSB0' disconnected
2016-04-22 12:58:50.479 [DEBUG] [arm.handler.DSCAlarmBaseThingHandler] - onBridgeDisconnected(): Bridge 'dscalarm:it100:ttyUSB0' disconnected
2016-04-22 12:58:50.479 [DEBUG] [arm.handler.DSCAlarmBaseThingHandler] - onBridgeDisconnected(): Bridge 'dscalarm:it100:ttyUSB0' disconnected
2016-04-22 12:58:50.479 [DEBUG] [arm.handler.DSCAlarmBaseThingHandler] - onBridgeDisconnected(): Bridge 'dscalarm:it100:ttyUSB0' disconnected
2016-04-22 12:58:50.479 [DEBUG] [arm.handler.DSCAlarmBaseThingHandler] - onBridgeDisconnected(): Bridge 'dscalarm:it100:ttyUSB0' disconnected
2016-04-22 12:58:50.479 [DEBUG] [arm.handler.DSCAlarmBaseThingHandler] - onBridgeDisconnected(): Bridge 'dscalarm:it100:ttyUSB0' disconnected
2016-04-22 12:58:50.479 [DEBUG] [arm.handler.DSCAlarmBaseThingHandler] - onBridgeDisconnected(): Bridge 'dscalarm:it100:ttyUSB0' disconnected
2016-04-22 12:58:50.480 [DEBUG] [.dscalarm.handler.IT100BridgeHandler] - openConnection(): Connecting to IT-100
2016-04-22 12:58:50.485 [INFO ] [smarthome.event.ThingUpdatedEvent   ] - Thing 'dscalarm:it100:ttyUSB0' has been updated.
2016-04-22 12:58:50.510 [ERROR] [rm.handler.DSCAlarmBaseBridgeHandler] - sendCommand(): Command Not Sent - Invalid!
2016-04-22 12:58:50.510 [DEBUG] [.dscalarm.handler.IT100BridgeHandler] - closeConnection(): Closing Serial Connection!
2016-04-22 12:58:50.617 [DEBUG] [.dscalarm.handler.IT100BridgeHandler] - close(): Serial Connection Closed!

Is there maybe a way to disable autodiscovery for the dscalarm module?

2016-04-22 13:07:33.436 [ERROR] [.dscalarm.handler.IT100BridgeHandler] - openConnection(): Port in Use Exception:
gnu.io.PortInUseException: org.openhab.binding.dscalarm.internal.discovery.IT100BridgeDiscovery
	at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:459)[160:org.openhab.io.transport.serial:2.0.0.201604180951]
	at org.openhab.binding.dscalarm.handler.IT100BridgeHandler.openConnection(IT100BridgeHandler.java:105)[159:org.openhab.binding.dscalarm:2.0.0.201604210102]
	at org.openhab.binding.dscalarm.handler.DSCAlarmBaseBridgeHandler.connect(DSCAlarmBaseBridgeHandler.java:142)[159:org.openhab.binding.dscalarm:2.0.0.201604210102]
	at org.openhab.binding.dscalarm.handler.DSCAlarmBaseBridgeHandler.polling(DSCAlarmBaseBridgeHandler.java:346)[159:org.openhab.binding.dscalarm:2.0.0.201604210102]
	at org.openhab.binding.dscalarm.handler.DSCAlarmBaseBridgeHandler$1.run(DSCAlarmBaseBridgeHandler.java:83)[159:org.openhab.binding.dscalarm:2.0.0.201604210102]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)[:1.8.0_77]
	at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)[:1.8.0_77]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)[:1.8.0_77]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)[:1.8.0_77]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[:1.8.0_77]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[:1.8.0_77]
	at java.lang.Thread.run(Thread.java:745)[:1.8.0_77]

If someone can give me a quick howto on setting up environment to be able to recompile the addon I am willing to play around to figure out why this binding never connects for me.

Also looking at https://github.com/openhab/openhab2-addons/blob/master/addons/binding/org.openhab.binding.dscalarm/src/main/java/org/openhab/binding/dscalarm/handler/IT100BridgeHandler.java
Line 102 onwards.

I am pretty sure, I must be hitting something that is not currently getting a catch message.

Hello @tinuva,

I’ve discovered a bug in the code. I plan on correcting it soon. Thanks.

1 Like

Awesome! Thank you very much. I see its already in your forked repo.

Hello @tinuva,

I have a JAR file saved here if you want to test it. Let me know what you think. Thanks.

Just want to say thankyou again for the JAR!

Continuing the discussion from DSC binding not connecting to IT-100:

Hi.

I see now I accidentally replied on the wrong topic, for that post.

Anyways, that CRC error only came up once, the 1st time after I started up OH2 on the IT100.
I think what happened is, it then synced in with the “timestamps” which was shown as not enabled, but was enabled if checking the serial port myself manually.

To end with, currently the binding is working, and I can see everything working now as I had it in OH 1.8.2.

Only thing missing, is the icons that you use in the examples on your github page where you commited the fixes. Though I think those are not standard with OH2.

1 Like