Announcement

Collapse

Contacting HomeSeer This Week

HomeSeer is open and operational this week. All orders are being processed and shipped as usual. However, some staff are working from home. If you need to contact HomeSeer for support or customer service, please use our Email or Chat options. https://homeseer.com/contact-us/
See more
See less

HS Script to send Xap Messages

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

  • HS Script to send Xap Messages

    Could some one post a HS script to send a Xap message using the Xap conduit?

    I am working on a script that will triger on CID recieved from HSP way2call then with a script send the caller name and number to the Xap network.

    I just need an example to get me started. This is what I have so far.

    Sub Main
    dim callname
    dim callnmbr
    ' get the caller directory name
    callname = hsp.cidname(1)
    ' get the phone number
    callnmbr = hsp.cidnumber(1)

    body="CID.Incoming" & chr(10) & "{" & chr(10) & "name=callname" & chr(10) & "phone=callnmbr" & chr(10) & "}" & chr(10)
    hs.plugin("xAP Conduit").sendxapmessage "CID.Incoming",body

    End Sub
    Last edited by HomeTech; January 17th, 2007, 08:27 PM.
    HS2 Environment
    Zotac 1.83 GHz Quadcore
    HomeSeer Way2Call
    Netiom-Xap board
    opnode 1-wire 1.2.7
    Plug-In's
    WeatherXML 1.0.0.32
    Pwr Link USB 1.0.0.13
    mcsTemp V6.2.0.14
    mcsXap V3.0.0.0/3.0.0.20
    IM Connector 4.87.2.5
    Sip Connector 2.56.2.4
    RFXCOM 15.0.0.22
    Odroid X2
    Asterisk 11.5.1
    FreePBX 2.11.0.42
    WebMin 1.720
    Xap Switchboard by Mi4

    There is no place Like 127.0.0.1

  • #2
    CouchPotatoe (Kevin) is the only one I have seen support this forum in quite awhile. If you do not have any luck then you can join the xAP yahoo group and participate in the email traffic.

    If you do not have very much invested in the xAP Conduit then you can try mcsXap. The xAP message generation can be setup directly in the event such as the one I attached.

    On a slightly different subject I have xAP scripting node with one of the demo scripts being a stress test. The node is at http://board.homeseer.com/showthread.php?t=104479 When benchmarking HS1 vs HS2 there was a considerable difference in CPU utilization. If you are willing I would be interested in seeing what type of CPU utilization you experience with HS2 using xAP Conduit while running the stress test script.
    Attached Files

    Comment


    • #3
      Thanks Michael I may do that. I have had no problems with the plugin to this point but I am only running one weather app. I was working with you last on MCSCID if you recall I am using HSP Way2call device for cid. I now have this script sending CID from Way2Call to Xap at least it looks like it is. I will test more today.

      Sub Main
      dim callname
      dim callnmbr
      ' get the caller directory name
      callname = hsp.cidname(1)
      ' get the phone number
      callnmbr = hsp.cidnumber(1)
      body="CID.Incoming" & chr(10) & "{" & chr(10) & "name="&callname & chr(10) & "phone="&callnmbr & chr(10) & "}" & chr(10)
      hs.plugin("xAP Conduit").sendxapmessage "CID.Incoming",body
      End Sub
      HS2 Environment
      Zotac 1.83 GHz Quadcore
      HomeSeer Way2Call
      Netiom-Xap board
      opnode 1-wire 1.2.7
      Plug-In's
      WeatherXML 1.0.0.32
      Pwr Link USB 1.0.0.13
      mcsTemp V6.2.0.14
      mcsXap V3.0.0.0/3.0.0.20
      IM Connector 4.87.2.5
      Sip Connector 2.56.2.4
      RFXCOM 15.0.0.22
      Odroid X2
      Asterisk 11.5.1
      FreePBX 2.11.0.42
      WebMin 1.720
      Xap Switchboard by Mi4

      There is no place Like 127.0.0.1

      Comment


      • #4
        Hi HomeTech .. It's a little while since I did this from HS as I am now using an embedded xAP controller but I'll have a look at the script above and get back to you shortly .

        I assume it doesn't work as is ? Does xAP Viewer show the message or indicate in some way it's malformed ? (Make sure Viewer filter preferences are set not to filter unrecognised messages).

        K

        Comment


        • #5
          The above script is set up as an event in HS2 to trigger when CID is received.
          when it runs I can go to the Xap window as seen below and see the following Xap message. I can see it is picking up the correct CID name and number from HSP Way2call BUT I do not see the message showing up at the HUB. so I am not getting it to the MCSCID app. That is what I am tring to do. The MCSCID is running on a different computer for now.

          Any Ideas?
          Attached Files
          HS2 Environment
          Zotac 1.83 GHz Quadcore
          HomeSeer Way2Call
          Netiom-Xap board
          opnode 1-wire 1.2.7
          Plug-In's
          WeatherXML 1.0.0.32
          Pwr Link USB 1.0.0.13
          mcsTemp V6.2.0.14
          mcsXap V3.0.0.0/3.0.0.20
          IM Connector 4.87.2.5
          Sip Connector 2.56.2.4
          RFXCOM 15.0.0.22
          Odroid X2
          Asterisk 11.5.1
          FreePBX 2.11.0.42
          WebMin 1.720
          Xap Switchboard by Mi4

          There is no place Like 127.0.0.1

          Comment


          • #6
            That message looks well formed and so it should be arriving at your xAP hub OK. I have typed it here as shown and it is good. The fact HS shows it as received means it has traversed your local hub ok. You are running a local hub I assume or is the xAP HS plugin the ONLY xAP application on this main machine.

            The xAP hub you refer to above I assume is running on a different PC - the one with mcsCID on it ? Does this hub see other xAP messages OK eg from HomeSeer or is it only this handbuilt one it doesn't see. I assume you are using a xAP hub that has some GUI to show the messages.

            Lastly , and I could be mistaken here as I dont use the application, I thought the purpose of mcsCID was to generate the incoming CID messages from a modem say (not to receive them), I think it also generates some display messages. I think mcsCID may ignore cid.incoming messages. What exactly are you trying to achieve with the cid.incoming message you have sent, I'm suspecting you are wanting it displayed somewhere perhaps ?

            K

            Comment


            • #7
              The set up I have is as follows:

              Hood = Home computer
              1) HS2 with Xap Plugin
              2) Xap HUB / ( v 1.2.1.6) Xap Framework.net V1.2.9.12 for xAP v1.2
              3) xServer [this is sending and receiving Xap messages from my Work office]

              mcs-backup = Work computer
              1) Xap HUB service
              2) xRouter / set to full routing
              3) Xap Weather

              mcs-007 = My work station computer at work
              1) Xap HUB
              2)MCSCID
              3)MCSVOICE

              I am wanting to use the mcscid app at my work on my desktop computer so when a incoming call from home is ringing it sends the cid info to my office then to my workstation at my office into mcscid. So that it can use my Outlook contacts for lookup and speak .

              I have a weather Xap app running here at the office reporting to HS at home working great.

              I thought that Michael said if the Xap message is sent as seen in my previous post that it would act on it and perform its magic search lookup feature.

              Hope that clears some of the confusion.
              HS2 Environment
              Zotac 1.83 GHz Quadcore
              HomeSeer Way2Call
              Netiom-Xap board
              opnode 1-wire 1.2.7
              Plug-In's
              WeatherXML 1.0.0.32
              Pwr Link USB 1.0.0.13
              mcsTemp V6.2.0.14
              mcsXap V3.0.0.0/3.0.0.20
              IM Connector 4.87.2.5
              Sip Connector 2.56.2.4
              RFXCOM 15.0.0.22
              Odroid X2
              Asterisk 11.5.1
              FreePBX 2.11.0.42
              WebMin 1.720
              Xap Switchboard by Mi4

              There is no place Like 127.0.0.1

              Comment


              • #8
                Ok I have the message showing up on my xAP HUB on my Office Workstation .

                I had to enable the UID message send and receive in the xServer at the home Hood Computer (UID FF411100)

                Now I see the xAP CID.Incoming message BUT MCSCID is not doing any thing with it. I have tested MCSCID on the desktop here at work just with the Simulated call received section in the MCSCID app and it searchec my outlook and speaks through MCSVOICE so I guess I will need to ask Michael on his thread what else I need to do .

                Michael if your out there looking at this is there any thig I need to setup in MCSCID to get this going. I do not have the Net caller Id device so do I need to enter any thing into the com port IP selection?
                HS2 Environment
                Zotac 1.83 GHz Quadcore
                HomeSeer Way2Call
                Netiom-Xap board
                opnode 1-wire 1.2.7
                Plug-In's
                WeatherXML 1.0.0.32
                Pwr Link USB 1.0.0.13
                mcsTemp V6.2.0.14
                mcsXap V3.0.0.0/3.0.0.20
                IM Connector 4.87.2.5
                Sip Connector 2.56.2.4
                RFXCOM 15.0.0.22
                Odroid X2
                Asterisk 11.5.1
                FreePBX 2.11.0.42
                WebMin 1.720
                Xap Switchboard by Mi4

                There is no place Like 127.0.0.1

                Comment


                • #9
                  Ahh yes - I hadn't anticipated you were routing xAP packets over the internet between two locations - and the possibility of filtering there.

                  I do suspect that the mcsCID app was not designed to listen for CID.incoming messages but due to its other significant inbuilt functionality it might be worth supporting this. If not mi4's xAP Switchboard will provide similar functionality and does handle CID.Incoming as a trigger. It also gives you a fully accessible web page log of all call activity and can build and form ongoing xAP messages.

                  Let us know how it goes... nice that someone is using the xRouter approach as xAP then offers a realtime HA/event interface between two or more remote sites. It has a strange obsessive appeal whatching what's happening somewhere remote.

                  K

                  PS: Just for info for those exploring xAP and reading this thread .... xAP uses broadcast UDP for it's intranet communications (ie local network) which is very fast and dependable. However once out on the internet there are many places that UDP can go astray as it is not an end to end validated protocol, nor is broadcast desireable. To avoid the possibility of dropped or out of sequence packets on the internet a xAP router is used that uses TCP as a point to point 'tunnel' for xAP rather than UDP. The xAP router is a free software application again from mi4.

                  Comment


                  • #10
                    Thanks. Just tried switchboard Xap and that does work it displays the name and number in a WEB page list and I get a pop up baloon. Can't get it to speak with MCSVOICE yet. I need to read up on it.
                    HS2 Environment
                    Zotac 1.83 GHz Quadcore
                    HomeSeer Way2Call
                    Netiom-Xap board
                    opnode 1-wire 1.2.7
                    Plug-In's
                    WeatherXML 1.0.0.32
                    Pwr Link USB 1.0.0.13
                    mcsTemp V6.2.0.14
                    mcsXap V3.0.0.0/3.0.0.20
                    IM Connector 4.87.2.5
                    Sip Connector 2.56.2.4
                    RFXCOM 15.0.0.22
                    Odroid X2
                    Asterisk 11.5.1
                    FreePBX 2.11.0.42
                    WebMin 1.720
                    Xap Switchboard by Mi4

                    There is no place Like 127.0.0.1

                    Comment


                    • #11
                      Great

                      xAP Switchboard can send custom xAP messages when various events happen, (incoming call, end call, call pickup, digits dialled etc). The messages are built in files called ToSend_trigger where trigger is the type of event. You want the one that is called just Tosend which is in the xAPTel folder, there are some notes in the sample file that tell you some parameters you can use (eg the callers name, location, etc). For xAp to voice again there are several apps available with different features.

                      The STD lookup I suspect will not be helpful in the US (which I think you are) but the Google maps linkage might be. If you have the appropriate location lookup data for US tel area codes to cities it can be added to the database and if it's public domain perhaps we could include it in the xAP Switchboard DB that is installed.

                      Take a look at the xAP Outlook conduit that mi4 has that additionally will add you the screen pop features, on multiple machines even, and the contacts integration and call history within Outlook.

                      Just thought though.... can you detect the end of your incoming calls somehow ? - otherwise xAP Switchboard may become confused. In order to fully utilise SB you need to send the call answered and call ended xAP messages (which are detailed in the schema docs). Possibly your CID hardware may not provide this info via HomeSeer..... If it doesn't it may be necessary to fake it by sending the messages a short time after CID.incoming is seen so xAP Switchboard knows the call is finished. It will then log it correctly but the duration will be wrong. Try it as is and see what happens.... shout if you need more info...

                      K

                      Comment


                      • #12
                        I tried it here and see that I prohibited outbound xAP messages when the cid.incoming was received via xAP. I changed that and posted update to V1.5.5 of xapmcsCID.

                        When I provided both VR and TTS capability to xapmcsVoice I used a new schema xap.Voice to handle both since the existing voice-related schema had no provisions for VR. I believe James uses something like a TTS schema to do voice output so there is an interoperability problem.

                        Comment


                        • #13
                          Thanks Michael! Its working Great! So now we can say the MCSCID works with HSP Way2Call .

                          I am going to move to your MCSCID dissucion with some questions.

                          Thanks Again
                          HS2 Environment
                          Zotac 1.83 GHz Quadcore
                          HomeSeer Way2Call
                          Netiom-Xap board
                          opnode 1-wire 1.2.7
                          Plug-In's
                          WeatherXML 1.0.0.32
                          Pwr Link USB 1.0.0.13
                          mcsTemp V6.2.0.14
                          mcsXap V3.0.0.0/3.0.0.20
                          IM Connector 4.87.2.5
                          Sip Connector 2.56.2.4
                          RFXCOM 15.0.0.22
                          Odroid X2
                          Asterisk 11.5.1
                          FreePBX 2.11.0.42
                          WebMin 1.720
                          Xap Switchboard by Mi4

                          There is no place Like 127.0.0.1

                          Comment

                          Working...
                          X