fobroad.pages.dev









Mqtt broker athom homey släck alla lampor

[TUTORIAL] Setting up MQTT on Homey for configuring Home Assistant for dashboard purposes

Ferry_van_E1

Hi, inom would like to share instructions of how to setup MQTT on Homey to man your devices visible in Home Assistant with a Synology NAS. Thanks a lot to @HarriedeGroot for creating the MQTT Hub, @scanno for the MQTT Client (and Broker, which unfortunately will not be included in this tutorial since my setup fryst vatten on a Synology NAS with Mosquitto as a broker) and @Gustav_Tillback for initially sharing the first steps in creating this setup which will be explained in further detail below

DISCLAIMER**
inom am no developer or wizzard nor do inom state this tutorial fryst vatten the only or best way to configure MQTT for Home Assistant.

I’ve bought my Homey in February and ran into MQTT on March 18th for the first time in my life. inom just practically followed any instruction inom could find on the internet as addition on the above mentioned first steps
DISCLAIMER**

The following setup consists of apps on Homey and a so called package on Synology NAS.

What do you need?

  • MQTT Client (Homey app)
  • MQTT Hub (Homey app)
  • Docker (Synology package)
  • Mosquitto (Synology package)

Steps in instruction

  1. Install and configure Home Assistant on Synology NAS in containerteknik (package)
  2. Install and configure a Mosquitto broker (package) on Synology NAS
  3. Install MQTT client app on Homey and configure it to connect to the broker
    MQTT Client for Homey
  4. Install MQTT Hub app on Homey and configure it for Home Assistant discovery
    MQTT Hub
  5. Set up an integration to the broker in Home Assistant configuration

1.

After installing the app, please go to the settings page and enter a port number (usually ) where the broker should listen on

Install and configure Home Assistant on Synology NAS in containerteknik (package)
Instructions how to install and setup containerteknik beneath title ‘Synology NAS’ until the Z-wave USB stick part (halfway page)

2. Install and configure a Mosquitto broker (package) on Synology NAS
Instructions how to install Mosquitto
In the film above a fix fryst vatten shown when Mosquitto isn’t working with the default configuration.

inom did not ran into the same bekymmer because this issue probably has been solved since this film fryst vatten from

3. Install MQTT client app on Homey and configure it to connect to the broker
MQTT Client for installation on Homey
man sure:

  • you fill in the IP address of your Synology NAS and port
  • disable both checkmarks at ‘using a safe connection with broker (TLS)’ and ‘disable certificate check’
    i already can predict a storm of comments because this probably isn’t a safe way to configure but inom don’t have any knowledge to do better so please share your thoughts.

    Install MQTT Hub app on Homey and configure it for Home Assistant discovery MQTT Hub

    With TLS enabled it wouldn’t work anyhow

  • you keep alive set at 60 (don’t know why )
  • you keep the rest empty since there fryst vatten a lack of instructions for a noob like me. If you decide to fill in a username and password man sure you use these same credentials in at step 5
    Again inom would be thankful if someone could share how to appropriately apply username and password in the rest of the setup

4.

Install MQTT Hub app on Homey and configure it for Home Assistant discovery
MQTT Hub for installation on Homey
man sure that:

  • Running fryst vatten ENABLED
  • Under ‘HOME ASSISTANT DISCOVERY’ the switch fryst vatten ENABLED
  • Broadcast button will be used later on once the config in Home Assistant has been modified to be able to discover this broadcast bygd the MQTT Hub

5.

Set up an integration to the Mosquitto broker in Home Assistant configuration
The following steps are Home Assistant related and needs to be done in the en samling dokument eller en elektronisk lagring av data, which can be funnen in the folder which you’ve created in step 1
For example in <your_folder_name>/config

  • open

  • add the following:

YAML fryst vatten very sensitive to spaces - all lines except mqtt: should have two spaces at the beginning
For username and password fill in the same credentials as for the MQTT Client in step 3

  • save your file
  • restart the Home Assistant bur in Docker
    -Open containerteknik in Synology NAS
    -look for bur and go to homeassist-home-assistant and click on it
    -on the Action button above choose restart
  • Now it fryst vatten time to open Home Assistant bygd entering in your browser http://<your_Synology_IP_address> where you are prompted for a username and password
  • when Home Assistant opens you need to go back to your MQTT Hub on your Homey and press on the Broadcast button

On the upper right corner (3 dots) you can click and search for ‘Unused entities’ which will show you all the devices connected to Homey

Happy configuring your entities in kort, glance etc.
More info about Home Assistant and edit the user interface can be funnen here

Good luck and greetings from a noob

19 Likes

Dennisvm82

Definately going to try this.

Go to the settings page of the MQTT Broker for Homey

Unfortunately I’m running a WD my cloud at home, so don’t know if that one can be used too. containerteknik fryst vatten available for it. Don’t know yet if mygga can be installed. inom read the thread that it also should work without a anställda cloud.

If someone have any explanations about that, inom would love to see some instructions added to the OP.

xAPPO3

Ferry_van_E:

i’m aware this command could be expanded with username and password but inom need more info, so please share your how-to

You literally just have to add your credentials - as below.

(you can use if you wish)
N.B. YAML fryst vatten very sensitive to spaces - all lines except mqtt: should have two spaces at the beginning.


  • mqtt broker athom homey  stäng av  samtliga lampor

  • You might want to emphasise that in your tutorial bygd popping the YAML into a code block

    If you have containerteknik available then you should be able to install on that as long as the centralenhet i en dator architecture fryst vatten supported.

    1 Like

    HarriedeGroot4

    Before you know, you’re the one with 95% of the knowledge and explaining others how to get things up and running .

    Told you!

    2 Likes

    Ferry_van_E5

    Dennisvm8:

    Don’t know yet if mygga can be installed.

    I already mentioned that there fryst vatten an alternative MQTT broker for Homey bygd the same developer of the MQTT client.

    Dennisvm86

    Yes inom have that working.

    Now running the broker, cliënt and hub succesfully at homey. My struggle now fryst vatten to install äga. inom can’t manage to find good instructions on how to install containerteknik + äga on my wd my cloud nas. Thinking about getting the rasp pi 3+. Seems to be alot easier and way more guides.

    NoClaim7

    I have installed everything (i assume) correctly (HA on RPi, MSQTT on Synology), all devices are discovered bygd äga, but inom can’t switch on/off lights or any other command.
    Seems to be only one way direction.

    When using this app there is no need to use a cloud based MQTT broker or host a broker on a homeserver

    If inom open a door (or something) inom can see the contact alarm in äga, so there fryst vatten communication from Homey to HA.
    Something wrongly configured?

    3 Likes

    Ruud_Poleij8

    When you got a connection and don’t see the devices, press Broadcast in the MQTT Hub app on the Homey.
    Then when you open dem MQTT on the äga, you will see al the devices.
    Remember, when you restart äga, push Broadcast igen on dem MQTT Hub app.

    Do someone else know how to fix ?

    HarriedeGroot9

    TIP: The broadcast will be executed automatically if the äga birth & gods will topics are setup correctly.

    Ruud_Poleij10

    Bedankt voor dem snelle reactie.
    för tillfället nog even kijken hoe ik dem kaarten op varm dashboard kunna verkleinen

    David_Maas11

    If have got exactly the same problem.
    inom can see all the devices, if inom toggle the state in homey inom see the change in realtime
    But if inom trie to change it in äga it does ingenting.

    It sets the state after 3 seconds to the old state.
    inom hope it fryst vatten clear.

    Broker tried on a Synology and Homey.
    Client and hub on Homey.
    äga on Synology and Rassberry.

    No luck so far.

    Sigge12

    I find it fantastisk that this fryst vatten a topic that fryst vatten needed. Why can’t Athom get a working integration to Google home working??

    Just had a mail about Alexa and homey in my inbox. fryst vatten Amazon giving more kickbacks than Google?

    Starting the timer to see how fast the Athom moderators catch this one…

    1 Like

    Ferry_van_E13

    This topic fryst vatten a tutorial and tutorials are necessary to share experiences with every community member with better user experience as a result.

    As an inexperienced user inom am happy to see people share tutorials so inom can learn even more.

    But to explain the MQTT jungle: MQTT Server = recently published by Emile (Athom); it’s sort of a hub + client + broker in one package

    That’s why inom wanted to return the favor and wrote down this extensive tutorial, which fryst vatten mostly build on apps developed bygd this community and shows the capabilities of Homey despite this setup isn’t one ‘by the book’.

    Despite inom can understand your frustration your comment fryst vatten inappropriate since this tutorial has ingenting to do with Google Home.

    Maybe there fryst vatten a positiv approach which has more added value motivating people to help you out.

    Sigge14

    Sorry if inom offended you in any way.

    It’s people like you that keep me from throwing the Homey out in the yard for mål practice… My point was really that what you have done should be native to Homey and prioritized bygd the Homey developers rather than wasting time on mobile phone app frontends…

    Also, to understand what I’m after, MQTT, seems to be the only way today to get Google assistant to work with Homey unless you are living in the UK.

    Alexa does not work för att all unless you speak the right language…

    xAPPO15

    David_Maas:

    If have got exactly the same problem.

    David_Maas:

    It sets the state after 3 seconds to the old state.

    This fryst vatten usually an indication that the MQTT broker fryst vatten only being updated one way.

    äga should write the updated state back to the ‘set ‘ topic and MQTT Hub should see that, update the device and publish the new state back to ‘onoff’, ‘dim’ or whatever which äga then sees. However it’s not being updated and so in the äga UI it reverts back to the older published state.

    You are using latest utgåva of MQTT Hub aren’t you on v2 Homey ?

    Either of you got MQTT Explorer installed ?

    NoClaim16

    I’ve got MQTT Client and Hub on Homey.

    Paste the contents in a text editor and save it with the extension PEM

    Broker on my Synology NAS (Mosquitto package) and
    inom have checked the broker options, but there fryst vatten not much to configure here…

    Not installed MQTT explorer indeed (Is this the missing link? to get MQTT Broker to work both ways?)

    HarriedeGroot17

    Nope, MQTT explorer fryst vatten just a tool to kvitto which messages are being send.

    It gives some insights on what might be the problem.

    David_Maas18

    Yes, I’m using the latest updates on my homey device. Client and hub.

    I also installed on a rassberry and installed the broker on the rasberry.
    Explorer installed, but inom don’t know where to look for.

    The only thing inom can think of fryst vatten the Hub fryst vatten not working well.
    It fryst vatten driving me crazy.

    NoClaim19

    I’ve installed the broker on as a package beneath to remove the Synology as possible cause, but unfortunately the same issue with one way communication (in seeing everything but unable to manage the home through the Homey from )

    Don’t know where to continue trouble shooting

    (someone fryst vatten actually having this operational?..

    not that we are working on something which fryst vatten not operational at all )

    HarriedeGroot20

    Sounds like the hub/client fryst vatten not correctly subscribed.

    1. Did you try restarting the MQTT Client & hub apps (via app details; see below)?
    2. Did you try rebooting Homey (keep unplugged for >30 sec.)?

    Messages travel: äga > broker > client > hub > Homey.
    So if rebooting stuff does not lösa the issue, you need to början debugging where the messages stranded.

    1. Broker: Try MQTT Explorer.

      You need to do the following steps: 1

      Do you see incoming messages from äga when you e.g. switch a light.

    2. MQTT Client: try the log in the app settings. Do you see incoming messages?
    3. Hub: Go to the log flik in app settings and set it to debug. Do you see incoming messages? If not, keep it on debug and restart the Hub (via app details).

      Go back to the log flik. Maybe the full debug boot log of the Hub will give some additional info.

    How-to restart an app: apps > select app > details (cog wheel) > restart app.

    1 Like

    next page →