MonitorAndSetNestHumidity

The Unofficial SmartThings Blog
Jump to navigation Jump to search


<al imagesize="Large">B00ZIRV39M</al>

Category: My Apps

Author:Yves Racine

ST Community handle: http://community.smartthings.com/users/yvesracine/activity

Company Link: http://www.ecomatiqhomes.com#!home/mainPage


If you like MyNext Devices and related smartapps, please support the developer by clicking on the paypal link below:

https://paypal.me/ecomatiqhomes



Summary

MonitorAndSetNestHumdity, the smartapp that can monitor & control your house's humidity level via your connected humidifier/dehumidifier. If the equipment is not connected to Nest or to a smart switch, the smartapp cannot control it.

Supported Features

  • You can specify the target humidity and the humidity differential allowed
  • You can trigger some humidify/dehumidify/ventilation switches based on your indoor humidity level vs. target
  • You can use a power meter to control when your Dehumidifier/Humidifer can run (optional)
  • You can specify in Fan & Other settings if you want to trigger the HVAC fan when humidity is above the humidity threshold inputted in the smartapp
  • Notifications can be sent to the ST user account (optional)
  • The smartapp can be temporarily deactivated (on hold) with a power (virtual or physical) switch (optional parameter)


Code location: https://github.com/yracine/device-type-myNext/tree/master/smartapps

Instructions for My Next Device installation (readme): https://github.com/yracine/device-type-myNext/blob/master/README.md

Prerequisites

  • Nest thermostat controlled via SmartThings by MyEcobee device
    => see http://thingsthataresmart.wiki/index.php?title=My_Next_Tstat
  • Humidifier/Dehumidifier connected to your ecobee thermostat
  • Humidifier/Dehumidifier connected to smart switch(es)
  • Outdoor Temp/Humidity sensor or ST WeatherStation (ST Weather Tile) such as this one (optional):

https://github.com/yracine/device-type.weatherstation4

  • Indoor Temperature & Humidity Sensors (optional) : for better readings

UI Look & Feel

Dashboard

MonitorAndSetNestHumidity p1.jpg


MonitorAndSetNestHumidity p2.jpg


MonitorAndSetNestHumidity p3.jpg



Humidifier Setup

MonitorAndSetNestHumidity p4.jpg


Dehumidifier Setup


MonitorAndSetNestHumidity p5.jpg


Notification & Other Options


MonitorAndSetNestHumidity p6.jpg

MonitorAndSetNestHumidity p7.jpg

Troubleshooting

.................................................................................................................................

Issue #1: I don't know how to create a custom smartapp

.................................................................................................................................

See the explanations of a fellow community member here:

Hubitat

Copy the code from the text files under apps in the Hubitat IDE, and then press "Save".

HubitatSmartapp page1.PNG

Enable "oAuth" for the smartapp.

HubitatSmartapp OAuth.png


SmartThings

See the explanations of a fellow community member here:

http://community.smartthings.com/t/faq-an-overview-of-using-custom-code-in-smartthings/16772

And, here are some basic explanations with screenshots.

  • a) Point your browser to you SmartThings IDE for your country (i.e. http://ide.smartthings.com or whatever your shard is) and Log In.

Loginscreen.jpg

  • b) Once you are logged in, find the My SmartApps link on the top of the page. Clicking My SmartApps will allow you to produce a new SmartApp.

MySmartApps.png

  • c) Find the button on this page labeled +New SmartApp and click it.

+NewSmartApp.png

  • d) Since you already have the code in your computer’s clipboard, find the tab along the top section called From Code. In the area provided, paste (typically CTRL+V) the code you copied from GitHub. Click Create in the bottom left corner of the page.

NewSmartAppCreate.png

  • e)This will bring up another page, with the code now formatted within the IDE. If the code was copied correctly, there are no other steps except to save and publish the code. In the upper right corner of the page, find and click Save. Now, click Publish (For Me), and you should receive a confirmation that the code has been published successfully.

SavePublish.png


http://community.smartthings.com/t/faq-an-overview-of-using-custom-code-in-smartthings/16772


You can also use the github integration and update your repo:


GitHub Settings:

Owner: yracine

Name: SmartThingsPublic

Branch: master

You then need to save & publish each "edited" smartapp.

.................................................................................................................................

Issue #2: I created the smartapp in the IDE, but I don't know where to execute it

.................................................................................................................................


For ST users, For the initial setup, under the app, click on the '+' icon in the upper right corner of the mobile app, and then on the smartapps link. You should see the smartapp under the custom section.

If you still do not see your smartapp, please make sure that you have published it in the IDE!


For any subsequent execution, under the ST mobile app, click on the "hamburger" menu in the left corner of the mobile app. The list of installed smartapps will then appear.

.................................................................................................................................

Issue #3: java.lang.NullPointerException: Cannot get property 'X' on null object

.................................................................................................................................


Just update your smartapp by going through all the smartapp setup pages by pressing 'Next' till 'Done'.

The smartapp was recently modified to include some defensive code to ensure that the smartapp is rescheduled. This is intended to alleviate some of the ST scheduling issue as discussed in these threads:


http://community.smartthings.com/t/scheduler-and-polling-quits-after-some-minutes-hours-or-days/16997

http://community.smartthings.com/t/schedule-not-working/3895

http://community.smartthings.com/t/is-it-me-or-schedules-not-firing-this-evening/10176


.................................................................................................................................

Issue #4: java.util.concurrent.TimeoutException: Execution time exceeded 20 app execution seconds

.................................................................................................................................

ST has introduced some generic rate limiting rules for all smartapps and device handlers. For cloud-to-cloud integrations, these rate limiting constraints are sometimes too low, and this exception can be raised from time to time.

There are some threads about it in the ST community forum:

http://community.smartthings.com/t/rate-limiting-too-restrictive-max-execution-time-exceptions/17985

http://community.smartthings.com/t/execution-times-increasing/19979

http://community.smartthings.com/t/unschedule-api-execution-time-too-long/11232


.................................................................................................................................

Issue #5: I want to upgrade the code but I don't know how

.................................................................................................................................

Most of the time (unless specified otherwise), you just need to copy and paste the smartapp's code from github (using the <raw> function preferrably to avoid forking the code for no reason) into the IDE at:


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

- Click on the smartapp that you want to update

- Paste the code into the code window (and make sure to copy all the lines)

- And save & publish.

.................................................................................................................................


You can also find the smartapps under the SmartThingsPublic github repo. If you have the github integration, you just need to select the ecobee apps that you need when you "Update from Repo" (yracine is at the end of the "New - only from github" list).

GitHub Settings:

Owner: yracine

Name: SmartThingsPublic

.................................................................................................................................

Issue #6: I want detailed Logging/Notifications or I want to enable Ask Alexa Notifications

......................................................................................................................................


Hubitat

  • a) go to your installed apps and select the right app amongst the list

go to http://192.168.xx.xx/installedapp/list (insert your own hub's IP address)

  • b) In Notifications & Other Settings Setup> On the last setup page, set the following flag to true
   "Detailed Logging & Notifications?"


  • c) go to the logs section of your hub

http://192.168.xx.xx/logs (insert your own hub's IP address)

SmartThings


In order to have detailed Logging/Notifications, you'd need to set the following parameters in the smartapp:

  • a) Notifications & Other Settings Setup> On the last setup page, set the following flag to true
   "Detailed Logging & Notifications?"


  • b) To receive push notifications, answer 'Yes' to the following input parameter
   "Send a push notification?", metadata: [values: ["Yes", "No"]]


  • c) To receive the notifications configured above through Ask Alexa, set the following flag to true
   "Ask Alexa verbal Notifications?"


N.B. The logs are available under the IDE at:

https://graph.api.smartthings.com/ide/logs (or whatever your shard is, under Live Logging in the IDE)

You can click at the top of the window on the smartapp name to filter the logs.