Announcement

Collapse
No announcement yet.

HomeSeer MQTT plugin.

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

    #91
    Posting here because the domoticaforum.eu moderator approval of posts is slow.

    I am really enjoying the plugin - thank you.

    Am I doing something wrong?
    Trying to send an MQTT command to an ESP Easy LCD display.
    The attached picture of my event works fine - the LCD updates.
    But I need to transfer this ability to a script - so I did this: &hs.PluginFunction("MQTT", "", "publish", {"/LED_DEN/cmd", "lcd,1,1,hello world"})
    In the logs I get this: Running script(2) &hs.PluginFunction("MQTT", "", "publish", {"/LED_DEN/cmd", "lcd,1,1,hello world"}), init error: Invalid character
    I am basing that script off of the MQTT Plugin description: Example: hs.PluginFunction("MQTT", "", "publish", {"/tmp/myTopic", "1234"})

    Thank you everyone!
    Attached Files


    ~Bill

    Comment


      #92
      Originally posted by Bill Brower View Post
      Posting here because the domoticaforum.eu moderator approval of posts is slow.

      I am really enjoying the plugin - thank you.

      Am I doing something wrong?
      Trying to send an MQTT command to an ESP Easy LCD display.
      The attached picture of my event works fine - the LCD updates.
      But I need to transfer this ability to a script - so I did this: &hs.PluginFunction("MQTT", "", "publish", {"/LED_DEN/cmd", "lcd,1,1,hello world"})
      In the logs I get this: Running script(2) &hs.PluginFunction("MQTT", "", "publish", {"/LED_DEN/cmd", "lcd,1,1,hello world"}), init error: Invalid character
      I am basing that script off of the MQTT Plugin description: Example: hs.PluginFunction("MQTT", "", "publish", {"/tmp/myTopic", "1234"})

      Thank you everyone!
      Am not any good at scripting but try to remove the under score from "LED_DEN" and see if it works otherwise the plugin author can best explain this.



      Eman.
      TinkerLand : Life's Choices,"No One Size Fits All"

      Comment


        #93
        Try putting ' around hello world

        Originally posted by Bill Brower View Post
        Posting here because the domoticaforum.eu moderator approval of posts is slow.

        I am really enjoying the plugin - thank you.

        Am I doing something wrong?
        Trying to send an MQTT command to an ESP Easy LCD display.
        The attached picture of my event works fine - the LCD updates.
        But I need to transfer this ability to a script - so I did this: &hs.PluginFunction("MQTT", "", "publish", {"/LED_DEN/cmd", "lcd,1,1,hello world"})
        In the logs I get this: Running script(2) &hs.PluginFunction("MQTT", "", "publish", {"/LED_DEN/cmd", "lcd,1,1,hello world"}), init error: Invalid character
        I am basing that script off of the MQTT Plugin description: Example: hs.PluginFunction("MQTT", "", "publish", {"/tmp/myTopic", "1234"})

        Thank you everyone!
        Try putting ' or " around hello world other wise it appears as 2 values

        Comment


          #94
          I cannot help with the syntax expected by this plugin, but you may find that you do not need to use script with mcsMQTT https://forums.homeseer.com/showthread.php?t=192675 manual http://mcsSprinklers.com/mcsMQTT.pdf. Just storing values in Device String or Device Value or using replacement variables in Event Action are other approaches that are used with mcsMQTT.

          Comment


            #95
            Originally posted by Michael McSharry View Post
            I cannot help with the syntax expected by this plugin, but you may find that you do not need to use script with mcsMQTT https://forums.homeseer.com/showthread.php?t=192675 manual http://mcsSprinklers.com/mcsMQTT.pdf. Just storing values in Device String or Device Value or using replacement variables in Event Action are other approaches that are used with mcsMQTT.
            WOW!,

            Where have you been man? You just opened a can of worms!
            This really is so sweeeet! And another good reason for staying awake all night!
            Question please ===> Will I be able to link up to external systems like Node-RED and or formulate custom topics seamlessly like I did before? For this looks like one of the coolest plugin to ever hit HomeSeer! I am so looking forward to installing and modifying everything again.

            Do you have a HomeSeer forum where we can post questions because redirecting people to other sites has proved a pain. The devil is within the details in the previous posts on this thread.

            BOY YOU ROCK!


            Eman.
            Last edited by Eman; January 3, 2018, 05:31 PM.
            TinkerLand : Life's Choices,"No One Size Fits All"

            Comment


              #96
              I have been around longer than most on the board starting back in the HS1 days. You can see from my post count. Had many plugins with HS1 and HS2 and then consolidated into just a few for HS3. The forum for discussion is in the above post, but I have asked Tyler to give mcsMQTT a subforum of its own rather than hiding as a thread in the parent forum.

              I have been doing xAP for many years which has many similarities with MQTT so it was an easy port of that plugin into the equivalent for MQTT. xAP has more structure than MQTT so a message had context and was easier to integrate with HS3 with minimal user involvement. For example, xAP defines if a message is a command, event, or just info refresh. With MQTT there may be some conventions, but no standards so the user needs to be explicit on how to command a node.

              Tyler also indicated that he has been busy, but that the plugin should be in the updater now. The change log for the plugin is maintained on the board as the referenced link for discussions.

              Comment


                #97
                Originally posted by rxmas View Post
                Try putting ' or " around hello world other wise it appears as 2 values
                It must not like the Immediate Script Command because the following works:

                PHP Code:
                Sub Main(parm as object)
                Dim x as string
                hs.PluginFunction("MQTT""""publish", {"/LED_DEN/cmd""lcd,1,1,hello world"})
                End Sub 
                Thanks for trying.


                ~Bill

                Comment


                  #98
                  MQTT subscription without a related device

                  Hi

                  I erased a MQTT device directly from the device manageent page and now I am stuck with an entry in the MQTT Plugin subscritpion page.

                  Would someone know how I can erase this fantom entry ?

                  thanks

                  Comment


                    #99
                    Originally posted by goldriver View Post
                    Hi

                    I erased a MQTT device directly from the device manageent page and now I am stuck with an entry in the MQTT Plugin subscritpion page.

                    Would someone know how I can erase this fantom entry ?

                    thanks

                    They go away when you restart the server. And unless you tick the monitor server in the settings they shouldn't be back but only on the broker. Just create a new one and forget about it.

                    There is some good info here as well : http://www.steves-internet-guide.com...sages-example/



                    Eman.
                    TinkerLand : Life's Choices,"No One Size Fits All"

                    Comment


                      Originally posted by Eman View Post
                      They go away when you restart the server. And unless you tick the monitor server in the settings they shouldn't be back but only on the broker. Just create a new one and forget about it.

                      There is some good info here as well : http://www.steves-internet-guide.com...sages-example/



                      Eman.

                      Comment


                        Many are using Pi or similar with SD the means of storage. If mosquito persists power cycles then it is constantly writing to SD to hold retained messages. Has there been any discussion on the lifetime write considerations for MQTT using brokers hosted on SD devices? With the broker being a single point failure it should be robust and not kill itself by destroying its SD.

                        Comment


                          Originally posted by Michael McSharry View Post
                          Many are using Pi or similar with SD the means of storage. If mosquito persists power cycles then it is constantly writing to SD to hold retained messages. Has there been any discussion on the lifetime write considerations for MQTT using brokers hosted on SD devices? With the broker being a single point failure it should be robust and not kill itself by destroying its SD.
                          I use these systems : http://wdlabs.wd.com/category/wd-pidrive/
                          On all my PI projects. I posted elsewhere about them.


                          Eman.
                          Last edited by Eman; February 14, 2018, 03:44 AM.
                          TinkerLand : Life's Choices,"No One Size Fits All"

                          Comment


                            Originally posted by Michael McSharry View Post
                            Many are using Pi or similar with SD the means of storage. If mosquito persists power cycles then it is constantly writing to SD to hold retained messages. Has there been any discussion on the lifetime write considerations for MQTT using brokers hosted on SD devices? With the broker being a single point failure it should be robust and not kill itself by destroying its SD.
                            Although not relevant to your topic, one would consider building a failover. Now this looks interesting : https://makezine.com/projects/build-...ry-pi-cluster/


                            Eman
                            TinkerLand : Life's Choices,"No One Size Fits All"

                            Comment


                              Most of my Pi do a similar setup using cheap usb to sata and small S S D, but doubt if mainstream users take these precautions. The cluster addresses capacity but not failover as best as I can see. DNS magic would be needed along with failover monitoring to achieve redundancy in functionality

                              If I understand correctly the S S D controller has the smarts to detect bad cells and replace that cell with an unused one. This could imply that a larger S S D would have longer life if much of it was not used. Need more nitty gritty to know if this gives dynamic redundancy at the cell or chip level.

                              Comment


                                Originally posted by Michael McSharry View Post
                                Most of my Pi do a similar setup using cheap usb to sata and small S S D, but doubt if mainstream users take these precautions. The cluster addresses capacity but not failover as best as I can see. DNS magic would be needed along with failover monitoring to achieve redundancy in functionality

                                If I understand correctly the S S D controller has the smarts to detect bad cells and replace that cell with an unused one. This could imply that a larger S S D would have longer life if much of it was not used. Need more nitty gritty to know if this gives dynamic redundancy at the cell or chip level.
                                Hi Michael,
                                I had a look again at what you said here and tried again look for more information and found this : https://medium.com/@lelylan/how-to-b...s-8011a06bd000

                                The other options are commercial and costly! : https://www.hivemq.com/blog/building...y-mqtt-cluster

                                Then there is this : https://dzone.com/articles/mqtt-load...ith-nginx-plus (NIGNIX-PLUS)


                                But there is also this : http://emqtt.io/ Seems quite interesting if you looking for an adventure!

                                Conclusion: if not in a production process environment or critical, this is where a home user would choose the easier options of say creating backups.

                                What do you think?



                                Eman.
                                TinkerLand : Life's Choices,"No One Size Fits All"

                                Comment

                                Working...
                                X