Web API options for Cortex

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • chris_j_hunter
    Automated Home Legend
    • Dec 2007
    • 1713

    #16
    looking forward to that ...

    most of the added capability we need could be enabled by a few extra General Logic objects ... but our Nabaztag / Mir:ror RFID readers need something else - a Raspberry Pi server & some sort of interface which may be possible using what you are developing !
    Our self-build - going further with HA...

    Comment

    • Aristoteles
      Automated Home Jr Member
      • Jan 2013
      • 32

      #17
      I've compiled it now and it seems to work as it should. It is quite straightforward. Just send a POST request through any browser to get data from Cortex and a PUT to set a value. With the example below for instance I get the value for a light (ie. object id 32913 and port no 7 which is TOGGLE). With a corresponding PUT request I can toggle the light. Be aware though that it seems to need some improved error handling since It can cause Cortex to freeze if used incorrectly.
      If any are interested to test it, I can send you the compiled exe file. Just send me your email.

      http://IP_FOR_SERVER_RUNNING_CORTEX:.../Ports/32913/7

      Comment

      • Aristoteles
        Automated Home Jr Member
        • Jan 2013
        • 32

        #18
        Hi spellinn,
        Just wondered if you got this to work?
        I've just tested ifttt and would like to use it with information from cortex. What I'd like to have is Cortex sending http postings which I can access through an RSS feed. It would be a very easy way to get continuous information on what is happening on my network.

        Comment

        • chris_j_hunter
          Automated Home Legend
          • Dec 2007
          • 1713

          #19
          did you try Karam's Android app IDR NB+ :

          Cortex W10 Software Download the (). This is a fully-functional version that will provide access to all features whilst unlicenced, but with an hourly


          it's become available since this thread was started ...

          we use it with the NoticeBoard and AllDisplay and WebAPIclient objects in Cortex to display weather forecasts & network status / module information (temperatures, on/off status, durations, power consumption, threshold triggers, whatever) on Dragon tablets we've put alongside each intercom unit we have in the house, and elsewhere ...

          the weather information comes from the Met.Office DataPoint facility, via JSON & the Cortex WebAPIclient object ... haven't looked to see what's available beyond the UK, yet ...

          traffic information is available (via Bing - jams, road-works, etc), so we may add that sometime, too ...

          lots of low-cost Android tablets available, we've used these :



          which we find work well (good blacks, neat appearance, responsive, easy to touch & swipe, etc) ...

          photo' attached - text size is changeable, doesn't have to be so small - screen shows energy consumption, overall & by major component, plus temperatures at key points in the heating & ventilation systems, solar, heat pump, etc, plus status of various pumps & filters, plus weather forecast for today, tonight, tomorrow, days after ... auto-updating is set to be hourly, could be any interval we choose, pushing Button 2 would update the data to now, and a double push would bring the forecast for next week ... swipe screen to scroll, tap to dim, move to Cortex Mobile, change settings, check e-mails, browsing, etc, etc ...

          our selfbuild isn't quite finished, yet, so being able to keep an eye on how the systems are performing is quite useful ... the displays also display spoken messages for a short while, in case we didn't quite hear what was said, and tell us things like how long we were asleep for ...

          our intercoms are old-style - we like them, but even better with the current ones (screens are available in a choice of frame colours, so easy to match - we use other colours in other situations) ... screens moveable, of course, so can pick-up to browse, or move to other locations as needed ... we stand them in Anker stands, which can be wall-mounted, too, and also have a colour choice, to match ...

          putting the screens by the intercom units means we can use its buttons to command updates & get it to display more detailed information when we want - could be any module with buttons, of course, even a button wired to a digital input of a convenient module, the tablets themselves communicating via WiFi & the Cortex WebServer ...

          we augment this with the Cortex Mobile app on our 'phones, for status & command & alerts while we're moving about, in or away from the house ...

          all works very well ... indeed, pretty much does all & more than we wished for, earlier in this thread !
          Attached Files
          Last edited by chris_j_hunter; 25 May 2016, 06:18 PM.
          Our self-build - going further with HA...

          Comment

          • Karam
            Automated Home Legend
            • Mar 2005
            • 863

            #20
            I haven't tried using IFTTT myself but in that case you might be using the Cortex WebAPI Client as opposed to the server (i.e if POSTing out)

            Wow Chris that's quite a bit of information that your App is displaying, but knowing the scale of your system probably not a surprise .

            Regarding the NB+ App:

            1) The public release version of the App on our site needs updating as it was discovered to have a memory leak which caused the App to be closed down after a couple of weeks or so depending on particular settings. This has since been corrected in development versions but I've yet to get round to updating the release one ... apologies about that. I'll post when done.

            2) The development version has a few other features. I can't actually remember all the differences off the top of my head as its continuously being twiddled with, but some include an option of alerting with a sound when a message line content changes and also speaking its content out (via the tablet) - though I personally rarely use this as it can get irritating for some data types and it doesn't have the same finess of delivery control as Cortex. Also various options to hide or unhide things like progress bar, intermessage lines etc. If anyone is particularly interested in such options and will let me off with my clunky programming skills then you're welcome to e-mail me for development versions.

            An example with less data content than Chris's is shown below.
            Attached Files

            Comment

            • chris_j_hunter
              Automated Home Legend
              • Dec 2007
              • 1713

              #21
              yep, my photo' showed the one on my desk, so easy to read even with small text ...

              for other locations, we'll be using larger text sizes & linking them to other NoticeBoards - ie: so can tailor content & presentation to situation ...

              another option is to use larger tablets - ours are 7", but 10" are also available for twice the money ...
              Our self-build - going further with HA...

              Comment

              • Karam
                Automated Home Legend
                • Mar 2005
                • 863

                #22
                I think its still possible to get some 9" tablets from China at around Ł37 inc delivery (see everbuying.net), though 10" seem to start around the Ł50 mark. Probably not the best quality screens at that price but depends on use I guess.

                Comment

                • chris_j_hunter
                  Automated Home Legend
                  • Dec 2007
                  • 1713

                  #23
                  we found the cheaper ones were low on pixel count - ie: offered no more than the smaller 7" ones ... so that would be something to watch, plus light leakage etc...
                  Our self-build - going further with HA...

                  Comment

                  • Aristoteles
                    Automated Home Jr Member
                    • Jan 2013
                    • 32

                    #24
                    Thanks Chris,
                    Well I tested the notice board, but I never got it to work. Attached a screenshot with my settings. Perhaps I do something obvious wrong. When I test the message it comes up allright, but when running it does not refresh every minute as I would like to.
                    What I would like is also to have some simple way of seeing when a door opens/closes or when a room becomes occupied/unoccupied.
                    From what I saw I could not make such connections. Only from the scheduler or am I wrong?
                    /Glenn


                    NoticeBoard.jpg

                    Comment

                    • chris_j_hunter
                      Automated Home Legend
                      • Dec 2007
                      • 1713

                      #25
                      have a look at AllDisplay ...
                      Our self-build - going further with HA...

                      Comment

                      • Aristoteles
                        Automated Home Jr Member
                        • Jan 2013
                        • 32

                        #26
                        I'm sorry Chris, but I lost you.
                        I´m using the AllDisplay a lot. It is perfect for the panels.
                        I manage to get the messages appear one by one on the NoticeBoard, but they disappear after a short while. They don´t seem to be like a feed where I can scroll back in history.

                        Comment

                        • chris_j_hunter
                          Automated Home Legend
                          • Dec 2007
                          • 1713

                          #27
                          Hi Glenn -

                          have been travelling, and sorry, misunderstood your question ...

                          our NoticeBoard shows Messages in white & Notices in yellow (can't recall, but ISTR there's a choice for all the colours), and ours shows Messages for an hour, and Notices for 45 seconds ...

                          we refresh our Messages every hour, and we let Notices fade away ... to define how long Notices show for, set Time to Clear in NoticeBoard Screen Options in the NoticeBoard Behaviour Menu ... Messages by default last for an hour (we've not wanted to depart from this, but have noted that triggering is done via the Update Text Line connection of AllDisplay and that this is created via the Value option, so have wondered if different values would give different times) ...

                          to trigger Message & Message Tag updates, we use General Logic triggered by the Scheduler with (eg) the settings shown in the first attachment ...

                          to have the Noticeboard (or a tablet showing the NoticeBoard) show when a Room becomes Occupied, or whatever, I would create some GeneralLogic that connects Room Presence to an AllDisplay item's Update Text Line connection, and then connect that item to the NoticeBoard & Sound & whatever - see (eg) the second & third attachments ...

                          to get a list of (eg) Occupations that you could scroll through, I would make sure that each message was produced by a separate gate in the General Logic, to ensure it is a separate message (likely to be the case, anyway, because separate rooms, unless you combined them via OR gates - so don't do that) then the logic will update each message when a change occurs, depending on your logic, and no need to use the Scheduler to give one minute updates ...

                          HTH

                          Chris
                          Attached Files
                          Last edited by chris_j_hunter; 27 May 2016, 11:28 PM.
                          Our self-build - going further with HA...

                          Comment

                          • Aristoteles
                            Automated Home Jr Member
                            • Jan 2013
                            • 32

                            #28
                            Thanks Chris,
                            I've tested it and it works, With 40 rooms or so and a lot of other things I would like to push to this feed, it will be quite difficult to manage and I would like to be able to scroll back in history. Anyway it is a step forward. Any idea how to get a timestamp on the notice/message?
                            /Glenn

                            Comment

                            • chris_j_hunter
                              Automated Home Legend
                              • Dec 2007
                              • 1713

                              #29
                              AllDisplay items can include Message Tags in the text - and <Time> will give you a time stamp ... examples in the attachment below ...

                              BTW, we use MessageServices to keep track of when some things occurred - mainly for historical reasons, rather than monitoring, and with a separate service for each subject ... whatever we choose, but fed from AllDisplay (eg: lower-most entries in the second & third attachments of my previous posting, above) ... might suit you, too, because can have as many as you like & easily scrolled & will keep entries for whatever time you specify ...
                              Attached Files
                              Last edited by chris_j_hunter; 28 May 2016, 12:01 AM.
                              Our self-build - going further with HA...

                              Comment

                              • Aristoteles
                                Automated Home Jr Member
                                • Jan 2013
                                • 32

                                #30
                                Thanks Chris, and one more (final?) question:
                                The clock gives the time in 12h format. How do I set it to 24H format?
                                I tried with =?HHMMSS but doesn´t seem to work.
                                Sorry for the plethora of questions.

                                BTW one thing I noticed is that when I am using the AllDisplay for the panels (where a line is constantly connected to an item in the AllDisplay). There is no need to output the time, but when I send it to the Notice board, which is more of a feed, there is a need for the time (and also some extra information like which room caused the message). Because of this it looks like I need to create double display items. It will definitely be quite difficult to administrate.... I wish there was a direct connection from the object to the Notice board. Perhaps a future request?
                                /Glenn
                                /Glenn

                                Comment

                                Working...
                                X