Translations:API/1/en

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: