# \[TUTORIAL\]\[PRO\] How to integrate Home Assistant with Homey Pro and v.v

**URL:** <https://community.homey.app/t/tutorial-pro-how-to-integrate-home-assistant-with-homey-pro-and-v-v/92641>\
**Category:** Tutorials\
**Tags:** app, mqtt, homey-pro, home-assistant, howto\
**Created:** [October 23, 2023, 8:01pm UTC](https://community.homey.app/t/tutorial-pro-how-to-integrate-home-assistant-with-homey-pro-and-v-v/92641 "2023-10-23T20:01:31Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![Peter\_Kawa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peter_kawa/32/173848_2.png) [@Peter\_Kawa](https://community.homey.app/u/Peter_Kawa)\
**Post date:** [October 23, 2023, 8:01pm UTC](https://community.homey.app/t/tutorial-pro-how-to-integrate-home-assistant-with-homey-pro-and-v-v/92641/1 "2023-10-23T20:01:31Z")

</div>

#### → Nederlandstalige versie → [klik hier](https://community.homey.app/t/tutorial-pro-home-assistant-integreren-met-homey/77587)

#### → Tutorial with examples of setting up HA from scratch, extended with zwave as example → [click me](https://community.homey.app/t/honeywell-t6-pro-zwave-help/114693/5)

It is not very easy to connect Home Assistant (or HA) with Homey _ **Pro** _ when you are new to it,  
hence this comprehensive guide.  
You can make it work! (At least I hope so 😁 )

When I forgot something, or something is wrong: feel free to point it out.

#### By default, all Homey devices are available @ HA after a successful connection using MQTT; BUT you need to install the desired HA devices on Homey, just like other devices need to be installed.

- Also I have added the optional “[How to install the HACS store](https://community.homey.app/t/tutorial-stappenplan-homey-koppelen-met-home-assistant/77587#optioneel-hacs-store-installeren-18)”

### For a first impression:

- The installed HA devices in Homey  

- A selection of Homey devices in HA  

- 
  - In the device overview, you can see that these devices are present @ HA via the MQTT integration:  
 ![Screenshot from 2023-10-23 22-09-18](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/5/6/56946b3a882479abc1a574c328cfe3ac0b6301d2.png)

## Run the following on Homey:

### - MQTT Hub app

> **Click here**
>
> - Install this app:  
> ~~[https://homey.app/a/nl.hdg.mqtt/](https://homey.app/a/nl.hdg.mqtt/test)~~  
> [https://community.homey.app/t/app-pro-mqtt-hub-community-version/113463](https://community.homey.app/t/app-pro-mqtt-hub-community-version/113463)
> 
> - Configuration:  
> On the mobile app, go to …More → Apps → MQTT Hub → Cogwheel → App Settings  
> Copy the settings from the screen as shown below, and save.
> 
> - 
> - **For the Pro 2023** : in the bottom field “Performance”, set a message delay, in order to avoid app crashes
> 
> - Click on image for full view  
>   
> 
> - The ‘Devices’ tab allows you to exclude devices you don’t want in HA. Fewer devices benefit performance and crash sensitivity.
> 
> - 
> - **CAUTION** to immediately remove devices you add to Homey using the Home Assistant Community app from the Devices list. To avoid loops! ((`*`) _as long as new devices are still automatically added to the list_)
> 
> - Go to tab ‘Log’, and set the level to “Errors and Warnings”, to reduce log size and performance

### - MQTT Client app

> **Click here**
>
> Please install this app:  
> [https://homey.app/a/nl.scanno.mqtt/](https://homey.app/a/nl.scanno.mqtt/)
> 
> - Configuration:  
> On the mobile app, go to …More → Apps → MQTT Client → Configure app  
> Enter your data, like the example data in the settings screen screenshot, and save the settings
> - 
> - 
> - ⚠ _ **The username + password of the MQTT Client as well as the MQTT Broker must be the same** _  
>   
> ![signal-2023-03-12-174554_003](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/3/d/3dc476a94edc2020e4e7dfef7370d9b69001f6d7.jpeg)

## Run the following on HA:

### - Mosquitto Broker and MQTT integration

> **Click here**
>
> Install the broker:
> 
> - Go to Add-ons  
> 
> - Click the blue button **[Add-on Store]** …  
> 
> - … and then search for Mosquitto broker and install this add-on by clicking on it  
> 
> - Configuration:
> 
> - 
> - Go to the ‘Configuration’ tab at the top
> 
> - 
> - ⚠ → Enter the user and password _ **similar to those of MQTT Client** _, with exactly the same number of spaces as in the screenshot below:
> 
> [minus sign][space]username:[space]name  
> [space][space]password:[space]password
> 
> ![Screenshot from 2023-10-23 22-23-43](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/b/a/ba2b6cda42779120ad3c91de59c75da853f27b49.png)
> 
> - 
> - 
> - NOTE: This screen on the screenshot unfortunately wouldn’t save my input, but, via YAML (click on the 3 dots at the top right) it succeeded:  
> ![Screenshot from 2023-10-23 22-24-52](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/8/7/87af277ff8dcdfb943d67bf79550a20dbfad0857.png)
> 
> - Click ‘Save’
> 
> - Then go to the ‘Information’ tab at the top
> 
> - Turn on ‘Start on startup’ in any case
> 
> - Click on ‘START’ at the bottom left of the add-on screen  
> 
> ### Mosquitto Broker and MQTT Integration
> 
> To use the Mosquitto broker, go to the integration page and install/configure the integration:
> 
> - Go to Settings → Devices and Services
> 
> - MQTT should now appear there as a discovered integration:  
> 
> - If yes: scroll down until " ‘Discovered MQTT integration’ continued" to continue!
> 
> - 
> - 
> - _If not, click ‘Add integration’ at the bottom right and search for ‘mqtt’, click on the found MQTT integration and add it_  
> ![Screenshot from 2023-10-23 22-36-04](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/e/f/ef4364bc87f90a0c2b6fadf5d1a4b5b83234967d.png)
> 
> - 
> - _Choose MQTT without additions_  
> ![Screenshot from 2023-03-13 12-49-55](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/7/b/7b8c0c9dcac4195dbda60bb0dae8ba8f5e06aaf1.png)
> 
> - 
> - 
> - Copy the data from the screen below;\* \*  
> → _username + password is again the same user + password you used for the MQTT Client and Broker_.  
> ![Screenshot from 2023-10-23 22-38-24](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/c/1/c13383ea3dbb74f46bb37331d82020ee7af6b1be.png)
> 
> - 
> - 
> - _Click ‘Next’ and then ‘Finish’_
> 
> #### ‘Discovered MQTT integration’ continued:
> 
> - Click ‘Configure’ to enable MQTT detection if required, and click ‘Save’ in the screen that follows:  
> (Translated: _Would you like to configure HomeAssistant to connect to the MQTT-Broker which is presented to you by the Mosquitto Broker add-on_ “Save”)  
> 
> - Click ‘Finish’  
> (The screen says ‘Congrats, config created for Mosquitto Broker’ “Finish”)  
> 
> - Click ‘Configure’ again to set up MQTT for the MQTT Broker with your own username + password  
> 
> - In this screen, click ‘MQTT RECONFIGURE’  
> 
> - Change username + password to matching the user + password you used with the MQTT Client and Broker  
> 
> - If all went well, your Homey devices are now being loaded  
> Example:  
> 
> - A sample of my Homey devices in HA  
> 
> - Detail of a plant sensor @ HA, coming from Homey

## Run the following on Homey

### - Home Assistant Community app

> **Click here**
>
> Finally, install this app on Homey:  
> [https://homey.app/a/io.home-assistant.community/](https://homey.app/a/io.home-assistant.community/)
> 
> - Look up the IP address of your HA installation;
> - Add a new device and choose Home Assistant Community
> - 
> - Now (only 1-time needed) enter the IP address as URL ([http://x.x.x.x:8123](http://x.x.x.x:8123)) and the so-called ‘longlived token’
> 
> - 
> - 
> - _The manual to create a token can be found on the [app page](https://homey.app/a/io.home-assistant.community/) and/or on the [forum topic](https://community.homey.app/t/app-pro-home-assistant-community-app/71477) of this app_  
> Example:
> 
> > ![Screenshot_20230616-021712_Homey](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/2/2/22d759ecfd6ceee149347de521ca2ff241e2e864.jpeg)
> 
> - Then, choose the desired type (sensor, switch, light etc.) and enter the desired device name in the search field
> - Here is an example with a type ‘button’  
> ![Screenshot from 2023-03-12 19-36-30](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/7/5/7534c850d4e2d176704747952a834d9b5b1858c3.png)

## - Must have tool: MQTT Explorer

> **Click here**
>
> #### This tool allows you to see what is or isn’t being sent back and forth in MQTT
> 
> - Win/Lin/Mac: [http://mqtt-explorer.com/](http://mqtt-explorer.com/)
> 
> - HA addon: [https://community.home-assistant.io/t/addon-mqtt-explorer-new-version/603739](https://community.home-assistant.io/t/addon-mqtt-explorer-new-version/603739?u=peter_kawa)
> 
> - Configuration example, again use the same user + password as with the MQTT Broker & Client, and use the IP address of HA (which runs the broker)  
> 
> - MQTT data impression  
> This is what Homey sends to HA:  
> 
> - This is what HA sends to Homey:

## - Useful flows

> **Click here**
>
> #### Broker offline:
> 
> You can e.g. also use this trigger to automatically restart HA f.i.
> 
> ### HA offline or back online
> 
> #### If HA has been offline, or Homey, I always had to manually perform a ‘broadcast’ in the MQTT Hub app, otherwise the Homey devices on HA would no longer work. Also, a notification is sent.
> 
> _And a totally ‘useless’ option: I also set an AVD’s ([advanced virtual device](https://community.homey.app/t/app-pro-advanced-virtual-device-device-capabilities-app-with-unique-text-status-indicator/68198)) status to on/offline . It’s called “HA On-Offline”. Also a variable is updated with the status_

## - Run the following @ HA

### Optional: install HACS store

> **Click here**
>
> _ **HACS = Home Assistant Community Store** _  
> _ **There are many nice ‘apps’ in this additional store, but it is not supported by HA** _
> 
> - Read these ‘necessities’  
> [https://hacs.xyz/docs/setup/prerequisites](https://hacs.xyz/docs/setup/prerequisites)
> - How to download and install:  
> [https://hacs.xyz/docs/setup/download](https://hacs.xyz/docs/setup/download)
> 
> ### Install a community integration
> 
> - Go to the HACS  
> 
> - … and look for the brand, e.g. ‘shelly’  
> 
> ## Examples
> 
> #### To give an impression of possibilities
> 
> #### My HACS integrations:
> 
> Among others iCalender, HVC waste calendar, variable, Nordpool energy prices etc.
> 
> ![Screenshot 2023-03-13 at 11-43-35 HACS - Home Assistant](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/e/2/e2459439831185791614b69ec32e1e09d71bbfaf.png)
> 
> #### My HACS frontend:
> 
> This is mainly for ‘spicing up’ my dashboards
> 
> ![Screenshot 2023-03-13 at 11-44-01 HACS - Home Assistant](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/6/6/660f749206c07640bf49cfe3a38fb52efb324f11.png)

---

_[View the full topic](https://community.homey.app/t/tutorial-pro-how-to-integrate-home-assistant-with-homey-pro-and-v-v/92641)._
