Skip to content

GaryFunk/smartknob-home-assistant-integration

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

75 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SmartKnob

This is an integration for Home Assistant. It provides a user interface for setting up and using ur SmartKnob with Home Assistant.

Introduction

This is an integration for Seedlabs.it´s SmartKnob. It allows for usage and setup of multiple SmartKnobs with Home Assistant. Through an easy to use user interface. The hardware is inspired by scottbez1´s SmartKnob project, but its functionalities are substantially different, as such, Scott's knob is not compatible with this project.

Current Features

  • Control and setup single SmartKnob
  • No yaml or automation setup neccessary all configurable from UI

Installation

Click to show installation instructions for Home Assistant

Easiest install is via HACS:

Open your Home Assistant instance and open a repository inside the Home Assistant Community Store.

HACS -> Integrations -> Three dots in the top right corner -> Custom repositories -> Add:

Notes:

  • HACS does not "configure" the integration for you. You must go to Configuration -> Integrations and add SmartKnob after installing via HACS.
  • The mqtt integration must be installed and configured in order for the SmartKnob integration to work. As manual configuration is required for the mqtt setup, this cannot happen automatically.

For manual installation for advanced users, copy custom_components/smartknob to your custom_components folder in Home Assistant.

Updating

Instructions on how to update will eventually be available here

Development

Click to show instructions for setting up ur Development Environment

If you are interestd in developing Home Assistant's SmartKnob Integration you will need three things:

  1. A working version of Home Assistant Core. We will use a local dockerized version.
  2. A MQTT Broker. We will use Mosquitto
  3. This repo, checked out locally, and all the building tools needed to compile it.

Pre-requirements

  1. Install Docker Desktop. Alternatively you can install docker, and make sure it's linked in your shell enviroment.
  2. We will be using Microsoft Visual Studio Code as the IDE of choice.
  3. Install Yarn . You will need it to compile the UI in this integration.

Set-up

  1. **INSTALL HOME ASSISTANT CORE**. Follow the instructions to install Home Assistant Core This will setup a local dockerized version of Home Assistant Core. A Visual Studio projet will also be initialized based on the clone Home Assistant Core repo. From Visual Studio menu select Terminal -> Run Task -> Run Home Assistant Core to start your docker instance of Home Assistant. You should now be able to see the instance running in Docker Desktop or by running doker ps
  2. **MQTT BROKER**: We recommend Mosquitto. Once installed, you can start the broker, with something along those lines : /usr/local/opt/mosquitto/sbin/mosquitto -c /usr/local/etc/mosquitto/mosquitto.conf. By default, Mosquitto runs unencrypted and unauthenticated. You can test the installation and ensure the server is running successfully by typing on a new terminal window mosquitto_sub -t topic/state to subscribe to a new topic/state, and in a third window, send a message by typing mosquitto_pub -t topic/state -m "Hello World"
  3. **SETUP INTEGRATION CODEBASE**. Checkout this codebase. [TODO] include here all the comments that are needed to compile the code.
  4. **UPDATE HOME ASSISTANT WITH THE SmartKnob INTEGRATION**.
      This repository generates a custom components, that needs to be moved to the home assistant running instance. To do so, you can type from command line docker cp path_to/smart-knob-home-assistant-integration/custom_components docker_name_instance:/workspaces/core/config , where docker name instance is the identifier that docker uses when booting a new image. This command will copy the content of the custom_components folder in this repo to the dockerized home assistant instance.
      Restart home assitant. From Visual Studio menu select Terminal -> Run Task -> Run Home Assistant Core to restart your instance.
      Login to home assistant (usually available at http://localhost:8123/). Go to Settings -> Devices and Services, and from the Integrations Tab, press the button 'Add Integration'. Select MQTT from the list, and when prompted use the following informations: host: host.docker.internal (or the ip of the machine where the MQTT broker is running) and port: 1883. (or the custom port used by the MQTT broker)
      From Setting -> Device and Services, select the tab Devices, and press the Add Device button. From the list select SmartKnob
      On the main menu on the right, you should see a new item called 'SmartKnob'.
  5. Done!
    • You have now everything you need to start developing for this integration.

Trello Board

https://trello.com/b/u4zme4hK/smartknob

About

Home Assistant integration for Seedlabs' Smart Knob device.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 57.4%
  • TypeScript 42.4%
  • Other 0.2%