PHPackages                             dutchie027/govee-api-v2 - 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. [API Development](/categories/api)
4. /
5. dutchie027/govee-api-v2

ActiveLibrary[API Development](/categories/api)

dutchie027/govee-api-v2
=======================

API Using Govee's newer OpenAPI Spec

v0.9.1(1y ago)2132MITPHPPHP ^8.0CI failing

Since Jan 1Pushed 1y ago1 watchersCompare

[ Source](https://github.com/dutchie027/govee-api-v2)[ Packagist](https://packagist.org/packages/dutchie027/govee-api-v2)[ RSS](/packages/dutchie027-govee-api-v2/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (6)Dependencies (8)Versions (8)Used By (0)

[![Latest Stable Version](https://camo.githubusercontent.com/7bef4d35173c02678e9c09fb0772672e88d62e5df02ab5ee5f9362c6161a3e2f/68747470733a2f2f706f7365722e707567782e6f72672f647574636869653032372f676f7665652d6170692d76322f76)](https://packagist.org/packages/dutchie027/govee-api-v2) [![Total Downloads](https://camo.githubusercontent.com/e7bcd9f6091894722601f73d639086b9dc2dd922421f977646d16d9b7b7f2d43/68747470733a2f2f706f7365722e707567782e6f72672f647574636869653032372f676f7665652d6170692d76322f646f776e6c6f616473)](https://packagist.org/packages/dutchie027/govee-api-v2) [![Latest Unstable Version](https://camo.githubusercontent.com/522a343f971a51d14cdc8c03969f3cae49066ceb89abe493b3adee822a394cee/68747470733a2f2f706f7365722e707567782e6f72672f647574636869653032372f676f7665652d6170692d76322f762f756e737461626c65)](https://packagist.org/packages/dutchie027/govee-api-v2) [![License](https://camo.githubusercontent.com/55382ff82f7d2a3b4743a42377ec118ac28c6b40a7f97c7c794692e6db8a1063/68747470733a2f2f706f7365722e707567782e6f72672f647574636869653032372f676f7665652d6170692d76322f6c6963656e7365)](https://packagist.org/packages/dutchie027/govee-api-v2) [![PHP Version Require](https://camo.githubusercontent.com/307a52286b6ae9004ffaf1a9dd882fe9d67c59e113760f4ed2834e73733104b9/68747470733a2f2f706f7365722e707567782e6f72672f647574636869653032372f676f7665652d6170692d76322f726571756972652f706870)](https://packagist.org/packages/dutchie027/govee-api-v2)[![CodeFactor](https://camo.githubusercontent.com/8869025adbec4d1c7f953f32e27fc4645207787bfff00703dae84a52f338bbc0/68747470733a2f2f7777772e636f6465666163746f722e696f2f7265706f7369746f72792f6769746875622f647574636869653032372f676f7665652d6170692d76322f6261646765)](https://www.codefactor.io/repository/github/dutchie027/govee-api-v2)

Govee PHP API v2
================

[](#govee-php-api-v2)

This is a rewrite of the Govee API I wrote a while back. Govee changed the API to be more robust, so I am rewriting the code to accommodate.

WORK IN PROGRESS
----------------

[](#work-in-progress)

NOTE: This is still a work in progress. As I commit more to it, it will become more stable, but for now it's not fully baked.

Requirements
------------

[](#requirements)

- PHP &gt;8

Installation
------------

[](#installation)

You can install the package using the [Composer](https://getcomposer.org/) package manager. You can install it by running this command in your project root:

```
composer require dutchie027/govee-api-v2
```

Basic Usage
-----------

[](#basic-usage)

### Set up the Environment Variables

[](#set-up-the-environment-variables)

Rename `.env.sample` to `.env` and set the variables accordingly.

### Instantiate the client

[](#instantiate-the-client)

To use any of the Govee API functions, you first need a connection reference. The connection refrence can then be fed to either the Lights library or the Plugs library, or even both if you have both Govee Lights and Plugs.

Using the full name:

```
// Ensure we have the composer libraries
require_once ('vendor/autoload.php');

// Instantiate & Connect
$govee = new dutchie027\GoveeApiV2\Connect();
```

Using a namespace:

```
// Ensure we have the composer libraries
require_once ('vendor/autoload.php');

// Namespace
use dutchie027\GoveeApiV2\Connect;

// Instantiate with defaults
$govee = new Connect();
```

### Get Device Count

[](#get-device-count)

```
print $govee->getDeviceCount();
```

### Get All Devices

[](#get-all-devices)

```
$array = $govee->getDeviceList();
```

NOTE: This function takes a boolean parameter. If the parameter is set to true it will return an array based on the Govee API. If it's set to false, it returns raw JSON.

### Get An Array of All Callable MAC Addresses

[](#get-an-array-of-all-callable-mac-addresses)

```
$macArray = $govee->getDeviceMACArray();
```

#### MAC Return Array

[](#mac-return-array)

```
Array
(
    [0] => A9:E9:0A:04:AD:CD:12:34
    [1] => FA:8F:50:B2:AD:A7:00:12
    [2] => E0:94:41:AC:62:13:56:78
)
```

### Get An Array of All Device Names

[](#get-an-array-of-all-device-names)

```
$nameArray = $govee->getDeviceNameArray();
```

#### Device Name Return Array

[](#device-name-return-array)

```
Array
(
    [0] => My-Living-Room
    [1] => Hallway
    [2] => Fire-House
)
```

Contributing
------------

[](#contributing)

If you're having problems, spot a bug, or have a feature suggestion, [file an issue](https://github.com/dutchie027/govee-api-v2/issues). If you want, feel free to fork the package and make a pull request. This is a work in progresss as I get more info and the Govee API grows.

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance41

Moderate activity, may be stable

Popularity16

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity38

Early-stage or recently created project

 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.

###  Release Activity

Cadence

Every ~1 days

Total

7

Last Release

493d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/6424f66fa0ca243cf585d30e65d4dbecb0272ecee4397df15b5d9a6fab448c6b?d=identicon)[dutchie027](/maintainers/dutchie027)

---

Top Contributors

[![dutchie027](https://avatars.githubusercontent.com/u/6707999?v=4)](https://github.com/dutchie027 "dutchie027 (37 commits)")

---

Tags

apiautomationgoveegovee-apilightsphpapicontrolhome automationlightsplugsgoveethermostats

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/dutchie027-govee-api-v2/health.svg)

```
[![Health](https://phpackages.com/badges/dutchie027-govee-api-v2/health.svg)](https://phpackages.com/packages/dutchie027-govee-api-v2)
```

###  Alternatives

[theodo-group/llphant

LLPhant is a library to help you build Generative AI applications.

1.5k311.5k5](/packages/theodo-group-llphant)[checkout/checkout-sdk-php

Checkout.com SDK for PHP

553.3M7](/packages/checkout-checkout-sdk-php)[convertkit/convertkitapi

Kit PHP SDK for the Kit API

2167.1k1](/packages/convertkit-convertkitapi)[manamine/php-eos-rpc-sdk

PHP SDK for the EOS RPC API

187.5k](/packages/manamine-php-eos-rpc-sdk)

PHPackages © 2026

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