Announcement

Collapse
No announcement yet.

Broker Connection Status HS3 Device Not Reporting State

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

  • Broker Connection Status HS3 Device Not Reporting State


    The MQTT_Status device “Broker Connection Status” shows RED/Offline, never indicating the true ONLINE state of the broker.

    Using V 4.1.7.1
    Enabled “Show Statistics in HS Devices and mcsMQTT Statistics Tab
    Confirmed broker is online
    enabled and disabled Show Statistics many times... still RED/Offline


    #2 Side Issue... (think I have experienced this before)

    Try Disconnect from MQTT Brokers check box... enable again removing the check
    broker not recognized automatically
    Waited 6 minutes... broker not recognized
    Manually reset broker (ESP8266)
    Wait 3 minutes... no broker recognition
    Disable/Enable Plugin.... Online again
    And!!! Broker Connection Status device GREEN/Online !!!!

    Opinion.. if this is correct operation, then Manual section 13.1.2.9 should clearly indicate that a plug in reset is required (and a note on the screen) ... and/or, have check box to reset the plugin???


    Let us do additional testing....

    Select ... Disconnect from MQTT Brokers
    Properly get RED/Offline
    De-select … Disconnect from MQTT Brokers
    Wait 6 minutes doing updates to the page to monitor status...
    Confirmed this again to show my ORIGINAL concern, Broker Connection Status point is now operating properly.


    #3
    Previously manually created a point that mimics your temporary statistics point. This never worked. It is now removed. Could creating this definition have caused the non-reporting issue??

    Obviously, I would like to have a always available device defined that shows broker state... please.


    Thoughts are appreciated LZH




  • #2
    V 4.1.7.1 is broken if you use username/password with the broker. Latest is at http://mcsSprinklers.com/mcsMQTT_4_1_8_0.zip. Just the HSPI...exe file is need to replace the one in the HS root folder.

    Comment


    • #3
      Loaded the revision 4.1.8.0

      Not sure what this should fix... I am NOT using UN/PW with broker.

      Checked “Disconnect from MQTT Brokers”
      • Waited 8 minutes
      • Broker connection does not auto recover after un-checking “Disconnect from MQTT Brokers”
      • Broker DOES connect after plug-in STOP/Start
      ??? Confused as to the value of this check box ????

      Consider new features

      #1

      Add a check box to enable a “Broker Connection Status” WITHOUT all the other associated diag devices. (additional looking uncovered the complexity of me manually duplicating this function!)

      I would use this status to Email/text when MY side of the IOT network is down.

      #2
      Add a ENABLE check box to restart the broker connections






      Comment


      • #4
        The implementation is a persistent thread that executes every ten seconds. It checks the socket connection to broker and if it does not exist it destroys the object that manages the broker and tries to create a new connection. I will try to replicate what you describe. There should be no need for a user option. It should always be happening.

        You do have an event trigger with mcsMQTT for broker connection. Will this do what you need in lieu of having a HS device that contains broker status?

        Comment


        • #5
          I tried the test of using the broker disconnect checkbox. I did it three times and it was a matter of seconds between the checkbox was changed and the online/offline status updated. The HS log shows each connection. There is more info in the mcsMQTT debug log. Can you post your debug log for this test?

          Comment


          • #6
            Michael

            Sorry... have “read” the manual several times but overlooked the event trigger for broker connection. YES that will do quite nicely.

            #2 A BIG thank you for adding multiple brokers. That will help my future efforts.

            Failed Broker Auto Connection

            Have been able to consistently repeat the failure mode... attached is a sequence of events document.

            I will be looking tonight with some additional extreme debugging. Here is a quick analysis from what I did this morning.
            • System stable
            • Click checkbox to disconnect
            • Clear checkbox
            • ESP Broker CRASH
            • ESP auto recovers all down stream connections
            • MQTT plugin connection attempts “locked” ????
            Log throws this line:
            Oct-03 2:51:56 PM mcsMQTT StartMQTTThread Line 0 Object reference not set to an instance of an object.
            And sometimes this
            Oct-03 2:45:10 PM Error Displaying remotely connected interfaces: Object reference not set to an instance of an object.
            Have not yet done a deep dive into the ESP Crash Dumps to see if it is my broker issue or the plugin.
            Think I will be learning some new MQTT things this week... LZH















            Attached Files

            Comment


            • #7
              I tried with shutting down my broker and do not get the same unexpected object reference errors. I just get message that connect failure occurs. In http://mcsSprinklers.com/HSPI_MCSMQTT_4181.zip I sprinkled 24 line markers in the error output that is report the object issue. This should help reduce the scope of the problem. There is also info in the mcsMQTT debug file at \data\mcsMQTT but the line markers will have better resolution.

              Comment


              • #8
                Thanks.. will load that and test by EOD tomorrow. One of us is doing some "blocking" after the ESP CRASHES. I will make up this story and hope it puts something into your mind to uncover the sequence...
                1. MQTT properly sends a request to my ESP broker to connect (is this request different on a "restart" versus a FULL start of the plugin???)
                2. Obviously, ESP is overwhelmed with data, runs out of memory or my library mis-manages the plugin request
                3. Note that the broker DOES connect to the plugin before it crashes.
                4. Possibly, the Plug in does not know the broker is gone, and is waiting for a response.???
                5. Possibly... MQTT does not get a full response it is expecting and hangs waiting, when it should be timing out for a retry???
                6. I want to point the finger at your side, because the ESP resets, connects down stream, but then ?never? gets another plugin request to link????
                Thanks.. I'll start working with the new debugger... LZH

                Comment


                • #9
                  Michael... link above for HSPI_MCSMQTT_4181.zip is not working. Was away for several days welcoming a new member to the family and thought this delay would make the link "alive". Ready to start more investigation if you can enable the debug code. LZH

                  Comment


                  • #10
                    Typo in the site it is http://mcsSprinklers.com/HSPI_MCSMQTT_4181.zip

                    Comment


                    • #11
                      Good Morning... Latest debug logs attached using special 4181 logging. I did not see any additional useful info... hope you can decipher some help.

                      My ESP Broker Crashing issue... Can you give me an overview of what MQTT data you are sending during the attempt to connect? Is communication different after releasing the checkbox versus Plugin RESTART? When we are able to fix this initial issue, I have a ESP library bug that allows a crash and I need to repair that issue to avoid future ESP failures.

                      LZH
                      Attached Files

                      Comment


                      • #12
                        I use the MQTT library at https://github.com/eclipse/paho.mqtt.m2mqtt to manage the MQTT protocol. The segments in the discussion below show where I create the client object and where connection to broker is attempted. At the bottom I posted the debug output for two test cases. One was disconnect/reconnect. The other was disconnect/stop broker/reconnect/start broker. The difference I see is that you are getting an untrapped error that propagates to HS while errors are all trapped and only make it to the debug log.

                        I suggest that you include the debug log (\data\mcsMQTT\mcsMQTT Debug.txt) to provide a more complete picture of your failure mode. This debug file does not erase prior data but overwrites. You may want to delete it before doing a controlled test.

                        The error trap that made it to HS log is at end of StartMQTTThread procedure. Other code referenced is also in this same procedure.

                        Code:
                                Catch ex As Exception
                                    hsWritelogEx(PLUGIN_NAME, "StartMQTTThread TagLine " & sLine, ex.Message)
                                End Try
                        The code generating the object reference error between tag 10 and 11 is:
                        Code:
                                                    hsWritelog(PLUGIN_DEBUG, "Calling MQTT Connect")
                                                    sLine = "10"
                        
                                                    Try
                                                        iBrokerResponse = oMQTTClient(iBroker).Connect(
                                                            clientId,
                                                            gMQTTBrokerUsername(iBroker),
                                                            gMQTTBrokerPassword(iBroker),
                                                            gDefaultRetain,
                                                            gDefaultQOS,
                                                            True,
                                                            gThisComputer & "/" & PLUGIN_NAME & "/LWT",
                                                            "Offline",
                                                            True,
                                                            60)  'False,, 'Messages.MqttMsgBase.QOS_LEVEL_EXACTLY_ONCE,
                                                        If bFirstPass(iBroker) Then
                                                            hsWritelog(PLUGIN_DEBUG, "MQTT Thread Broker " & gMQTTBroker(iBroker) & " Connect Response=" & iBrokerResponse.ToString)
                                                        End If
                        
                                                    Catch ex As Exception
                                                        hsWritelog(PLUGIN_DEBUG, "StartMQTT Connection attempt1 to Broker" & gMQTTBroker(iBroker) & ". Exception: " & ex.ToString() & " / InnerEx: " & ex.InnerException.ToString())
                                                        If gDebugLog Then
                                                            hsWritelogEx(PLUGIN_DEBUG, "StartMQTT Connection attempt1 to Broker " & gMQTTBroker(iBroker), ex.Message & ":" & ex.InnerException.Message)
                                                        End If
                                                        oMQTTClient(iBroker) = Nothing
                                                    End Try
                                                    sLine = "11"
                        Between tag 10 and 11 most of the code is in its own try/catch trap so it seems the object of interest is in catch portion of this trap. gMQTTBroker is the IP/name of the broker. oMQTTClient is the object to manage the broker connection. They became arrays when multiple broker support was added. Likely suspect is oMQTTClient, but should have seen the debug message before it that includes gMQTTBroker. There were also earlier uses of gMQTTBroker that did not generate an error trigger.

                        Earlier in the code sequence is creation of oMQTTClient with the following segment. If the object was (or was not) created then there should be something in the HS log if not created and debug log unconditionally about Calling MQTTclient.
                        Code:
                                                    hsWritelog(PLUGIN_DEBUG, "Calling MQTTclient")
                                                    sLine = "7"
                        
                                                    Try
                                                        oMQTTClient(iBroker) = New MqttClient(gMQTTBroker(iBroker),
                                                        gMQTTBrokerPort(iBroker),
                                                        bSecure,
                                                        caCert,
                                                        clientCert,
                                                        sslProtocol,
                                                        New Security.RemoteCertificateValidationCallback(AddressOf ValidateBrokerCertificate))
                                                        'New Security.LocalCertificateSelectionCallback(AddressOf SelectClientCertificate))
                                                    Catch ex As Exception
                                                        hsWritelog(PLUGIN_NAME, "StartMQTT Client attempt Failed to Broker" & gMQTTBroker(iBroker) & " " & ex.Message & ":" & ex.InnerException.Message)
                                                    End Try
                                                    sLine = "8"
                        Debug log for action of disconnect checkbox toggle. "Calling MQTT Connect" shows point of initial and then subsequent reconnect.

                        Code:
                        10/9/2019 10:55:55 AM    6997    | Spawning MQTT Threads  
                        10/9/2019 10:55:55 AM    7000    | mcsMQTT Debug MQTT Ready
                        10/9/2019 10:55:55 AM    7003    | MQTT Thread Started with broker 192.168.0.215, Shutdown=False, Disconnect=False, Client=False, Connected=False  
                        10/9/2019 10:55:55 AM    7006    | MQTT Thread Not Connected Yet  
                        10/9/2019 10:55:55 AM    7007    | Calling MQTTclient  
                        10/9/2019 10:55:55 AM    7008    | MQTT Thread Client Created for Broker 1  
                        10/9/2019 10:55:55 AM    7009    | MQTT Thread Client ID=mcsMQTT on MCS7  
                        10/9/2019 10:55:55 AM    7009    | Calling MQTT Connect  
                        10/9/2019 10:55:55 AM    7022    | MQTT Thread Broker 192.168.0.215 Connect Response=0  
                        10/9/2019 10:55:55 AM    7025    | MQTT Broker Connection Accepted, Connected=True to broker 192.168.0.215  
                        10/9/2019 10:55:55 AM    7030    | HSEvent LOG| 2| 10/9/2019 10:55:54 AM| mcsMQTT| MQTTClient is Connected to broker at 192.168.0.215 | | 0| | 0| 10/9/2019 10:55:54 AM  
                        10/9/2019 10:55:55 AM    7031    | MQTT Thread Subscribing  
                        10/9/2019 10:55:55 AM    7036    | MQTT Subscription Start  
                        10/9/2019 10:55:55 AM    7038    | MQTT Subscription Topics being selected  
                        10/9/2019 10:55:55 AM    7039    | MQTT Subscription Topics selected  
                        10/9/2019 10:55:55 AM    7041    | MQTTSubscribe List /  NoDiscovery=False to  
                        10/9/2019 10:55:55 AM    7043    | #  
                        10/9/2019 10:55:55 AM    7141    | ActoOnMessageForTrigger Topic BLEScan/2/LWT,Payload=Offline  
                        10/9/2019 10:55:55 AM    7145    | ActoOnMessageForTrigger Topic BLEScan/1/LWT,Payload=Online  
                        10/9/2019 10:55:55 AM    7147    | ActoOnMessageForTrigger Topic BLEScan/3/LWT,Payload=Online  
                        10/9/2019 10:55:56 AM    8525    | ActoOnMessageForTrigger Topic BLEScan/2/LWT,Payload=Online  
                        10/9/2019 10:56:05 AM    17525    | ActoOnMessageForTrigger Topic BLEScan/2/LWT,Payload=Offline  
                        10/9/2019 10:56:07 AM    19097    | ActoOnMessageForTrigger Topic BLEScan/2/LWT,Payload=Offline  
                        10/9/2019 10:56:10 AM    22078    | ActoOnMessageForTrigger Topic BLEScan/3/BlueCharm,Payload={"Scan":{"Address":"b0:91:22:f7:62:bf","RawRSSI":-82,"FilteredRSSI":-84.78},"Location":{"BeaconDistance":14,"BeaconFOM":11,"BeaconX":0,"BeaconY":0,"Zone":0}}  
                        10/9/2019 10:56:10 AM    22130    | ActoOnMessageForTrigger Topic BLEScan/3/ff-ff-ff-ff-ff-ff,Payload={"Scan":{"Address":"ff:ff:ff:ff:ff:ff","RawRSSI":-87,"FilteredRSSI":-84.86},"Location":{"BeaconDistance":14,"BeaconFOM":11,"BeaconX":0,"BeaconY":0,"Zone":0}}  
                        10/9/2019 10:56:10 AM    22174    | ActoOnMessageForTrigger Topic BLEScan/3/Feasycom,Payload={"Scan":{"Address":"DC:0D:30:47:02:09","RawRSSI":-70,"FilteredRSSI":-70.73},"Location":{"BeaconDistance":6,"BeaconFOM":11,"BeaconX":0,"BeaconY":0,"Zone":0}}  
                        10/9/2019 10:56:10 AM    22179    | ActoOnMessageForTrigger Topic BLEScan/3/42-00-07-B2-C6-C7,Payload={"Scan":{"Address":"42:00:07:B2:C6:C7","RawRSSI":-1,"FilteredRSSI": -1.00},"Location":{"BeaconDistance":-1,"BeaconFOM":0,"BeaconX":0,"BeaconY":0,"Zone":0}}  
                        10/9/2019 10:56:10 AM    22182    | ActoOnMessageForTrigger Topic BLEScan/3/45-00-E7-41-9B-60,Payload={"Scan":{"Address":"45:00:E7:41:9B:60","RawRSSI":-1,"FilteredRSSI": -1.00},"Location":{"BeaconDistance":-1,"BeaconFOM":0,"BeaconX":0,"BeaconY":0,"Zone":0}}  
                        10/9/2019 10:56:10 AM    22186    | ActoOnMessageForTrigger Topic BLEScan/3/45-00-E7-41-9B-60,Payload={"Scan":{"Address":"45:00:E7:41:9B:60","RawRSSI":-1,"FilteredRSSI": -1.00},"Location":{"BeaconDistance":-1,"BeaconFOM":0,"BeaconX":0,"BeaconY":0,"Zone":0}}  
                        10/9/2019 10:56:33 AM    45067    | ActoOnMessageForTrigger Topic BLEScan/2/LWT,Payload=Online  
                        10/9/2019 10:56:34 AM    46524    | Page Timing Start  
                        10/9/2019 10:56:35 AM    46725    | Sort > 0  
                        10/9/2019 10:56:35 AM    47041    | Page Timing End  
                        10/9/2019 10:56:42 AM    54064    | ActoOnMessageForTrigger Topic BLEScan/2/LWT,Payload=Offline  
                        10/9/2019 10:56:42 AM    54105    | ActoOnMessageForTrigger Topic BLEScan/2/LWT,Payload=Online  
                        10/9/2019 10:56:51 AM    63065    | ActoOnMessageForTrigger Topic BLEScan/2/LWT,Payload=Offline  
                        10/9/2019 10:56:52 AM    64633    | ActoOnMessageForTrigger Topic BLEScan/2/LWT,Payload=Offline  
                        10/9/2019 10:57:05 AM    77230    | Calling MQTTclient  
                        10/9/2019 10:57:05 AM    77233    | Calling MQTT Connect  
                        10/9/2019 10:57:05 AM    77251    | MQTT Broker Connection Accepted, Connected=True to broker 192.168.0.215  
                        10/9/2019 10:57:05 AM    77257    | MQTT Thread Subscribing  
                        10/9/2019 10:57:05 AM    77258    | HSEvent LOG| 2| 10/9/2019 10:57:05 AM| mcsMQTT| MQTTClient is Connected to broker at 192.168.0.215 | | 0| | 0| 10/9/2019 10:57:05 AM  
                        10/9/2019 10:57:05 AM    77281    | MQTT Subscription Start  
                        10/9/2019 10:57:05 AM    77283    | MQTT Subscription Unsubscribe  
                        10/9/2019 10:57:05 AM    77285    | MQTT Subscription Topics being selected  
                        10/9/2019 10:57:05 AM    77286    | MQTT Subscription Topics selected  
                        10/9/2019 10:57:05 AM    77293    | MQTTSubscribe List /  NoDiscovery=False to  
                        10/9/2019 10:57:05 AM    77294    | #
                        This test case disconnects mcsMQTT via checkbox. Mosquitto broker is stopped. Disconnect checkbox toggled back to connect state. Later Mosquitto broker started. All actions are as expected including the error trap diagnostic when unable to connect to Mosquitto.

                        Code:
                        10/9/2019 11:07:24 AM    0    | mcsMQTT Version 4.1.8.1 running at \\DELL-PC\Users\Public\Documents\LaptopVM\MQTTPlugin_HS3\bin, HS is at C:\Program Files\HomeSeer HS3
                        :
                        10/9/2019 11:07:31 AM    6808    | Background Init Filters - Background Complete  
                        10/9/2019 11:07:31 AM    6817    | Spawning MQTT Threads  
                        10/9/2019 11:07:31 AM    6837    | mcsMQTT Debug MQTT Ready
                        10/9/2019 11:07:31 AM    6850    | MQTT Thread Started with broker 192.168.0.215, Shutdown=False, Disconnect=False, Client=False, Connected=False  
                        10/9/2019 11:07:31 AM    6858    | MQTT Thread Not Connected Yet  
                        10/9/2019 11:07:31 AM    6860    | Calling MQTTclient  
                        10/9/2019 11:07:31 AM    6865    | MQTT Thread Client Created for Broker 1  
                        10/9/2019 11:07:31 AM    6867    | MQTT Thread Client ID=mcsMQTT on MCS7  
                        10/9/2019 11:07:31 AM    6868    | Calling MQTT Connect  
                        10/9/2019 11:07:31 AM    6883    | MQTT Thread Broker 192.168.0.215 Connect Response=0  
                        10/9/2019 11:07:31 AM    6885    | MQTT Broker Connection Accepted, Connected=True to broker 192.168.0.215  
                        10/9/2019 11:07:31 AM    6891    | MQTT Thread Subscribing  
                        10/9/2019 11:07:31 AM    6892    | HSEvent LOG| 2| 10/9/2019 11:07:30 AM| mcsMQTT| MQTTClient is Connected to broker at 192.168.0.215 | | 0| | 0| 10/9/2019 11:07:30 AM  
                        10/9/2019 11:07:31 AM    6897    | MQTT Subscription Start  
                        10/9/2019 11:07:31 AM    6898    | MQTT Subscription Topics being selected  
                        10/9/2019 11:07:31 AM    6899    | MQTT Subscription Topics selected  
                        10/9/2019 11:07:31 AM    6900    | MQTTSubscribe List /  NoDiscovery=False to  
                        10/9/2019 11:07:31 AM    6901    | #  
                        :
                        
                        10/9/2019 11:08:41 AM    77108    | Calling MQTTclient  
                        10/9/2019 11:08:41 AM    77110    | Calling MQTT Connect  
                        10/9/2019 11:09:21 AM    117254    | StartMQTT Connection attempt1 to Broker192.168.0.215. Exception: uPLibrary.Networking.M2Mqtt.Exceptions.MqttConnectionException: Exception connecting to the broker ---> System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it 192.168.0.215:1883
                           at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)
                           at System.Net.Sockets.Socket.Connect(EndPoint remoteEP)
                           at uPLibrary.Networking.M2Mqtt.MqttNetworkChannel.Connect()
                           at uPLibrary.Networking.M2Mqtt.MqttClient.Connect(String clientId, String username, String password, Boolean willRetain, Byte willQosLevel, Boolean willFlag, String willTopic, String willMessage, Boolean cleanSession, UInt16 keepAlivePeriod)
                           --- End of inner exception stack trace ---
                           at uPLibrary.Networking.M2Mqtt.MqttClient.Connect(String clientId, String username, String password, Boolean willRetain, Byte willQosLevel, Boolean willFlag, String willTopic, String willMessage, Boolean cleanSession, UInt16 keepAlivePeriod)
                           at HSPI_MCSMQTT.MqttAppModule.StartMQTTThread() in \\DELL-PC\Users\Public\Documents\LaptopVM\MQTTPlugin_HS3\MqttAppModule.vb:line 1084 / InnerEx: System.Net.Sockets.SocketException (0x80004005): No connection could be made because the target machine actively refused it 192.168.0.215:1883
                           at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)
                           at System.Net.Sockets.Socket.Connect(EndPoint remoteEP)
                           at uPLibrary.Networking.M2Mqtt.MqttNetworkChannel.Connect()
                           at uPLibrary.Networking.M2Mqtt.MqttClient.Connect(String clientId, String username, String password, Boolean willRetain, Byte willQosLevel, Boolean willFlag, String willTopic, String willMessage, Boolean cleanSession, UInt16 keepAlivePeriod)  
                        10/9/2019 11:09:23 AM    119543    | StartMQTT Connection attempt1 to Broker 192.168.0.215 Exception connecting to the broker:No connection could be made because the target machine actively refused it 192.168.0.215:1883
                        10/9/2019 11:09:43 AM    138777    | Calling MQTTclient  
                        10/9/2019 11:09:43 AM    138780    | Calling MQTT Connect  
                        10/9/2019 11:09:48 AM    144010    | StartMQTT Connection attempt1 to Broker192.168.0.215. Exception: uPLibrary.Networking.M2Mqtt.Exceptions.MqttConnectionException: Exception connecting to the broker ---> System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it 192.168.0.215:1883
                           at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)
                           at System.Net.Sockets.Socket.Connect(EndPoint remoteEP)
                           at uPLibrary.Networking.M2Mqtt.MqttNetworkChannel.Connect()
                           at uPLibrary.Networking.M2Mqtt.MqttClient.Connect(String clientId, String username, String password, Boolean willRetain, Byte willQosLevel, Boolean willFlag, String willTopic, String willMessage, Boolean cleanSession, UInt16 keepAlivePeriod)
                           --- End of inner exception stack trace ---
                           at uPLibrary.Networking.M2Mqtt.MqttClient.Connect(String clientId, String username, String password, Boolean willRetain, Byte willQosLevel, Boolean willFlag, String willTopic, String willMessage, Boolean cleanSession, UInt16 keepAlivePeriod)
                           at HSPI_MCSMQTT.MqttAppModule.StartMQTTThread() in \\DELL-PC\Users\Public\Documents\LaptopVM\MQTTPlugin_HS3\MqttAppModule.vb:line 1084 / InnerEx: System.Net.Sockets.SocketException (0x80004005): No connection could be made because the target machine actively refused it 192.168.0.215:1883
                           at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)
                           at System.Net.Sockets.Socket.Connect(EndPoint remoteEP)
                           at uPLibrary.Networking.M2Mqtt.MqttNetworkChannel.Connect()
                           at uPLibrary.Networking.M2Mqtt.MqttClient.Connect(String clientId, String username, String password, Boolean willRetain, Byte willQosLevel, Boolean willFlag, String willTopic, String willMessage, Boolean cleanSession, UInt16 keepAlivePeriod)  
                        10/9/2019 11:09:48 AM    144011    | StartMQTT Connection attempt1 to Broker 192.168.0.215 Exception connecting to the broker:No connection could be made because the target machine actively refused it 192.168.0.215:1883
                        10/9/2019 11:09:58 AM    154043    | Calling MQTTclient  
                        10/9/2019 11:09:58 AM    154046    | Calling MQTT Connect  
                        10/9/2019 11:09:59 AM    155564    | MQTT Broker Connection Accepted, Connected=True to broker 192.168.0.215  
                        10/9/2019 11:09:59 AM    155569    | MQTT Thread Subscribing  
                        10/9/2019 11:09:59 AM    155569    | HSEvent LOG| 2| 10/9/2019 11:09:59 AM| mcsMQTT| MQTTClient is Connected to broker at 192.168.0.215 | | 0| | 0| 10/9/2019 11:09:59 AM  
                        10/9/2019 11:09:59 AM    155592    | MQTT Subscription Start  
                        10/9/2019 11:09:59 AM    155594    | MQTT Subscription Unsubscribe  
                        10/9/2019 11:09:59 AM    155596    | MQTT Subscription Topics being selected  
                        10/9/2019 11:09:59 AM    155598    | MQTT Subscription Topics selected  
                        10/9/2019 11:09:59 AM    155599    | MQTTSubscribe List /  NoDiscovery=False to  
                        10/9/2019 11:09:59 AM    155601    | #  
                        :
                        10/9/2019 11:10:17 AM    172667    | Shutdown IO

                        Comment


                        • #13
                          Michael... I asked for the details.. thanks... a bit of re-learning needed, but I will attempt a look at the sequence and evaluate to my ESP crashing issue.

                          Two documents are attached
                          • Process used is in HS3 log
                          • MQTT log
                          Have not done any analysis.. hope you can quickly find a “feature” to change.

                          #2... not necessarily for you, but a new ESP issue for me. I tell you this in the event you see something strange in the log file.

                          This is something I have seen before and do not know how to clean.
                          • Press ON/OFF from HS3 screen
                          • Device does NOT change state
                          • HS3 does NOT change state
                          • MQTT is issued from HS3, received at Broker... don't know yet if it propagates further.
                          Press manual switch on Sonoff/Tasmota device
                          • Normal operation... device local state changes... HS3 screen properly reflects state
                          • Try again from HS3 screen.. still inoperative
                          My night's efforts are defined..LZH


                          #3 Have a log from the entire WED operation... but it is too large and probably not useful. Ask if you want me to cull through to important areas.
                          Attached Files

                          Comment


                          • #14
                            mcsMQTT restarts the debug file with each restart. I can see some remnants of the 4:35 broker connection, but I suspect the juicy part was overwritten. There was also the end of the 4:42 session. The debug needs to be saved after each shutdown so one can see what happened during the session.

                            Comment


                            • #15
                              Completed a new sequence (also provided what may be the OLD log you wanted)

                              File names should still have time stamps.

                              See attached
                              • Clean start Save log (2)
                              • Plug in off/on
                              • HS3 Log Cleared
                              • Check box on/off
                              • ESP Crash
                              • Save log (3)
                              • Plugin off
                              • Save log (4)
                              • Plugin on
                              • Save log (5)
                              Attached Files

                              Comment

                              Working...
                              X