We have moved at community.getvera.com

Author Topic: Nest Protect (Smoke/CO detector)... Who will be the first to develop a plug-in?  (Read 37089 times)

Offline Gklmdawson

  • Full Member
  • ***
  • Posts: 111
  • Karma: +4/-0
That'd be great. I've got some protects that I would love to integrate into vera. Would it require having a nest thermostat? I don't have the nest thermostat and I'd prefer to keep the one I have.

Offline watou

  • Moderator
  • Hero Member
  • *****
  • Posts: 889
  • Karma: +44/-12
That'd be great. I've got some protects that I would love to integrate into vera. Would it require having a nest thermostat? I don't have the nest thermostat and I'd prefer to keep the one I have.

I think the only requirement would be that you have an account at nest.com with your device(s) registered there.  I will need help testing the new code for users like you who only have Protect(s) and not thermostat(s).  I expect to have something to test in the next two weeks.

watou

Offline capjay

  • Hero Member
  • *****
  • Posts: 675
  • Karma: +9/-3
That'd be great. I've got some protects that I would love to integrate into vera. Would it require having a nest thermostat? I don't have the nest thermostat and I'd prefer to keep the one I have.

I think the only requirement would be that you have an account at nest.com with your device(s) registered there.  I will need help testing the new code for users like you who only have Protect(s) and not thermostat(s).  I expect to have something to test in the next two weeks.

ditto. I have Nest protects but no thermostats. I'll be happy to test.

Offline Gklmdawson

  • Full Member
  • ***
  • Posts: 111
  • Karma: +4/-0
I'll be out of town this week but I'd be happy to do some tests and provide feedback

Offline ronaldc74

  • Newbie
  • *
  • Posts: 13
  • Karma: +0/-0
Hi,

Would also be happy to test as I do not have the thermostat as well. Only using several Protects.

Thanks
Ron

Offline patersom82

  • Sr. Newbie
  • *
  • Posts: 42
  • Karma: +1/-1
Hi there.

Another willing volunteer to test. 

I have just purchased 2x Nest Nest Smoke & CO Alarms.  I have Vera 1.5.622 and would love to be able to 'see' these alarms in my Vera dashboard.

Offline watou

  • Moderator
  • Hero Member
  • *****
  • Posts: 889
  • Karma: +44/-12
Regarding extending the Nest plugin to support the Protect, I want to get the battery level as meaningful as possible, so one can learn from Vera when it's time to replace the batteries.  Of course, the native app will give you warnings six and then three months before the batteries are too weak, but I want to show battery level properly in Vera.

Can anyone here help me with what would be the best theory for the meaning of a battery_level of 5304 in a battery-powered Nest Protect? 

Here's my theory:  Since the wired version of the Protect needs 3 L91 lithium AA batteries as a backup, and the battery-powered version needs 6 of those, it makes me think that the 6 batteries are two sets of three in parallel, giving a voltage level that is three times the voltage of a single lithium AA.  Since Lithium AA batteries have an unloaded voltage of 1.8, 3 * 1.8 is 5.4.  So if the Protect is reporting its battery level in millivolts, then it's conceivable that my Protect, with two sets of three lithium batteries in parallel, is currently providing 5.304 volts.  So if this is true, all I need to do is determine what the minimum usable voltage level is, and this will define the scale for reporting in Vera.

Any thoughts?

Thanks,
watou


Offline watou

  • Moderator
  • Hero Member
  • *****
  • Posts: 889
  • Karma: +44/-12
For testing, I've added support for just the smoke detector part of the Nest Protect to the existing Nest plugin.  It uses the existing service and device definition files for smoke detectors that I found on my Vera.  This has the benefit of working wherever there is existing support for smoke detectors in Vera (and mobile apps) without requiring code to be changed to support a new service or device type.  The downside is that there is no pretty Nest icon, only the default one.

While there is a subcategory defined for CO detectors (5), I did not find XML or JSON files on my Vera for them, so I would like feedback on this before I add an additional device to support the CO detector.

So I'm looking for testers.  I haven't blown smoke at my Protect, so if anyone wants to test the attached file, I would appreciate it.

To install this alpha version:
  • Install the current Nest v1.6 plugin if not already installed, and set your username and password so it is logging into nest.com successfully.
  • Download the attached I_Nest1.xml file, and go to Apps -> Develop Apps -> Luup files, Choose the file, check the "Restart Luup after upload" box, and press GO.
Your Vera will restart twice; once to load the newly uploaded file, and again when new Nest device(s) are discovered and added.  The log will report the plugin version as 1.7, but it's not yet the real 1.7 version until the new update is in the app store.

Caveats:
  • The plugin will only trigger that smoke was detected after the next polling cycle, up to two minutes by default.
  • The smoke detector support is not to be relied upon for any purpose that effects the life or health of anyone -- the standard disclaimers against all liability in the current license are also in effect.
  • This support does not use the new official Nest API; that will have to wait until the official API includes more features.
  • I see no way to receive notifications from the passive infrared sensor in the Protect to use as a motion sensor.
  • I have not tested against a nest.com account that does not also have a thermostat device but I don't (yet) know of a reason why it shouldn't work.

Please report your observations.   Thank you!

watou

Offline CudaNet

  • Beta Testers
  • Hero Member
  • *****
  • Posts: 1401
  • Karma: +42/-11
  • Chimichanga !
Install was clean, no problems and detected/added my 6 protects almost immediately. Trigger info is present within scenes and was able to quickly associate (assign name/room) the devices based on the plug-in 'Altid' and Nest's (website) technical data ('802.15.4mac'). Battery levels are displaying and readings are between 90-93%.

I'm 110% sure my wife will be pissed at me for testing using smoke, not sure if manually testing the device yields the same results. However, how are we sure these detectors even work ...
openLuup, AltUI, Zway and HomeWave, enough said...

Offline watou

  • Moderator
  • Hero Member
  • *****
  • Posts: 889
  • Karma: +44/-12
Install was clean, no problems and detected/added my 6 protects almost immediately. Trigger info is present within scenes and was able to quickly associate (assign name/room) the devices based on the plug-in 'Altid' and Nest's (website) technical data ('802.15.4mac'). Battery levels are displaying and readings are between 90-93%.

I'm 110% sure my wife will be pissed at me for testing using smoke, not sure if manually testing the device yields the same results. However, how are we sure these detectors even work ...

Good to hear.  At some point I had set the "description" field for my Protect as "Upstairs" and that came through as the Vera device name.  I was hoping that at least something meaningful would be provided when the user hadn't set the name explicitly online.

Sorry to burden you (and your family) with empirical smoke testing, if you choose to, but at least I can say that I'm pretty sure the trigger will fire within two minutes.

While I'm thinking of it, the Protect battery level is currently being shown between the range of 4200 and 5400, which I am interpreting to be millivolts as supplied by lithium AA batteries.  I guessed at 4200 (a low battery being 1.4 volts), but I don't know.  I'm still hoping someone chimes in about my battery hypothesis above, and what a need-to-change-the-batteries condition would be in terms of voltage.  It's all guessing at the moment.

Thanks, and please let me know if you get a chance to actually create a smoke condition.  I doubt that the test mode will register as actual smoke.

Regards,
watou

Offline knewmania

  • Sr. Member
  • ****
  • Posts: 255
  • Karma: +0/-0
I had a chance to install the new Protect functionality and can confirm that the install was very easy as @CudaNet reported. My single Nest Protect showed up almost immediately. I setup the 'Smoke Alarm is Activated' notification and assigned it to the appropriate users.

I have a 120v connected Protect and it shows ~93% Battery Level.

I informed the family that I needed to do the 'mandatory functional testing'  ;D of the smoke detectors and held a extinguished candle over the Protect. Within 20 seconds the Protect went into its alarm mode, shortly there after I received the email/txt from the Vera.

Of course I also received the notifications from the Nest app as well.

I am very happy with the new functionality. Thank you for proceeding with the enhancement given the limitations of the delivered API.
« Last Edit: July 09, 2014, 09:36:41 pm by knewmania »
Vera 2. UI 1.5.622 / Vera 3. UI 1.7.760

Offline watou

  • Moderator
  • Hero Member
  • *****
  • Posts: 889
  • Karma: +44/-12
I have a 120v connected Protect and it shows ~93% Battery Level.

That's good to know that the backup batteries still show through on the 120v version of the Protect.  But I still have to make sure the approach I'm using for battery level is correct or at least sufficiently useful.

I informed the family that I needed to do the 'mandatory functional testing'  ;D of the smoke detectors and held a extinguished candle over the Protect. Within 20 seconds the Protect went into its alarm mode, shortly there after I received the email/txt from the Vera.

I'm very glad to hear that a real smoke event triggered properly.  As for the carbon monoxide detector, I don't want to create a new D_NestCOSensor1.xml file, JSON file and icon, but I think the absence of one already in the Vera will require me to.  This new device would not be fully understood by the mobile apps.

Thanks very much for testing.  When the path is clear for adding the CO detector device and I have feedback from people who only have Protect(s) but no thermostats, I will add the CO feature in and publish a v1.7 of the plugin in the app store.

watou
« Last Edit: July 09, 2014, 10:16:15 pm by watou »

Offline guessed

  • Community Beta
  • Master Member
  • ******
  • Posts: 5301
  • Karma: +92/-22
  • Release compat is not a bolted-on afterthought
@watou,
I have 6x of them, along with the 2x Thermostats.

After applying the patch (thanks!!) and restarting twice, I see all six of the Smoke sensors appear correctly on the Dashboard.

Each reports energy usage between 92% and 94%, they're all hard-wired units so a similar discovery that @knewmania posted above.


Your guess on the battery level seems like a reasonable one.  The thing that'll come with time is knowing how fast this battery chem "drops off", from a usability standpoint.  My old team did a lot of work with battery-powered stuff, and it was eye-opening how different the results were across the different makeup of the cell(s) involved.

Q: Is it possible to pull across the Labels from the Feed?  With 6x units, it's hard to identify them (not impossible, just not easy ;)

Offline watou

  • Moderator
  • Hero Member
  • *****
  • Posts: 889
  • Karma: +44/-12
Thanks very much, @guessed, for reporting your experience and for feedback about the battery levels.

Q: Is it possible to pull across the Labels from the Feed?  With 6x units, it's hard to identify them (not impossible, just not easy ;)

I will investigate unpacking the "where" information for each thermostat and Protect, which identifies if it is in the Basement, Den, Dining Room, etc., for the purpose of augmenting the device's name attribute on device creation.  So each newly created thermostat, humidistat, smoke and CO detector device's name would be in the format "name (where)" upon creation.  If the device has no specific name or description, the Vera device name would just be the "where" label.  I don't want to try to auto-assign each device to a matching Vera room name, even though it would be cool, because this might unintentionally override the user's preferences.

watou

UPDATE: I've changed the plugin so that any thermostat, humidistat, or smoke detector device will have in its name where you've assigned it to be in the house (Den, Basement, Upstairs, etc.).  If you load the attached I_Nest1.xml, and delete any of these devices and wait for the plugin to re-discover them, whatever label you've attached to your thermostat or Protect will be reflected in the device's initial name (which you can change later).  Please test this and give me your feedback.  Thank you!
« Last Edit: July 10, 2014, 08:10:14 am by watou »

Offline guessed

  • Community Beta
  • Master Member
  • ******
  • Posts: 5301
  • Karma: +92/-22
  • Release compat is not a bolted-on afterthought
Thanks @watou, that was quick!

I applied the patch this morning, but I'd already hand-keyed the labels last night.  I didn't want to delete/recreate the children as I already have them hooked up to openHAB via their id's.