Translations:API/1/ru

From Larnitech wiki page
Revision as of 08:43, 16 January 2022 by Rusanov (talk | contribs) (Created page with "API works through HTTP GET request, so you can work with your Larnitech server from browser, just sending requests from address string. Request: <syntaxhighlight lang="xml" li...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

API works through HTTP GET request, so you can work with your Larnitech server from browser, just sending requests from address string. Request:

1http://IPADDR:PORT/JSON_REQUEST

Where: IPADDR – ip address of your metaforsa or DE-MG; PORT – port for API plugin (you can get it from LT Setup=>Plugins=>API=>Configure button); JSON_REQUEST – request to server in json format. Fields of JSON_REQUEST:

  • "requestType" - Type of request:
    • “getDevicesList” – request for getting the list of all devices;
    • “getDeviceStatus” – request for getting device status;
    • “setDeviceStatus” – request for setting device status;
    • “setDeviceStatusRaw” – request for setting device status (status in hex format);
    • “getAllDevicesStatus” – request for getting all devices status.
  • “key” – key for API plugin (you can get it from LT Setup=>Plugins=>API=>Configure button).
  • “addr” – address of device.
  • “status” – status of device.

Examples of requests and responses: