1. Go to this page and download the library: Download shadowroot2/gree_ac library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
shadowroot2 / gree_ac example snippets
e = new \Gree\GreeAC();
$gree->setDebug(true); // If you want to see all
print_r($gree->scan());
e = new \Gree\GreeAC();
$gree->setDebug(true); // If you want to see all
$gree->setCID('f4211ede6d31'); // Replace to your own cid
$key = $gree->getBindKey();
echo 'Secure key is: '.$key;
$gree = new \Gree\GreeAC('192.168.10.3', 'f4211ede6d31', 'Lz5Op8Rs2Uv4Xy5A'); // Replace values to yours
$gree->setDebug(true); // If you want to see all
print_r($gree->status()); // Will show current settings
print_r($gree->on()); // Switch on AC
sleep(3);
print_r($gree->off()); // Switch off AC
// ...etc
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.