Skip to content

An experiment in home automation via the Govee API

License

Notifications You must be signed in to change notification settings

mpearon/govee-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 

Repository files navigation

govee-api

The contents of this repository are a work in progress

Goal

High-level, I intend to further automate the Govee ecosystem. Initially, this will just be an exploratory practice. As I progress through the project, I might formalize my approach.

Instructions

Right now, this is a simple PowerShell module, so you just need to import it via Import-Module.

  • On first run of any functions, you will be prompted to enter your API key. This will be encrypted and stored in an environment variable in your user scope (Govee-API-Key). It will then be decrypted as required to assemble the headers.

Examples

  • Get device list: Get-GoveeDevice
  • Turn on device(s) from list: Get-GoveeDevice | Out-GridView -PassThru | Set-GoveeDevicePower -powerOn
  • Turn off device by name: Get-GoveeDevice -name 'Television Lights' | Set-GoveeDevicePower -powerOff
    • This use case also accepts wildcards or RegEx: Get-GoveeDevice -name '(.+)?Light' | Set-GoveeDevicePower -powerOff, Get-GoveeDevice -name 'Humid*' | Set-GoveeDevicePower -powerOff
  • Toggle device power by type: Get-GoveeDevice -type light | Set-GoveeDevicePower -toggle

To-do

  • Poll devices
    • via Get-GoveeDevice
  • Poll device state
    • via Get-GoveeDeviceState
  • Set device power state
    • via Set-GoveeDeviceState
  • Set other device states
  • Convert to class-based implementation
  • Add provisions for event subscription

About

An experiment in home automation via the Govee API

Topics

Resources

License

Stars

Watchers

Forks