govee-lan-control


Namegovee-lan-control JSON
Version 1.0.3 PyPI version JSON
download
home_pagehttps://github.com/srinivasansharath/govee_lan_control
SummaryA Python package to control Govee LED devices over the local network using multicast UDP packets.
upload_time2024-08-08 06:18:06
maintainerNone
docs_urlNone
authorSharath Srinivasan
requires_python>=3.6
licenseMIT
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Govee Lan Control Package

This package implements the Govee LED control sequences listed in - https://app-h5.govee.com/user-manual/wlan-guide. Multicast udp packets are used to identify a Govee LED device on the subnet. UDP control packets are used to control its state, color, brightness, etc.

This package has been developed and tested with only one Govee Device on the network i.e. SKU: H6056, https://us.govee.com/products/govee-rgbicww-wifi-bluetooth-flow-plus-light-bars; having multiple Govee devices on the network could cause issues with this package, and this feature will need to be implemented. (maybe once I buy my 2nd Govee device) 

## Installation
```pip install govee_lan_control```

## Usage

```
import time
import random
from govee_lan_control import GoveeLanDevice

# Init the device
led = GoveeLanDevice()

# if device is not found, exit
if led.isInitialized == False:
    exit()

# Print the discovered device
print(f"Discovered Govee LED device: {led.name} at IP: {led.ip} with MAC: {led.mac}")

# Turn on the LED
led.on()

# Set the brightness to 50%
led.brightness(50)

time.sleep(1)

# Set the color to white, and the color temperature to 9000K
led.color([255, 255, 255], 9000)

time.sleep(1)

# Set a random color
led.color(
    [random.randint(0, 255), 
    random.randint(0, 255), 
    random.randint(0, 255)], 
    9600)

time.sleep(1)

# Blink the LED twice
led.blink(2)

# Turn off the LED
led.off()
```


## Build and Publish

Clean up previous build
```$ python3 setup.py clean --all```

Build the package
``` $ python3 setup.py sdist bdist_wheel```

Publish the package to pypi.org
``` $ twine upload dist/* ```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/srinivasansharath/govee_lan_control",
    "name": "govee-lan-control",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": null,
    "keywords": null,
    "author": "Sharath Srinivasan",
    "author_email": "srinivasansharath@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/b0/16/bd73bdd8c1c7fe9240229bd2cf6e184ddd294fd6bfdf575079547760048c/govee_lan_control-1.0.3.tar.gz",
    "platform": null,
    "description": "# Govee Lan Control Package\n\nThis package implements the Govee LED control sequences listed in - https://app-h5.govee.com/user-manual/wlan-guide. Multicast udp packets are used to identify a Govee LED device on the subnet. UDP control packets are used to control its state, color, brightness, etc.\n\nThis package has been developed and tested with only one Govee Device on the network i.e. SKU: H6056, https://us.govee.com/products/govee-rgbicww-wifi-bluetooth-flow-plus-light-bars; having multiple Govee devices on the network could cause issues with this package, and this feature will need to be implemented. (maybe once I buy my 2nd Govee device) \n\n## Installation\n```pip install govee_lan_control```\n\n## Usage\n\n```\nimport time\nimport random\nfrom govee_lan_control import GoveeLanDevice\n\n# Init the device\nled = GoveeLanDevice()\n\n# if device is not found, exit\nif led.isInitialized == False:\n    exit()\n\n# Print the discovered device\nprint(f\"Discovered Govee LED device: {led.name} at IP: {led.ip} with MAC: {led.mac}\")\n\n# Turn on the LED\nled.on()\n\n# Set the brightness to 50%\nled.brightness(50)\n\ntime.sleep(1)\n\n# Set the color to white, and the color temperature to 9000K\nled.color([255, 255, 255], 9000)\n\ntime.sleep(1)\n\n# Set a random color\nled.color(\n    [random.randint(0, 255), \n    random.randint(0, 255), \n    random.randint(0, 255)], \n    9600)\n\ntime.sleep(1)\n\n# Blink the LED twice\nled.blink(2)\n\n# Turn off the LED\nled.off()\n```\n\n\n## Build and Publish\n\nClean up previous build\n```$ python3 setup.py clean --all```\n\nBuild the package\n``` $ python3 setup.py sdist bdist_wheel```\n\nPublish the package to pypi.org\n``` $ twine upload dist/* ```\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A Python package to control Govee LED devices over the local network using multicast UDP packets.",
    "version": "1.0.3",
    "project_urls": {
        "Homepage": "https://github.com/srinivasansharath/govee_lan_control"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "442db44714949765e77bfcbd123d054d1d0e646178aa1933f3a2a5ba42b87007",
                "md5": "1d54211d8408bd834eded4ae0ffe157b",
                "sha256": "d49ee389c3cfa7588b951ae701e495113321f3c4107f22feea90885f31df386c"
            },
            "downloads": -1,
            "filename": "govee_lan_control-1.0.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "1d54211d8408bd834eded4ae0ffe157b",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 5824,
            "upload_time": "2024-08-08T06:18:04",
            "upload_time_iso_8601": "2024-08-08T06:18:04.622462Z",
            "url": "https://files.pythonhosted.org/packages/44/2d/b44714949765e77bfcbd123d054d1d0e646178aa1933f3a2a5ba42b87007/govee_lan_control-1.0.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b016bd73bdd8c1c7fe9240229bd2cf6e184ddd294fd6bfdf575079547760048c",
                "md5": "f91fdbc5dfcf644a116d4dd28cf19ec9",
                "sha256": "9d020da0f447e1552e42ce3521fde165234918d9135bc979dbd2cbc8e8a1daca"
            },
            "downloads": -1,
            "filename": "govee_lan_control-1.0.3.tar.gz",
            "has_sig": false,
            "md5_digest": "f91fdbc5dfcf644a116d4dd28cf19ec9",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 4789,
            "upload_time": "2024-08-08T06:18:06",
            "upload_time_iso_8601": "2024-08-08T06:18:06.068169Z",
            "url": "https://files.pythonhosted.org/packages/b0/16/bd73bdd8c1c7fe9240229bd2cf6e184ddd294fd6bfdf575079547760048c/govee_lan_control-1.0.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-08-08 06:18:06",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "srinivasansharath",
    "github_project": "govee_lan_control",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "govee-lan-control"
}
        
Elapsed time: 0.30056s