Announcement

Collapse
No announcement yet.

mcsMQTT Plugin

Collapse
This is a sticky topic.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    McsMQTT and Node Red both need to be configured to use the same MQTT broker. The broker you have configured for mcsMQTT is not accepting the connection. It could be wrong IP or it could be the wrong user name or password if the broker requires these credentials.

    my guess is that you have not setup an independent broker. If that is the case then you should leave the General tab setting for MQTT Broker blank and configure Node Red to use the HS IP with no username or password.

    in the MQTT event action to send message you have a action text box using format Topic=Payload. The Topic will be the same one you have used in the Node Red flow.

    Comment


      mcsMQTT and node-red use the same Mosquitto broker, no security, localhost, port 1883. Topics are matched.

      Comment


        The other thing I noticed is that HS4 events that trigger and include mcsMQTT actions no longer insert log entries. mcsMQTT log entries still get created for connect, disconnect and initialization, but not sends.

        Comment


          The mcsMQTT debug will contain info about why the broker connection is not being made. It is enabled from plugin’s General tab at the top. Data is in /data/mcsMQTT/mcsMQTT Debug.txt.

          localhost implies all three applications are on the same computer. I never tried localhost. I have always used the IP 127.0.0.1 or the actual network IP.

          Comment


            One more thing: I have Mosquitto broker running in verbose mode. It shows node-red publish requests for topic "Alexa". The console never shows an MQTT message being sent from HS4 (mcsMQTT)

            Comment


              1601436313: Received DISCONNECT from mqtt_ae44d593.aebcd8
              1601436313: Client mqtt_ae44d593.aebcd8 disconnected.
              1601436313: New connection from 127.0.0.1 on port 1883.
              1601436313: New client connected from 127.0.0.1 as mqtt_4a681021.bad83 (p2, c1, k60).
              1601436313: No will message specified.
              1601436313: Sending CONNACK to mqtt_4a681021.bad83 (0, 0)
              1601436313: Received SUBSCRIBE from mqtt_4a681021.bad83
              1601436313: Alexa (QoS 2)
              1601436313: mqtt_4a681021.bad83 2 Alexa
              1601436313: Sending SUBACK to mqtt_4a681021.bad83
              1601436313: Received PUBLISH from mqtt_4a681021.bad83 (d0, q0, r0, m0, 'Alexa', ... (0 bytes))
              1601436313: Sending PUBLISH to mqtt_4a681021.bad83 (d0, q0, r0, m0, 'Alexa', ... (0 bytes))

              Comment


                "The mcsMQTT debug will contain info about why the broker connection is not being made. It is enabled from plugin’s General tab at the top. Data is in /data/mcsMQTT/mcsMQTT Debug.txt.

                localhost implies all three applications are on the same computer. I never tried localhost. I have always used the IP 127.0.0.1 or the actual network IP."

                On a Windows 10 64-bit machine, what would be the debug file path? Or is it on the the HS4 box Linux file system?
                localhost and 127.0.0.1 both have the same result.

                Comment


                  On a Windows 10 64-bit machine, what would be the debug file path? Or is it on the the HS4 box Linux file system?
                  localhost and 127.0.0.1 both have the same result.
                  Likely C:\Program Files (X86)\HomeSeer HS4\Data\mcsMQTT\mcsMQTT Debug.txt, but depends upon where you installed HS

                  Comment


                    This just appeared in the HS4 log:

                    Click image for larger version

Name:	MissingFilesmcsMQTTClient.JPG
Views:	175
Size:	5.7 KB
ID:	1423096

                    Comment


                      That is a HS4 thing and not related to mcsMQTT. I did get it on early HS4 versions. I do not see it on current release 4.1.7.0.

                      Comment


                        Thanks. Opening a ticket with them.

                        Comment


                          Did you produce a debug file for the MQTT Action? The HS4 warning can be ignored.

                          Comment


                            Yes, I have debug logging checked. HS4 is on my Zee S2 controller, so I have to figure out how to access the O/S on it.

                            Comment


                              I use WinSCP on Windows to look at and move files on Linux systems.

                              Comment


                                Good morning, Michael. mcsMQTTdebug log example:

                                9/29/2020 7:52:49 PM 3976 | Background Send
                                9/29/2020 7:52:49 PM 4042 | Background Init Filters - Background Complete
                                9/29/2020 7:52:49 PM 4048 | Spawning MQTT Threads
                                9/29/2020 7:52:49 PM 4087 | mcsMQTT Debug MQTT Ready
                                9/29/2020 7:52:49 PM 4120 | MQTT Thread Started with broker 1 127.0.0.1, Shutdown=False, Disconnect=False, Client=False, Connected=False
                                9/29/2020 7:52:49 PM 4128 | MQTT Thread Not Connected Yet
                                9/29/2020 7:52:49 PM 4128 | Calling MQTTclient for Broker 1
                                9/29/2020 7:52:49 PM 4137 | MQTT Thread Client Created for Broker 1
                                9/29/2020 7:52:49 PM 4138 | MQTT Thread Client ID=mcsMQTT on HomeTrollerZeeS2V5
                                9/29/2020 7:52:49 PM 4138 | Calling MQTT Connect
                                9/29/2020 7:52:49 PM 4138 | Pre-connect oMQTTClient(0) is Nothing=False
                                9/29/2020 7:52:58 PM 13446 | Handle Action TANumber 0 input of Alexa=This is a test
                                9/29/2020 7:52:58 PM 13446 | Handle Action Topic Alexa
                                9/29/2020 7:52:58 PM 13448 | Handle Action Topic=Payload Alexa=This is a test
                                9/29/2020 7:52:59 PM 14151 | Calling MQTTclient for Broker 1
                                9/29/2020 7:52:59 PM 14151 | Calling MQTT Connect
                                9/29/2020 7:52:59 PM 14151 | Pre-connect oMQTTClient(0) is Nothing=False
                                9/29/2020 7:53:09 PM 24153 | Calling MQTTclient for Broker 1
                                9/29/2020 7:53:09 PM 24154 | Calling MQTT Connect
                                9/29/2020 7:53:09 PM 24154 | Pre-connect oMQTTClient(0) is Nothing=False
                                9/29/2020 7:53:19 PM 34156 | Calling MQTTclient for Broker 1
                                9/29/2020 7:53:19 PM 34156 | Calling MQTT Connect
                                9/29/2020 7:53:19 PM 34157 | Pre-connect oMQTTClient(0) is Nothing=False
                                9/29/2020 7:53:29 PM 44159 | Calling MQTTclient for Broker 1
                                9/29/2020 7:53:29 PM 44159 | Calling MQTT Connect
                                9/29/2020 7:53:29 PM 44160 | Pre-connect oMQTTClient(0) is Nothing=False
                                9/29/2020 7:53:39 PM 54161 | Calling MQTTclient for Broker 1
                                9/29/2020 7:53:39 PM 54161 | Calling MQTT Connect
                                9/29/2020 7:53:39 PM 54161 | Pre-connect oMQTTClient(0) is Nothing=False
                                9/29/2020 7:53:49 PM 64164 | Calling MQTTclient for Broker 1

                                Comment

                                Working...
                                X