2017 © Pedro Peláez
 

library domoticz-php

Library for connecting to Domoticz

image

rutgerkirkels/domoticz-php

Library for connecting to Domoticz

  • Wednesday, February 7, 2018
  • by rutgerkirkels
  • Repository
  • 2 Watchers
  • 1 Stars
  • 6 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 5 Versions
  • 0 % Grown

The README.md

DomoticzPHP

PHP Library for connecting to Domoticz, (*1)

With this library you can control lights, switches, thermostats and other home automation devices with PHP by connecting to Domoticz, the open-source Home Automation System., (*2)

Installation, (*3)

php composer.phar require rutgerkirkels/domoticz-php, (*4)

Basic usage, (*5)

// Initialize the Domoticz library with the hostname of the Domoticz machine.
// If you didn't set login credentials, you can leave the username and password
// attributes empty.

$client = new \rutgerkirkels\DomoticzPHP\Client('http://YOUR_DOMOTICZ_MACHINE:PORT', <USERNAME>, <PASSWORD>);

// Get all lights and switches
$lightsAndSwitches = $client->getDevices('light');

// Get the status of a device
$device = $client->getDeviceByIdx(<idx>);
echo $device->getStatus();

// When the device is a dimmer, get the current set level in percentages (return false of not a dimmer)
$level = $device->getLevel();

// Initiate a controller for this dimmer
$dimmerController = (new \rutgerkirkels\DomoticzPHP\Factories\ControllerFactory($device))->get();

// and turn it on...
$dimmerController->turnOn();

// and off again...
$dimmerController->turnOff();

The Versions

07/02 2018

dev-master

9999999-dev

Library for connecting to Domoticz

  Sources   Download

MIT

The Requires

 

The Development Requires

client home automation domotics domoticz

07/02 2018

dev-development

dev-development

Library for connecting to Domoticz

  Sources   Download

MIT

The Requires

 

The Development Requires

client home automation domotics domoticz

07/02 2018

v0.1.1-alpha

0.1.1.0-alpha

Library for connecting to Domoticz

  Sources   Download

MIT

The Requires

 

The Development Requires

client home automation domotics domoticz

04/02 2018

v0.1.0-alpha

0.1.0.0-alpha

Library for connecting to Domoticz

  Sources   Download

MIT

The Requires

 

The Development Requires

client home automation domotics domoticz

13/11 2016

v1.0.0

1.0.0.0

Library for connecting to Domoticz

  Sources   Download

MIT

The Requires

 

The Development Requires

client home automation domotics domoticz