Announcement

Collapse
No announcement yet.

xAP issues

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

  • xAP issues

    HI,

    I have now some newbie questions about xAP even after reading the manuals.

    I have been wondering about installation of the xap files because there are no installer files. The zip files contain the exe files. I have extracted xapmcshub and xapmscdatabase files to c:\Program FIles\xAP. When I right-click xap Hub on system tray, I can't open System status and System Config. I can only view traffic. Should I be able to open these two system things? When I restart my computer xaphub and xapdatabase don't start automatically so should I add them into the startup folder? One more thing. As I am going to use xapdatabase for logging data into an access database do I really need the xaphub? I am not going to use xap on any other computer.

    I also have problems with the actual xap plugin. I copied the hspi file on HS3 directory and when I try to enable the plugin I get the following error message (see the screencopy). What am I missing here?
    Attached Files

  • #2
    I can only view traffic. Should I be able to open these two system things?
    The system functions are not implemented.
    When I restart my computer xaphub and xapdatabase don't start automatically so should I add them into the startup folder?
    yes, they should go in the startup folder. I actually start everything in a controlled fashion with a vbs script and then this script is placed in the startup folder. I attached one of mine for reference.
    One more thing. As I am going to use xapdatabase for logging data into an access database do I really need the xap hub? I am not going to use xap on any other computer.
    Yes you need a hub. The hub is used to distribute socket port 3639 data to all xAP applications on the same computer. Only one application on a computer can listen on this port so the hub servers as the router within the computer.
    I also have problems with the actual xap plugin. I copied the hspi file on HS3 directory and when I try to enable the plugin I get the following error message (see the screencopy). What am I missing here?
    All the files in the zip are placed in the HS3 folder. It also expects the HS3 reference files there as well. These have moved since mcsXap was originally developed. I think HST now places them in \HTML\bin. They are HomeseerAPI.dll, HSCF.dll and Scheduler.dll. Just make a copy into the HS3 root folder.

    When setting up your xAP structure it is best to keep each application in its own folder. It is not a good idea to throw everything into the same location as there may be files names that are the same, but different content. In my environments I have a xAP parent folder and then under each I have \xapmcsHub, \xapmcsDatabase, \xapmcsChart etc. Only the HS plugin does not follow this pattern. They could also be organized under Program Files\ rather than xAP\ or whatever convention you elect.
    Attached Files

    Comment


    • #3
      Hi,

      Many thanks. I modified your script according to my needs and it's working now. I still have few issues. For some reason the setup page of xapmcsdatabase is not complete so it's somewhat difficult to make the setup (se the screen copy).

      I had "installed" the xap programs in different folders. Regarding the xap plugin I get the following error message in the log:

      Dec-23 08:27:25 Error Initializing plug-in(1): mcsXap Instance::Could not load file or assembly 'System.Data.SQLite, Version=1.0.87.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139' or one of its dependencies. The system cannot find the file specified.

      I am using Access and not SQLite. How can I disable this?
      Attached Files

      Comment


      • #4
        Copy the SQLite dll to the H3 root folder. HST puts it in a subfolder. Use you cursor to highlight the browser page so you can find the cell to change the background color. Now you have both foreground and background color as black. There is a .css StyleNoBody.css taht that I use and should be in several of the applications I have posted. The path to the style sheet is also a user setup.

        Comment


        • #5
          I copied all the dll's included in xapmcsDatabase both to HS3 root and bin. After this I restarted HS3 and now I get the following error message and homeseer doesn't start at all ( it's starting up but nothing happens). Any ideas?
          Attached Files

          Comment


          • #6
            I have deleted all the SQlite dlls both in the root and bin folders and rebooted my computer, but this didn't help. I still get the same error message and Homeseer is hanging. When I click OK on the message box, HS makes a shutdown which also takes very long time.
            Last edited by jlikonen; December 23rd, 2013, 03:36 AM.

            Comment


            • #7
              OK, I uninstalled HS3 and tried again. I copied MySQLData.dll in to the root. Now I get the following error messages in the log:

              12/23/2013 10:29:55 AM ~!~mcsXap~!~MakeTable Line 0 Could not load file or assembly 'System.Data.SQLite, Version=1.0.87.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
              12/23/2013 10:29:55 AM ~!~mcsXap~!~MakeTable Line 0 Could not load file or assembly 'System.Data.SQLite, Version=1.0.87.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
              12/23/2013 10:29:55 AM ~!~mcsXap~!~InitHW Line 0 Could not load file or assembly 'System.Data.SQLite, Version=1.0.87.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
              12/23/2013 10:29:55 AM ~!~Error~!~Initializing plug-in(1): mcsXap Instance::Could not load file or assembly 'System.Data.SQLite, Version=1.0.87.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
              12/23/2013 10:29:58 AM ~!~Info~!~Plugin mcsXap with instance: has disconnected
              12/23/2013 10:29:58 AM ~!~Plug-In~!~Finished initializing plug-in mcsXap

              It seems that when I copy System.DAta.SQLite.dll into the root it will screw up HS3 completely.

              Now I disabled xap plugin and closed HS. I then deleted System.DAta.SQLite.dll. After this HS seems to restart OK (with xap plugin dsiabled). After a while I get a message box with a message (see also the screen copy).:

              See the end of this message for details on invoking
              just-in-time (JIT) debugging instead of this dialog box.

              ************** Exception Text **************
              System.IO.IOException: The process cannot access the file 'C:\Program Files\xAP\xapmcsDatabase\Data\xapmcsDatabase.txt' because it is being used by another process.
              at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
              at System.IO.File.Delete(String path)
              at xapHTTPTray.xapGlobal.InitMessageFile()
              at xapHTTPTray.xapGlobal.TraceMessage(String& sMessage, Boolean& bShowMessage, Boolean& bDontBlinkIcon)
              at xapHTTPTray.xapGlobal.hsWritelogFile(String& sName, String& sName2)
              at xapHTTPTray.Application.WritelogFile(String& s1, String& s2)
              at xapmcsDatabase.XapDatabase.xap1Wire_Load(Object eventSender, EventArgs eventArgs)
              at System.Windows.Forms.Form.OnLoad(EventArgs e)
              at System.Windows.Forms.Form.OnCreateControl()
              at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
              at System.Windows.Forms.Control.CreateControl()
              at System.Windows.Forms.Control.WmShowWindow(Message& m)
              at System.Windows.Forms.Control.WndProc(Message& m)
              at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
              at System.Windows.Forms.ContainerControl.WndProc(Message& m)
              at System.Windows.Forms.Form.WmShowWindow(Message& m)
              at System.Windows.Forms.Form.WndProc(Message& m)
              at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(M essage& m)
              at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Mes sage& m)
              at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


              ************** Loaded Assemblies **************
              mscorlib
              Assembly Version: 2.0.0.0
              Win32 Version: 2.0.50727.5472 (Win7SP1GDR.050727-5400)
              CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
              ----------------------------------------
              xapmcsDatabase
              Assembly Version: 2.0.0.9
              Win32 Version: 2.0.0.9
              CodeBase: file:///C:/Program%20Files/xAP/xapmcsDatabase/xapmcsDatabase.exe
              ----------------------------------------
              System.Windows.Forms
              Assembly Version: 2.0.0.0
              Win32 Version: 2.0.50727.5468 (Win7SP1GDR.050727-5400)
              CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
              ----------------------------------------
              System
              Assembly Version: 2.0.0.0
              Win32 Version: 2.0.50727.5467 (Win7SP1GDR.050727-5400)
              CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
              ----------------------------------------
              System.Drawing
              Assembly Version: 2.0.0.0
              Win32 Version: 2.0.50727.5467 (Win7SP1GDR.050727-5400)
              CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
              ----------------------------------------
              Microsoft.VisualBasic
              Assembly Version: 8.0.0.0
              Win32 Version: 8.0.50727.5420 (Win7SP1.050727-5400)
              CodeBase: file:///C:/Windows/assembly/GAC_MSIL/Microsoft.VisualBasic/8.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualBasic.dll
              ----------------------------------------
              xapHTTPTray
              Assembly Version: 2.0.1.2
              Win32 Version: 2.0.1.3
              CodeBase: file:///C:/Program%20Files/xAP/xapmcsDatabase/xapHTTPTray.DLL
              ----------------------------------------
              System.Configuration
              Assembly Version: 2.0.0.0
              Win32 Version: 2.0.50727.5476 (Win7SP1GDR.050727-5400)
              CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
              ----------------------------------------
              System.Xml
              Assembly Version: 2.0.0.0
              Win32 Version: 2.0.50727.5476 (Win7SP1GDR.050727-5400)
              CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
              ----------------------------------------
              System.Web
              Assembly Version: 2.0.0.0
              Win32 Version: 2.0.50727.5474 (Win7SP1GDR.050727-5400)
              CodeBase: file:///C:/Windows/assembly/GAC_32/System.Web/2.0.0.0__b03f5f7f11d50a3a/System.Web.dll
              ----------------------------------------

              ************** JIT Debugging **************
              To enable just-in-time (JIT) debugging, the .config file for this
              application or computer (machine.config) must have the
              jitDebugging value set in the system.windows.forms section.
              The application must also be compiled with debugging
              enabled.

              For example:

              <configuration>
              <system.windows.forms jitDebugging="true" />
              </configuration>

              When JIT debugging is enabled, any unhandled exception
              will be sent to the JIT debugger registered on the computer
              rather than be handled by this dialog box.
              Attached Files

              Comment


              • #8
                In my install version 1.0.87 is in the HS3 folder and in the HS3\bin folder. I have older versions of the HS3 install that have 1.0.80. Since I have a current HS3 release it should be the 1.0.87. See what you have. I have attached the dll I have.
                Attached Files

                Comment


                • #9
                  Michael,

                  It have made some progress now. I copied the dll you posted into both places but this didn't solve all the problems. There were some error messages in the HS log related to another dll (SQLite.Interop.dll) which was only in the bin folder. I copied it to HS root and now I can enable the xap plugin. I can now open the setup page for the plugin. There is still one glitch, though (see attached screen copy). Any ideas where it comes from?

                  Many thanks for your help!
                  Attached Files

                  Comment


                  • #10
                    I normally get things like this when I try to start the application when it is already running.

                    Comment


                    • #11
                      OK, thanks for the info. Next step now is the setup and my aim is to populate the database using the xap plugin. Let's see whether there are any issues as I have been using mcstemp plugin for many years. I would like to continue using the old database.

                      I noticed that you have a xapWol plugin as well. I haven't had time yet to look at it, but I wonder whether that could be used with HSTouch (both in my IPad and IPhone) as well.

                      Comment


                      • #12
                        The database structure of mcsTemperature and xapmcsDatabase are the same, but the field names in xapmcsDatabase are internally generated rather than being a user input as was the case with mcsTemperature.

                        You have two choices to keep your mcsTemperature data with xapmcsDatabase. One is to use Access to rename the field/column/table names of the mcsTemperature database to those used with xapmcsDatabase. The second is to copy the mcsTemperature data into the xapmcsDatabase database. I have added a tool to help with the second option.

                        What is not obvious is what the xapmcsDatabase names need to be. This means it is best to start collecting data in xapmcsDatabase and let the field and table names be created. Once the structure has been setup then you have all the information you need.

                        The xapmcsDatabaseCopy tool will list all the xapmcsDatabase entries and then provide a pulldown selector for each that you select to map the names between the two databases. The Copy button provided will delete what is currently in xapmcsDatabase and copy all the mapped names from mcsTemperature to it. Note the location of the mcsTemperature database is a use input on this tool. The Update button will not delete existing data in xapmcsDatabase and only update the data that has been mapped that have the same SampleDate times.

                        If you do it manually by renaming then I suggest that you make a copy of mcsTemperature database into the location where you want xapmcsDatabase database and then let the new columns be added as you accept xap messages. Using Access you would capture the column name, delete the column and then rename an existing column that has the prior mcsTemperature data for the same sensor. The same approach can be used for the discrete table names.

                        When working with xapmcsDatabase you will notice that database fields are not created when a xap message has been Accepted, but only upon receipt of the next xap message for the newly Accepted entry. I find it useful to use xAP Message Viewer when setting up the database so the same message can be resent after it was Accepted to allow the database entry to be created. This is easier than trying to make a change to the source sensor. If all your xAP data is coming from HS3 then you can also use the Send BSC button on mcsXap to generate the traffic easily.


                        I don't remember too much about xapmcsWOL, but I do know it sends out the magic Wake On LAN packet. In the HS3 environment the easiest way to send this would be to create an Event that has an action of sending the xAP message that would result in xapmcsWOL delivering the WOL packet. If you get to that point then I can research the specifics. I believe there are other scripts/plugins that did this in HS2 and likely will also exist in HS3.

                        Comment


                        • #13
                          It seems that setting up xap is not as easy as I thought. I have problems with more or less everything. Perhaps we should try to solve them step by step.

                          I have installed xapHub and xapDatabase and the HS3 plugin which is enabled. I have also installed xap Message viewer. First problem is that I don't see anything on the xapmcsHub Status View page, so no traffic there. Also the Message Viewer doesn't show anything. I guess I should see the computer running the xap programs.

                          Comment


                          • #14
                            Since everything goes through the xapHub you will not expect to see much unless you see it there. Do you have multiple NIC on your PC? If so you can put the following in a file \Config\mcsXap.ini but change the data to reflect your NIC. Do this for every xAP application \Config folder including HS3.

                            [INTERFACE]
                            InterfaceAddress=192.168.0.13
                            BroadcastAddress=192.168.0.255

                            mcsxapHub user interface is from the tray icon with right click to View Traffic. In the lower right will be a count of messages that have been received on port 3639.

                            You also want to make certain you do not have firewall issues. Typically each application needs to be enabled as being approved through your firewall. It only needs to be given permission for local access.

                            Comment


                            • #15
                              I don't have a second NIC on my computer. I have tried to look at the View Traffic but the window is empty and also the count of messages is empty. I'm looking at xapHub on my local LAN so I guess I don't need to open any ports on the firewall.

                              Now I tried to copy the homeseer.mdb with xapmcsdatabasecopy but I get the following error message (see the attached screen copy). I also attach the xapmcsDatabase.txt file. What am I missing (again)?

                              I wish it was easier to setup the xAP.
                              Attached Files

                              Comment

                              Working...
                              X