Vacation Lighting Director (VLD) Log and Subscribe Questions

I've noticed that Vacation Lighting Director is putting a ton of info in the log. I tracked it down to this, mainly:

def initialize(){
	if (newMode != null) {
		subscribe(location, modeChangeHandler)
	}
	schedStartEnd()
	if(people) {
		subscribe(people, "presence", modeChangeHandler)
	}
	log.debug "Installed with settings: ${settings}"
	setSched()
}
...
def modeChangeHandler(evt) {
	log.trace "modeChangeHandler ${evt}"
	setSched()
}

Does VLD really need to subscribe to EVERY location event? Why not just location.mode events? That has to be why VLD is chewing up so much CPU also...I would just fix this, but the code is not super clear to me....

Whose app code are you using for this? This would be a good question for whoever wrote/ported this particular version. The one by nhschottfam that also appears to be in HPM (there may be others with the same name, so not saying this is the only one it could be) is one I found with a quick search and does appear to subscribe only to location mode events in the equivalent line of code, as you suggest:

3 Likes

I was using the code from here. There doesn't seem to be a central Vacation Lighting Director thread in the HE forums, so not even sure where I got it from. But you're right, the one in HPM is the way to go. Thanks for pointing me to it.

If you or anyone else interested, here is the original port from the Smart Things platform back in the day by one of the original users of Hibitat. Just uploaded it to my GitHub page.

You need to ensure for HE you use the beta repo of this git:

https://raw.githubusercontent.com/imnotbob/vacation-lighting-director/beta/smartapps/imnotbob/vacation-lighting-director.src/vacation-lighting-director.groovy

Or install it from HPM. It does not have the problem described.

There is an updated version in HPM.

It further optimizes operations on HE, and has instructions if you want to install multiple instances.

It also can turn logging off after 2 hrs.

It is available in HPM. Vacation Lighting Director.

2 Likes

I have installed this. But how do I use it? It's not listed as an app.

HPM installs the code in HE

You have to in the HE console go to

HE console -> apps

  • new user app

and select VLD that should be there after you did the HPM install.

Now you should have the app in HE console -> apps

Yep, I'm brain dead. Should have known that by now. Thanks.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.