[OBSOLETE] Smart Dehumidifier Control

Just out of curiosity, are you using the update v1.1 app or the original one? There shouldn’t be any difference but while making the v1.1 changes I tweaked a few things in code to avoid some typecasting issues that could arise. But, seeing as though you are having an issue at installation, I don’t think that is even in play. It’s odd that Support wasn’t able to find any log anywhere as to the error.

One idea that might give us a datapoint is to install the code with just the stuff that should be happening at install and nothing else. I chopped it down to just that if you want to try it.

def appVersion() {
	return "Test"
}

definition(
    name: "Smart Dehumidifier Control v${appVersion()}",
    namespace: "LLWarrenP",
    author: "Warren Poschman",
    description: "Control dehumidifier based on relative humidity from an external sensor",
    category: "Convenience",
    iconUrl: "https://s3.amazonaws.com/smartapp-icons/Meta/water_moisture.png",
    iconX2Url: "https://s3.amazonaws.com/smartapp-icons/Meta/water_moisture@2x.png",
    iconX3Url: "https://s3.amazonaws.com/smartapp-icons/Meta/water_moisture@2x.png")

preferences {
	section("Smart Dehumidifier Control v${appVersion()}")
   	section("Control which Dehumidifier:") {
		input "dehumidifier", "capability.switch", required:true
	}
	section("Use the following humidity sensor(s):") {
		input "humiditySensor", "capability.relativeHumidityMeasurement", required:true
	}
	section("Desired Humidity Setpoint") {
		input "humiditySetpoint", "number", title: "Setpoint % RH", defaultValue: 50, required:true
	}
	section("Also allow an overshoot of +/-:") {
		input "humidityOvershoot", "number", title: "Overshoot % RH", range: 0..25, defaultValue: 0, required:true
	}
	section("Require a minimum off cycle time of this many minutes:") {
		input "minCycleTime", "number", title: "Minimum Off Cycle (Minutes)", defaultValue: 0, required:true
	}
	section( "Continuous Runtime Notifications" ) {
		input "maxRuntime", "number", title: "Maximum Runtime (Hours)", range: 0..48, defaultValue: 0, required:true
		input "messageText", "text", title: "Custom Runtime Alert Text (optional)", required: false
		input "phone", "phone", title: "Phone Number (for SMS, optional)", required: false
		input "pushAndPhone", "enum", title: "Both Push and SMS?", required: false, options: ["Yes","No"]
	}
}

def installed() {
	log.debug "Installed with settings: ${settings}"
	subscribe(humiditySensor, "humidity", humidityHandler)
}

def updated() {
	log.debug "Updated with settings: ${settings}"
	unsubscribe()
	subscribe(humiditySensor, "humidity", humidityHandler)
}

def humidityHandler(evt) {
	log.debug "humidity changed to: ${evt.value}%"
	def currentHumidity = Integer.parseInt(evt.value.replace("%", ""))
}

// END OF FILE

For anyone following the thread, I finally got around to putting this up in GitHub so I deleted the original code that was at the top and subbed in some GitHub links.

@David_Van Not sure if you’ve tried the “slimmed down” version above for debug but if you’re worried about cut and paste this should hopefully alleviate those concerns.

I didnt have any luck with the slimmed down version or installing from github. Im baffeled :man_shrugging:

There is good news… It looks like the instance I installed in the ide simulator is still running and controlling things properly.

Updated to v1.4 with a change that allows you to monitor doors and windows equipped with open/close contact sensors so as to not run the dehumidifier while open. Also features a timeout that allows you to have routine use (i.e. entry and exit) without affecting the operation. See GitHub for latest rev.

1 Like

I have the exact same issue… I installed using GitHub and get the ‘something’s wrong - we can’t load your screen right now’ message when I try to select the app from the ‘my apps’ section of Smartthings.

I’m using the classic version of ST so it’s not related to the new-app… Any ideas?

I’m wondering if it could be one of:

a) You’ve loaded the app into the wrong ST “shard” using the IDE interface. In searching around to see what the issue could be, I found that in the past some other users had a similar problem that was related to that. For instance, this thread (start here and read down the thread):

b) I’m not an iOS user, but related to the above issue is that there is (apparently) two places that you could potentially load up an app from in the iOS mobile app. One is Automation → SmartApps and the other is located in Marketplace → SmartApps → My Apps. From what i read in a couple of places, it would seem that the recommendation is to use Automation → SmartApps but I’m not sure what the difference is.

@Shinedown78 and @David_Van: would either or both of you be able to try the above suggestions and let us know if you find anything?

Otherwise, we can ask SmartThings Support to chime in as I am also at a loss. I use the classic ST app and have honestly never seen this at all.

I now have 20 instances of the app in my automation tab (I’m an android user btw) another one appears whenever I click on the app from the marketplace tab. Def using the correct shard. Going to try to uninstall now…

Ok, all uninstalled… really want to use your app, but not working for me right now. To help with trouble shooting, I am using the classic app on android, eu-west shard and the Github method of installation.

Github install works fine - clicking ‘+my apps’ from the marketplace tab of the app shows me the app, but I get than error message when clicked, in turn, everytime I click the app an additional smartapp is popping up under my ‘Automation/smartapp’ tab.

I did not try going through the ‘Automation/add a SmartApp’ tab to initially install the app. Perhaps this way around may work.

Hope this helps.

You can always just cook your own recipe with webCoRE.

Here’s mine:

Please do let us know if going through the ‘Automation/add a SmartApp’ makes any difference. Per my above comment, I found several other posts that seem to recommend doing that instead of the ‘+my apps’ method.

@David_Van @Shinedown78 As this problem is difficult to debug since I can’t reproduce it myself, I took the info you guys provided and pinged ST Support. The short of it is that they feel really strongly it is the aforementioned “wrong shard” issue. I know @Shinedown78 you mentioned you were confident that the right shard was used but Support just doesn’t have any other suggestions and nor were they able to offer any log that we could look at to get more info.

So, here is the direct ask from ST support:

Often, we recommend to the user to uninstall and reinstall their app. If everything is published correctly to the correct shard, there will not be a problem.

Please let your users know that they must publish on the same shard as their Hub and to confirm with the shard (platform) listed in the URL.

To ensure they are on the correct shard, please instruct them to log into the IDE, then immediately click “My Locations” in the upper left followed by clicking the name of their location before publishing any apps. This will get them where they need to be.

Beyond reinstalling the ST phone app itself, I suppose it really comes down to how you access the IDE - I personally always log directly into the shard (the graph-api URL) instead of using the account.smartthings.com redirect but in the above instruction from support should ensure that you’re in the place you need to be.

Hope this somehow helps. Also do let us know if you get any different behavior via the ‘Automation / Add a SmartApp’ method.

Hi, I login via graph and always select locations/home before I touch anything else so im 99% sure it’s not a shard issue. Will try again tomorrow and let you know how it goes.

Ok, I think I figured out what was going on. In the preferences for the app, I was specifying some ranges for the %RH and so on. Apparently you need to place the range in quotes and if you don’t it seems to crash in certain circumstances.

So, this is NOT ok:

	section("Desired Humidity Setpoint") {
		input "humiditySetpoint", "number", title: "Setpoint % RH", range: 0..100, defaultValue: 50, required:true
	}

But this is OK:

	section("Desired Humidity Setpoint") {
		input "humiditySetpoint", "number", title: "Setpoint % RH", range: "0..100", defaultValue: 50, required:true
	}

Why that does not throw an error at save or put some runtime error in the logs is beyond me but I must have found an example somewhere in the docs that didn’t have the quotes around the range because I got the idea from the docs. Whatever, I say to that.

Anyhow, @Shinedown78 and @David_Van, please give the v1.6 version of the app a shot and let me know if it loads as expected now. Thanks for your patience!

Hi @LLwarrenP, will give it a go in the next couple of days and report back. Thanks for looking into it!

That was it!, it installed and is running great now. Thanks for your hard work!

Thanks for the verification. Do let me know if you stumble on any bugs or unexpected behaviors - sometimes it’s hard to think of all the possibilities and interactions to even put them on the list to test them.

Like for instance I did just now find a small bug in the logic that has to do with the door/window pause/resume in that I made the classic mistake of using “==” instead of “=” when assigning a variable. The impact is nil since the state machine variables should “reset” themselves if they get off kilter but a bug is a bug. If you do an Update from Repo it should snag the fixed one - same version number and all though as it was such a minor thing.

Thx and hope this saves you big $ this year as dehumidifiers, Energy Star or not, are some of the biggest energy hogs, especially if the onboard humidistat mis-reports like every one I have ever owned does! I guestimate it has saved me $40 already and it hasn’t even gotten sticky yet where I’m at!

All working for me now! Sorry for taking so long to try, been on holiday!

I would like to get something like this setup but my dehumidifier does not have an auto-restart feature… can you guys recommend one that does?

Most of the modern ones will so I don’t think you will have trouble finding one but I have had great luck with GE that is sold at Home Depot and other big box retailers and Amazon. It’s one of the quietest I have ever had by far and is very efficient. The model I have is the ADEL50LW - a 50pt unit. All of them will have lousy humidistats but then again the app solves that. :wink:

I would avoid Sears (Kenmore) as that was my previous one and it had failures under warranty and afterwards. Other popular models I have seen frequently are LG, Supentown, and Frigidaire.

Hi,
I installed the Smart Dehumidifier control app. on my ST and have Zooz 4-In-1 sensor report the Relative humidity to it. The sensor seems to be reporting the information well (I can see it in the “recently” tab of the sensor) but in the app. nothing happens when the humidity change (I set it up to response for every 1% change). I can also see at the top of the smart app screen that the app. seems to be not getting the data from the sensor for some reason - showing “updating” all the time - any idea? any logs I can look at/share?