Page 1 of 5 12345 LastLast
Results 1 to 10 of 46

Thread: Web API options for Cortex

  1. #1
    Automated Home Sr Member
    Join Date
    Dec 2007
    Posts
    53

    Default Web API options for Cortex

    I'd like to trigger events from cloud-based integration systems such as itDuzzit.com and ifttt.com but both require something to be listening on a HTTP(s) port. Whilst I can send emails to Cortex it's a bit hit and miss and hardly realtime.

    Is there a proper web API on the Cortex roadmap, or has anyone found a way of bridging the Windows app-messaging API currently provided by Cortex to a true HTTP Web-based API?

    Cheers

    Neil

  2. #2
    Automated Home Sr Member
    Join Date
    Dec 2007
    Posts
    53

    Default

    Am I really alone in this requirement? With the Internet of Things, I would of thought this kind of API control of home automation would be high on people's agendas.

    Cheers

    Neil

  3. #3
    Automated Home Legend Karam's Avatar
    Join Date
    Mar 2005
    Posts
    818

    Default

    What sort of things would you be doing with ifttt or itDuzzit?

  4. #4
    Automated Home Legend chris_j_hunter's Avatar
    Join Date
    Dec 2007
    Location
    North Lancashire
    Posts
    1,674

    Default

    that the Mobile extension to Cortex doesn't do already ?

  5. #5
    Automated Home Sr Member
    Join Date
    Dec 2007
    Posts
    53

    Default

    Some of the ideas floating round my head (some may be feasible, others still not possible)

    - Set up more advanced alerting/recording from my various IP cameras based on occupancy, time of day.
    - Trigger the pre-heating of my car based on occupancy, outside temperature, day of week etc
    - Trigger events at home based on my location (e.g. I arrive at the station and am 10 minutes from home)
    - Send alerts from Cortex via twitter DMs
    - Pull in weather feeds and display predicted highs/lows on my panels
    - Trigger Sonos at certain times of the day when the house is unoccupied for improved occupancy simulation
    - Better integrate my alarm system and Cortex
    - Use a http://bt.tn/ to trigger events within Cortex

    APIs are becoming commonplace, and most are provided by a JSON or REST web interface. It would be nice if Cortex could also be controlled this way (and might even facilitate you producing a proper mobile app..hint hint

    Cheers

    Neil
    Last edited by spellinn; 29th January 2015 at 09:45 AM.

  6. #6
    Automated Home Sr Member
    Join Date
    Dec 2007
    Posts
    53

    Default

    Speaking of a mobile app, your time to market would be much quicker if you create an API and use something like http://www.smartthings.com/ or http://octoblu.com/

    They have very good developer community and documentation:

    http://docs.smartthings.com/en/lates...ss-application

    The platform seems very extensible, and with the IFTTT integration opens up the possibilities to use any of the thousands of Mobile or Cloud triggers (location, weather, time, stocks..you name it)

    Cheers

    Neil
    Last edited by spellinn; 29th January 2015 at 12:50 PM.

  7. #7
    Automated Home Legend chris_j_hunter's Avatar
    Join Date
    Dec 2007
    Location
    North Lancashire
    Posts
    1,674

    Default

    Neil -

    you're clearly more into this than we ...

    we currently use the Mobile extension, occasionally for switching or adjusting things (as when up a ladder & need the lights dimmed up a bit, or needing to activate the House before we arrive home), but more often for checking Histories (as in determining when the delivery man exactly did try to deliver, how long's the heating been on today, has the cold spell turned the corner, yet) ...

    and we find the main issue with it is to do with how we connect to it - by WiFi, when at home - because the address (192.168.etc) is liable to change, from time to time, and because the WiFi hub isn't always on, and the connection doesn't always resume when it comes back on ...

    in other words, would your alternative approach be immune to such issues ?

    BTW, thought your SmartThings link interesting - but how for-real is it ... ?

    eg: automatic lighting, in reality, is rather more than just a relay & a motion sensor - to work well, lots of subtleties & complexities are involved & have to be got right ...

    and the same must be true for location sensing etc, too !

    Chris

  8. #8
    Automated Home Sr Member
    Join Date
    Dec 2007
    Posts
    53

    Default

    Hi Chris

    My main interest isn't to manually control lights and Cortex objects from my mobile phone - as you state, I could use the mobile extension provided by the Cortex web server to do that.

    I'm thinking slightly more longer term, when every device talks to every other device over IP.

    I want the flexibility of using "the current favourite automation platform" based in the cloud to control and integrate my devices (devices being everything in my house, my car, my laptop and mobile). And to do that, they all need to be exposed and controllable by a published API. As you see from my wish list above, it's mostly about automating actions based on data and events that Cortex already knows about - outside temperature, house and room occupancy, camera and alarm events etc.

    The connectivity issues you are seeing can be resolved by using DHCP reservations on your WiFi router so that your Cortex system always gets the same internal IP address. Most modern WiFi routers support this functionality. Public Internet IP address changes can easily be handled using one of the many Dynamic DNS providers. And if your WiFi does not automatically reconnect then it sounds like you need a better one - I don't have that issue.

    At some point (maybe many years from now) the concept of having a Windows application running on a PC 24/7 connected with a serial port will look very old school so I'm obviously keen to future proof my investment for the IoT age which is upon us. I've already experimented with running Cortex in the cloud, remoting the serial port back to a system in my house, but as you still need that jump box it made little sense to leave it that way.

    I need an Idratek module that contains an built-in web server, WiFi+Ethernet connection, and can expose my Cortex objects via and API, send and receive IDRANET commands via IP to any, and even many endpoints - whether that's another PC in my house running Windows+Cortex, or a cloud-based automation platform.

    Cheers


    Neil

  9. #9
    Automated Home Legend chris_j_hunter's Avatar
    Join Date
    Dec 2007
    Location
    North Lancashire
    Posts
    1,674

    Default

    Neil -

    thanks ...

    not sure about the many years from now, though - ISTM it's all already upon us !

    we've WiFi & Cat-6 & Cat-5e & CT100 cables all over the house, have IP devices here & there, the HiFi & even the cars have interfaces that are ready to connect, in many ways ...

    BTW - the other module, we're missing, is a display module, with a display that's short (low character count) but readable from across the room, for showing time and/or temperature or whatever, and short identifiers (eg: when doorbell sounds, can show Gate or Door, or when Alarm sounds, can show Fire, Flood, whatever) ...

    Chris

  10. #10
    Automated Home Sr Member
    Join Date
    Dec 2007
    Posts
    53

    Default

    Yes you're right - it's here now. Hence why I'm bringing this up wrt Idratek and Cortex.

    Your display module idea - in my mind this would be catered for by using a modern SmartTV that can display Twitter and RSS feeds etc.

    An API-capable Cortex could output to a service that could provide RSS which would allow you to subscript to a notification feed from any device - large or small format, internal to your house or out on the road.

    Cheers

    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
  •