Envirogreen Posted June 15, 2014 Posted June 15, 2014 I am looking to bring Elk functionality to irule through the ELK/ISY integration. In speaking with irule they use the ISY REST command for their ISY integration, and they suggested I use the same for the ELK. Sounds good, but I've hit a problem right out of the gate, how do I determine - it says fkId : Defined in elkobjs.xsd:uelk:FunctionKeyType, but I have no idea what that is. To create a button for #1 - I have the following - but need to figure out fkid. /rest/elk/keypad/1/cmd/press/funcKey/ Any help would be appreciated.
Michel Kohanim Posted June 15, 2014 Posted June 15, 2014 Hello Envirogreen, Function Key ID is a number from 1 to 8 corresponding to your F buttons on the keypad. With kind regards, Michel
Envirogreen Posted June 16, 2014 Author Posted June 16, 2014 So does that mean that kpid and fkid are the same thing? /rest/elk/keypad//cmd/press/funcKey/ Simulates pressing the fkId button on keypad given in kId kpId : Keypad number (1- fkId : Defined in elkobjs.xsd:uelk:FunctionKeyType So for F1, it would be /rest/elk/keypad/1/cmd/press/funcKey/ Also, with this covering function keys, is there a similar rest function for actual numbers 0-9? How about arm/disarm? Thank you, Jeff
Michel Kohanim Posted June 16, 2014 Posted June 16, 2014 Hi Jeff, Do you have access to wsdk? You can find it here: http://www.universal-devices.com/develo ... -4.2.4.zip Please go to WSDL directory, look for FunctionKeyType. There is a list with explanations. Here's the list in verbatim: Function Keys on a Keypad F1 F2 F3 F4 F5 F6 Data Stay Exit Chime Bypass ELK Down Up Right Left Star Pound With kind regards, Michel
MWareman Posted June 16, 2014 Posted June 16, 2014 So does that mean that kpid and fkid are the same thing? /rest/elk/keypad//cmd/press/funcKey/ Simulates pressing the fkId button on keypad given in kId kpId : Keypad number (1- fkId : Defined in elkobjs.xsd:uelk:FunctionKeyType So for F1, it would be /rest/elk/keypad/1/cmd/press/funcKey/ Also, with this covering function keys, is there a similar rest function for actual numbers 0-9? How about arm/disarm? Thank you, Jeff Not quite. It looks like keypad 1 function key 2 would be: /rest/elk/keypad/1/cmd/press/funcKey/2 My Elk is not setup at the moment, so I cannot test (between moving). Arm and Disarm are covered in the Elk integration manual (Area commands) at https://www.universal-devices.com/devel ... DK-ELK.pdf Michel - I assume this is the latest version available, and that this has not materially changed since 3.2.3. Michael.
Envirogreen Posted June 16, 2014 Author Posted June 16, 2014 That helps a lot! I'll hopefully get a few minutes to give this a try today. Thank you
Envirogreen Posted June 20, 2014 Author Posted June 20, 2014 So used exactly this /rest/elk/keypad/1/cmd/press/funcKey/2 in irules and it isn't working If you know rules I crated a new device called Elk M1, then under network code added a devoice code, and in the data field put in /rest/elk/keypad/1/cmd/press/funcKey/2 Attached this to a button and synced to my iPad. On the iPad created a new Gateway (ELK ISY) and mimicked the ISY gateway (as I couldn't at two items to the same gateway in irules), and then added the ELK m1 device to the ELK ISY With all that - no success.
MWareman Posted June 20, 2014 Posted June 20, 2014 Does the URL work with a web browser? If it does, you may have to seek irule help beyond what I know..... If not, what happens?
MWareman Posted June 20, 2014 Posted June 20, 2014 In a regular web browser, visit http://ISY.IP/rest/elk/keypad/1/cmd/press/funcKey/2 It should ask for your ISY username and password (if not already session authenticated) and perform the action. If it does what you need, then you have an irule issue (possibly authentication). If it does not work, then we need to dig more into the api documents. Michael.
Envirogreen Posted June 20, 2014 Author Posted June 20, 2014 it says failed to open page (using Safari - in case that makes any difference)
MWareman Posted June 20, 2014 Posted June 20, 2014 (using Safari - in case that makes any difference) Shouldn't, but I don't use Safari... I assume you at substituting the IP for your actual IP and that the HTTP port of your ISY is still the default of 80?
Envirogreen Posted June 20, 2014 Author Posted June 20, 2014 so user error, typo on the IP...with the correct IP I got the request for authentication and then this message This XML file does not appear to have any style information associated with it. The document tree is shown below. 404
MWareman Posted June 21, 2014 Posted June 21, 2014 Hmm... So something's wrong with the URL, or its structure. This clearly didn't work. Michel, do you see anything inconsistent with the documentation? My Elk is in a storage unit right now, until I can reinstall it in my (still being constructed) new home at the beginning of August, so I have nothing I can work with currently to try and figure this out. Hopefully, someone else with an active Elk can take a look, otherwise I will be able to continue then.
MWareman Posted June 21, 2014 Posted June 21, 2014 One thing to ask - the 'K' of funcKey is capitalized. I don't know if it makes a difference, just wanted to make sure you tried that.
J_Barrett Posted June 21, 2014 Posted June 21, 2014 i just tried it on my ISY (IP 192.168.1.238) Http://192.168.1.238/rest/elk/keypad/2/ ... /funcKey/2 For keypad 2 F2 and it works fine - Browser asks for user and and password and then triggers the Task This XML file does not appear to have any style information associated with it. The document tree is shown below. 200
Envirogreen Posted July 10, 2014 Author Posted July 10, 2014 I'm at a loss - http://192.168.2.16/rest/elk/keypad/1/cmd/press/funcKey/2, asks for sign in credentials, I enter them and still get the 404 response. Any thoughts on what could be causing the problem?
Envirogreen Posted November 8, 2014 Author Posted November 8, 2014 Picking this back up - I had network issues (the Elk and another device were sharing - not well - the same IP) So now all of the above works. I have the function keys working. I have Disarm working, but Arm isn't working. area/<areaId>/cmd/arm?armType=<elkArmType> &code=<accessCode> I filled in <areaId>=1, and <elkArmType>=1 but assuming that the arm type of 1 is not correct. Is there somewhere that I can find out what my options are? thank you
MWareman Posted November 9, 2014 Posted November 9, 2014 Arm type 1 is 'Arm Away'. http://wiki.universal-devices.com/index.php?title=ISY_Developers:API:REST_Interface#Area_Commands says the line should be '/rest/elk/area/[areaid]/cmd/arm?armType=[elkarmtype]&code=[accesscode]'. I assume you just truncated the beginning.
MWareman Posted November 9, 2014 Posted November 9, 2014 I just tried the above on my Elk, and it worked flawlessly.
MWareman Posted November 9, 2014 Posted November 9, 2014 Oh, the options are listed in the week: https://www.universal-devices.com/developers/wsdk/4.2.18/elkobjs.xsd
Envirogreen Posted November 11, 2014 Author Posted November 11, 2014 Thank you for the options link - that really let me progress a lot further. I now have all the buttons on he keypad programmed except for the numbers 0-9. Am I missing this in the documentation or is it not doable? One other question - I want to be able to query the content displayed on the screen, with the response being the text (so I can display it)....is that doable? Thank you for all of your great help
MWareman Posted November 11, 2014 Posted November 11, 2014 I believe you can only send function keys (not individual buttons), and set the text displayed. I do not believe you can retrieve the displayed text though - only the status of the keypad (armed/disarmed etc). The REST documentation is at http://wiki.universal-devices.com/index.php?title=ISY_Developers:API:REST_Interface#ELK_Integration
Recommended Posts
Archived
This topic is now archived and is closed to further replies.