Announcement

Collapse
No announcement yet.

mcsXap 3.0.0.60 / R-Pi3: settings not saved

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

    mcsXap 3.0.0.60 / R-Pi3: settings not saved

    System
    R-Pi3, JesseLite 4.4
    HS3 Pro 3.0.0.297 (Linux)
    xAP plugin 3.0.0.60
    xapmcsHubConsole (xAP traffic is generated on a separate Windows machine that has been running great for many years.)

    Issue: the settings are not saved when the plugin is shut down or the system is restarted.

    The plugin will start normally and I can 'accept' devices for inclusion in HS. Devices are properly updated in HS for a few days until something goes awry with xapmcsHubConsole (or the plugin?) and devices are no longer updated or listed on the plugin page.

    - Killing and restarting xapmcsHubConsole does not resolve the problem.
    - Restarting the plugin does not resolve the problem (and errors appear in the HS log)
    - Killing and restarting xapmcsHubConsole then restarting HS seems to be the only way to get xAP working again on the machine.

    Here are the log entries when I close the plugin:
    Code:
    Nov-12 07:42:23	 	Info	Plugin mcsXap with instance: has disconnected
    Nov-12 07:42:23	 	mcsXap	SaveXapDictionaryToDB Message has a object of type xapreport and was not recorded to DB
    Nov-12 07:42:23	 	mcsXap	SaveXapDictionaryToDB Message has a object of type xapreport and was not recorded to DB
    Nov-12 07:42:23	 	mcsXap	SaveXapDictionaryToDB Message has a object of type xapreport and was not recorded to DB
    Nov-12 07:42:23	 	mcsXap	SaveXapDictionaryToDB Message has a object of type xapreport and was not recorded to DB
    Nov-12 07:42:23	 	mcsXap	SaveXapDictionaryToDB Message has a object of type xapreport and was not recorded to DB
    Nov-12 07:42:23	 	mcsXap	SaveXapDictionaryToDB Message has a object of type xapreport and was not recorded to DB
    Nov-12 07:42:23	 	mcsXap	SaveXapDictionaryToDB Message has a object of type xapreport and was not recorded to DB
    Nov-12 07:42:23	 	mcsXap	SaveXapDictionaryToDB Message has a object of type xapreport and was not recorded to DB
    Nov-12 07:42:23	 	mcsXap	SaveXapDictionaryToDB Message has a object of type xapreport and was not recorded to DB
    Nov-12 07:42:23	 	mcsXap	SaveXapDictionaryToDB Message has a object of type xapreport and was not recorded to DB
    Nov-12 07:42:23	 	mcsXap	SaveXapDictionaryToDB Message has a object of type xapreport and was not recorded to DB
    Nov-12 07:42:23	 	mcsXap	SaveXapDictionaryToDB Message has a object of type xapreport and was not recorded to DB
    Nov-12 07:42:23	 	mcsXap	SaveXapDictionaryToDB Message has a object of type xapreport and was not recorded to DB
    Nov-12 07:42:23	 	mcsXap	SaveXapDictionaryToDB Message has a object of type xapreport and was not recorded to DB
    Nov-12 07:42:23	 	mcsXap	SaveXapDictionaryToDB Message has a object of type xapreport and was not recorded to DB
    Nov-12 07:42:23	 	mcsXap	SaveXapDictionaryToDB Message has a object of type xapreport and was not recorded to DB
    Nov-12 07:42:23	 	mcsXap	SaveXapDictionaryToDB Message has a object of type xapreport and was not recorded to DB
    Nov-12 07:42:23	 	mcsXap	SaveXapDictionaryToDB Message has a object of type xapreport and was not recorded to DB
    Nov-12 07:42:23	 	mcsXap	SaveXapDictionaryToDB Message has a object of type xapreport and was not recorded to DB
    Nov-12 07:42:23	 	mcsXap	SaveXapDictionaryToDB Message has a object of type xapreport and was not recorded to DB
    Nov-12 07:42:23	 	mcsXap	SaveXapDictionaryToDB Message has a object of type xapreport and was not recorded to DB
    Nov-12 07:42:23	 	mcsXap	SaveXapDictionaryToDB Message has a object of type xapreport and was not recorded to DB
    Nov-12 07:42:23	 	mcsXap	SaveXapDictionaryToDB Message has a object of type xapreport and was not recorded to DB
    Nov-12 07:42:23	 	mcsXap	SaveXapDictionaryToDB Message has a object of type xapreport and was not recorded to DB
    Nov-12 07:42:23	 	mcsXap	SaveXapDictionaryToDB Message has a object of type xapreport and was not recorded to DB
    Nov-12 07:42:23	 	mcsXap	SaveXapDictionaryToDB Message has a object of type xapreport and was not recorded to DB
    Nov-12 07:42:23	 	Plug-In	Shutting down Plug-In: mcsXap
    And the plugin restart:
    Code:
    Nov-12 08:23:00	 	Plug-In	Finished initializing plug-in mcsXap
    Nov-12 08:22:50	 	mcsXap	Using xAP port 33550
    Nov-12 08:22:48	 	mcsXap	Version 3.0.60 Registered with Homeseer
    Nov-12 08:22:48	 	Info	Plugin mcsXap has connected. IP:127.0.0.1:55128
    When the plugin is restarted, all of the previously accepted devices are no longer checked and checking them creates more duplicate devices in HS. I also noticed that the date of HomeSeer/Data/mcsXap.db has not unchanged since the plugin was installed. The permissions for this file are the same as the HS DB: -rw-r--r--.

    Any thoughts?
    Best regards,
    -Mark-

    If you're not out on the edge, you're taking up too much room!
    Interested in 3D maps? Check out my company site: Solid Terrain Modeling

    #2
    I can try to setup a Linux environment when I return next week. From memory, the database saves should happen every time the setup page is saved. I would expect errors generated at that time as well if data is not being saved.

    I think the .NET/mono version of xap hub periodically (~10 minutes) status that contains the counts of clients and messages sent/received. This data should help isolate if the hub or the plugin has lost xAP connectivity. I think it is a schema such as hub.statistics.

    Comment


      #3
      Thanks Michael, I sure appreciate the assistance. BTW, no rush at all since this is a test rig and not a production machine.
      Best regards,
      -Mark-

      If you're not out on the edge, you're taking up too much room!
      Interested in 3D maps? Check out my company site: Solid Terrain Modeling

      Comment


        #4
        A quick update: when checking this HS system today I find it very sluggish. I SSH to the box and (using top) find the HSPI_MCSXAP.exe process pegged at 400 %CPU and remaining there. The plugin setup page takes over a minute to load but does eventually respond. No errors in the HS log. FYI, the HS process (HSconsole.exe) is hovering around 1.5% CPU during this time.

        Disabling the plugin (from Manage Plugins) results in the log entries listed in my first post above, and the plugin .exe process does eventually terminate.

        Re-enabling the plugin brings CPU usage for the plugin back into the normal 0.5% range, HS log entries are normal, plugin appears to be receiving xAP traffic and the system is once again responsive.
        Best regards,
        -Mark-

        If you're not out on the edge, you're taking up too much room!
        Interested in 3D maps? Check out my company site: Solid Terrain Modeling

        Comment


          #5
          Originally posted by Michael McSharry View Post
          I think the .NET/mono version of xap hub periodically (~10 minutes) status that contains the counts of clients and messages sent/received. This data should help isolate if the hub or the plugin has lost xAP connectivity. I think it is a schema such as hub.statistics.
          Thanks. I monitored my xAP system (using xFX viewer) for a 24hr period but did not see any 'hub.statistics' message (or anything like it) - just heartbeats from each of the machines running a xAP hub. BTW, I am only running your hub on this R-Pi box and utilizing the xFX hub on my production Windows HS box.
          Best regards,
          -Mark-

          If you're not out on the edge, you're taking up too much room!
          Interested in 3D maps? Check out my company site: Solid Terrain Modeling

          Comment


            #6
            I setup hs3 .297 on RPI-3 by following instructions on post #4 at http://board.homeseer.com/showthread.php?t=175652. Copied the mcsXap zip to HomeSeer folder and xapmcsHubConsole files to a usr/local/xAP subfolder. Been running this week with my normal network xAp traffic and a few devices accepted for HS3. No other HS3 plugins or events setup.

            I agree that hub statistics do not appear as xAP.Info. Only in response to a message (e.g. xAP.Query) directed to the hub. As an example that will work for your as well.
            Code:
            xap-header
            {
            v=13
            hop=1
            uid=FF.0005:0040
            class=xAPBSC.query
            source=mcs.OneWire.PRO100:xapmcs1Wire_Air_Return.ED0000002C744928.Temperature
            target=mcs.hub.*
            }
            xAPBSC.query
            {
            ID=*
            }
            The xapmcsHubConsole response to this query was as shown below showing that 32853 messages were forwarded to mcsXap plugin from the 33161 that were received by the hub. Don't recall what filtering is done, but seems like it would have shown in the bad message or duplicate count. Does not matter for you are trying to investigate.
            Code:
            xap-header
            {
            v=13
            hop=1
            uid=FF.00FF:0000
            class=Hub.Statistics
            source=mcs.hub.HomeTrollerZeeS2V2
            }
            Hub.Counts
            {
            Received=33161
            Forwarded=32853
            BadFormat=0
            Duplicates=0
            }
            Hub.Node.1
            {
            Node=mcs.XapHS3.HomeTrollerZeeS2V2
            Count=32853
            Port=45652
            }
            I did confirm that I get the same Log messages you received upon plugin disconnect. This was caused by an object type being lower case under Linux and mixed case under Windows. I made the conditional case insensitive and the error messages no longer appear in the log with http://mcsSprinklers.com/mcsXap_3_0_0_62_HS3.zip When I did enable with 3.0.0.62 my HS3 devices previously selected when using 3.0.0.61 remained which implies that the xAP/HS3 device relationships were previously saved in the database.

            Give 3.0.0.62 a try to see if addresses your issues.

            Comment


              #7
              I did create .Net 4.0 version of the hub that is attached and it overcame the warning message about version compatibility. How do you auto start the hub?

              Another note. If you start xapmcsHubConsole.exe from a console window then every message will be echoed to the console. Another means to aid in debugging.
              Attached Files
              Last edited by Michael McSharry; November 26, 2016, 05:07 PM.

              Comment


                #8
                Thank you very much for the updated version Michael! I will install, test and let you know what I find. Also, thanks for the updated hub .exe and for the info on querying the hub. I'll give this a try as well.

                Regarding auto-starting the hub, I was doing this in the HS startup script using sudo mono /usr/HomeSeer/xAP/xapmcsHubConsole/xapmcsHubConsole.exe & to run it as a service, but found that it's not 100% reliable and sometimes the xAP plugin would not see any traffic at HS startup even though the hub was reporting heartbeats on the network. So for now I simply start the hub manually.

                Thanks again!
                Best regards,
                -Mark-

                If you're not out on the edge, you're taking up too much room!
                Interested in 3D maps? Check out my company site: Solid Terrain Modeling

                Comment


                  #9
                  I looked into the autostarting of Linux xAP hub and discovered the issue is that when started without a login the Ethernet interfaces were only showing 127.0.0.1. When started from a login then the network IP was showing up. To address this I changed the behavior of how the IP specified in Config/mcsXap.ini was handled by the hub. Previously the user-specified IP was ignored if it was not discovered during startup. Now if no other interface is discovered beyond 127.0.0.1 the user-specified one will be used. This will aid in periodic or power-interrupt restarting of the Linux computer so the xAP hub will start automatically and route the xAP traffic.

                  Comment

                  Working...
                  X