Skip to content
This repository has been archived by the owner on Apr 4, 2023. It is now read-only.

Automation shows "State Usage is Greater than 80%" #569

Closed
PeteBoyRocket opened this issue Apr 16, 2018 · 13 comments
Closed

Automation shows "State Usage is Greater than 80%" #569

PeteBoyRocket opened this issue Apr 16, 2018 · 13 comments

Comments

@PeteBoyRocket
Copy link

PeteBoyRocket commented Apr 16, 2018

Verify the following before opening an issue:

  • [x ] You followed the Nest Developer documentation here? Nest Developer Account Creation
  • [x ] That OAuth is Enabled for the SmartApp under the IDE.
  • [ x] The SmartApps and ALL (5) Devices Handlers are using the latest code available.
  • [ x] You have reviewed the NST Manager Wiki for potential fixes.
  • [ x] That ALL SmartApps and Device Handlers have been Published for You in the IDE.

About Your Setup:

  • How many Thermostats?: 1
  • How many Protects? 2
  • How many Cameras? 2
  • Using the Nest Presence Device? Yes
  • Using the Nest Weather Device? Yes
  • iOS or Android?: Android
  • Mobile App Version: v2.15.1 build 218914

Expected Behavior

Tapping the NST Manager automation should allow me to configure it.

Current Behavior

Tapping the NST Manager automation shows this message:

image

I'm unable to do anything with the automation at this point. Including uninstalling it.

Hacking this line https://github.com/tonesto7/nest-manager/blob/master/smartapps/tonesto7/nest-manager.src/nest-manager.groovy#L152

to (stateSz > 180) Lets me use it again. seems to work ok. See this in the diagnostics page after doing that:
image
And this:
image

Steps to Reproduce (for bugs)

1.Tap the NST Manager automation

Context

Please include a copy of your log under the IDE if possible
https://graph-eu01-euwest1.api.smartthings.com/api/smartapps/installations/a6832cdd-c230-4b51-8bef-0e501da8c70a/diagHome?access_token=70991a52-67b1-4b7f-b859-b6ab33635612

@jacobwtyler
Copy link

same issue here

@tonesto7
Copy link
Owner

tonesto7 commented May 4, 2018

@PeteBoyRocket @jacobwtyler
I see the cause. For some reason, your install kept building up commands into the queue until it filled up the entire state memory. Are you able to open the smart app at all?

If you can then open it and press Done. That should call the stateCleanup() function and clear out the queues.

If that doesn't work but you can get into the SmartApp still than go into Application Preferences > Logging > Toggle Reset Application Data > Press Done all the way out to the main smart apps list.

@PeteBoyRocket
Copy link
Author

I can open it, but I suspect thats because I still have the hacked stateSz > 180 line.
I opened it and pressed Save in the top right until it took me back to the smart app screen.
Now when I open it it seems to think its doing a first install, asking me to selectg my location and devices. Stepping through this makes it 'Save', but it doesn't seem to configure anything. Every time I reopen it it repeats this.
Trying to uninstall the smart app at the moment, It doesn't seem to let me via the Android app, and the developer console says I can't delete it because it is installed by a user!
May have to contact SmartThings support...

@PeteBoyRocket
Copy link
Author

PeteBoyRocket commented May 5, 2018

Ok, removing all of the nest devices THEN uninstalling it is how to remove it! Obvious in hindsight.
Reinstall -> had to create my Nest Developer OAuth secret and client ID -> done.
During install logged in to Nest A-OK, selected devices etc and clicked save. Appears to save ok, but opening the Nest Manager takes me to the 'Select your devices' page of the installer, and none of the devices were added.

Next I'll try uninstalling it, then remove all the Nest Manager Smartapp and device handler code. Aka as clean as I can get it and start from scratch

@PeteBoyRocket
Copy link
Author

Good news! whatever the issue was doing this seems to have fixed it!

  • complete uninstall of devices and smartapp via the Android app
  • remove the smartapp and device handlers from the developer console
  • Follow initial install instructions

@jacobwtyler Can you try this? If this fixes your issue, I guess we can close this, unless @tonesto7 wants to do anything further with it.

@jacobwtyler
Copy link

jacobwtyler commented May 6, 2018

@tonesto7 I don't have any options when I click on the SmartApp. It only displays the message

...Your Manager State Usage is Greater than 80% full...

and the only thing I can click is the back button in the top left or a Save button in the top right. (I'm on iOS). I did completely remove all Nest devices from SmartThings and then removed the SmartApp via the IDE and then reinstalled NST Manager and added all my devices back successfully and I thought everything was fixed so I went into WebCoRE and set my pistons back up the way I had them. Then I decided to click on the SmartApp again and the message was back. I'm going to try removing everything again.

nest manager status error smartthings

@jacobwtyler
Copy link

jacobwtyler commented May 6, 2018

Removed all 12 cameras, 1 thermostat and 6 Protects again and uninstalled the SmartApp via IDE and created new OAuth and reinstalled. Once again, everything installed fine and I get everything set up. This time, I went right back into the SmartApp and it did allow me in. I looked for the

Application Preferences > Logging > Toggle Reset Application Data > Press Done

section that you referenced and found nothing of the sort. A few seconds after looking around in the SmartApp, ST pushed a notification which just read "Info: ". This looked familiar and it happened last time as well I believe. Anyhow, after that notification, I could no longer get into the SmartApp. It just gives me the 80% full message again. Any ideas?

@jacobwtyler
Copy link

I got it to install if I didn’t add my 12 cameras and I was able to view the logging section. It was 78% without the cameras and I tried the reset application data. It it didn’t free up any space. As soon as I add the cameras back, it goes up to 84% and I had a quick chance to try the reset application data again but it did nothing again. Then it gives me an “info:” notification and I can no longer get into the SmartApp. Only the 80% message.

@imnotbob
Copy link
Collaborator

imnotbob commented May 8, 2018

Do you have the weather device enabled?
How many locations do you have?
I have made some changes to reduce state, but I'm curious how many devices you have in total (cameras, thermostats, etc across all your locations)

@jacobwtyler
Copy link

@imnotbob, currently I do not have the weather device enabled but I did when this started. Total devices:
12 cameras
7 protects
1 thermostat
1 Presence Sensor
1 Weather Sensor

In order to get my manager state down to 78%, I’ve eliminated the weather sensor and all 12 cameras.

@imnotbob
Copy link
Collaborator

imnotbob commented May 8, 2018

I created some changes to reduce state usage. Once tony has a look at them he can share them out.

After that I would like to see you data in the web diagnostics (I don't need logging on)

@imnotbob
Copy link
Collaborator

imnotbob commented May 8, 2018

Likely this should move to private messages in the forum

@jacobwtyler
Copy link

Your update got me down to 55% WITH the cameras added back. Thanks so much!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants