[OBSOLETE] Nest Protect Device Type

Yeah I already tried that. This is the line of code it has for the metadata:
// for the UI
metadata {
simulator {

I changed it to this:
metadata {
definition (name: “Nest Protect”, namespace: “MyHome”, author: "nick@nickhbailey.com") {
capability "Battery"
capability "Carbon Monoxide Detector"
capability "Polling"
capability “Smoke Detector”
}

that’s the old one, scroll up and use my fork.

Thanks man, I was using the old one like you said. It works great now. Thanks again Sid

1 Like

I think I found the problem with the “Java.lang.IllegalArgumentException: Metadata definition not found” errors. I went the the link above. I followed the link in the directions to the code, selected raw, copied and pasted and received the error.

To fix it I went to the link above but this time I clicked on the link to the code that is located ABOVE the directions then cut and pasted the raw code and it worked.

Could the two links point to different places?

I followed all the directions and added the 5 Nest Protects. I see them in the IDE. I see them listed in the Smartthings dashboard. The Smart Home Monitor says everything is ok for Smoke. When I click on any of the detectors in Things everything is listed as Unknown. Refreshing does not change anything.

Did I miss a step somewhere?

4 days later and still Unknown on all my Nest Protects. There must be a setting I am missing somewhere?

Thank you @sidjohn1 for the offer of paid support. I understand that you would like to be fairly compensated for your time and effort but unfortunately I didn’t want to pay for support for something that could not get to work in the first place.

I did however find a solution to my problem. I cut and pasted @jcbannon’s code from post #21 above and it worked right away.

I wasn’t sure if I needed to or not since they already appeared to be working, but I deleted and re-added all my Protects since I changed the device type code.

Then in the new app’s Dashboard I hit the Marketplace icon in the lower right corner and found a device needs configuration message for all the Protects. I updated them from the link to add them to the correct rooms and they appear everywhere in the app as they are supposed to.

Next, I’m off to check out Pollster.

1 Like

@sidjohn1, I spent a little time today after receiving the ST2 and got Nest Protect integration working straight away with your new code.

I found when following the instructions on GitHub, the link you have in, “Copy contents of Nest Protect Device Type file to your new device type” points to the old code version from 2014 rather than your branch, which may be why it is not working for some.

After noticing the date was not new and the Nest Protect not working, I scrolled up and copied the code from the, “Nest Protect Device Type” at the top of your, “SmartThings-NestProtect” page.

Thanks for getting this working and out of curiosity, is there a reason that you don’t publish this with ST so that it can become a native device? I am new to HA and ST, so apologies if this has been answered before. I read the Echo thread and saw a similar path that the Nest Protect integration took, however that is now natively supported.

There is no nice answer for this, so I’ll just be honest. There is no incentive to do so. I personally hate coding, but I do it because it’s the only way to automate what I want. I code for me, and me only. I share the code, cause it’s an awful waste of time for others to keep reinventing the wheel.

Sadly, I feel this community places very little value on all the work the hobbist developers do. Sure there is much love for the apps and devices, but when it comes to backing up that love with anything tangible like helping with the coding of the project or supporting it with money the conversation goes defendingly mute. To add to the fun if the free code doesn’t work people are quick to complain, regardless of the reason why it doesn’t work.

In the end it’s extra work for me to make it easier for others to find, use, only to not contribute, or support and complain when it doesn’t work the way they want it to. Obviously there are exceptions to this and I greatly appreciate the very, very few people who have supported my work, but until there is enough support to warrant the extra work, I can’t see myself going the extra mile.

In short, to everyone who reads this and is using any community developers code be it smartapp or devicetype if you truly want to see what SmartThings can do, if you really want to automate everything, you have to be willing to support us and respect the time we put into our projects.

4 Likes

Why not take it to the next level? I never donated for community code, but I purchased Obything and Smartrules.

Well let’s see how this post goes.

This code is amazing - any chance you can help me out the with Nest Thermostat code as well ?

I see this error in my logs with your fork…

“Device Nest Protect (battery) does not report battery properly. This is probably due to numerical value returned as text”

@spyd4r I’m not sure what you are looking at cause the nest protect does not return a proper numerical value for the battery the value is binary either it’s ok or it is not.

just a log line i found trolling through

https://graph.api.smartthings.com/ide/logs

That link will not show me your logs :wink: and i don’t see that error in mine. Secondly i don’t provide free support for free code. If you would like to contribute to getting the error fixed, the link is below.

https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=XKDRYZ3RUNR9Y

As a happy user of the updated code for both my wired and battery operated Nest, I have contributed a couple dollars in appreciation for your time and effort. Thank you for making the ST hub, which I am new to starting with v2, a better product. Now if only someone would break the Lutron enigma :wink:

Your support is greatly appreciated thx, much!

Hi @sidjohn1 although I haven’t tried your app, it is really helpful for all of us that do not code. Thank you in advance.
In order to complete my home automation project as desired I would like to know if would be possible for you to get from the Nest Protect, Motion Sensor status and Temperature.

For the first one it seems it is has the capability:
"Nest Protect (Wired 120V) works the same way as your Nest Learning Thermostats by sensing when you are home, when you leave and uploading this information to improve the performance of Auto-Away."

As for The Temperature, Someone from Nest said it has Temperature sensor but I haven’t found much more.
"The Nest Protect does include a temperature sensor, but at this time it doesn’t feed the data to the Nest thermostat."

Since I agree that everyone should have an incentive, I’m willing to deposit into your PayPal account $50 for the Motion Modification and $ 50 extra if you can get the temperature.

What do you think?

I have doubts this is possible since Nest is not exposing away or temperature. Maybe it’s hackable, maybe they will, and if so I’m in for a donation too!