DIY Projects

Home Assistant. Essential plugins to install. Samba, HACS, File Editor, MQTT Mosquitto

Home Assistant has a plugin system called Add-on which allows you to add very advanced features to your home automation server directly from an Add-on Store. Among all the addons offered, several are essential to take full advantage of HASS. Samba Share to easily install and edit files from a Windows, macOS or Linux PC. File Editor to create, edit, upload YAML files directly from the web interface. HACS, an extension that allows you to install plugins, themes and automations developed by the user community. The MQTT Mosquitto broker to integrate connected objects, essential for example for Tasmota or Espurna.

 

Depending on the platform on which HASS is installed, some add-ons are not available. For example the Visual Studio Code editor is not available on Raspberry Pi while it is on a Synology NAS.

Plugin HACS (Home Assistant Community Store)

Apart from the official extensions accessible directly from the Supervisor’s Add-on Store , there is the Home Assistant Community Store (HACS) extension which makes it possible to very easily install the add-ons developed by the user community. This is probably the extension to install first on your HASS home automation server. HACS is unfortunately not – yet – available as an Add-on from the official store. So you have to install it manually and have a GitHub account (free). Nothing complicated but it’s too long to include it in this tutorial. Go to the article below to install HACS step by step.

With HACS, you can easily install themes to customize the interface, components (integration) and automation scripts (automation).

Add new repositories to the Add-on Store

The number of official plugins is quite limited compared to plugins developed by the user community. If you find that installing HACS is too complicated, you can manually add repositories to the Add-on Store such as add-ons community

Open supervisor

Open the menu (three vertical dots) then Repositories

Paste the url to the desired repository then click on ADD

If the url is correct, you need to get info about the repository. Click on the trash can to delete the deposit in case of error.

Reload the awning using the Reload menu option.

Here you have new extensions for Home Assistant that are easy to install / uninstall

Some useful repositories

Install the File Editor add-on (old Configurator), the file manager

The Add-On File Editor is an essential plugin which allows you to create folders and files (scripts, configuration, etc.) directly from Home Assistant’s WEB interface. File Editor also allows you to upload files to the Home Assistant server. All this is possible without having to grant SSH access or configure anything on the Docker (NAS, Raspberry Pi or other NUC).

Since version 4.3, the Configurator plugin has changed its name and is now called File Editor.

Open supervisor

Search for the keyword file editor

Click on the File Editor plugin icon. Click on Install to start the installation. No special configuration is necessary.

Once the add-on is installed, activate the options and launch the service by clicking on Start.

Once the LED is on, you can access the file editor from the HASS sidebar.

File Editor allows you to

File Editor does not allow

Install Samba Share, file sharing with Windows, macOS or Linux

File Editor allows you to perform most file operations directly from the Home Assistant web interface. Edit YAML files, create directory, upload / download files. The main limitation of File Editor remains the lack of an decompression tool. You can run Linux commands, but it’s much less easy than managing files from your PC or MAC.

Samba is a file sharing protocol that has been around since 1993. Samba allows access to Home Assistant files regardless of the system on which it is installed, and from any platform. Windows File Explorer, macOS Finder, or any Linux distribution’s file manager.

Open the Supervisor

Open the Add-on Store tab and search for the keyword samba.

Click on the plugin card and start the installation 

Once the installation is complete, open the configuration tab and change the following settings:

Click Save to save the configuration

Check Start on Boot and Auto update then start Samba by clicking on Start

Open the log to verify that everything is going well. You can also know the name of the share folder that will appear in File Explorer or Finder.

Open the config folder with Samba

Once the Samba service is successfully started, a few moments after starting the service, you should see a new folder appear on the network named homeassistant.

Open this folder by indicating your username and possibly the password (recommended)

Go to the config folder and create a new directory named themes (without accent). Paste the themes previously retrieved from GitHub in this new folder.

Install the MQTT Mosquitto broker

The Mosquitto broker developed by the community is deprecated. Mosquitto must be installed from the official Add-on Store.

Note. If you already have an MQTT broker installed on your Docker, you will need to deactivate it or use other ports (1883 or 8883) offered by default for the Home Assistant addon.

Once the installation is complete, you can protect access to Mosquitto with a user and a password. To do this, go to Configuration -> Users to create a new user.

Click on the plus at the bottom of the screen and enter the name of the new user. No need to give it administrator rights. Finish by clicking on create.

Go back to the MQTT broker configuration tab on the Add-on Store. Here is an example of a configuration where access to Mosquitto is protected by a password. Replace the username and password with the one created previously.

logins:
  - username: USER
    password: USER_PASSWORD
anonymous: false
customize:
  active: false
  folder: mosquitto
certfile: fullchain.pem
keyfile: privkey.pem
require_certificate: false

Check Start on boot and start the service by clicking on Start. If everything is correct the LED should light up

Once started, it remains to configure the MQTT component. Go to Configure -> Integration and click on Configure on the Mosquitto map.

Check Enable newly added entities to automatically add new home automation accessories discovered.

Attention, if you develop your own connected objects, you must respect a certain formalism detailed here.

To disable automatic discovery, open the menu (three vertical dots) then system options

There you have it, the MQTT broker is ready to go. You can use Node-RED or an application such as MQTT.fx to test. To go further with MQTT

Updates

2021/01/20 First published tutorial

Click to rate this post!
[Total: 1 Average: 5]
Exit mobile version