Announcement

Collapse
No announcement yet.

Plugin TEMP08 and 1WIO

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

    #31
    I did not notice that the relay status was updated in the browser window based upon the Relay 01 message returned. This would also show up as the Last Change time update. I made some changes to this part.

    xapmcsTemp0x will send xAP messages whenever something changes from the Temp08 such as temperature or relay status. xAP Message Viewer is an essential tool to see the xAP message traffic. It is not needed in normal operation, but is a useful tool to understand where issues may exist. The viewer was developed b Edward Pearson and can be downloaded from http://www.erspearson.com/xAP/xFx/viewer_main.htm

    Another piece that is required is an xAP hub so that all xAP applications on the same computer will receive all the xAP traffic. There are several of these available. On most of my computers I run one developed in VB6 and runs in the tray much like xapmcsTemp0x. This one can be obtained from the xAP Llibrary on the HS Message Board. Edward also has versions available.

    Both xapmcsTemp0x and the xAP Hub need to be started each time the computer is started. I do it with a .vbs script in my windows startup folder. Putting shortcuts the startup folder should also work. Initially when getting the system to work each application can be started manually. At this point both xapmcsTemp0x and one of the xAP hubs should be running on the same computer as well as xAP Message Viewer on any computer on the same LAN. I will assume all on the same for now.

    The next step in the integration is to select which of the devices available in xapmcsTemp0x you want to make visible to HS3. This will likely be your Temperature sensors and your relays. Initially select just one of each for testing the process. Use a temperature sensor that tends to change or the temperature of it can be easily changed. You will check the "A"ccept checkbox for your two sensors and then Save the page on xapmcsTemp0x. At the bottom of the page there is a button to send the status of all devices. Click it and you should see an xAP messages in the Viewer for each of the two Accepted devices.

    If success at this step then the next step is with mcsXap and HS3. If HS3 is on a different computer then an xAP hub also needs to be running on the one with HS3. I will also assume mcsXap plugin will be on the same computer as HS3.

    mcsXap will show all xap messages that it sees. If you click the same button at the bottom of the xapmcsTemp0x page as before followed by viewing the mcsXap browser page from HS3 menu then you should see rows with the two devices. There may be other rows as well for heartbeats or other xAP messages. If you do see them they are not yet visible to HS3. mcsXap firewalls then until mcsXap "A"ccept checkbox is clicked. When you click the "A"ccept checbox then HS3 device will be created. For the relay ON/OFF control buttons will also be visible. Once you see the devices then for a third time click the button to force status to be reported on xapmcsTemp0x. The device status in HS3 on the device management page will reflect the same status that is showing in xapmcsTemp0x browser page. It will be automatically be updated everywhere as the Temp08 provides updates. You can also use HS3 to change the relay. In this case, especially, the command should be visible on the xAP Viewer. If there is a problem at any step of the integration process use xAP Message viewer to determine if the issue is with mcsXap or xapmcsTemp0x.
    Attached Files

    Comment


      #32
      again many thx for the good instructions!

      I followed those and installed the xap hub as plugin mcsXap_3_0_0_50_HS3.zip from http://67.217.100.102/showthread.php?t=161282. I find out that I missed two files which I have found in the /BIN dir in HS3 (SQLite.Interop.dll and System.Data.SQLite.dll). Now the plugin status in HS3 is ok. Please see attachment for a print screen of the plugin config page.

      The xapmcsTemp0x also works with the new files you provided. I started this manually. I also download xfx viewer but when I run this, no messages are seen. Nothing happens. I can't find anything to config in xfx viewer. Do I miss something?

      HS3, mcsxap (root HS3), xapmcsTemp0x (in xAP under HS3), xfx viewer are all on the same computer.

      Then I followed your instructions for getting the devices in HS3 and selected under "A" one of each, so one relay and one temp sensor. Saved this and pressed the bottom button on the onewire page. That unfortunately does not do the job for me. There are no rows added as seen in the same attachment. Do I miss something? Or what could be wrong?
      Attached Files
      Last edited by Ralfmen; December 27, 2014, 10:30 AM.

      Comment


        #33
        It looks like you do not have an xAP hub installed. The one I mostly use is xapmcsHub.zip from http://board.homeseer.com/showthread.php?t=109125. The .NET ConsoleHub works on Windows or Linux but build for Linux. It has been a long time since the service hub was created and I do not use it. There are also xAP hubs from Edward Pearson's xFx site. I would create a folder just as you did for xapmcsTemp0x under HS3 root\xAP. The xFx message viewer will likely install under Program Files by default. It does not matter where it is installed.

        Without an xAP hub running then all xAP applications on a computer will be deaf. The xap Hub listens on port 3639 which is the one assigned/reserved for xAP use. It then forwards the messages to all the other xAP applications on the same computer. All xAP applications on all computers send their data out on port 3639.

        Comment


          #34
          Yes you were right. I missed that part and installed the xAP Hub. Sorry for that! I also had to install and register mswinsck.ocx.

          I have both the xAP Hub and xAPmcsTemp0x under a xAP dir in the root of HS3. With the HS3 plugin mcsXap installed it starts automatically both plugins the hub and the temp0x during startup from HS3. I'll start HS3 as administrator and so also the xAPmcsTemp0x plugin starts as administrator. So that is very nice!

          I saw on the onewire page that you changed this and now the status from the relays is shown. That works great!

          I have two sensors as advised made as a device in HS3. The relay shows up as a Xap device with on/off function. And the temp shows up as a xAP device with the right value and renews. So far so good.

          However from the relay device the on / off function does not work. The relay is marked as on. But I can't switch it to off. See also attachment. Not in HS3 and not for real. It does nothing. The off switch does not react at all. The other thing is that the status from the relay is off for real and also showed as off on the onewire page but in HS3 the status is on. I checked if the relay does work by the onewire page from the plugin and it does. So that is working ok.

          Do you have any idea what it can be?

          An other thing is that the value of the temp device is only without digits. Like 45 or 47, but not 45.5 or 47.3. And I would really like one digit because my system is accurate and I need to now the temp more precise. Do you know how to do this?

          Again many thx!
          Attached Files

          Comment


            #35
            The significant digits is a user input on xapmcsTemp08 and your screen shot shows it being set to 1. You should be able to see what appears from the Temp08, from xapmcsTemp0x, and into xap messages to mcsXap by looking at communication page, OneWire page and xAP Message Viewer. If any truncation is happending then you can isolate to where it is.

            Did you confirm that the relay operations worked correctly with status update in xapmcsTemp0x based upon on/off buttons in xapmcsTemp0x? Each status change in xapmcsTemp08 should be reflected in the HS3 device when controlled locally from xapmcsTemp0x.

            When controlled from HS3 then mcsXap sends a xap message. The class of that message will be xapbsc.cmd. You should see this in xap Message Viewer. On the right panel of the viewer you can click on the message to expand it into a popup window. Copy that window and past it into the message board. Of particular interest are the target address and ID contained in the header of the message.

            When mcsxapTemp0x recognizes an address that it is managing it will send the RLY command to the Temp08. When Temp08 echo's back a response showing the four relay states, xapmcsTemp0x will recognize a change and send that as an xAP message just like was sent when you used the button at the bottom of the page.

            Comment


              #36
              Hi Michael, many thx again! I did some research although it is hard for me to understand what exactly all the information means. But I saw some things.

              Right click om the xAP Hub in the systray only the top option "view" works. The others "config, status and help" don't work. Is this common?

              I have set the option SignificantDigits to 1, 2 and 3. This does not change a thing. The text that is send is with this option set to 1 is seen below:

              xap-header
              {
              v=13
              hop=1
              uid=FF.0007:000C
              class=xAPBSC.event
              source=mcs.Temp0X.TorenServer.TorenServer:xapmcsTemp0x_CV aanvoer.670008009217AC10.Temperature
              }
              input.state
              {
              State=ON
              Text=44.3
              }


              So the text send is 44.3 In the onewire page the temp is showed 2 times under status. One time as clear text 44.3 and one time in a blue square as 44. Please see attachment. Does this help you?

              There is one failure notice that is reported repeatedly

              Error Message: FF.0007:00:0000 is not a valid UID
              Received From: 127.0.0.1:32768
              xap-hbeat
              {
              v=13
              hop=1
              uid=FF.0007:00:0000
              class=xap-hbeat.alive
              source=mcs.Temp0X.TorenServer.TorenServer
              interval=60
              port=64364
              }



              The views you asked for
              xap-header
              {
              v=13
              hop=1
              uid=FF.000D:0000
              class=xapBSC.Cmd
              source=mcs.XapHS3.TorenServer
              target=mcs.Temp0X.TorenServer.TorenServer:xapmcsTemp0x_Relai s 4.000000000107A829.Relay.3
              }
              output.state.1
              {
              ID=000E
              state=Off
              }

              And

              xap-header
              {
              v=13
              hop=1
              uid=FF.000D:0000
              class=xapBSC.Cmd
              source=mcs.XapHS3.TorenServer
              target=mcs.Temp0X.TorenServer.TorenServer:xapmcsTemp0x_Relai s 4.000000000107A829.Relay.3
              }
              output.state.1
              {
              ID=000E
              state=On
              }


              I attached two reports as a zipfile (save all messages option) from xfx viewer. Run 1 is when I imported the relay and temp sensor again after deleted them in HS3 and restarted HS3, xAP Hub and xAPmcsTemp0x. Then the tempsensor is updated. The relay isn't working in HS3. It works however within the onewire page and the status changes too. So that seems ok. xfx viewer reports 2 devices and 2 subs.

              The seconds file (run2) I restarted HS3 and xAP Hub and xAPmcsTemp0x. Then the temp sensor does not update. Also the relay is not working. xfx viewer reports 2 devices and 1 sub. The relay does not show up. In run1 there were 2 devices and 2 subs.

              Can this help you to identify the problem?



              Later on I did a new run and added only the tempsensor and I saw something else.

              I saw that when I only mark the tempsensor in the xAPmcs plugin in HS3 and push the bottom button in on the onewire page, also the relay shows up in xfxviewer. The tempsensor is then added in HS3. The relay is not added in HS3, it should not because it is not marked, so that looks ok. But is it common that it shows up in xfx viewer?

              And I saw that after a while that the tempsensor has two addresses. 2 of the same nodes are reported in xfx viewer. And it reports a failure "address has multiple UID's". It looks like something else has made this second node. The viewer reports still 2 devices and 2 subs. And the added device in HS3 shows good values for the temp and renews. So that looks ok. Any idea?
              Attached Files
              Last edited by Ralfmen; December 28, 2014, 07:47 AM.

              Comment


                #37
                Right click om the xAP Hub in the systray only the top option "view" works. The others "config, status and help" don't work. Is this common?
                The xAP Hub tray options are based upon an early design of an overall xAP system. The only one that is active for this application is "view". You normally will not be looking at the hub view, but it does provide some statistics.

                I have set the option SignificantDigits to 1, 2 and 3. This does not change a thing. The text that is send is with this option set to 1 is seen below:
                Sensor values are formatted when changed values are received. Changing the significant digits will only take effect when the Temp08 provides a different value for a temperature reading.

                The xAP message sent from xapmcsTemp0x "Text=44.3" shows one significant digit as expected with a significant digit setting of 1. The graphic is an image of only integer values. There are both in the Device String. I would expect the Device Value to contain 44.3. The Device Value is likely what you will be using for any logic in HS. This String/Value relationship is the same as was done for mcsTemperature.

                There is one failure notice that is reported repeatedly

                Error Message: FF.0007:00:0000 is not a valid UID
                The UID is a unique end point identification. This format is incorrect. I should have caught this earlier. It is something that I recently changed as I was updating logic for 1WIO which has 4 end points per device. You will see in the next message a UID that is formatted correctly. It is the heartbeat that I did not update. I do not know if the hub will be sensitive to the UID format. I suspect not, but if it is then it may not recognize xapmcsTemp0x. You can determine by looking at its view window to confirm if it is routing messages to this node.

                xap-header
                {
                v=13
                hop=1
                uid=FF.000D:0000
                class=xapBSC.Cmd
                source=mcs.XapHS3.TorenServer
                target=mcs.Temp0X.TorenServer.TorenServer:xapmcsTemp0x_Relai s 4.000000000107A829.Relay.3
                }
                output.state.1
                {
                ID=000E
                state=Off
                }
                The significant information in this xapbsc.cmd message is
                [code]
                target=mcs.Temp0X.TorenServer.TorenServer:xapmcsTemp0x_Relai s 4.000000000107A829.Relay.3
                [code]
                "mcs.Temp0X.TorenServer" means it is directed at xapmcsTemp0x on computer TorenServer. This seems to be correct.
                "xapmcsTemp0x_Relai s 4.000000000107A829.Relay.3" attempts to uniquely identify the endpoint as a the 4th (0,1,2,3) relay on device "000000000107A829" with the name "xapmcsTemp0x_Relai s 4". For the name "xapmcsTemp0x" was prepended by xapmcsTemp0x and "Relai s 4" is your entry on xapmcsTemp0x for the name of the end point. Names cannot have spaces. I should protect that automatically by changing spaces to underscores.

                The "ID=000E" is the last 4 hex digits of the UID. It is a reasonable value, but can only know if it is correct if the same UID is reported by xapmcsTemp0x as part of its status reporting (xapbsc.event or xapbsc.info) such as when the relay state changes or when the report status button is clicked. I would expect the header of this message to contain "uid=FF.0007:000E" where the 0007 is the xapmcsTemp0x UID component and 000E is the specific relay. I did confirm this from the xFx viewer data you attached.

                I attached two reports as a zipfile (save all messages option) from xfx viewer. Run 1 is when I imported the relay and temp sensor again after deleted them in HS3 and restarted HS3, xAP Hub and xAPmcsTemp0x. Then the tempsensor is updated. The relay isn't working in HS3. It works however within the onewire page and the status changes too. So that seems ok. xfx viewer reports 2 devices and 2 subs.
                When you delete devices from HS3 you should do this from mcsXap by removing "A"ccept checkbox from the device. If deleted from HS while still showing as a mapped device in mcsXap then confusion could result.

                The xap Hub routes xAP traffic. For it to perform this function it needs to know with applications communicate using xAP. It does this by listening for heartbeats. The heartbeat contains the connection formation. When you restart the xAP hub then you have lost the history of the applications that exist and it needs to relearn. This means you need to wait for all the heartbeats to be received before any communication can occur such as temperature updates or relay commands. Best to just leave the xAP hub running as long as the computer is running.

                I saw that when I only mark the tempsensor in the xAPmcs plugin in HS3 and push the bottom button in on the onewire page, also the relay shows up in xfxviewer. The tempsensor is then added in HS3. The relay is not added in HS3, it should not because it is not marked, so that looks ok. But is it common that it shows up in xfx viewer?
                xFx viewer remembers what it had seen in the past in the left panel. Only new traffic shows in the right panel if I remember correctly. Prior versions of it worked like the xap Hub were it only remembers from the last start. xFx Viewer also sees all traffic on the computer so even if mcsXap has not accepted it through its firewall, it still exists and xFx viewer can see it. To exclude it from the network then the source (xapmcsTemp0x) would need to have its "A"ccept checkbox cleared.

                And I saw that after a while that the tempsensor has two addresses. 2 of the same nodes are reported in xfx viewer. And it reports a failure "address has multiple UID's". It looks like something else has made this second node. The viewer reports still 2 devices and 2 subs. And the added device in HS3 shows good values for the temp and renews. So that looks ok. Any idea?
                The UID is dynamically determined as xapmcsTemp0x gets data from Temp08 during startup. I expect the relays to be 0008 000A 000C 000E based upon seeing the 4th relay being assigned 000E. xapmcsTemp0x stores the UIDs it has assigned in \Config\mcsxapTemp0x.ini. It is stored as an index which is 1/2 of the UID value.
                [Devices_Index]
                000000000107A829Y0=4
                000000000107A829Y1=5
                000000000107A829Y2=6
                000000000107A829Y3=7
                You can look through this file and find duplicate assignments such as =6 as the xFx viewer reported. You can edit the file to reassign the temperature sensor to then next index. There is some logic in xapmcsTemp0x to manage duplicates and find the next available but with the UID changes to accommodate 1wio I may have missed something.

                I need to fix the heartbeat UID. There is also issue with source address in heartbeat. I need to protect user from entry of spaces for names. The xapbsc.cmd message from mcsXap does appear to be correct so the issue is either the hearbeat caused the hub to not route it or xapmcsTemp0x is not responding to the command. I will do what I can at this end and post a new version.

                When you do test then next one you will want to use the xAP Message Viewer to see the xapbsc.cmd message from HS3/mcsXap followed by xabbsc.event message from xapmcsTemp0x. You will also observe HS3 Device Management page for status update. If there is no success then observe xapmcsTemp0x communication window to see if RLY command was sent to Temp08 and the Relay status message returned. Observe the status on xapmcsTemp0x onewire page. Since we have confirmed local operations within xapmcsTemp0x with control and status of the relay and a correctly formatted xapbsc.cmd message from HS3/mcsXap the likely issue is with UID or with address formatting to correctly identify the endpoint of interest.

                Comment


                  #38
                  Heartbeat fixed. Names have spaces replaced with underscore. I expect success this time as we have confirmed proper operation at both ends and only the communications seem to be in the way previously.
                  Attached Files

                  Comment


                    #39
                    It is hard for me to understand it all. But I gladly give it a try with your help. Which is much appreciated! I added as a zip file the messages from xfx viewer and the mcsXapTemp0x.ini file.

                    I tried today to add the same sensors again from scratch with the new files you provided. This is what I did. I first unchecked in the onwire page the sensors, saved and push the bottom button. Then I checked them again, saved and pushed the bottom button. I attached a print screen of the mcsXap page in HS3. As you can see rows show up twice in mcsXap in HS3 with different dates. I checked “a” then for the new added sensor and relay as you can see.

                    I found out that I can remove rows from the page when I check “r”. But the are not really removed, because I can get them back with the option “show rejected messages” but I think this is normal. But I want to mention it, so that you can judge for yourself. Can I delete them permanently? Is this necessary?

                    Then I went searching in xfx viewer and mcsHub view. And also tried to change the relay state in HS 3 and with the onewire page. It shows still on, while the status is actually off.

                    When the relay is pushed off (or on, does not matter) in HS3 this message showed up:

                    xap-header
                    {
                    v=13
                    hop=1
                    uid=FF.000D:0000
                    class=xapBSC.Cmd
                    source=mcs.XapHS3.TorenServer
                    target=mcs.Temp0X.TorenServer:xapmcsTemp0x_Relais_4.00000000 0107A829.Relay.3
                    }
                    output.state.1
                    {
                    ID=000E
                    state=Off
                    }

                    Then followed in some seconds by. But I don’t know if this is because I gave the command off, or from the command with class xap-hbeat.alive. Because it keeps showing up even if I don’t change the relay device in HS3.

                    Error Message: FF.0007:00:0000 is not a valid UID
                    Message Line#: 5 - uid=FF.0007:00:0000
                    Received From: 127.0.0.1:32768

                    xap-hbeat
                    {
                    v=13
                    hop=1
                    uid=FF.0007:00:0000
                    class=xap-hbeat.alive
                    source=mcs.Temp0X.TorenServer
                    interval=60
                    port=58294
                    }



                    I took this last report from xapHub view. In the xfx viewer I can find similar messages but the port there is every time 51858. When I take a closer look I see that in xapHub view the port number is often different but also sometimes 51858. In xfx viewer I can only see port 51858. Is this normal?

                    The message page from xAPmcsTemp0x does not show any relay state change. It does, when I try to change it from the onewire page. Then the message page shows good results. So there it works. To me it looks like something is wrong with the communication between HS3 and mcsXapTemp0x.


                    In xfx viewer under devices I can see that the HB state of mcsTemp0x is “waiting”, while xAPHub state is “alive”. Is this normal?

                    To me it shows as the heartbeat from the mcsXapTemp0x is not right in anyway, as far as I understand the error messages.


                    About the tempsensor I added. This is what I can determine.

                    In xfx viewer under nodes the tempsensor again showed up twice and this “address has multiple IDs” is reported during the run seen in the attached file for xfx viewer. This is the run as mentioned before, that I added the rows in xAP Hub and devices in HS3. But when I did another run, some hours later, this failure did not show up and only one node for tempsensor is seen (FF.0007.000C). So this seems correct. maybe it solved itself by anyway?

                    During this last run, the relay node however does not show up. The HB state from mcs.Temp0x.Torenserver is also "waiting". The error reports and everything else seems the same. I did not attached xfx view file from this run, but I can if it's helps you.


                    I inspect the mcsXapTemp0x.ini and I can see that there are double indexes. But I don’t know what to change and how to change. I added the mcsXapTemp0x.ini file in the hope that you can determine a problem and tell me what to do?

                    The temp device under “advanced” in HS3 gives:

                    Reference ID
                    250
                    Technology Address
                    250
                    Status
                    44.5 = Dim
                    Value
                    44.5 = "44"
                    String

                    Supports Status
                    False
                    Dimmable
                    False
                    Interface
                    mcsXap
                    Extra Data Store
                    0 Named entries, 0 UnNamed entries.
                    Device Type Internal
                    No API, Type: Type 0, SubType:
                    Device Type (String)

                    Misc Settings
                    Status Only, Show Values
                    Device Image File
                    images\Devices\Image-Not-Selected.png
                    Thumbnail Image File
                    images\Devices\Image-Not-Selected_small.png
                    Relationship Status
                    Not Set



                    The value which the device actually has is 44.5 and still showed as 44. How can I get it to show 44.5?

                    Then I restarted HS3 and let the plugins xapHub and mcsXapTemp0x run. I checked if the tempsensor does update. And it does after about 3 or 4 minutes. So that looks fine! The xfx viewer file attached contains all the messages with HS3 restarted about 12.14, so I never quit it. At about 12.22 I tried to change the relay, but again nothing happens. I checked the message page and also there nothing that indicates a relay 4 state change. Please do not confuse this with the run I mentioned before, which was couple of hours later.

                    Can I help you with some other information?

                    Again many thanks!!
                    Attached Files
                    Last edited by Ralfmen; December 29, 2014, 09:01 AM.

                    Comment


                      #40
                      The new devices in HS3 are expected because the names were changed to replace the spaces with underscores.

                      "D"elete, "R"eject and "A"ccept are the firewall options. "D" is used when you have a message that will never again appear such as those that were created originally but have since had their names changes (space vs. underscore). Delete will remove them from mcsXap memory. "R" is used to acknowledge a message that is valid, but is not of interest in HS3. Using "R" It would be like sending a file to the recycle bin and using "D" like purging the recycle bin. At this state of testing I would not play with these checkboxes as they just add one more thing that could affect the results. One step at a time.

                      Then I went searching in xfx viewer and mcsHub view. And also tried to change the relay state in HS 3 and with the onewire page. It shows still on, while the status is actually off.
                      I am confused on this one. Previously you indicated that you could use the ON/OFF button from the OneWire page to control the relay and the status on OneWire page would change to reflect the correct relay state. Now you indicate that you can no longer do this. If it cannot be done from OneWire page, then there is no point in trying it from HS since the integration of xapmcsTemp0x with Temp08 is not working. If you can change the relay from OneWire ON/OFF button and status is updated then all we need to check is the messages between mcsXap and xapmcsTemp0x. The relay OFF command from HS3 showed up as the following:

                      target=mcs.Temp0X.TorenServer:xapmcsTemp0x_Relais_4.00000000 0107A829.Relay.3

                      It looks correct except for the space in 00000000 0107A829. When I look at the zip file you attached this space is not present so I think this must just be a board formatting issue. For this test it does mean that HS3/mcsXap is working as expected. This was also true in the version you tried the previous day.

                      Later
                      The message page from xAPmcsTemp0x does not show any relay state change. It does, when I try to change it from the onewire page. Then the message page shows good results. So there it works. To me it looks like something is wrong with the communication between HS3 and mcsXapTemp0x.
                      would indicate that the local operation using only OneWire page of xapmcsTemp0x does work correctly. I was not aware data would be shown on the Messages page, but if it does then that is fine. The Communication page showing the low level communications with the Temp08 provides a definitive assessment of operation.

                      Error Message: FF.0007:00:0000 is not a valid UID
                      Message Line#: 5 - uid=FF.0007:00:0000
                      Received From: 127.0.0.1:32768
                      I was surprised to see the above message continue to be generated. This was fixed in the latest version and testing on my system resulted in a good UID format on the heartbeat. The heartbeat message occurs every 60 seconds independent of any relay actions taken. When I looked at mcsXapTemp0x.ini I see that the UID was set to FF.0007:00. This was a format for a prior version of xAP specification. I had expected FF.0007 entered. I added logic to check for proper format of this user input in the next version.

                      I took this last report from xapHub view. In the xfx viewer I can find similar messages but the port there is every time 51858. When I take a closer look I see that in xapHub view the port number is often different but also sometimes 51858. In xfx viewer I can only see port 51858. Is this normal?
                      The port number is requested from Windows each time an xAP application starts. It is put in the header of heartbeat messages so the hub will know on which port the application that sent the heartbeat is listening. Anything the hub receives on port 3639 (the assigned xap port) it will forward to the port from where the heartbeat came (e.g. 51858).

                      xapmcsHub does not produce error messages such as an invalid UID format so what you are showing must be coming from xFx viewer. I am guessing that Edward uses the socket information to get "Received From: 127.0.0.1:32768". This should be the port that xapmcsHub is using to forward messages to xFx viewer. The data in the message would indicate that xapmcsTemp0x thinks it is using "port=58294". This all makes sense from a port routing perspective, but dont know why the UID format is still not correct for heartbeat.
                      I suspect that xFx viewer shows it is waiting for a heartbeat because a valid one has not yet been received. I'm guessing that xapmcsHub does not care about UID because it does not use it to route messages so the invalid heartbeat format should not affect the message routing I did not confirm this guess.

                      Within HS3 you showed the following for the temperature sensor.
                      Code:
                      Reference ID
                      250
                      Technology Address
                      250
                      Status
                      44.5 = Dim
                      Value
                      44.5 = "44"
                      String
                      I do not have HS3 here to reference, but it looks to me as if HS3 does recognize the 44.5 as being the DeviceValue and has translated this to Dim/44 as the display attributes. Perhaps if you look at some other devices that display as you expect and look at the Device Management attributes of those vs this temperature device then we can understand what to do to make it display as you desire. I do suspect that if you used the DeviceValue as part of some event or script logic that the 44.5 will be the value used.

                      I see three things to address.
                      1. Hearbeat UID from xapmcsTemp0x
                      2. Processing of xapbsc.cmd message within xapmcsTemp0x
                      3. UID duplicates in xapmcsTemp0x.

                      I have already changed the logic to automatically validate the UID for duplicates. This will result in a new assignment of UID for some of the devices. For the next test I suggest that HS3/mcsXap start with a clean slate with no knowledge of prior xAP traffic. This will avoid confusion of duplicates. Delete the file mcsXap.db which should be in the \data\mcsXap subdirectory of HS3. If not there then either one deeper or one higher in the directory structure.

                      Start HS3/mcsXap, xapHub, xFx Viewer and xapmcsTemp0x. Wait a miinute for the heartbeats to propagate.
                      Test #1 confirm with xFx Viewer that heartbeat errors do not exists
                      Test #2 locally on xapmcsTemp0x Accept Relay 3 if not already accepted. Evaluate ON/OFF buttons and the status update on Onewire page.
                      Test #3 view mcsXap xAP setup. The relay event message should have been discovered and a line added for it. Accept the the .state message of this device to create an HS3 device.
                      Test #4 change relay status on xapmcsTemp0x. Observe the status update on HS3 device
                      Test #5 confirm that xapmcsTemp0x has debug enabled. From HS3 toggle the relay to the other state. Observe OneWire page status of relay has changed after refreshing the page. If it does not then observe the xapmcsTemp0x Communication page looking for RLY command and the Relay status response.
                      If failure then capture the xFx viewer messages as you have done in the past and the xapmcsTemp0x debug file. If success then you can continue to accept other devices in xapmcsTemp0x and mcsXap to fully integrate the Temp0x with HS3.
                      Attached Files

                      Comment


                        #41
                        Hi Michael. First of all again many thanks for all the work. It paid off! You made again a big step to success. Please see the test results below. I also added the files you requested.

                        Start HS3/mcsXap, xapHub, xFx Viewer and xapmcsTemp0x. Wait a miinute for the heartbeats to propagate.
                        Test #1 confirm with xFx Viewer that heartbeat errors do not exists
                        No errors does exist

                        Test #2 locally on xapmcsTemp0x Accept Relay 3 if not already accepted. Evaluate ON/OFF buttons and the status update on Onewire page.
                        Everything works as it should be. The status changes, the correct state is shown, the relay changes physically

                        Test #3 view mcsXap xAP setup. The relay event message should have been discovered and a line added for it. Accept the the .state message of this device to create an HS3 device.
                        Right, new rows are added for the relay just as it should. So also this looks ok. Some extra information: I removed the file mcsXap.db before start as you said. What I saw was that when I first opened the mcsXap page in HS3 (after a fresh startup) that there where already 4 rows. 2 for the heartbeats mcs.Temp0X.TorenServer.mcs.Temp0X and xFx.v4Viewer.TorenServer.xFx.v4Viewer. And 2 for the tempsensor state and text. I did at that time not added a thing by the onewire page. Then I added as you said by clicking the bottom button on the onewire page (already the relay and tempsensor "a" were checked in the onewire page) and only the relay was added. I checked "a" in HS3 xapmcs and the devices (relay and tempsensor) were added. So everything looks normal. But I want to have mentioned it, just in case.

                        The relay at that time had status ON for real (onewire page) and in HS3 it also had status ON. So at first that looks fine, but before the relay had always status ON when added, despite what the actual state was/is. See also next test result.

                        Test #4 change relay status on xapmcsTemp0x. Observe the status update on HS3 device
                        Nothing changes in HS3 when I do so. See also next test.

                        Test #5 confirm that xapmcsTemp0x has debug enabled. From HS3 toggle the relay to the other state. Observe OneWire page status of relay has changed after refreshing the page. If it does not then observe the xapmcsTemp0x Communication page looking for RLY command and the Relay status response.
                        I changed the relay in HS3 to OFF. The relay changed the status physically and one the onewire page as it should. Also the command showed up in the communications page (yesterday I mentioned message page but that was wrong there it doesn't, sorry for that) and the onewire page shows status change to OFF. So in xapmcsTemp0x it works as it should. However in HS3 the state does not change. When I turned the command in HS3 to ON, it also switches to ON in xapmcsTemp0x as it should, but is HS3 nothing changes. The time "last change" in HS3 is the time that I added the device. So it does not update the status, but the device does work!

                        In xfx viewer everything looks normal. Both devices are "alive", separate nodes, no doubles, no errors. So that is great!

                        I do not have HS3 here to reference, but it looks to me as if HS3 does recognize the 44.5 as being the DeviceValue and has translated this to Dim/44 as the display attributes. Perhaps if you look at some other devices that display as you expect and look at the Device Management attributes of those vs this temperature device then we can understand what to do to make it display as you desire. I do suspect that if you used the DeviceValue as part of some event or script logic that the 44.5 will be the value used.
                        This is the advanced view of a dimmable device set to 23% in HS3 for me

                        Reference ID 90
                        Technology Address L5
                        Status 23 = Dim
                        Value 23 = "Brightness 23%"
                        String

                        I don't have a other device with a decimal digit. Unfortunately for me it is necessary that not only HS3 sees the right value but for me it is also necessary that I can see it with decimal digits. At least in HSTouch, but by great advance also in HS3. So if you have any idea where to get started, it would be great.

                        As you can see we are almost there :-)
                        Attached Files
                        Last edited by Ralfmen; December 30, 2014, 12:00 PM.

                        Comment


                          #42
                          The only issue I see is the xapbsc.event message on relay state change. I see that for the 1WIO I was only checking value and not state so state always reports as ON. I fixed this. I also initialized the relay state to the last reported relay state. If you know how to request relay state then I can add it so it will be definitively known at startup. I also reported the current state of all devices upon completion of the initialization sequence. This will assure HS is synchronized upon completion of xapmcsTemp0x startup.

                          I am a novice with HS3 and do not have it where I am now so I cannot help much with setting up display attributes. I suggest asking the specific question of how to display DeviceValue of 12.3 in a separate thread. Do you really want this to be a DIM value for a temperature sensor? Making it have a DIM attribute may force it to integer.
                          Attached Files

                          Comment


                            #43
                            Hi Michael, thx again! The status in HS3 was set to off, as that was the actual status at that moment of the relay. So that looks ok. But now I can't change the relay to ON or OFF. Not in HS3 and even not in xapmcstemp0x. The comm page gives:

                            >
                            2014-12-30 20:09:18 | [Sent to Temp0x ]

                            2014-12-30 20:09:19 | [Sent to Temp0x RLY00 ]


                            20:09:19 | ?Entry error

                            >
                            2014-12-30 20:09:19 | [Sent to Temp0x On ]


                            ?Entry error

                            >
                            2014-12-30 20:09:22 | [Sent to Temp0x ]

                            2014-12-30 20:09:23 | [Sent to Temp0x RLY00 ]


                            ?Entry error

                            >
                            2014-12-30 20:09:23 | [Sent to Temp0x ON ]


                            ?Entry error

                            >
                            2014-12-30 20:09:26 | [Sent to Temp0x ]

                            2014-12-30 20:09:27 | [Sent to Temp0x RLY00 ]


                            ?Entry error

                            And so on. Can you explain this?

                            Then I quit HS3 and restarted xapmcsTemp and tried it there. Also there the relay or relay status does not react. Then I get in the comm page:

                            2014-12-30 20:28:07 | [Sent to Temp0x RLY00 ]


                            20:28:07 | ?Entry error
                            20:28:07 |
                            20:28:07 | >
                            2014-12-30 20:28:13 | [Sent to Temp0x ON ]


                            ?Entry error

                            >
                            TUE 20:28:00



                            2014-12-30 20:28:52 | [Sent to Temp0x RLY00 ]


                            20:28:52 | ?Entry error
                            20:28:52 |
                            20:28:52 | >
                            2014-12-30 20:28:58 | [Sent to Temp0x OFF ]


                            ?Entry error

                            >
                            TUE 20:29:00

                            Then I tried mcstemperature in HS2 and that works ok. Any idea?

                            I added two data files from xapmcsTemp0x. One with HS3 running xapmcsTemp0x_30_1.txt and one only running xapmcstemp0x xapmcsTemp0x_30_2.txt. Maybe this can help you.

                            If you know how to request relay state then I can add it so it will be definitively known at startup.
                            Do you mean a temp08 command? In that case I think INP should do the job. But I am not certain. In mcstemperature the status always is good at startup, but I don't no how you did that. But maybe you mean something else?

                            . Do you really want this to be a DIM value for a temperature sensor?
                            No :-) that was an example. I will make a new thread for that later on when it's working.

                            Again many thanks!
                            Attached Files

                            Comment


                              #44
                              The issue is that it did not process the DIS command where the IWIO device was declared. You will see an error message in the log file. I believe I understand why and added additional line numbers should I not be correct. It had to do with reading the last saved state of the Temp08 for the relay status. The update is attached.

                              You can also try the INP command from the Communication page and see if it prompts the Temp08 to report the relay status.
                              Attached Files
                              Last edited by Michael McSharry; December 30, 2014, 03:33 PM.

                              Comment


                                #45
                                I did some testing. xapmcstemp0x works fine. So that is fixed. Thx for that! The INP command however does not work. It says "not installed". In the list of commands within xapmcsTemp0x there is no INP command. I don't know if that is the cause. Do you?

                                Then I started everything as should and everything works fine. So the status change works in HS3 and in xapmcsTemp0x. Also I can control the relay in HS3 and that works fine! But there are some things I determine.

                                I added the xfxview file so you can check for your self. When I started at 21:53:45.93 this message occurs:

                                xap-header
                                {
                                v=13
                                hop=1
                                uid=FF.0007:0007
                                class=xAPBSC.info
                                source=mcs.Temp0X.TorenServer:xapmcsTemp0x_Relais_4.00000000 0107A829.Relay.3
                                }
                                output.state
                                {
                                State=OFF
                                Text=0
                                }

                                Later on followed by:

                                xap-header
                                {
                                v=13
                                hop=1
                                uid=FF.0007:0007
                                class=xAPBSC.event
                                source=mcs.Temp0X.TorenServer:xapmcsTemp0x_Relais_4.00000000 0107A829.Relay.3
                                }
                                output.state
                                {
                                State=ON
                                Text=1
                                }

                                At that time the relay was off, but in HS3 it has the state ON, also before the first event message (OFF), so from startup. Then a little bit later I pushed OFF in HS3 (as you can see in the xfx viewer file) then the status changes and is correct set to OFF. From that moment on HS 3 shows the right status and works fine.

                                Then I quit HS3 and changes the relay in the onewire page to OFF. In HS3 it had the status ON before I quit HS3. After a restart i waited for a status change in HS3 but that did not happen. The restart was at 22:03:24.91. Then only the the following message showed up:

                                xap-header
                                {
                                v=13
                                hop=1
                                uid=FF.0007:0007
                                class=xAPBSC.event
                                source=mcs.Temp0X.TorenServer:xapmcsTemp0x_Relais_4.00000000 0107A829.Relay.3
                                }
                                output.state
                                {
                                State=OFF
                                Text=0
                                }

                                But the device in HS3 stays ON as it was before I restarted HS3. Any Idea?

                                Also new devices are added in HS3 (tempsensor and relay) when I restarted HS3, without quitting mcsxapHub and xapmcsTemp0x.So at this time I have double devices for the same sensor and relay. I think that should not happen. Any idea?

                                Hope this can help you. If I can provide some information please ask. Many thanks!
                                Attached Files

                                Comment

                                Working...
                                X