PHPackages                             robstiles/ediplug - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. robstiles/ediplug

ActiveLibrary

robstiles/ediplug
=================

Package to communicate with EdiMax EdiPlug smart power plugs.

121PHP

Since Mar 18Pushed 11y ago1 watchersCompare

[ Source](https://github.com/kebian/ediplug)[ Packagist](https://packagist.org/packages/robstiles/ediplug)[ RSS](/packages/robstiles-ediplug/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

EdiPlug
=======

[](#ediplug)

A package to communicate with EdiMax EdiPlug smart power plugs.

This package will allow you to check the power status of your plug, turn it off and on as well as retrieve and set new power schedules.

A work in progress with basic functionality.

Example Code
------------

[](#example-code)

### Locating Plugs

[](#locating-plugs)

```
// Create the locator
$locator = new Locator();
// Spend 5 seconds looking for plugs
$plugs = $locator->scan(5);
foreach($plugs as $plug) {
	echo "MAC: $plug->mac\n" ;
	echo "Manufacturer: $plug->manufacturer\n";
	echo "Model: $plug->model\n";
	echo "Version: $plug->version\n";
	echo "IP Address: $plug->ip_address\n";
}
```

### Turning a Plug On or Off

[](#turning-a-plug-on-or-off)

```
// Create object with address, username and password.
$plug = new EdiPlug('192.168.1.100', 'admin', '1234');
// Turn it on
$plug->on();
// Turn it off
$plug->off()
// Or use its power property
$plug->power = true;
```

### Disable All Schedules

[](#disable-all-schedules)

```
	$plug = new EdiPlug('192.168.1.100', 'admin', '1234');

	// Get the week's schedule information from the plug.
	$week_schedule = $plug->schedule;

	// Cycle through each day
	foreach($week_schedule as $day => $day_schedule) {
		// Turn off all the schedules
		$day_schedule->enabled = false;
	}
	// Send new schedule back to the plug
	$plug->schedule = $week_schedule;
```

### Cycle Through Each Period for Tuesday

[](#cycle-through-each-period-for-tuesday)

```
	$plug = new EdiPlug('192.168.1.100', 'admin', '1234');

	// Get the week's schedule information from the plug.
	$week_schedule = $plug->schedule;

	// Cycle through each on/off period for Tuesday
	foreach($week_schedule[WeekSchedule::TUESDAY] as $period) {
		echo "On at $period->on, off at $period->off\n";
	}
```

### Set Power to Come On Friday 7pm - 11pm

[](#set-power-to-come-on-friday-7pm---11pm)

```
	$plug = new EdiPlug('192.168.1.100', 'admin', '1234');

	$week_schedule = $plug->schedule;

	$friday = $week_schedule[WeekSchedule::FRIDAY];
	$friday->add(TimePeriod::createFromTimes(
		Carbon::createFromTime(19,00),
		Carbon::createFromTime(23,00)
	));
	$friday->enabled = true;

	$plug->schedule = $week_schedule;
```

###  Health Score

21

—

LowBetter than 18% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/dc0c4756e2ae5439247dda639e0dca9de4e21ba0e15a5367797b5e9297991baf?d=identicon)[kebian](/maintainers/kebian)

---

Top Contributors

[![kebian](https://avatars.githubusercontent.com/u/251674?v=4)](https://github.com/kebian "kebian (14 commits)")

### Embed Badge

![Health badge](/badges/robstiles-ediplug/health.svg)

```
[![Health](https://phpackages.com/badges/robstiles-ediplug/health.svg)](https://phpackages.com/packages/robstiles-ediplug)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
