Announcement

Collapse
No announcement yet.

xapmcsdatabase /sqlexpress / mcsxapHS3 errors

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

  • xapmcsdatabase /sqlexpress / mcsxapHS3 errors

    HS2/xapmcsDatabase/xapcharts and sqlexpress has been working quite well for me for sometime (once the initial setup difficulties had been overcome!)

    Now trying to get the combination to work with HS3 and some devices are not working with SQLExpress, a syntax error message appears and all db logging stops.

    The first error message is something like

    <small>15/12/2014 21:33:05 | 15/12/2014 21:33:05 | ExecuteCommand UPDATE tblPeriodic SET amcsXap_TS 7_00FAU2=7380 WHERE ID=6 Line 171 Incorrect syntax near '7'.

    If I deselect "accept" in the xapmcsdatabase interface I get this

    </small><small>15/12/2014 21:34:13 | 15/12/2014 21:34:13 | Database Schema Keys ,mcsXap_TS 7_00FAU2 are in database but not selected for further data collection. Prefix=a, HighRate=False

    Shortly followed by this

    </small><small>15/12/2014 21:34:57 | 15/12/2014 21:34:57 | ExecuteCommand INSERT INTO tblPeriodic (SampleDate,aB7000802011A6B10,a6900080200F6B910,a8C000802011 0FA10,aE30008020118B510,aF20008018A3C8310,aFB000800979B5B10, a63000802011F5E10,a380008020135BF10,amcsXap_Gara_00CBU6,amcs Xap_TS 7_00FAU2) SELECT '2014-12-15 21:34:57',4480,6110,3600,2000,1300,3400,2250,2100,52000,7380 Line 171 Incorrect syntax near '7'.

    In order to get db logging restarted I have to delete the column in SQLexpress and restart xapmcsDatabase. I've tried to see if I can see some common element which could cause the problem, but with no success. At first I thought that a spurious space was being intoduced into the SQLexpress column name (amcsXap_HW b_01A9U47 and amcsXap_Low _019FU43 produce error messages and have spaces, but amcsXap_CH-T_019DU31 doesn't have a space and also gives an error message).

    Another issue: some devices seem to change the database column spontaneously; one device has created amcsXap_Dini_001CU76, amcsXap_Dini_001CU75 and a couple of others that I've deleted.

    Also, nearly all of the devices that I'm trying to log are temperature sensors, but xapmcsDatabase seems to generate a new sensor type suffix for every device. They look as if they should be editable, but they don't seem to be.

    Any ideas?

    Bill
    </small>

  • #2
    The initial error is based upon the device "amcsXap_TS 7_00FAU2" which has a space in its name. Space is not a valid character in an xAP field. Trace back to see what is causing the space to appear. What does the source message look like in xAP Message Viewer?

    Comment


    • #3
      Originally posted by Michael McSharry View Post
      The initial error is based upon the device "amcsXap_TS 7_00FAU2" which has a space in its name. Space is not a valid character in an xAP field. Trace back to see what is causing the space to appear. What does the source message look like in xAP Message Viewer?
      This is the xapmcsdatabase debug log when the message appears.

      <small>17/12/2014 08:31:25 | 17/12/2014 08:31:25 |_Debug ReadMessage Callback from mcs.XapHS3.Mahler:Garage_TS_7_Code.mcsXap_TS 7_00FA
      17/12/2014 08:31:25 | 17/12/2014 08:31:25 | Debug ReadMessage Update sValue=52.1; sDisplay=52.1; Stip=52.1; Make=52.1
      17/12/2014 08:31:25 | 17/12/2014 08:31:25 |_Debug SendToSocket xap-header { v=13 hop=1 uid=FF.0006:00 class=Homeseer.Event source=mcs.Database.Mahler } Event.Log {
      17/12/2014 08:31:25 | 17/12/2014 08:31:25 | Debug ReadMessage Update2 sValue=52.1
      17/12/2014 08:31:25 | 17/12/2014 08:31:25 |_Debug SendToSocket xap-header { v=13 hop=1 uid=FF.0006:00 class=Homeseer.Event source=mcs.Database.Mahler } Event.Log {
      17/12/2014 08:31:25 | 17/12/2014 08:31:25 | ExecuteCommand UPDATE tblPeriodic SET amcsXap_TS 7_00FAU2=5210 WHERE ID=945 Line 171 Incorrect syntax near '7'.
      17/12/2014 08:31:25 | 17/12/2014 08:31:25 |_Debug ReadMessage Targeted=False, Unknown=True
      17/12/2014 08:31:25 | 17/12/2014 08:31:25 |_Debug ReadMessage Callback from mcs.Database.Mahler
      17/12/2014 08:31:25 | 17/12/2014 08:31:25 |_Debug ReadMessage Targeted=False, Unknown=True
      17/12/2014 08:31:25 | 17/12/2014 08:31:25 |_Debug ReadMessage Callback from mcs.XapHS3.Mahler:Garage_TS_7_Code.mcsXap_TS 7_00FA
      17/12/2014 08:31:25 | 17/12/2014 08:31:25 | Debug ReadMessage Update sValue=52.1; sDisplay=52.1; Stip=52.1; Make=52.1
      17/12/2014 08:31:25 | 17/12/2014 08:31:25 |_Debug SendToSocket xap-header { v=13 hop=1 uid=FF.0006:00 class=Homeseer.Event source=mcs.Database.Mahler } Event.Log {
      17/12/2014 08:31:25 | 17/12/2014 08:31:25 | Debug ReadMessage Update2 sValue=52.1
      17/12/2014 08:31:25 | 17/12/2014 08:31:25 |_Debug SendToSocket xap-header { v=13 hop=1 uid=FF.0006:00 class=Homeseer.Event source=mcs.Database.Mahler } Event.Log {
      17/12/2014 08:31:25 | 17/12/2014 08:31:25 | ExecuteCommand UPDATE tblPeriodic SET amcsXap_TS 7_00FAU2=5210 WHERE ID=945 Line 171 Incorrect syntax near '7'.

      And here is the debug ouput from an erroring device with no spaces in the name.

      </small>
      <small>17/12/2014 08:52:41 | 17/12/2014 08:52:41 |_Debug ReadMessage Targeted=False, Unknown=True
      17/12/2014 08:52:41 | 17/12/2014 08:52:41 |_Debug ReadMessage Callback from mcs.Database.Mahler
      17/12/2014 08:52:41 | 17/12/2014 08:52:41 |_Debug ReadMessage Targeted=False, Unknown=True
      17/12/2014 08:52:41 | 17/12/2014 08:52:41 |_Debug ReadMessage Callback from mcs.XapHS3.Mahler:Garage_CH-TS-bot-ret_Code.mcsXap_CH-T_019D
      17/12/2014 08:52:41 | 17/12/2014 08:52:41 | Debug ReadMessage Update sValue=37.4; sDisplay=37.4; Stip=37.4; Make=37.4
      17/12/2014 08:52:41 | 17/12/2014 08:52:41 |_Debug SendToSocket xap-header { v=13 hop=1 uid=FF.0006:00 class=Homeseer.Event source=mcs.Database.Mahler } Event.Log {
      17/12/2014 08:52:41 | 17/12/2014 08:52:41 | Debug ReadMessage Update2 sValue=37.4
      17/12/2014 08:52:41 | 17/12/2014 08:52:41 |_Debug SendToSocket xap-header { v=13 hop=1 uid=FF.0006:00 class=Homeseer.Event source=mcs.Database.Mahler } Event.Log {
      17/12/2014 08:52:41 | 17/12/2014 08:52:41 | ExecuteCommand UPDATE tblPeriodic SET amcsXap_CH-T_019DU31=3740 WHERE ID=947 Line 171 Incorrect syntax near '-'.</small>

      Comment


      • #4
        mcs.XapHS3.Mahler:Garage_TS_7_Code.mcsXap_TS 7_00FA
        indicates that mcsXap plugin is not replacing the spaces with underscores in the name. I will take a look. Right now I am trying to get jquery working with mcsXap to give the same feel as other HS3 software as well as overcome the long times to process setup page changes.

        Comment


        • #5
          Give this a try for mcsXap on HS3. It is a prior version before I started converting to jquery.
          Attached Files

          Comment


          • #6
            Thanks for the replies.

            That version addresses the spaces issue. A duplicate set of xapmcsDatabase entries are produced with underscores instead of spaces and trying one seems to work.

            However, an entry that doesn't have spaces, but produces errors still produces errors.

            <small>18/12/2014 11:08:17 | 18/12/2014 11:08:17 |_Debug ReadMessage Callback from mcs.XapHS3.Mahler:Garage_CH-TS-bot-ret_Code.mcsXap_CH-T_019D
            18/12/2014 11:08:17 | 18/12/2014 11:08:17 | Debug ReadMessage Update sValue=29.8; sDisplay=29.8; Stip=29.8; Make=29.8
            18/12/2014 11:08:17 | 18/12/2014 11:08:17 |_Debug SendToSocket xap-header { v=13 hop=1 uid=FF.0006:00 class=Homeseer.Event source=mcs.Database.Mahler } Event.Log {
            18/12/2014 11:08:17 | 18/12/2014 11:08:17 | Debug ReadMessage Update2 sValue=29.8
            18/12/2014 11:08:17 | 18/12/2014 11:08:17 |_Debug SendToSocket xap-header { v=13 hop=1 uid=FF.0006:00 class=Homeseer.Event source=mcs.Database.Mahler } Event.Log {
            18/12/2014 11:08:17 | 18/12/2014 11:08:17 | ExecuteCommand UPDATE tblPeriodic SET amcsXap_CH-T_019DU31=2980 WHERE ID=1704 Line 171 Incorrect syntax near '-'.</small>
            Last edited by billt; December 18th, 2014, 06:15 AM.

            Comment


            • #7
              Actually, it looks as if something doesn't like dashes in the name. If I replace the first dash with a space, then it works! (The later dashes don't appear in the xapmcsdatabase code.)

              Comment


              • #8
                I probably should guarantee that all database-reserved characters are not used in the xAP message. Things like apostrophe and plus would also have similar issues.

                Comment

                Working...
                X