Skip to content

Implementing custom Keystroke command #66

@adrianmihalko

Description

@adrianmihalko

I really want to implement custom Keystroke command.

So I started to search in this topic and I found that I need to send '071' command to Envisalink:

'071' Keystroke String 1-6 Characters - [1-6 ASCII Character String] Envisalink

I started with httpslistener.py:

elif request == 'disarm':
            #if parameters['alarmcode'] == None: raise tornado.web.HTTPError(404)
            response = {'response' : 'Request to disarm partition %s received' % parameters['partition']}
elif request == 'keystroke':
             response = {'response' : 'Custom keystroke for partition %s received' % parameters['partition']}
...
(r'/api/alarm/(arm|stayarm|armwithcode|disarm)', ApiAlarmHandler),
(r'/api/(refresh|pgm|keystroke)', ApiAlarmHandler),
   

envisalink.py, I added:

elif type == 'keystroke':
                self.send_command('071', str('*106#1234'))

(*106#1234 === *1 bypass 06 zone # usercode).

Then I tried:

$ curl "https://192.168.x.xx:8111/api/keystroke"
{"response": "Custom keystroke for partition 1 received"}

but nothing happens on the alarm. Is there anything that I am missing? 👍

(I have Envisalink 4 with DSC alarm).

Edit:

Oh, in the log I see:

May 05 23:03:10 - INFO: 200 GET /api/keystroke (192.168.xx.xx) 20.26ms
May 05 23:03:11 - DEBUG - core/envisalink.py:handle_line@134: RX < 502 - System Error 021

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions