Skip to content
HTTP API server for controlling Telldus™-powered home automation systems.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
public
vendor
.gitignore
README.md
TelldusApi.php
TelldusCredentials.php.example
composer.json
composer.lock
composer.phar

README.md

telldus-nfc

Proxy service with a simple API for ad-hoc interaction with the Telldus home automation system. Useful for devices that cannot use OAuth to authenticate themselves against the official Telldus API.

Originally intented for accessing Telldus using URLs stored in low memory NFC tags, but can be used wherever Telldus interaction through plain HTTP/1.1 is required.

Installation

  1. Enter your Telldus API credentials in TelldusCredentials.php.example and rename the file to TelldusCredentials.php.
  2. Set your web server's webroot to the public/ folder.

Usage

All API endpoints are accessible using HTTP GET.

/devices

Lists all registered devices.

Returns a success indicator, and an array of registered devices.

Request
GET /devices
Response
{
  "success": true,
  "devices": [
    {
      "id": "1",
      "name": "Livingroom Lights"
    },
    {
      "id": "2",
      "name": "Coffee Maker"
    },
  ]
}

/device/{id}/on

Sends the turnOn command to the device.

Returns a success indicator.

Request
GET /device/1/on
Response
{
  "success": true
}

/device/{id}/off

Sends the turnOff command to the device.

Returns a success indicator.

Request
GET /device/1/off
Response
{
  "success": true
}

/device/{id}/toggle

Sends either the turnOn or the turnOff command to the device, depending on the last command received by the device.

Returns a success indicator, and what action was taken (one of on or off).

Request
GET /device/1/toggle
Response
{
  "success": true,
  "action": "on"
}
You can’t perform that action at this time.