定制 augustofagioli/ewelinkapiphp 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

augustofagioli/ewelinkapiphp

Composer 安装命令:

composer require augustofagioli/ewelinkapiphp

包简介

API connector for Sonoff/eWeLink devices

README 文档

README

🔗 Download latest release

Install by composer

composer require pjanisio/ewelink-api-php

eWeLink API PHP is a connector for Sonoff / eWeLink devices. This library allows you to interact with your eWeLink-enabled devices from your browser.

Requirements

  • PHP 7.4+

Current features

  • get all devices list with their parameters using deviceId or deviceName from ewelink app
  • saving devices data and other outputs from API to .json
  • search for any value of each device (f.e switch status, productName, MAC etc.)
  • set any parameter/state of device using HTTP gateway or websockets
  • set parameter for multi-channel devices (like 4CH Pro)
  • update power parameters like current, voltage, power for electricity monitoring devices
  • debug all requests and responses to debug.log

Documentation

Go to Wiki Pages to get started read about possible methods.

Example

This is a single case example to turn on device.

Look at Wiki Pages to get knowledge of how to start and other methods.

<?php
$deviceId = 'your_device_id';

$params = ['switch' => 'on']; 
$statusUpdateResult = $devices->setDeviceStatus($deviceId, $params);

echo $statusUpdateResult;

Ready to deploy Device Monitoring application

Please see example app written based on this class that checks and update chosen parameters in real time (using asynchronous calls) using both HTTP and websocket method alltogether.

Device Monitoring APP

screencapture-nastran-org-modules-dev-ewelink-index-html-2024-07-05-07_01_19

Tech info

Visit wiki page for devs: devs-wiki

统计信息

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

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 6
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-07-05