Download the PHP package dutchie027/govee without Composer

On this page you can find all versions of the php package dutchie027/govee. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package govee

Govee PHP API

CodeFactor

A simple PHP package that allows you to control Govee Smart Lights using their API.

Requirements

Installation

You can install the package using the Composer package manager. You can install it by running this command in your project root:

Basic Usage

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.

Settings

The default settings are fine, however you might want to override the defaults or use your own.NOTE: All settings are optional and you don't need to provide any.

Field Type Description Default Value
log_dir string The directory where the log file is stored sys_get_temp_dir()
log_name string The name of the log file that is created in log_dir. If you don't put .log at the end, it will append it 6 random characters + time() + .log
log_tag string If you share this log file with other applications, this is the tag used in the log file govee
log_level string The level of logging the application will do. This must be either debug, info, notice, warning, critical or error. If it is not one of those values it will fail to the default warning

Connect (Core) Functions

Get Device Count

Get An Array of All Devices

Example Return Array

Get An Array of All Callable MAC Addresses

MAC Return Array

Get An Array of All Device Names

Device Name Return Array

Get the location of the log file

Example Return String

Lights Functions

Controlling Lights

To control lights, you first need to make a connection and then reference the connection

Once you've got a reference to the lights, it will preload all of the MAC Address(es) and name(s) of the devices.

Turning A Light ON

To turn a light on, simply feed it the MAC address or the name of the light.

Turning A Light OFF

Like turning a light on, to turn a light off, simply feed the MAC address or the name of the light.

Adjusting BRIGHTNESS of A Light

To adjust the brigthness, simply give the name or MAC and the brightness, an INT between 0 and 100.

Changing the COLOR of A Light

To adjust the color, simply give the name or MAC and the brightness and then feed the R, G, B colors you'd like the device to set itself to. NOTE the values for Red, Green and Blue must be between 0 and 255.

Changing the TEMPERATURE of A Light

To adjust the temperature, simply give the name or MAC and the name and then feed the temperature. NOTE Temperature must be an INT between 2000 and 9000.

Get the STATE of A Light

To get all of the details about a light, simply feed getDeviceState the name or the MAC address. You'll get a JSON return you can then either read or feed to json_decode and turn in to an array to use/read.

Plugs Functions

Turn On A Plug

Turn Off A Plug

Contributing

If you're having problems, spot a bug, or have a feature suggestion, file an issue. 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.


All versions of govee with dependencies

PHP Build Version
Package Version
Requires guzzlehttp/guzzle Version ^7.2
monolog/monolog Version ^2.1
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package dutchie027/govee contains the following files

Loading the files please wait ....