Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/subutux/hud
Homeassistant UI Display
https://github.com/subutux/hud
Last synced: 30 days ago
JSON representation
Homeassistant UI Display
- Host: GitHub
- URL: https://github.com/subutux/hud
- Owner: subutux
- License: mit
- Created: 2016-10-08T22:32:11.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2018-12-02T22:56:32.000Z (almost 6 years ago)
- Last Synced: 2024-10-14T16:44:47.739Z (30 days ago)
- Language: CSS
- Size: 17.1 MB
- Stars: 6
- Watchers: 3
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Homeassistant UI Display
This is a UI for [home-assistant](http://home-assistant.io) i've
written for own use. It's main purpose is to be able to control
home-assistant from a pi with a touchscreen mounted on the wall.This project uses [pygame](http://pygame.org) as backed & the awesome
[pgu](https://github.com/parogers/pgu) for the GUI. Using a custom theme
& UI elements, I've tried to mimmick the web ui of home-assistant.## Screenshot
![images/screencast.png](images/screencast.gif)
![images/touchscreen.gif](images/touchscreen.gif)## features
* displaying group items
* switching on/off of lights
* displaying sensor data
* ~~Uses EventStream (`/api/stream`) for streaming updates~~
* Uses the websocket connection of Home Assistant for communication & updates
* Using `icon_font_to_png` to use the Material Design Icon font on the fly.
* Cool## Install
```bash
git clone https://github.com/subutux/HUD
# Install using pip
sudo pip3 install .# run the help
hud --help
```## Configuration
HUD needs a configuration file, ini-style. For Example:
```ini
[HomeAssistant]
Host = localhost
Port = 8123
Key = my-secret-password
SSL = True
```The first one speaks for itself, home assistant configuration.
## Auto start
When running on a pi, you probably want to auto start hud.
When installing hud, there are some extra files installed:- /etc/systemd/system/hud.service
A systemd service for starting up HUD
- /etc/default/hud.optsYour command line parameters for HUD
- /usr/local/sbin/hud.inita workaround for a problem with sseclient in systemd
About that last one,This is a work around for a nasty problem with
SSEClient/requests. The problem was that the requests with
'stream=True' would'nt initialize when hud is run directly from
systemd.> (Needs to be tested after switching to websockets)
For some weird reason running hud from this bash'wrapper' fixes
the annoyance.If someone has any idea why this is, let me know. I'm eager to know.
### Enabling service
To enable the service, run:
```bash
sudo systemctl enable hud.service
sudo systemctl daemon-reload
```## Arguments
```
usage: hud [-h] -c CONFIG [-f /dev/fbX] [-t /dev/input/eventX] [-n]
[-H host.name] [-p PORT] [-k KEY] [-s] [-v]
[-L {INFO,WARNING,ERROR,CRITICAL,DEBUG}] [-l LOGFILE]A pygame GUI for Home Assistant.
optional arguments:
-h, --help show this help message and exitConfiguration:
-c CONFIG, --config CONFIG
config file to use
-f /dev/fbX, --framebuffer /dev/fbX
Use this framebuffer as output for the UI (defaults to
window mode)
-t /dev/input/eventX, --touchscreen /dev/input/eventX
Enable touchscreen integration. Use this as event
input
-n, --no-display We don't have a display. Sets the SDL_VIDEODRIVER to
"dummy". Usefull for testing
--width The width of the display
--height The height of the displayHomeAssistant:
(optional) Parameters to override the config file-H host.name, --homeassistant host.name
The location of home-assistant
-p PORT, --port PORT the port to use for home-assistant (default: 8123)
-k KEY, --key KEY The api password to use (default: None)
-s, --ssl Use ssl (default false)Logging:
(optional) Logging settings-v, --verbose Log output
-L {INFO,WARNING,ERROR,CRITICAL,DEBUG}, --logLevel {INFO,WARNING,ERROR,CRITICAL,DEBUG}
Log level to use (default: ERROR)
-l LOGFILE, --logfile LOGFILE
Instead of logging to stdout, log to this file
```
## DisclamerDon't look at the code, it's ugly! You're always welcome to post a pull request
to make the code cleaner, or just give me some pointers. I love to learn more!