Results 1 to 8 of 8

Thread: Running a Cortex Macro for xAPFlash

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Automated Home Guru neilhooper's Avatar
    Join Date
    Oct 2008
    Location
    Hereford, United Kingdom
    Posts
    124

    Default Running a Cortex Macro for xAPFlash

    Can anybody give me some guidance on how to set this up.

    At present I can run the macro by pressing a physical button, which is not ideal, or I can press a button on a remote that is captured by Idratek/Cortex. What I would like to do is either emulate pressing the button or emulate pressing the remote control button or run the macro direct from xAPFlash. I've tried to 'push' the button and 'press' the remote button without success that leaves me with controlling the macro direct but I don't know where to start to be honest. Any help would be appreciated.

    - Neil

  2. #2
    Moderator Kevin's Avatar
    Join Date
    Jan 2004
    Location
    West Yorkshire
    Posts
    554

    Default

    Hi Neil, I'm just away for a week at the moment so I can't easily provide/check a step by step for this but if you're still struggling I'll do so when I get back.

    However the best approach would be to create a virtual device like a relay or light in Cortex and xAP enable it so it is turned on and off by the xAPFlash button (you can either set the button up to just send the 'on' or 'off' or you could send a 'toggle' which is the default although probably not as wanted here). Make sure this works exactly as intended. Now within Cortex take the output connection from the relay or lamp and use it to trigger the macro. If you are using on/off rather than toggle then you will need to reset the trigger state , either with some timed pulse action or I would think that within the macro itself is ideal. This will then ensure that the button on xAPFlash indicates a momentary 'on' state as the macro is run. This will provide good visual feedback to the user and is a guarantee it was performed.

    (You don't actually have to go via a virtual device - you could just receive/recognise an appropriate xAP message in Cortex and use the xAP message connection output to trigger the macro but then there will be no visual indicator within Cortex and also the button on xAPFlash will not show the state change)
    Last edited by Kevin; 17th June 2012 at 02:44 PM.

  3. #3
    Automated Home Guru neilhooper's Avatar
    Join Date
    Oct 2008
    Location
    Hereford, United Kingdom
    Posts
    124

    Default

    Kevin,

    I hope you're on holiday and not working.

    That's a good idea I'd not thought of that. Will be getting it working later today.

    - Neil

  4. #4
    Automated Home Guru neilhooper's Avatar
    Join Date
    Oct 2008
    Location
    Hereford, United Kingdom
    Posts
    124

    Default

    Kevin,

    Don't bother replying to this until you get back as it's not important.

    I'm having a little problem with getting the virtual device to work. I've set up a light and created a button to control it but it's not working. I've filled in all the details correctly but for some reason when the button is pressed nothing happens. If I toggle within Cortex its status gets updated in xAPFlash. I've put it's details in a button that I know works but still nothing, and I've put the details of another working light in the new button and that one works. I've checked and double checked the settings in Cortex comparing them with another known light that works and everything is the same. I'm confused !!!! Any ideas?

    - Neil

  5. #5
    Moderator Kevin's Avatar
    Join Date
    Jan 2004
    Location
    West Yorkshire
    Posts
    554

    Default

    OK I'm back Neil and, assuming it's still not working I'll try and provide a step by step...

    First a couple of questions..

    Do you have xAPFlash controlling anything in Cortex (not just tracking status) ?
    You do have a xAP hub running on the machine that Cortex is running on ?
    Could you paste me the content of a xAPBSC.event message from Cortex as it changes state from within Cortex (use xFX Viewer)
    Also a copy of the xAPBSC.cmd message from xAPFlash to Cortex when you press the button.

    K

  6. #6
    Automated Home Guru neilhooper's Avatar
    Join Date
    Oct 2008
    Location
    Hereford, United Kingdom
    Posts
    124

    Default

    Hi Kevin,

    Quote Originally Posted by Kevin View Post
    Do you have xAPFlash controlling anything in Cortex (not just tracking status) ?
    K
    - Yes, lot's of things succesfully.

    Quote Originally Posted by Kevin View Post
    You do have a xAP hub running on the machine that Cortex is running on ?
    K
    - Yes.


    I haven't had chance to update this thread since I posted it. I got involved with removing an internal wall here over the weekend as phase two has now started and I've been to a funeral today, It's all fun !!!

    It's working now but it wouldn't for a couple of days. I hadn't changed anything but I noticed it had started working either after a network stop & start or it could of been a reboot of the Cortex PC after an update.

    However a persistant problem that I have had is that I can't get my Outside Light Level to dispaly in a text box because xAPFlash is reporting it as a missing device.

    It's strange as I can display the Outside Temperature and Outside Humidity, they are on the same module.

    I think that it may be something on the Cortex side so I think I'll drop Vivian an email and see if he can investigate.

    Anyway back to the topic in hand. I've got the virtual light working (somehow) and now just need to make it run the macro.

    I would prefer to be able to run the macro direct though as I have some other uses for macros that invlove the Motor Control and HVAC objects that aren't xAP enabled in Cortex. I've been looking into those objects and I can't see how they can be easily exposed to xAP as they have a multitude of control options.

    - Neil

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •