Android Widget

Thanks… Just got it working!!!

I bought it several weeks ago and love it. I just couldn’t figure out how to get it to work with virtual switches. It turned out to be a user error. I had to authorize SharpTools to be able to control the newly created virtual switches within the App and everything started worked as expected.

1 Like

SharpTools just stopped working for me. Not sure why this problem started. I get a “Result: Unexpected error: 401” no matter what thing or routine I try to control. Is anyone else seeing this problem? Any suggestions on how to fix it?

@lojack - sorry that things aren’t working as expected at the moment!

There’s a known issue that I’m working through with SmartThings. I worked with them yesterday to get a fix in place and tested and rolled out an update to SharpTools last night, but it looks like there is still some work that needs to be done to get this working for everyone.

You can follow the progress at this thread:

1 Like

Everything seems to be working as expected again. Thanks for the fast turnaround. :slight_smile:

1 Like

I’m sorry, I spoke too soon. The SharpTools android app seems to work as expected but the widgets are not working, at least mine aren’t. Any recommendation on how I can get them fixed?

Are you referring to the ability to use the widgets to control something? Or the widgets aren’t updating their state (yellow/gray coloring)?

1 Like

To control something.

As an example, I have a widget that turns off all the lights in the house. It basically turns off a simulated (virtual) switch. The simulated (virtual) switch works fine within the Smartthings app but fails to work when called from the SharpTools widget.

Update : The simulated switches (on my system) are not working from within the Smartthings routines either. Therefore, this may not be a SharpTools issue. Is anyone else seeing this problem?

1 Like

You might try watching the IDE Live Logs. I would look to see that the Virtual Switch is triggering it’s on/off state accordingly and look to see if the SmartApp that is using the Virtual Switch is also triggering as expected.

The IDE Live Logs for my SharpTools widget was reporting PUBLISHED off(). The SmartThings App simulated switch control is reporting PUBLISHED offPhysical(). I changed the widget so now they both are reporting PUBLISHED offPhysical(). Is there documentation that can tell me the difference. There’s still a strange behavior that I think maybe as designed and my expectations may need to be adjusted.:confounded:

Did changing to offPhysical() resolve things for you? I haven’t seen that command before, but I would hazard a guess that off() would be considered a virtual flip of the switch whereas offPhysical() would simulate a physical flip of the switch.

SmartApps can take action based on physical vs virtual triggers. For example, you might add logic to a SmartApp that says not to repeat a task if the light was physically switched off vs being switched off virtually in code.

http://docs.smartthings.com/en/latest/ref-docs/event-ref.html?highlight=isphysical#isphysical

1 Like