DSC Binding - how to send a command string similar to keypad

Dumb question.

Should I import something to the .rules file in order for sendDSCAlarmCommand to work?

I am getting an error:
Error during the execution of rule Update DSC time java.lang.RuntimeException: The name 'sendDSCAlarmCommand(<XStringLiteralImpl>)' cannot be resolved to an item or type.

I am using the jar from the link above, I tried also a fresh compile (as of today) cloned from GitHub…

Thanks in advance for any help…

@JjS

What does your rule look like?

Did you setup an item to trigger the rule?

rule "Update DSC time"
when
    Time cron "0 07 21 ? * *"
then
    logInfo("DSC","*****Updating time...")
    sendDSCAlarmCommand("010")
end

I havent tried that command yet, but will test.

Perhaps @rsstephens could comment further on this one.

I do not think it is command 010 specific, the same error I get with any command.

It seems my dsc.rules file does not recognize this command.

In import section I have:

import org.openhab.core.library.types.*
import java.util.Date

Silly question but you have the action bundle installed also?

@JjS Also try importing:

import org.openhab.model.script.actions.*

into your rules file

I knew I was missing something obvious - the action boundle was missing. The import is not necessary.

Thank you.

It seems that the 010 command has no effect on my control panel. Message is sent, confirmed with “500” but time stays the same. Then I get the timeout message:

2015-10-24 18:51:00.179 [INFO ] [org.openhab.model.script.DSC  ] - *****Updating time...
2015-10-24 18:51:00.590 [INFO ] [runtime.busevents             ] - PANEL_MESSAGE state updated to 500: A command has been received successfully.
2015-10-24 18:51:05.601 [INFO ] [runtime.busevents             ] - PANEL_MESSAGE state updated to 502: An error has been detected.
2015-10-24 18:51:05.602 [INFO ] [runtime.busevents             ] - PANEL_SYSTEM_ERROR state updated to 011: Keybus Transmit Time Timeout

I checked it also writing directly to Envisalink socked from the script:

    Connection established successfully.
Logging in to Envisalink...
  Password request
MSG: 005pass
  OK: 5000052A
  Logged in
Login completed sucessfully.
MSG: 010121212121280
  OK: 50001026
  System error: Keybus Transmit Time Timeout
MSG: 010121212121280

There are 4 seconds sleeps between each command sent. As you see, I try to set date to 12:12 12/12/12, message gets confirmed, but then I get Keybus Transmit Timeout (error 502 with code 11) - I suspect this is the reason why the command does not work.

I managed to set time from script by sending sequence of commands:

0711*6
0711code
071111414
0711050505

where code is MasterCode and I get time set to 14:14 on 05/05/05, but cannot figure out how to send this sequence for the dsc action as the last command has 7 bytes of data (splitting did not work).

Anyone has experienced simmilar ploblems with command 010? Any ideas hot to get it fixed?

Hello @JjS,

The 010 command isn’t going to work in the DSC Alarm binding how you would expect, using the SendDSCAlarmCommand. The DSC Alarm binding actually creates the time string from the internal clock of the openHAB server and sends that. This is because the internal API of the binding was designed to set the time, using command 010, from the web UI. Any string that you may input using the SendDSCAlarmCommand for the time string will basically be ignored. Also, all the commands that you try to send using SendDSCAlarmCommand are filtered through the internal API of the DSC Alarm binding. This includes the 071 command which is checked for string length and will not send the command if over 6 bytes. I suppose you could set the time on the openHAB server to what you need it to be and then do the 010 command - SendDSCAlarmCommand(“010”). Not sure how this would affect openHAB. Hope this helps to explain. Sorry for the inconvenience.

You are absolutely right, “010” has no arguments. This is clearly stated in documentation. I also double checked the source (./src/main/java/org/openhab/binding/dscalarm/internal/protocol/API.java, line 284, if I am not mistaken) to make sure that the format matches the specs of EVL-4 TPI - it does.

As my panel has very inacurate clock, I expect this command to adjust it periodicaly (once a day) to compensate the drift. I call it like this:

rule "Update DSC time"
when
    Time cron "0 0 18 ? * *"
then
    logInfo("DSC","*****Updating time...")
    sendDSCAlarmCommand('010')
end

The problem I guess is the timeout error I mentioned in my previous post.
The time on a server is right, synced with NTP, but “010” command has no effect. It tiggers 502 response with code 011: Keybus Transmit Time Timeout five seconds after the command is sent.

Any ideas?

Not sure if it makes a difference but maybe try using double quotes around 010 in the command.

Do not think so, command gets transmitted, acknowlegded, by no effect.

Not sure what the problem could be. Might be an issue with the Envisalink itself. Unfortunately the Envisalink documentation isn’t real descriptive about this system error, or any for that matter. You could try turning the Time Broadcast option ON to see if the system time is being transmitted from the Envisalink/DSC Alarm. Sorry I’m not much help on this.

Hello all,

I’m quite new to the OpenHAB comunity and looking for some answers, that I couldn’t find, regarding DSC Binding. Hope to get it here not to start a new discussion…

  • Can I use the DSC movement sensors (when the system is not armed) as a trigger in OpenHAB to activate another system lets say lights…
  • Do I understand correctly that DSC alarm action bundle works only with OpenHAB 1.8? I have 1.7 version…
  • In DSC alarm bundle Sitemap example there are specific “MyImages”, are they somewhere available to download or do you need to create them by yourself?

Thanks in advance,
Vaidas

@intruder82 Welcome! Let me see if I might be able to help with my somewhat limited experience (I have been using openhab for just over a year now I suppose) but absolutely love where the project is headed and the community that supports it.

Can I use the DSC movement sensors (when the system is not armed) as a trigger in OpenHAB to activate another system lets say lights.

Even though I do not have motions hooked up, they should be work like any other zone and if the zone state would be open or closed, so you could create a rule based on the change in state of that item

Do I understand correctly that DSC alarm action bundle works only with OpenHAB 1.8? I have 1.7 version…

You can use the action bundle with 1.7.x also, I am using it with 1.7.1 It wont be included in release until 1.8 though

In DSC alarm bundle Sitemap example there are specific “MyImages”, are they somewhere available to download or do you need to create them by yourself?

You can put any image you would like to use in the webapps/images folder and enter the image name with the item to link it, but I might be missing something…it is probably referencing custom images they downloaded. You can use any .png you like and just search the web, size will be scaled automatically

I can confirm, the zones can be monitored while system is not armed, so intruder system PIRs and contacts CAN be used for trigering actions in openHAB. However, there is a slight delay (say 0.2 seconds) comparing to the same PIR equiped with Fibaro universal sensor and reporting status via z-wave to OH.

I read status of the zones with
Contact ZONE3_GENERAL_STATUS "Bedroom" (DSCAlarmZones ) {dscalarm="zone:1:3:zone_general_status"}

It apparently takes some time for the control panel and envisalink to propagate the state to openHAB.

Hello @intruder82,

Welcome to the openHAB community.

Can I use the DSC movement sensors (when the system is not armed) as a trigger in OpenHAB to activate another system lets say lights…

You can use any zone to trigger another event through openHAB but, as @JjS mentioned, there is going to be that delay with the motion sensors. I haven’t tried this with my motion sensors but I have noticed the delay on the DSC Alarm system when they are triggered, so it may not be adequate if your looking for instant action to trigger a light.

Do I understand correctly that DSC alarm action bundle works only with OpenHAB 1.8? I have 1.7 version…

Yes you can use the DSC Alarm action with version 1.7 but you will also need to download the DSC Alarm binding for version 1.8, as that was modified to accommodate the new action.

In DSC alarm bundle Sitemap example there are specific “MyImages”, are they somewhere available to download or do you need to create them by yourself?

I used images acquired off the internet for my personal openHAB setup, and some of those examples on the wiki reflect that setup. I should probably change the wiki. As @ubergeek mentioned you could find images that would work for your setup or use openHAB native images. The images I used are free for personal use but I couldn’t upload them to openHAB because of copyrights.

Hope this helps.

Thank you all for replies!!

thanks for the confirmations. It seams I will need to try it out to see what the lag will be on my system if it’s less than 1s it should be usable. I tried the GENERAL_STATUS works fine only difficult to say what lag will there be with smart lights… they are still on the way…

@rsstephens thanks for the hint to update DSC alarm bundle to 1.8. Would have definitely lost an hour on that… Can you explain shortly this binding update. Is it enough to just download this bundle and overwrite in the addons folder or do I need to do something more? In online guide that I followed to install OpenHAB there was one command

sudo chown -hR openhab:openhab /usr/share/openhab

that I didn’t fully understood is this what needs to be done after every addon? (I’m new not only to OpenHAB but to unix to…)

For Images I was thinking that maybe I’m missing some of the functionality, thanks for the clarification, replaced it with default siren icon seems fine need to test it, don’t want to wake the neighborhood right now :slight_smile:

You can just overwrite the 1.7 bundles

Hello @intruder82,

Is it enough to just download this bundle and overwrite in the addons folder or do I need to do something more?

You can download the latest addon zip file from here. Then extract the DSC Alarm Binding and DSC Alarm Action JAR files to your openHAB addon folder. It will not overwrite your current binding version, because the name is different, so you will need to remove the older binding file. I have my openHAB server on a Windows based machine but I assume this procedure will work similarly in Unix/Linux.

In online guide that I followed to install OpenHAB there was one command

sudo chown -hR openhab:openhab /usr/share/openhab

that I didn’t fully understood is this what needs to be done after every addon?

This command is basically changing the ownership of the openHAB folder and all it’s subfolders/files to the openHAB user account and group. You shouldn’t have to run it again to make these changes.

Can you explain shortly this binding update.

This action adds the ability to send DSC commands to your alarm system using scripts and rules. Here is the wiki for the action that might help explain it in a little more detail.