承接 shadowroot2/gree_ac 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

shadowroot2/gree_ac

最新稳定版本:1.0

Composer 安装命令:

composer require shadowroot2/gree_ac

包简介

API for control Gree AC with WiFi module

README 文档

README

API to control Gree AC with WiFi by network

To make it work you should initialize connection to Gree+ with getting secret-key witch generating every time when you reset WiFi on Gree AC.

  1. Press Mode + WiFi button on remote of Gree AC (AC must beep once) and wait 2 minutes (AC will go to WiFi access point mode).
  2. Search Wifi AP with name like: f4211ede6d31 and connect your PC to it (WiFi password is: 12345678)
  3. Write simple script like finder.php:
<?php
  require_once 'vendor/autoload.php';

  $gree = new \Gree\GreeAC();
  $gree->setDebug(true); // If you want to see all
  
  print_r($gree->scan());
?>
  1. Run from console "php finder.php" you will see response:
Array
(
    [t] => dev
    [cid] => f4211ede6d31
    [bc] => gree
    [brand] => gree
    [catalog] => gree
    [mac] => f4211ede6d31
    [mid] => 10002
    [model] => gree
    [name] => 1ede6d31
    [series] => gree
    [vender] => 1
    [ver] => V1.1.13
    [lock] => 0
)
  1. Copy cid to somewhere
  2. To get bind key (secure key) write script like bind.php:
<?php
  require_once 'vendor/autoload.php';

  $gree = 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;
?>
  1. Run from console "php bind.php" you will see response: Secure key is: Lz5Op8Rs2Uv4Xy5A
  2. Save this key to somewhere
  3. Add AC to Gree+ app (it will add it to your WiFi router)
  4. Get IP address of AC from your WiFi router (for example it 192.168.10.3)
  5. Write simple script like test.php:
<?php
  require_once 'vendor/autoload.php';

  $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
?>

统计信息

  • 总下载量: 17
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 3
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 2
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: BSD-3-Clause
  • 更新时间: 2022-11-27

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固