Announcement

Collapse
No announcement yet.

mcsMQTT Plugin

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

    You are correct that there is nothing in the debug log related to device 548. What should happen is an HSEvent call to mcsMQTT should be made by HS when the Zwave device changes to "Running". mcsMQTT will then recognize that this device has a publish topic and will then publish it via MQTT.

    I expected to see other HSEvent calls where HS informs mcsMQTT that a device has changed. These also were not in the debug. I added debug to 3.3.4.2 that records mcsMQTT registering for the HSEvent callback.
    What I am trying to investigate is why HS is not calling mcsMQTT when device 548 (or any device) changes. mcsMQTT registers a callback during initialization if there is a non-plugin device, and later if a device has been accepted and there were no devices accepted before.

    In 3.3.4.2 I added debug to confirm that the callback is being requested. If not then the next step to look deeper as to why not. If it has then the next step is to look deeper why HS is not doing the callbacks. Since this should happen during initialization all that is needed is is the debug from 3.3.4.2 and info of interest will be in the first minute.

    Comment


      Michael,
      Do you need me to do anything else? Very willing to do what I can.
      Thanks
      Bruce

      Comment


        I would like to see the debug with version 3.3.4.2. Data of interest should be in the first couple minutes. Might as well post \Data\mcsMQTT\mcsMQTT.db as well so I have a complete picture.

        Comment


          Michael,
          Here is the debug.txt file and the db file. I had to rename the db file to db.txt to get it to upload.
          I had general debug on, shutdown the plugin, updated to 3.4.4.2,
          restarted the plugin, then toggled the device (548) from the device management page, then ran the event for on and then the event for off.


          Hope I captured what you need.
          Bruce
          Attached Files

          Comment


            The debug file inside the zip is dated yesterday and looks just like the prior one. It also looks odd with the start on 5/12 and later on 5/13 and then back to 5/12. There seems to be something wrong with this file. Suggest deleting it when mcsMQTT is not running and getting a fresh start with it.

            The database looks ok with 548 present and structure as expected.

            I expect to release 3.3.5.0 later today and I will put a little more in the debug trace related to HSEvent. You can try again with it.

            Comment


              That's strange. I don't know what happened. I just looked at the debug file and it had todays date and started when I restarted the PI. I will re-upload it. I will try the new version and give you the same files after I run the events.
              Thanks
              Bruce
              Attached Files

              Comment


                I have put 3.3.5.0 in updater. Check your General setup to confirm that "HS Device Discovery" on General Tab has the radio selected to be to enumerate non-plugin devices on startup. It seems that this may not be happening so mcsMQTT does not know it has any and will not request a callback for non-plugin device changes.

                Comment


                  Plug-in is no longer responding to mqtt topics and debug log files are huge!

                  Michael, this evening my setup stopped working. I am on version 3.3.4.2. I noticed my debug log got HUGE in a hurry. The files were upwards of 1/2 a gig in the matter of a few minutes. When I looked at the files, here is what I saw:

                  5/14/2018 9:30:15 PM 1 | mcsMQTT Version 3.3.4.2 running at C:\Program Files (x86)\HomeSeer HS3, HS is at C:\Program Files (x86)\HomeSeer HS3
                  5/14/2018 9:30:15 PM 19 | mcsMQTT InitHW ComputerName= HA01, IOEnabled=False
                  5/14/2018 9:30:16 PM 165 | mcsMQTT Debug InitHW Database Ready
                  5/14/2018 9:30:16 PM 168 | mcsMQTT Debug Receive Ready
                  5/14/2018 9:30:16 PM 172 | mcsMQTT Debug Trigger Ready
                  5/14/2018 9:30:16 PM 248 | Spawning MQTT Threads
                  5/14/2018 9:30:16 PM 250 | mcsMQTT Debug MQTT Ready
                  5/14/2018 9:30:16 PM 250 | HW Init Complete
                  WebPageCount=0
                  WebPageCount=0
                  WebPageCount=0
                  WebPageCount=0
                  ...


                  The last line shown goes on to line number 3420
                  Beginning on line number 3421, I see the following repeating for millions of lines:

                  Register Events 1, bValueCallbackRegistered=False, bStringCallbackRegistered=False
                  WebPageCount=0

                  The files get HUGE in a matter of moments, even WHEN LOGGING IS DISABLED.

                  I disabled the plug-in for now as it is filling my hard drive in short order. The last file got to 900MB in less than 10 minutes time.

                  I did upgrade to version 3.3.5.0 to no avail. I attached a screenshot of my settings.

                  FYI, I did a windows update this evening. That seems to be when this started.

                  Best,
                  Frank
                  Attached Files

                  Comment


                    Removed the subject debug in 3.3.5.1

                    Comment


                      Michael,
                      Thank you. That seems to have done it.
                      I now have to go through and reject 300 devices.
                      That is why I hadn't ticked that box first.
                      I have attached the debug file and the data base again.

                      Anything else I need to know?

                      Thanks again, I really appreciate all the work you have put into this.
                      It helps tie things together.
                      I really like the charting also

                      Bruce
                      Attached Files

                      Comment


                        What I should do is recognize the ones that are in the database and not depend upon a new enumeration. This is an oversight that I need to fix.

                        Comment


                          Michael, that stopped the log file from growing. Now my CPU utilization is high for the plugin (consistently in the 40%+ range). Additionally, my associated devices are now gone and none of the MQTT messages trigger events either. Screenshot and db file attached.

                          Thank you for your work on this plugin Michael and for the years of work on the other plugins you have shared.

                          Best,
                          Frank
                          Attached Files
                          Last edited by qwiksilver96; May 15, 2018, 05:19 AM. Reason: attached db file

                          Comment


                            Your database has no subscribed messages. Only non-plugin devices. Good that backup databases are created. I would expect that in the HS Log or Debug Log that there is something that indicates why the database lost its data and may help understand your CPU use.

                            Something odd about this is that mcsMQTT does not delete rows from the table. It only updates contents of existing rows and add new rows. It is more like the database was deleted from the folder somehow and a new database was created.

                            Comment


                              I now have to go through and reject 300 devices.
                              That is why I hadn't ticked that box first.
                              What I should do is recognize the ones that are in the database and not depend upon a new enumeration. This is an oversight that I need to fix.
                              Version 3.3.6.0 has this corrected. May be too late for you. If not you can restore the prior database and setting for enumeration and 3.3.6.0 should see HS device changes and then publish.

                              Comment


                                I already rejected them last night. Didn't take that long. The first few
                                page refreshes took a long time, but I figured that from previous posts.

                                Worked like a charm overnight and today, doing what I expected.
                                Thanks again,
                                Bruce

                                Comment

                                Working...
                                X