Cortex not recognising initial xAP connections

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • neilhooper
    Automated Home Guru
    • Oct 2008
    • 124

    Cortex not recognising initial xAP connections

    Hi All,

    I'm wondering if anybody has experienced this.

    I've recently got xAP flash working on my PC and Android phone. After my initial success I've hit a bit of a problem.

    My scenario is this;

    I'm running Cortex in trial mode at the moment and trying to get things working the way I want before I order any hardware that is, let's say, incorrect for my purposes. I don't want to make any potentially costly mistakes.

    For some reason when I first boot up the trial Cortex PC I cannot get xAP flash to connect my various buttons to Cortex. The only way I can get it to work is if I use Cortex to send an xAP message out for each device then everything works fine. I have a feeling that it may be caused by the fact that there isn't actually any hardware connected, so Cortex isn't sending out the initial status message because it can't interrogate the non existent hardware to get its status.

    I've just thought this through as I'm typing so I hope it makes sense.

    However, I'm still excited with the prospect of getting everything working as I want and I'm not going to give up.

    - Neil

    P.S. Can button labels be multiline? I don't think they can but just checking.
  • Kevin
    Moderator
    • Jan 2004
    • 558

    #2
    I haven't seen this behaviour and it may have some relation to the lack of actual state reporting devices - as you suggest. I assume the xAP hub is left running 24/7 on the Cortex machine and xAPFlash is not being restarted.

    Is it the xAPFlash button that doesn't control the device or is it the Cortex device that doesn't show it's status in xAPFlash when Cortex starts - the latter could be due to Cortex's 'info' reporting ?

    xAPFlash typically sends 'toggle' commands to a device if you are just using the basic mode of operation and so until Cortex knows a state it won't be able to change it. What device in Cortex do you have that you are controlling ? Does it report a xAP state when you start Cortex up ?

    Re two line labels . you could instead use a text field instead of a label which can display any number of lines....

    K

    Comment

    • neilhooper
      Automated Home Guru
      • Oct 2008
      • 124

      #3
      I assume the xAP hub is left running 24/7 on the Cortex machine and xAPFlash is not being restarted.
      K
      - No, the Cortex PC is being shut down every day at the moment. It will be running 24/7 when everything is finally implemented. It will run Cortex, xAP Hub and Iserver. I'm running xAPFlash either from another PC or my Android Phone, again, for testing purposes so it is being shut down and restarted.

      Is it the xAPFlash button that doesn't control the device or is it the Cortex device that doesn't show it's status in xAPFlash when Cortex starts - the latter could be due to Cortex's 'info' reporting ?
      K
      - Both, the xAPFlash button does nothing and shows no status, the xAP button shows all the devices as not being connected and lists them all as missing when clicked.

      What device in Cortex do you have that you are controlling ?
      K
      - A dimmer, set to manual control only. Once the connection is established it works flawlessly. I'm only trying on/off at the moment, starting off simple then move on to more complicated things. (Baby steps)

      Does it report a xAP state when you start Cortex up ?
      K
      - I don't know, where do I check?

      Re two line labels . you could instead use a text field instead of a label which can display any number of lines....
      K
      - Would I have to turn <html> & <wordwrap> & <multiline> all to true, specify my Button label with <text> and use some html formatting in the Button label text ?

      - Neil

      Comment

      • Kevin
        Moderator
        • Jan 2004
        • 558

        #4
        There isn't a 'connection' as such in xAP speak as it's a broadcast protocol but I know what you're saying. I'm trying to ascertain which bit isn't hearing the other bit, if indeed that is happening, or if your thoughts about having no actual hardware are causing this, which I too suspect is the cause.

        There is a xAP hub running on both machines (Cortex and xAPFlash) and the hubs do start before the applications ? Typically the hubs are implemented as a startup service to ensure this.

        If you use xFX Viewer you will be able to see on the xAP network the messages that are being sent, so you will see if Cortex is announcing the state of the dimmer correctly at startup, and the command messages from xAPFlash.

        state=? is a valid xAP state (meaning unknown) and such a reported state would obviously mean that xAPFlash can't toggle it. If Cortex reports this at startup then that would indicate the issue you're suggesting - and it would work correctly once you install either an IDRANet dimmer or a xAP linked device. Changing the state within Cortex would initialise the device to a known state, as would sending an 'on' or 'off' command from xAPFlash rather than using 'toggle'. In a 24/7 environment it wouldn't show as an issue anyway.

        Kevin

        Comment

        • Kevin
          Moderator
          • Jan 2004
          • 558

          #5
          Cortex version number

          Neil - what version number of Cortex are you running ?

          K

          Comment

          • neilhooper
            Automated Home Guru
            • Oct 2008
            • 124

            #6
            Hi Kevin,

            Version 25.2.21

            I asked Karam if the behavior that I'm experiencing is normal and Vivian replied with this;

            "Cortex does not send an xAP event message on network start for each enabled object.

            I will contact Kevin and ask him if this is appropriate or if something else should be done."

            - Neil

            Comment

            • Kevin
              Moderator
              • Jan 2004
              • 558

              #7
              Hmm - OK that's later than my version 25.2.19.. and I'm showing no updates available... strange... Anyway one issue that might have caused this was fixed in 25.2.15 and so you are later than that.

              Yes, Vivian contacted me... The lack of xAPBSC.info messages at startup should not cause this issue as xAPFlash sends xAPBSC.query messages for each button.

              What I was trying to see from the above request for xFX Viewer message sequence was if these messages were sent and if Cortex responded. So if you could get me this it would help.

              I need it from Cortex startup (don't change the state in Cortex) and then try changing the state from xAPFlash, and then when that doesn't work change the state in Cortex and try changing the state again from xAPFlash. Use the diskette icon bottom left in xFX Viewer to save the messages to a file and send it to me by email and I'll take a look.

              K

              Comment

              • Viv
                Automated Home Ninja
                • Dec 2004
                • 284

                #8
                Just to clarify I have found Cortex DOES send for most xAP enabled objects a xAPBSC.info message on network start. I say most, all but the lights.
                The lights response is timed and would eventually be sent.

                The next Cortex update will resolve this.

                Also Cortex is responding to xAPBSC.query (at least in my tests).

                Viv.

                Comment

                • Kevin
                  Moderator
                  • Jan 2004
                  • 558

                  #9
                  One other thing I thought of Neil...

                  Until Cortex sends it's first heartbeat it will not be able to hear incoming xAP messages as it won't have been registered with the xAP hub. It does this pretty quickly (and certainly within it's first minute of network start) but maybe you're getting in there before that has happened. In a normal running Cortex environment this would never cause an issue.

                  K

                  Comment

                  • neilhooper
                    Automated Home Guru
                    • Oct 2008
                    • 124

                    #10
                    Kevin,

                    I've just emailed you with the xFX Viewer file and some other thoughts.

                    - Neil

                    Comment

                    • Kevin
                      Moderator
                      • Jan 2004
                      • 558

                      #11
                      Neil,

                      I didn't want to have to bring down my only Cortex to play with this - plus doing so messes up my database information . The 8 bit counters in the hardware for my meter monitoring are very small and so they have to be read fairly frequently else they overflow and I lose logging data. ... hint hint IDRATek... ;-)

                      But of course I can only install the trial of Cortex once - and I have previously done this on both other machines I have available (and you need a new key anyway) and so I'm a bit stuck trying to get a test Cortex install for this...

                      I did take down my main system and load yours for a short while just now and I do see the behaviour you explain - I get one lamp CeilingRGBR9 that does send xAPBSC.infos every 10 secs. I network disabled two hardware devices that had you created.

                      I'll also try and take a longer look tomorrow and also see on Monday if I can get Vivian to supply an extension key for a week or so for one of the trials I have installed that have expired so I can avoid messing up my own system.


                      K
                      Last edited by Kevin; 25 March 2012, 02:37 AM.

                      Comment

                      • Kevin
                        Moderator
                        • Jan 2004
                        • 558

                        #12
                        I think you're basically right with your observations Neil, but it may well be just a 'no hardware' issue.

                        In my own setup most of my lighting is on C-Bus that I bought before IDRANet dimmers were available and so I hadn't noticed this . My lights were integrated into Cortex via a xAP automation object. I have some relay controlled loads within Cortex and they seem to work fine. However I just added some lighting loads on a real network enabled QLD4 and I see this same behaviour.

                        Cortex does not send info's at startup for the lights, nor it seems later in the periodic update, but as Vivian mentioned this will be a fix in the next release , if so all will be hunky dory again.

                        The info's at startup isn't itself the problem but Cortex does not respond to xAPBSC.query or xAPBSC.cmd messages targeted at these lights until they are changed locally via behaviour. Once changed manually they seem OK. I had thought the same was true even if you had hardware , but after saving my config and restarting it seems that query and cmd do work immediately.

                        Should query/cmd not respond then this leads of course to an inability to initially display status or control the lights from xAPFlash / xAP as you experienced.

                        Also it seems that manual editing of the output name in Cortex doesn't necessarily propogate to the xAP source name, but that may just be required restart issue.

                        All very fixable I feel - and well done for spotting it - I hope the next Cortex release gets it all working for you as you'd like whilst you're in your evaluation time.

                        K
                        Last edited by Kevin; 25 March 2012, 09:15 PM.

                        Comment

                        • neilhooper
                          Automated Home Guru
                          • Oct 2008
                          • 124

                          #13
                          Thanks Kevin,

                          I've responded to your email before I read this.

                          I'm hoping the update will be sooner rather than later as I'm just about to order hardware as soon as I can get a couple of other issues resolved.

                          - Neil

                          Comment

                          • Kevin
                            Moderator
                            • Jan 2004
                            • 558

                            #14
                            Vivian has already posted some fixes in 25.2.22 for some of these comments - (wow that's fast !) - I'm not sure if he also addresses the reporting without hardware - let me know ...

                            K

                            Comment

                            • neilhooper
                              Automated Home Guru
                              • Oct 2008
                              • 124

                              #15
                              Kevin,

                              I've updated to 25.2.22 and all now works as expected.... Great news.

                              - Neil

                              Comment

                              Working...
                              X