Announcement

Collapse
No announcement yet.

Excessive CPU and Excessive MQTT Topics

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

    #31
    You made some good points and perspective that should make this plugin more friendly for new users. Thank You for taking the time to help make it better.

    I notice when I am in VS at breakpoint I will sometimes loose the broker and need to restart the plugin. There is logic to reconnect, but really have not exercised it nor have I looked at the Tasmota code to see what it does since I know my Sonoffs often reconnect.

    I am still bothered by the dynamic page update with divToUpdate that I cannot get to work. It would be so much better to see the additional setup options when a selection is made rather than needing to rebuild the entire page. Seems nobody on the board has run into a problem in this area as no response to my post asking for suggestions.

    The debug should be an easy fix.

    Comment


      #32
      Thank you Michael.

      Mar-17 4:59:10 AM Plug-In Finished initializing plug-in mcsMQTT
      Mar-17 4:59:11 AM Info Plugin mcsMQTT has connected. IP:127.0.0.1:46133
      Mar-17 4:59:11 AM Starting Plug-In Initializing plugin mcsMQTT ...
      Mar-17 4:59:11 AM mcsMQTT Version 3.1.0.0 Registered with Homeseer
      Mar-17 4:59:12 AM Starting Plug-In Plugin mcsMQTT started successfully in 756 milliseconds
      Mar-17 5:00:04 AM mcsMQTT MQTT Broker Connection Accepted
      - 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


        #33

        Comment


          #34
          You are correct about the div tags. I started over and rebuilt the API part of the plugin by copy-paste into the sample plugin from the SDK. Never really found the root cause, but it is working now and provides a much richer interface for the user. I'll upload tomorrow after some more testing.

          I did not see any issue with the debug selection.

          I'll also get to looking at the reconnect with the broker. I know the broker pings to test the connection, but don't know what logic it uses to drop a connection or if a second connection can be established when the first one may not be in a clean state. I spent much time with IP/Serial devices in mcsSprinklers trying to manage the connections to assure good communications to valve controllers. It was especially problematic for WiFi ones.

          Comment


            #35
            Here have not seen any disconnects between the POE RPi on the network using your plugin and the Red Node / MQTT running on the RPi.

            Same RPi is running ZNet like stuff using sertonet and never see disconnects but when I do it manually it abends Z-Wave and that abends Homeseer 3.

            I did point this out on the Beta HS3 sections months ago with earlier beta's of HS3.

            Relating to wireless here have been testing wirelessly connected tabletop screens and yes I get occasional disconnects but they do not affect HSTouch.

            Regular touchscreens are connected POE Gb these times.

            So far doing a manual disconnect of the Node Red RPi to your MQTT plugin doesn't seem to affect the plugin here ...well it doesn't quit.
            - 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


              #36
              Dynamic page refresh has been uploaded to updater as 3.1.1.0. There are two manual tables and one Acceptance table to make associations. As changes are made in manual they are reflected in the Acceptance one if that row is displayed. Any entries on the Acceptance table are reflected in the manual one. The manual tables can be used to enter associations that have not been identified by enumeration or discovery. If something has already been discovered or enumerated then the table can be used to edit the properties.

              I put the one-time setup tables at the start of the page, but when the MQTT broker has been setup then these goes to the end. This way the likely next step will be closer to the top of the page when it is requested.

              All in all this represents a significant change in the user interface while backward compatibility has been maintained.

              Comment


                #37
                The settings and info are much easier to understand. Seems like the page loads even faster?! Very nice!

                Not sure what's causing the debug log but it's still doing it. Tried enabling debug, then disabling debug (to toggle it), then disabled the PI, deleted the debug file, restarted the PI and the debug log comes back. See screenshot.

                One recommendation on the tooltip for the topic to be published, could you add something like this?

                "To send text such as "On" or "Off" in the topic payload instead of a number, go to the device's status graphic page, remove the Text Box range value control and add single values with the label as the payload to send to the broker."

                Something like this would help to clearly demonstrate how the feature works and possibly save someone time trying to figure it out.
                Attached Files

                Comment


                  #38
                  You are saying the debug setting is working, the the effect is that a debug file is always generated. If this is the case it may be intentional, I need to look. There are some error messages that I do not want to go to the HS log, but would like to have a place to store them and this may be the debug file. The checkbox is put additional information such as event callback data or timing information. Does the debug log contains anything of significance?

                  When a Topic has been Accepted and that topic's payload at time of acceptance has On, Off, Open or Closed then the Status Graphic Pairs and Control Buttons are are setup automatically. Are you referring to the case where you setup a Topic manually?

                  Comment


                    #39

                    Comment


                      #40
                      If you use the Accept checkbox it will look at the payload and setup the Value/Status/Graphic pairs based upon the payload. A blank payload is status only. On, Off, Open, Closed will setup those corresponding buttons with control values of 0 and 1. Next update I will also include 0 or 1 with default text of Off and On be be button setup. If the payload is numeric then it will do a number box for control. Otherwise it will do a text box for control.

                      If your hello world is the first and then you later publish real data before your Accept the topic then you will get the desired association.

                      My intention is to make the mapping of MQTT data and HS to be as automatic and seamless as possible.

                      If you do Manual setup then you select Status Only, Button, Number and Text options on the radio button. This became available with V3.1.0.0 thanks to your feedback. If Button option is selected then the VSP will be On/Off with values of 1/0.

                      I am adding a note reference to further edits via Device Management to the manual setup table to try to address your tool tip suggestion.

                      Another thing that I overlook often is that a HS device is always status only until a Command Topic is entered. So initially when a Topic is accepted a command topic text box is shown. If this box is left blank then the device remains status only. If some topic to publish is entered then it will look at the payload to assess what type of command control should be setup in HS.
                      Last edited by Michael McSharry; March 19, 2018, 03:49 PM.

                      Comment


                        #41
                        I have been looking at the disconnect/reconnect. I have a positive way of detecting a lost connection but still working to reestablish one. Likely a timing problem so I expect to resolve it soon.

                        I also put the three segments on a tabbed page. This looks much cleaner. Some other features added as well. I will upload after I get the reconnect working.

                        Comment


                          #42

                          Comment


                            #43
                            More good ideas and I will see what I can do.

                            I did upload V3.1.2.0 which again has significant improvement. The change log at the sticky in this forum provides the noticeable items.

                            Manual is now quite dated, but wait until high level of change stops before I capture new screen shots and update.

                            Comment


                              #44
                              Version 3.1.4.0 has been posted and it add the retention of messages with filtering on the display. Let me know if I have covered all that you asked.

                              My next step is to capture the past couple weeks revisions in the manual.

                              On the General tab there is a new selection for mcsMQTT management where the days of history is specified and the classes of messages that will be retained for this period. The History tab then provides the filter controls to select what is of interest. A new page/tab is shown with the messages that have been requested.

                              Comment


                                #45

                                Comment

                                Working...
                                X