-
4th September 2017, 11:28 PM
#1
Automated Home Guru
Interfacing with Cortex
Probably a simple question but I've not been Keeping Up At The Back recently.... And it's testament to the stability of cortex that it's taken me 40 minutes of faffing to even "remember" the credentials to log into my cortex PC for the first time in many many months...!
I'm using some old scripts to 'talk' xAP with cortex -- to send in some additional data and extract/report on heating status. I need to re-write them and don't want to use xAP if I can help it....
Can I use something more modern? I have a feeling there's some means of JSON API over the network.
Thanks all.
-
5th September 2017, 11:09 AM
#2
Automated Home Legend
Yes, I would suggest the Cortex Web API which provides JSON, XML and our own Synapse formats of syntax. You will need to have the Cortex Mobile licence to use this and I would suggest your Cortex is updated to the latest available version (27.2.6). Go to Tools | Cortex API and on bottom of page choose the Web API via Web Server tab then read associated Help.
Last edited by Karam; 9th September 2017 at 09:54 AM.
-
8th September 2017, 02:03 PM
#3
Automated Home Guru
That seems to be just the job. Thanks. The old xAP-based 'glue' can go in the bin......
-
10th September 2017, 01:05 AM
#4
Automated Home Legend
good luck with that, would be interested to read more detail, including how it goes ...
we've done something similar (may not be quite the same) to feed weather forecasts to NoticeBoard & our tablets - which works well - albeit we're going to have remind ourselves of the details soon, because the Met.Office has given notice of changing things at their end ...
Last edited by chris_j_hunter; 10th September 2017 at 01:08 AM.
-
12th September 2017, 09:55 AM
#5
Automated Home Jr Member
It would be good to hear how you do. We use the Web API to communicate with our Pellet Boiler.
It integrates nicely as we also use Cortex to control our UFH/Radiators and to monitor the water temperature available to the various central heating components i.e. Boiler, Thermal Store, Water Cylinder etc.
Its great for tracking relationships between operating times of the boiler and the impact on water temperature through daily use of heating and hot water. It can also be used to boost the boiler to ensure there is enough hot water for the kids bathtime.
Mark
-
16th September 2017, 12:29 AM
#6
-
17th September 2017, 10:48 PM
#7
Automated Home Guru
Something of a breakthrough. As posted yesterday, I just could not get data to POST into cortex.
Try as I might, the details in Cortex manual/help wouldn't work for me:
/api/v1/Ports/ObjectIdentifier?PortIdentifier=Value
and
/api/v1/Properties/ObjectIdentifier?PropertyName=Value
Then I went back to the examples in the Cortex API / Simulation dialog. Selected "Set Port Value by IDNumber and Port Number
The API Simulation comes up as
/api/v1/Objects/ ?4=1
Ah... Objects... Not Ports or Properties.... And trying 'curl -v -d "11=8" "http://admin:admin@10.1.1.30/api/v1/json/Objects/475" ' works - a sacrificial test object on the screen gets the number I've sent it !!!
Not sure if this is a typo in the help doc or just my misunderstanding - but the Objects URIs listed in the Resource Identifier section of the Cortex API Web help only mention listing and not setting values....
Anyway, I think I can now continue....
-
25th September 2017, 09:55 AM
#8
Automated Home Legend
Thanks for sharing this information, useful to know the structure of interacting with the Cortex Web API. Might have a go this week using PowerShell as it is native to Windows 10. Done something similar with blockchain queries so shouldn't be that hard now you've shared the basics.
Cheers
Paul
-
26th September 2017, 10:51 AM
#9
Automated Home Legend
PowerShell works also with Win'8.1 (& Win'7/SP1) - so would be great if you posted a few simple examples of what you get to work ... nothing elaborate, just a few lines to get us started !
Chris
-
26th September 2017, 09:08 PM
#10
Automated Home Legend
Hi

Originally Posted by
chris_j_hunter
Chris
rather than hijack this thread and the information from

Originally Posted by
jpdw
jpdw
I have created a new thread with an extended explanation of using PowerShell
http://www.automatedhome.co.uk/vbull...ing-PowerShell
Paul
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules