Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mochipon/hassio-uhubctl
MQTT Bridge for uhubctl - control USB power per-port on smart USB hubs
https://github.com/mochipon/hassio-uhubctl
hassio-addons hassio-repository home-assistant home-automation uhubctl usb-hack usb-hub
Last synced: 21 days ago
JSON representation
MQTT Bridge for uhubctl - control USB power per-port on smart USB hubs
- Host: GitHub
- URL: https://github.com/mochipon/hassio-uhubctl
- Owner: mochipon
- License: mit
- Created: 2021-05-05T05:42:04.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-07-12T00:59:24.000Z (over 2 years ago)
- Last Synced: 2024-12-09T03:03:23.014Z (27 days ago)
- Topics: hassio-addons, hassio-repository, home-assistant, home-automation, uhubctl, usb-hack, usb-hub
- Language: Python
- Homepage:
- Size: 428 KB
- Stars: 7
- Watchers: 1
- Forks: 3
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Home Assistant Addon: MQTT Bridge for uhubctl
This project was spawned by the desire to control [`uhubctl`](https://github.com/mvp/uhubctl) from within Home Assistant.
This add-on takes advantage of the API provided by Home Assistant and is extremely easy to use. You no longer even need to set up credentials to connect to the MQTT server.
## Add-on Install Instructions
1. Navigate in your Home Assistant frontend to Supervisor -> Add-on Store.2. Click the 3-dots menu at upper right ... > Repositories and add this repository's URL: [https://github.com/mochipon/hassio-uhubctl](https://github.com/mochipon/hassio-uhubctl)
3. Scroll down the page to find the new repository, and click the new add-on named "MQTT Bridge for uhubctl"
4. Click Install and give it a few minutes to finish downloading.
5. Click Start, give it a few seconds to spin up.
## Configuration
By default, the add-on publishes telemetry data to the topic `tele/uhubctl/localhost`. Find the target hub you want to control by checking Vendor ID (`Vid`), Product ID (`Pid`), and number of ports of each hub.
Here is an example of a yaml entry in Home Assistant to control `Port 1` of `HUB3-4`.
```yaml
switch:
- platform: mqtt
name: USB Fan
unique_id: usb-fan
icon: "mdi:fan"
state_topic: "tele/uhubctl/localhost/HUB3-4/STATE"
value_template: "{{ value_json.POWER1 }}"
command_topic: "cmnd/uhubctl/localhost/HUB3-4/POWER1"
availability_topic: "tele/uhubctl/localhost/LWT"
payload_available: "Online"
payload_not_available: "Offline"
```