Skip to content

Elgato Stream Deck plugin for simple control of Home Assistant devices, entities and services.

License

Notifications You must be signed in to change notification settings

Gunsmithy/StreamDeckHomeAssistant

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

StreamDeckHomeAssistant

Unofficial Elgato Stream Deck plugin for simple control of Home Assistant devices, entities and services.

Note

If you're reading this, you should probably check out cgiesche/streamdeck-homeassistant instead.
I created this project without doing a proper search of the Home Assistant forums for better options.
While I love my weekend creation and its simplicity, power users are probably better off with the above.
For those still curious, read on!

Installation

If you're at this repo, you're probably installing the plugin manually instead of through the store.
Luckily, that's still pretty easy to do! You just don't get automatic updates.

To install or update the plugin, simply pop on over to the Releases tab and download the latest *.streamDeckPlugin file.
All you have to do is run it and Stream Deck should launch, asking if you want to install.

Configuration

The most important setup to be done is on your Home Assistant Instance.
You need to enable the API Integration which also depends on the HTTP Integration.
Myself and the Home Assistant team both strongly recommend that you secure your instance when exposing APIs like this, even locally.
As it stands right now though, the plugin will connect to secure or insecure Home Assistant instances using a toggle during your Stream Deck setup.
Once the API is configured, secure or otherwise, you need a Long-Lived Access Token which can be retrieved from your Profile page.

After all that, just create any action button on your Stream Deck and provide the Hostname/IP with the Port on which the API is accesible, check the appropriate Secure button, enter your Token, and you will be ready to go!
Any change to the Endpoint, Secure button, or Token should result in a reconnect of the websocket/listing of entities again, just make sure to click away from the current field after typing/pasting your values.

Switch Setup GIF

Features

  1. Websocket API to ensure immediate state updates on your Stream Deck once Home Assistant detects them.
  2. Automatic listing of supported entities in Home Assistant for easy button setup.
  3. Call Service action with configurable JSON payload for any actions not natively supported by the plugin.

Supported Entities/Actions

Binary Sensor

Binary Sensor Off Icon Binary Sensor On Icon Show the status of a Binary Sensor and manually refreshing on press if you're the untrusting sort.

Cover

Cover Open Icon Cover Closed Icon Show the status of a Cover and toggle it between open/closed on press.

Light

Light Off Icon Light On Icon Show the status of a Light and toggle it between off/on on press. Does not currently support scene/brightness/colour changes.

Lock

Lock Unlocked Icon Lock Locked Icon Show the status of a Lock and toggle it between unlocked/locked on press.
Does not currently support locks with codes.

Switch

Switch Off Icon Switch On Icon Show the status of a Switch and toggle it off/on on press.

Call Service

Call Service Icon For anything not supported above, you can use the Call Service action!
The action will list all services much like the Home Assistant Developer Tools tab.
You can then select a service and specify an arbitrary JSON payload to send upon pressing the button.

Limitations

The main limitations with this plugin would probably be in terms of error handling and stability.
Right now the Websocket connection which is used to get state updates is instantiated when the plugin/Stream Deck application launches, or you change any of the configuration values.
Should the Websocket lose connection for any reason, such as temporary loss of connectivity on your computer or a reboot of Home Assistant, the Websocket will likely need to be restarted.
Either restart Stream Deck application or just toggle Secure from No back to Yes or vice versa and that should fix it.

Furthermore, the supported entities are basic, just supporting toggle functionality and no additional attributes.
That being said, the Call Service action exists to hopefully bridge the gap for any missing niche functionality.

This project was thrown together over a weekend using some of the provided sample code from Elgato.
I'm also much more used to Python and Typescript development than Javascript, so code quality is a little lacking and I may migrate this project to Typescript given the time.

Contribute!

We're all busy people, but I love Home Assistant and the Stream Deck for niche little use cases like this, so I will try to work on this project as often as I can.

If you find any bugs or have any suggestions, check out the Issues tab to see if someone else has already submitted it, and submit it yourself if not.
When doing so, if you are so inclined,

If so inclined, you're welcome to Fork the repo and submit any pull requests you desire and I will review them as soon as I can. As specified in the limitations, code quality isn't particularly stellar anyways, so there's a good chance it will be pretty frictionless to merge. :)

Lastly, I'm not strapped for cash or anything, but a little beer money always goes a long way too. ;)

paypal

About

Elgato Stream Deck plugin for simple control of Home Assistant devices, entities and services.

Resources

License

Stars

Watchers

Forks

Packages

No packages published