Announcement

Collapse
No announcement yet.

MQTT - what is it good for?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    MQTT - what is it good for?

    Hi,

    I recently found a thread about "must have" plugins for HS3 and numerous people mentioned the 2 MQTT plugins available. To my surprise I had never even heard of them. A little research later and I'm still a bit unsure how I could make use of this so I have a few questions for other HS users.

    I did read that I could do some neat things with my LG B6 OLED TV with MQTT, but it seems like a lot of work just for that one use case, especially since this use case involves installing Node.js and running something called lgtv2mqtt.

    My questions:

    What devices are you using that speak MQTT?

    Other than an interface to MQTT-literate devices to know their status or control them, is there anything else this is useful for?

    Is this better than Z-wave or Insteon, or not in the same category?

    What is the quickest way to get setup with MQTT on Windows?

    Feel free to reply w/ links. I realize I'm asking a lot here and am still a bit in the dark.

    Thanks!
    HS4, Insteon, Z-wave, USB-UIRT, Harmony Hubs, Google Hub/Chromecasts/Speakers, Foscam & Amcrest cameras, EZVIZ DB1 doorbell
    Plugins: BLLAN, BLOccupied, BLUSBUIRT, Chromecast, Harmony Hub, Insteon, Jon00 Homeseer/Echo Skill Helper, Harmony Hub, Jon00 DB Charting, MediaController, NetCAM, PHLocation2, Pushover 3P, weatherXML, Z-wave

    #2
    If you dabble in the world of Internet Of Things (IOT) then MQTT is a language you will often run across. It provides the infrastructure that allows items to come and go relatively seemlessly. This means things like a toaster may come online and offline and the application layer (e.g.) does not need to set up events and logic to deal with it. This is not something that zwave or zig bee does gracefully.

    IOT devices are typically characterized as very low cost. They will typically be using WiFi as the physical medium. This make them very popular for the HA hobbiest. MQTT has low overhead and wide usage on all modern platforms so it fits into a system toolbox no matter what you like to run.

    i have migrated to Linux as my default HA platform, but typically use Windows for everything else. The mcsMQTT forum has a recent post for installing the MQTT broker (Mosquitto) on Windows. I have mine on a Raspberry Pi. In the appendices of mcsMQTT manual I describe a number of devices I am using MQTT (http://mcsSprinklers.com/mcsMQTT.pdf). If you read this forum you will see many other user’s use of MQTT.

    If you search Amazon or other retail providers you will likely not find too much with MQTT capability. Companies typically want to lock you in to their system and MQTT is totally open standard. MQTT will typically be aftermarket and applied where you want integration and not simply the ability to control from a smartphone. Is is oriented to Machine To Machine rather than Human to Machine.

    Comment


      #3
      Maybe this is something usefull to start to understand what is mqtt.
      https://internetofthingsagenda.techt...etry-Transport

      and you can search for the definitions of what is a server VS what is a client .

      mqtt does'Nt have any radio like insteon , lutron or z wave.


      So an entity /node... push it's status ( on /off / mute etc) when it's change into a mqtt broker ( the server part ( think of it like a big space where message are delivered))...via a topic/message like this : /mqtt/webos/message ( payload) , or /mqtt/webos/volume (payload) etc. payload = the value the entity sent at the beginning. ( you can transmit more than just value via mqtt but that's enought for now i think)

      To be able to use this, you have to get a mqtt client. it will listen to specific topics like the two I mentioned ( which i said are in the big space broker)

      Once you get that, I think we'll be able to talk about mcsmqtt client plugin ( which do a lot more than just listen to specific topics )
      Last edited by ; October 1, 2018, 11:08 PM.

      Comment


        #4
        Last year, I also started to use mqtt for the very same reason as you.

        I tooks me a while to understand the logic. I got it working in 2-3 days without very knowing why it was working.

        From my point or view now.. it is very easy to understand, but that's a retrospective bias. This is not the way we think in every day life. So it's normal feel overwhelm with all this new logic of *things*

        Comment


          #5
          Just a teaser.
          Btw, I started to install all my stuff with English description at the beginning. But i am now slowly transferring all my events and device name etc to french ( my native language). so that's why you see weird event names lol.
          Attached Files

          Comment


            #6
            From node red you can add this node package like this
            Attached Files

            Comment


              #7
              Welcome to group MQTT,

              Now I wont try to explain what the others have mentioned any better but to point you to the Grand Master's (Peter Scargill's Tech Blog) SCRIPT
              Get yourself a raspberry PI and it will aid you to install all you need by following the on screen then fire and go hands free

              For a teaser :

              My most resent project, it has helped create a super first event for powering down the house using the NEEO remote (HStouch and the HomeSeer App take a while when logging / connecting)
              I have a TCP node (connected to NEEO), JSON node an MQTT out toHomeSeer. IMAGES BELLOW
              For now I use the main power hard button to power down the whole house but can do much with information I get from NEEO.



              Eman.
              Attached Files
              Last edited by Eman; October 2, 2018, 12:36 PM.
              TinkerLand : Life's Choices,"No One Size Fits All"

              Comment


                #8
                Yes a raspberry pi would be very easier . That’s true! Thank eman
                Or at lest a virtual machine with debin or ubuntu on it to test all of that

                Comment


                  #9
                  Hi all,

                  Thanks for the great information! I have a lot of reading to do.

                  You mention raspberry pi or a virtual machine. My HS installation is on Windows and will likely stay that way for a long time. Is it not recommended to setup everything needed for MQTT on a Windows machine? Is it harder, or doesn't work as well?
                  HS4, Insteon, Z-wave, USB-UIRT, Harmony Hubs, Google Hub/Chromecasts/Speakers, Foscam & Amcrest cameras, EZVIZ DB1 doorbell
                  Plugins: BLLAN, BLOccupied, BLUSBUIRT, Chromecast, Harmony Hub, Insteon, Jon00 Homeseer/Echo Skill Helper, Harmony Hub, Jon00 DB Charting, MediaController, NetCAM, PHLocation2, Pushover 3P, weatherXML, Z-wave

                  Comment


                    #10
                    Windows is fine for a MQTT environment. Likely more Linux users of MQTT so that is where the experience base is that is making the recommendation. What is nice about RPi is that it is easy to start over if you mess things up. With Window there is typically much more installed so one does not want to reimagine unless absolutely necessary. Doing a Windows reinstall is pretty painful.

                    Comment


                      #11
                      You can install a Linux VM using Hyper-V, Oracle Virtual Box, VMWare, QEMU on a Windows computer and run it on the VM.

                      Here Homeseer 3 Pro box is running Linux with a Windows server virtual box.
                      - Pete

                      Auto mator
                      Homeseer 3 Pro - 3.0.0.548 (Linux) - Ubuntu 18.04/W7e 64 bit Intel Haswell CPU 16Gb
                      Homeseer Zee2 (Lite) - 3.0.0.548 (Linux) - Ubuntu 18.04/W7e - CherryTrail x5-Z8350 BeeLink 4Gb BT3 Pro
                      HS4 Lite - Ubuntu 22.04 / Lenovo Tiny M900 / 32Gb Ram

                      HS4 Pro - V4.1.18.1 - Ubuntu 22.04 / Lenova Tiny M900 / 32Gb Ram
                      HSTouch on Intel tabletop tablets (Jogglers) - Asus AIO - Windows 11

                      X10, UPB, Zigbee, ZWave and Wifi MQTT automation-Tasmota-Espurna. OmniPro 2, Russound zoned audio, Alexa, Cheaper RFID, W800 and Home Assistant

                      Comment


                        #12
                        Id yiu install dietpi on a rpi. You can choose to make it install npm. Node js. Mosquitto. And node red for you .

                        Comment


                          #13
                          I do like DietPi and have used it with Odroid and RPi. It is lightweight for embedded applications and the most novice-friendly of the Linux dialects. I had an issue in the past and submitted a bug report. It was serviced immediately with series of email exchanges with two experts.

                          Comment


                            #14
                            Here initially installed Node Red / Mosquitto Broker on my combo Stretch RPi running in the attic.

                            Combo in that it is POE powered, doing NOAA satellite map downloading, ZNet like device, Node Red, Mosquitto Broker, 1-Wire and OWFS device.

                            - Pete

                            Auto mator
                            Homeseer 3 Pro - 3.0.0.548 (Linux) - Ubuntu 18.04/W7e 64 bit Intel Haswell CPU 16Gb
                            Homeseer Zee2 (Lite) - 3.0.0.548 (Linux) - Ubuntu 18.04/W7e - CherryTrail x5-Z8350 BeeLink 4Gb BT3 Pro
                            HS4 Lite - Ubuntu 22.04 / Lenovo Tiny M900 / 32Gb Ram

                            HS4 Pro - V4.1.18.1 - Ubuntu 22.04 / Lenova Tiny M900 / 32Gb Ram
                            HSTouch on Intel tabletop tablets (Jogglers) - Asus AIO - Windows 11

                            X10, UPB, Zigbee, ZWave and Wifi MQTT automation-Tasmota-Espurna. OmniPro 2, Russound zoned audio, Alexa, Cheaper RFID, W800 and Home Assistant

                            Comment

                            Working...
                            X