dodev34/sdk-domoticz-bundle

PHP Domoticz API Bundle for symfony.

Installs: 37

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 2

Forks: 1

Open Issues: 0

Type:symfony-bundle

1.0.0 2017-07-30 20:34 UTC

This package is not auto-updated.

Last update: 2024-09-24 18:12:38 UTC


README

Installation

with composer

$ composer require dodev34/sdk-domoticz-bundle

Configuration

in you AppKernel file app/AppKenel.php

public function registerBundles()
{
    $bundles = [
        // ...
        new M12U\Bundle\Sdk\DomoticzBundle\M12USdkDomoticzBundle(),
        // ...
    ];
    
    // ...
}

in your config file app/config/config.yml

m12_u_sdk_domoticz:
    username: YOU_USERNAME
    password: YOU_PASSWORD
    base_uri: http://<you ip domoticz address>:8080

Note :

Make sure you have entered a username and password in your Domoticz application

Services

exemple with log message command

$provider = $container->get('m12u.sdk.domoticz.provider_proxy');
$command = $provider->getClient('command');

$result = $command->addLogMessage("you message here");
// result {"status":"OK","title":"AddLogMessage"}

AddLogMessage

todo: Finish creating the proxy for the rest of the api endpoints official doc for domiticz : https://www.domoticz.com/wiki/Domoticz_API/JSON_URL%27s