→ Nederlandstalige versie → klik hier
→ Tutorial with examples of setting up HA from scratch, extended with zwave as example → click me
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”
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:
- In the device overview, you can see that these devices are present @ HA via the MQTT integration:
Run the following on Homey:
- MQTT Hub app
Click here
-
Install this app:
https://homey.app/a/nl.hdg.mqtt/
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
-
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)
- CAUTION to immediately remove devices you add to Homey using the Home Assistant Community app from the Devices list. To avoid loops! ((
-
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/
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
-
-
- 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:
- 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:
-
-
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
- If not, click ‘Add integration’ at the bottom right and search for ‘mqtt’, click on the found MQTT integration and add it
-
-
- Choose MQTT without additions
- Choose MQTT without additions
-
-
- Copy the data from the screen below;* *
→ username + password is again the same user + password you used for the MQTT Client and Broker.
- Copy the data from the screen below;* *
-
-
-
- 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/
- 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) and the so-called ‘longlived token’
-
-
- The manual to create a token can be found on the app page and/or on the forum topic of this app
Example:
- The manual to create a token can be found on the app page and/or on the forum topic of this app
-
- 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’
- 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/
-
HA addon: https://community.home-assistant.io/t/addon-mqtt-explorer-new-version/603739
-
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) 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 - How to download and install:
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.
My HACS frontend:
This is mainly for ‘spicing up’ my dashboards