Hi,
I have issue in sending keys using REST API using swagger help file. I tried t use curl command as below
curl -X POST --header 'Content-Type: application/json' --header 'Accept: application/json' -d '{"keys":"76781"}' 'http://192.168.1.159:5000/api/v1/alarmdecoder/send?apikey=EXAMPLEA'
Webapp is working ok so far.
It gave me below error
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1997, in __call__
return self.wsgi_app(environ, start_response)
File "/opt/alarmdecoder-webapp/ad2web/app.py", line 128, in __call__
return self.app(environ, start_response)
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1985, in wsgi_app
response = self.handle_exception(e)
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1540, in handle_exception
reraise(exc_type, exc_value, tb)
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1982, in wsgi_app
response = self.full_dispatch_request()
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1614, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1517, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1612, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1598, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "/opt/alarmdecoder-webapp/ad2web/decorators.py", line 53, in wrapped_function
resp = make_response(f(*args, **kwargs))
File "/opt/alarmdecoder-webapp/ad2web/api/views.py", line 135, in wrapped
return f(*args, **kwargs)
File "/opt/alarmdecoder-webapp/ad2web/api/views.py", line 213, in alarmdecoder_send
keys = keys.replace("<S1>", AlarmDecoder.KEY_S1 )
AttributeError: type object 'AlarmDecoder' has no attribute 'KEY_S1'
Webapp version is v0.8.0 and firmware is latest stable firmware. Any help will be appreciated.
Regards
Skr25