more G-Labs products

Author Topic: Firebase support for Nest Thermostat  (Read 4683 times)

January 23, 2016, 08:22:35 AM
Reply #15

saue0

  • **
  • Information
  • Jr. Member
  • Posts: 40
Made it work whit this code.
Thanks

When.WebServiceCallReceived("HomeAutomation.NestLink/Update/", (jsonData) =>
{
    dynamic data = JsonConvert.DeserializeObject(((String)jsonData).Substring(31));
    // use the data object....
    MigService.Log.Debug(data.devices.thermostats);

    return "{ \"ResponseValue\" : \"OK\"}"
});


and here is my node.js part to send the data to Home genie


   var http = require('http');

   var options = {
     hostname: 'hg.erxinfo.ca',
     port: 8080,
     path: '/api/HomeAutomation.NestLink/Update/',
     method: 'POST',
     headers: {
              'Content-Type': 'application/json',
          },
     auth: 'xxx:xxx',
   };


   var hreq = http.request(options, (hres) => {
     hres.setEncoding('utf8');
     hres.on('data', (d) => {
            console.log(d);

     });
   });


   hreq.on('error', (e) => {
     console.error(e);
   });

   hreq.write(JSON.stringify(data));
   hreq.end();

Still need some work on the Node.js module....  and to be able to read all the valid data inside Home genie
« Last Edit: January 23, 2016, 08:25:10 AM by saue0 »

January 25, 2016, 01:18:06 AM
Reply #16

cmptrblder

  • *
  • Information
  • Newbie
  • Posts: 12
Geez, thanks guys for the work your doing, will be nice to have NEST part of Homegenie.  I went the side of hardware for too many years and got away from scripting and programming, wish I hadn't.  Can't wait for a finished product, thank you for your time.

January 28, 2016, 05:05:19 AM
Reply #17

saue0

  • **
  • Information
  • Jr. Member
  • Posts: 40
Here is a screenshot of the widget communicating with the Nest.
Still working on it. but seem to be valid.
The backend communicating with the Nest is a Node.js module. Will try to create a classhelper for firebase in c#.

2 thing to clarify,
  1- I had to create a new widget. How to integrate-it to the mobile application ?
  2 - I had to gesister myself to the Nest Development. This allow me tho have 50 firebase connection for my application. Should we have a real account for Home Genie, with a code review from the nest team. or each user sould register themself to acces the data ???

Anyway , this is a start ....

January 28, 2016, 05:12:40 AM
Reply #18

cmptrblder

  • *
  • Information
  • Newbie
  • Posts: 12
Nice work, I like the fact that homegenie covers stuff back from the x10 days to the current offerings like hue bulbs and such.  Some other programs offer limited support for older stuff or non at all, plus the look and feel of homegenie just works.

February 28, 2016, 08:31:53 AM
Reply #19

cmptrblder

  • *
  • Information
  • Newbie
  • Posts: 12

May 27, 2017, 09:40:13 PM
Reply #20

saue0

  • **
  • Information
  • Jr. Member
  • Posts: 40
New Homegenie package available , it support Thermostat,Protect and Camera

View it on Google+
https://plus.google.com/107303129643049077563/posts/ULtk173uzhy

Still Need some work. It is using the official Nest API.