https://github.com/eternityx/go-vee
https://github.com/eternityx/go-vee
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/eternityx/go-vee
- Owner: EternityX
- Created: 2025-01-02T01:14:35.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2025-01-02T07:03:05.000Z (5 months ago)
- Last Synced: 2025-04-10T19:43:33.128Z (about 2 months ago)
- Language: Go
- Size: 9.77 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# go-vee
Control Govee lights through a REST API written in Go.
## Endpoints
### Devices
`GET api/v1/devices`
Get a list of devices and their capabilities from the Govee cloud API.`GET api/v1/devices/lan`
Get a list of devices and their capabilities that are connected to your Local Area Network (LAN).---
### Control
`POST api/v1/devices/control`
You can make a request to `GET api/v1/devices` to get a list of capabilities for your devices.
Alternatively, you can [look at this reference](https://developer.govee.com/reference/get-you-devices) if you do not wish to use the Govee API at all.
Switch the light on
```json
{
"sku": "H6022",
"device": "XX:XX:XX:XX:XX:XX:XX:XX",
"capability": {
"type": "devices.capabilities.on_off",
"instance": "powerSwitch",
"value": 1
}
}
```Set brightness to 50%
```json
{
"sku": "H6022",
"device": "XX:XX:XX:XX:XX:XX:XX:XX",
"capability": {
"type": "devices.capabilities.range",
"instance": "brightness",
"value": 50
}
}
```Set the color to red
```json
{
"sku": "H6022",
"device": "XX:XX:XX:XX:XX:XX:XX:XX",
"capability": {
"type": "devices.capabilities.color_setting",
"instance": "colorRgb",
"value": 16711680
}
}
```