I have tried to load the the Netatmo (connect) SmartApp but this seems not to work. Does someone have the code to I can paste this in code section and how I need to proceed?
Thanks
jesterct
(Michael Busch)
March 8, 2016, 2:02pm
2
ronaldc1974:
Netatmo
Not sure what you mean but here is some code, hopefully it helps.
https://support.smartthings.com/hc/en-us/articles/202989470-Netatmo-Weather-Station
https://github.com/tslagle13/SmartThingsPersonal/blob/master/smartapps/tslagle13/netatmo-monitor.groovy
/**
* Netatmo Connect
*/
import java.text.DecimalFormat
import groovy.json.JsonSlurper
private getApiUrl() { "https://api.netatmo.com" }
private getVendorAuthPath() { "${apiUrl}/oauth2/authorize?" }
private getVendorTokenPath(){ "${apiUrl}/oauth2/token" }
private getVendorIcon() { "https://s3.amazonaws.com/smartapp-icons/Partner/netamo-icon-1%402x.png" }
private getClientId() { appSettings.clientId }
private getClientSecret() { appSettings.clientSecret }
private getServerUrl() { appSettings.serverUrl }
private getShardUrl() { return getApiServerUrl() }
private getCallbackUrl() { "${serverUrl}/oauth/callback" }
private getBuildRedirectUrl() { "${serverUrl}/oauth/initialize?appId=${app.id}&access_token=${atomicState.accessToken}&apiServerUrl=${shardUrl}" }
definition(
name: "Netatmo (Connect)",
namespace: "dianoga",
This file has been truncated. show original
/**
* Netatmo Sound Sensor Custom Device Attribute Detection
*
* Author: stuart@broadbandtap.co.uk
* Date: 29/01/2016
*
* Allows me to utilise a devices custom attribute to set a Virtual Switch for example i use the Sound Sensor on my Netatmo indoor module to turn on a virtual Switch if the noise in db is above a threshold and switch it off when below.
* I am using this as an extra detection to see if my main living room is occupied and i will use the switch status along with motion sensors to assess if its correct to turn off lights off.
* this is used as i get false positives just from motion as it seems i sit very still sometimes when watching TV. this smartapp is ideal to incorporate your custom attribute into Rule machine for example.
*/
definition(
name: "Netatmo Sound Level Detection",
namespace: "fuzzysb ",
author: "Stuart Buchanan",
description: "switch on a virtual switch if the value of a custom attribute is above or equals the specified threshold",
category: "Convenience",
iconUrl: "https://s3.amazonaws.com/smartapp-icons/Convenience/Cat-Convenience.png",
iconX2Url: "https://s3.amazonaws.com/smartapp-icons/Convenience/Cat-Convenience%402x.png"
)
This file has been truncated. show original
Thanks a lot. I am pretty new to all of this. I just created a smartApp for the Netatmo monitor but how can I point this to my Netatmo in my infrastructure.
jesterct
(Michael Busch)
March 9, 2016, 9:18pm
4
First you write you smartapp. Then you publish it to “yourself”, e.g. MyApps.
On you smartphone App, you go to the marketplace, select smartapp and scroll all the way down to “MyApps”. There you should see your privious written Smartapp. Select it and follow the prompts. It depends how you called your Field, you click on it and you add your device. Of course your device must be added to your hub prior.
Then your device and the smartapp should work together.
Got it working…thanks a lot!!