background image

2N TELEKOMUNIKACE a.s., www.2n.cz

31/42

4.2.3.1 Call Dialling

URL:

https://<IP>/api/v1/call/dial?number=<sip_address>

HTTP method:

GET

Request body:

N/A

Response code:

Standard HTTP response code, treating syntactic errors

Response data:

{"data":{"success":true}}

4.2.3.2 Call Accept

Accepts currently ringing incoming call.

URL:

https://<IP>/api/v1/call/accept

HTTP Metoda:

GET

Request body:

N/A

Response code:

Standard HTTP response code, treating syntactic errors

Response data:

{"data":{"success":true}}

4.2.3.3 Call Termination

Terminates the active call.

URL:

https://<IP>/api/v1/call/hangup

HTTP method:

GET

Request body:

N/A

Response code:

Standard HTTP response code, treating syntactic errors

Response data:

{"data":{"success":true}}

Summary of Contents for Indoor Touch

Page 1: ...www 2n cz Indoor Touch API API guide Version 3 4 x...

Page 2: ...ademarks and or trademarks or brands protected by law 2N TELEKOMUNIKACE a s administers the FAQ database to help you quickly find information and to answer your questions about 2N products and service...

Page 3: ...pgrade 2 Purpose of Document 3 API 3 1 Architecture and Function 3 2 Hardware 3 3 API Functions 3 4 Installation 4 HTTP API 4 1 Interface 4 2 Commands 5 Supplementary Information 5 1 Directives Laws a...

Page 4: ...2N TELEKOMUNIKACE a s www 2n cz 4 42 1 Upgrade Date Version Changes 01 04 2015 1 0 First version 04 05 2015 1 1 Hardware section added 08 03 2016 2 0 x HTTP API section added...

Page 5: ...and helps share it with third party applications or can be used by a customer launcher 2N IndoorTouch HTTP API HA provides third party applications a possibility to configure and control selected sys...

Page 6: ...LEKOMUNIKACE a s www 2n cz 6 42 3 API 3 1 Architecture and Function 3 2 Hardware 3 2 1 Inputs and Outputs 3 3 API Functions 3 3 1 LEDs 3 3 2 GPIO 3 3 3 System 3 3 4 Licence 3 3 5 Ethernet 3 4 Installa...

Page 7: ...lidity check LED control etc and provides a function interface via the C library It communicates with the library via the Unix socket This library can be used by other C programs for update and recove...

Page 8: ...1 2 Digital Output Voh 3 3 V DC 0 33 mA GP_IN1 2 INPUT 1 2 Digital Input Vihmax 5 V DC 100 k GP_IO1 2 IN OUT 1 2 Digital Input Output Vihmax 3 3 V DC 100 serial resistor Voh 3 3 V DC 4 mA 100 serial...

Page 9: ...dditional effects of its own 3 3 1 1 Effect Adding 3 3 1 2 Effect Removing 3 3 1 3 Effect Activation 3 3 1 4 Effect Deactivation 3 3 1 5 Effect Existence 3 3 1 6 Effect Enable 3 3 1 7 Display Backligh...

Page 10: ...tion for red LED blinking IndoorTouch LedsAddEffect test r LED_EFFECT_CONTINUITY_REPEATING 0 2 55 1000 255 0 1000 LED_RED LED_RED LED_GREEN LED_BLUE The library includes a pre defined effect red blink...

Page 11: ...n value is as follows IndoorTouch RC_OK 0 IndoorTouch RC_ERR_CONN 1 API daemon connection error IndoorTouch RC_ERR_NOTEXIST 4 the effect name does not exist IndoorTouch RC_ERR_DENIED 7 notifications a...

Page 12: ...n the selected database 3 3 1 6 Effect Enable int IndoorTouch LedsEffectsEnable boolean enable Effects are enabled by default If disabled effect activation is ignored and all the effects are switched...

Page 13: ...ons IndoorTouch GPIO_PIN_IN1 0x01 IndoorTouch GPIO_PIN_IN2 0x02 IndoorTouch GPIO_PIN_OUT1 0x04 IndoorTouch GPIO_PIN_OUT2 0x08 IndoorTouch GPIO_PIN_IO1 0x10 IndoorTouch GPIO_PIN_IO2 0x20 IndoorTouch GP...

Page 14: ...process can read the value but the setting ends with R C _ E R R _ L O C K E D The return value is as follows IndoorTouch RC_OK 0 IndoorTouch RC_ERR_CONN 1 API daemon connection error IndoorTouch RC_...

Page 15: ...be read etc IndoorTouch RC_ERR_DENIED 7 GPIO does not exist or is unswitchable 3 3 2 6 Switchable GPIO Direction Setting int IndoorTouch GPIOSetDirection int pin int direction Sets the direction of th...

Page 16: ...ed by Java daemon communication intervals an auxiliary nested static class is available for detection of IndoorTouch GPIOWatcher GPIO value changes When its instance is created starts a IndoorTouch GP...

Page 17: ...is disabled and CPU scaling enabled the module reduces the CPU rate from 1 Ghz to 300 Mhz Enable disable this functionality with the following command int IndoorTouch SysEnableCPUDownscale boolean en...

Page 18: ...rTouch SysSetMaxTemperature float tempDeg where temperature in Celsius degrees is the argument The GUI can get the current temperature value using the following function float IndoorTouch SysGetDevice...

Page 19: ...the product key in the following format The function unpacks information into the IndoorTouch LicInfo static class static public class LicInfo public boolean valid public int hours public int flags Va...

Page 20: ...e method 2N IndoorTouch returns Otherwise is returned false true 3 3 5 Ethernet As Android JB basic version supports only DHCP Ethernet setting and there are no such support and UI settings options in...

Page 21: ...y n o t b e i n c l u d e d gateway If a system error occurs the method will return null 3 3 5 2 DHCP Active Network Setting The call activates the Ethernet interface with a dynamically retrieved add...

Page 22: ...oped applications in Eclipse or AndroidStudio include the IndoorTouch java source code file to your project using path src java android After that import this file to your source code using hardware I...

Page 23: ...utput Value Setting 4 2 3 2N IP Mobile Control 4 2 3 1 Call Dialling 4 2 3 2 Call Accept 4 2 3 3 Call Termination 4 2 3 4 Call State 4 2 3 5 2N IP Intercom List Getting 4 2 3 6 Getting 2N IP intercoms...

Page 24: ...xecution request and the server sends a response The request consists of URL and optional data in the following format https IP api v1 subsystem parameters IP is the IDT IP address subsystem designate...

Page 25: ...ny reasons At present the HTTP API cannot distinguish errors and specific error messages will be implemented in the next versions if necessary The short list of potential errors is as follows Request...

Page 26: ...e obvious when the user enters another request via the web and is forwarded to the login dialogue This means that the web is used by another user and data might be overwritten HTTP API has no such lim...

Page 27: ...ord URL https IP api v1 login HTTP method PUT Request body login username password password Response code 200 if everything is OK otherwise 401 405 Response data N A In case the solution requires the...

Page 28: ...hod GET Request body N A Response code 200 if everything is OK otherwise 401 405 Response data N A 4 2 2 GPIO 4 2 2 1 GPIO List Getting 4 2 2 2 Input Value Getting 4 2 2 3 Output Value Setting 4 2 2 1...

Page 29: ...tting Get the input value and or switchable IO direction Name GPIO name refer to 4 2 2 1 Type can have the values value direction Z sk n seznamu GPIO vstup a v stup GPIO name in1 in2 type value Value...

Page 30: ...be false if GPIO is locked for setting via another application URL https IP api v1 gpio action set name string type string value bit HTTP method GET Request body N A Response code Response data data s...

Page 31: ...4 2 3 2 Call Accept Accepts currently ringing incoming call URL https IP api v1 call accept HTTP Metoda GET Request body N A Response code Standard HTTP response code treating syntactic errors Respons...

Page 32: ...dByRemote EarlyUpdating Refer to for more information http www linphone org URL https IP api v1 call status HTTP method GET Request body N A Response code Standard HTTP response code treating syntacti...

Page 33: ...293 name 2N IP Vario 4 2 3 6 Getting 2N IP intercoms Added to Devices Get the list of the added to the list of devices 2N IP intercoms URL https IP api v1 devices action get type add HTTP method GET R...

Page 34: ...treating syntactic errors Response data N A 4 2 3 8 Door Lock Activation Send a request to activate the door lock for a selected Make sure that 2N IP intercom the serial number is in the list of adde...

Page 35: ...ndard HTTP response code treating syntactic errors Response data data success true running boolean 4 2 3 11 2N IP Mobile Restart Restart if running and start if not running Once the 2N IP Mobile 2N IP...

Page 36: ...WCM9K 2TAIM os Android OS 4 2 2 sn 99 9999 9999 lanmac D0 39 72 1F 56 C8 freeStorage 989 MB totalMemory 496 MB keys APP LAUNCHER ROOT freeMemory 363 MB freeCache 88 MB system 2N Indoor Touch wifimac...

Page 37: ...data storage size totalMemory total available internal memory size keys licence keys for additional IDT functions namely APP possibility to install additional applications LAUNCHER possibility to swi...

Page 38: ...8 42 4 2 4 2 2N Indoor Touch Restart Restart the unit 2N Indoor Touch URL https IP api v1 maintenance resetdevice HTTP method GET Request body N A Response code Standard HTTP response code treatting s...

Page 39: ...2N TELEKOMUNIKACE a s www 2n cz 39 42 5 Supplementary Information 5 1 Directives Laws and Regulation General Instructions and Cautions...

Page 40: ...e or destruction of the product caused by incompetent replacement of parts or due to the use of reproduction parts or components The manufacturer shall not be liable and responsible for any loss or da...

Page 41: ...c Waste and Used Battery Pack Handling Do not place used electric devices and battery packs into municipal waste containers An undue disposal thereof might impair the environment Deliver your expired...

Page 42: ...2N TELEKOMUNIKACE a s www 2n cz 42 42 2N TELEKOMUNIKACE a s Mod ansk 621 143 01 Prague 4 Czech Republic Phone 420 261 301 500 Fax 420 261 301 599 E mail sales 2n cz Web www 2n cz v3 4 x...

Reviews: