Hi Jeff,
In the code of that node-red-contrib-tcc-honeywell node, you can see here that it does a series of http requests after each other to get the job done:
var tccLogin = function(node, callback) {
tccRequest(node, hdrs.getDefaults(node), 'TCC Login first GET', ConnectSuccess, function(node) {
tccRequest(node, hdrs.postDefaults(node), 'TCC Login POST', PostSuccess, function(node) {
tccRequest(node, hdrs.getDefaults(node), 'TCC Login second GET', ConnectSuccess, function(node) {
callback(node);
});
});
});
};
And for each of those requests you can find in this file how the request is made. For example the above getDetails
call:
module.exports.getDefaults = function(node) {
return {
method: "GET",
url: "https://mytotalconnectcomfort.com/portal/",
timeout: 15000,
strictSSL: false,
jar: node.jar,
headers: {
"Content-Type": "application/x-www-form-urlencoded",
"Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8",
"Accept-Encoding": "sdch",
"Host": "mytotalconnectcomfort.com",
"DNT": "1",
"Origin": "https://mytotalconnectcomfort.com/portal",
"User-Agent": "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.95 Safari/537.36"
}
}
};
So for this one, it executes a GET to that url and applies those http header variables. I assume you can do something similar with the http-request node if you don't want to use that node?
But to me it seems that is better to try to contact the author of that node. He has already figured out how it works ...
Good luck with it!
Bart