I have a DSC alarm system connected to my openhab2 system using envisalink3 module. I am having a hard time writing a rule for disarming my system. To disarm the system I use type in my code (for example) 1111 and the system disarms. To arm I hold either the arm away or arm stay for 2 seconds. Any ideas on what others have used for a rule? I am using a keyad widget that works for arming but I need a rule to disarm.
Have you defined the panel’s userCode? In your things:
Thing panel panel [ userCode=“xxxx”]
Then to disarm arm with user code (as defined by things above) in a rule:
You can see the alarm codes available: https://docs.openhab.org/addons/actions/dscalarm/readme.html
The docs confuse me a little as I think they aren’t up to date. You do not need the 1.x binding like that page says and you don’t need the action either which is what that page is for. I have ONLY the “dscalarm” binding installed via addons.cfg file on my 2.2 apt install. The dscalarm binding page makes no mention of this table.
Ultimately for this to work though, you must define a valid dsc user code for OH to use in your things. I would make a different one than you or others currently use so that you can track it.
Edit… I had put bridge config instead of panel usercode config
Ok I’ll give it a shot. Is it easier to create a rule through habmin? Or just write the code? I installed my bindings through habmin.
No clue. I don’t use any of those fandangled GUI’s
I do everything via conf files and vscode.
Im still confused on how to use a rule.
rule "DSC alarm Off"
What is entered under the when section? I am using the alarm keypad from lucky but cant get the off button to work.
Did you consider reading the Documentation?
I’m not familiar with Lucky’s keypad widget personally. My quick glance suggests it just stores your key presses into an item so that you can trigger a rule off of it? If so, you need to have your rule trigger off of this item changing and check to see if the item contains the proper digit combo.
The DSC binding does not allow you to send a pin to the alarm through code. It requires the pin be hard coded into the things definitions. As such, you can’t get the pin from this keypad widget and try to pass it to the alarm. All you could do is get the pin from the widget as a requisite to fire the rule which sends the disarm command to the panel using the hard coded pin of the things definition.
Hopefully that makes sense…
Being a newbie I guess I am still confused. I am not used to writing these text files since I mostly use the paper UI and habpanel. I have been starting to use habmin for installing bindings and such. I added the rules(exprimental) yesterday to see of writing a rule was simple. I am just teying to find a keypad that I can use with habpanel to arm and disarm my alarm panel. I am going to have to dig into the textural rules documentation(hopefully updated) and try and figure this out. Thanks for the insight.
It also seems that the only things I have in the openhab folders are the ones that I added just to use the sitemap function of the app on my android cell.
You mention the panels user code. Is this under the panel portion of the dsc alarm widget?
The applicable doc is: https://docs.openhab.org/addons/bindings/dscalarm/readme.html#thing-configuration
You need to define:
Thing panel panel [ userCode=“xxxx”]
where userCode is a valid code on your DSC system.
This code will be used by the binding for all code based activities against the alarm. (arm with code, disarm with code etc.)
If you have one touch arming(you do based on the fact that you can hold away and it starts arming), then you can arm without code from OH. Some people disable that function on their alarm and would then need to define this userCode line to be able to arm as well.
I cannot stress enough here that you are not going to be able to get a pin entered into a OH gui such as habpanel or basicui that gets passed to the panel. The binding doesn’t offer that. The only thing you can do is find some method to enter a pin into said UI’s that fires a rule which leverages the usercode defined in your things file.
I don’t mean to be rude but you are seemingly in over your head here. I want to enable learning as much as possible but you are struggling with the basics still and trying to do something advanced. You may want to learn more about how the system works and decide how you are going to use it… aka conf files or paperui, basicui or habpanel etc. before trying to get this widget working.
Lastly, experimental rules are not for you at this point IMHO. The experimental rules setup is very early stages and really is for advanced users more than anything to test during development. Eventually they could be a good method for newbies or people wanting a simpler rules structure but I don’t think it is anywhere near that right now and you are only asking for trouble. I could be off on this but that’s how I see ER at this point.
Thanks for the insight. And no I don’t feel you are being rude here. I don’t take stuff that personal just trying to learn something new. I think I am going to need toback off a little and like you said learn some of the basics. There are other widgets that I need to focus on such as weather, my thermostat and such. I will probably need to save this widget for last.
Thanks for the help.