Configure widget so color indicates mode?


(Mike T) #1

When the app is open and “things” are displayed the widgets shown on the screen have colors like green for closed door sensors, a different color for a light switch if it is on or off, etc.

Is there a way to configure the icon for smartThings so that when minimized it has a color that indicates the mode? I change my mode to Away using a presence sensor on my smartphone and while this has been more reliable recently there are times it fails to detect that I have left. It would be nice if I could set up a color for the minimized icon based on the mode so that at a quick glance I could tell whether smartThings is in the mode I expect.


(Chrisb) #2

Sounds like you’re looking for a Widget sort of thing. Are you on Android or iOS?


(Convinced ST will never be unbroken…) #3

Why not just send a notification on mode change. If you’re on Android, you could use Tasker to configure an on screen widget to indicate mode (and even toggle through them). But the phrase “minimized icon” leads me to believe you’re on iOS.


(Mike T) #4

I’m using an Android. I have the icon that I use to launch the SmartThings app in the dock at the bottom of the screen, so I see it no matter what window I’m viewing.

The SmartThings app is sending me notifications when the mode changes, but they are at the top of the screen in the notification bar and I have to swipe down to read them.

What I’d prefer to see, if possible, is the SmartThings app icon have a color to indicate mode; for example I could set it to green when I’m away. That way anytime I pick up my phone, no matter what the reason, if I look at the bottom of the screen I will immediately know if SmartThings is in the mode I expect. If I’m away from home and I see the icon is not green then I can go it and change the mode myself.


(Chrisb) #5

Nitpicky terminology alert: This would have to be done as a widget, rather than an icon. It would essentially work the same as an icon but to the best of my knowledge Android isn’t setup to change icons for a program. In practice what you want is a widget that changes color (or part of it’s color) based on certain events (namely: Mode changes in ST), and when tapped opens SmartThings.

Obviously, right now, this isn’t something that ST can do. We’ve asked for widget support at various times but, so far, ST hasn’t done anything in that area.

This should be doable with Tasker, I think. Basically you’d have Tasker create a widget and change the widget based on info from the notification panel. I’d have to look into how this would be done, but it should be doable. The downside is that you’re reporting based data from notifications. If mode is changed but the Mobile App happens to crash before reporting it, data might not be updated properly. Likewise, if you reboot your phone, there will be no mode info for tasker to report on until the next mode change happens. So Tasker really isn’t a perfect solution here.


(Convinced ST will never be unbroken…) #6

You could store the last state in a tasker variable. Of course, if the state changes while the phone is off it would not update, but you could create a profile in tasker to ping an endpointed SmartApp to send a notification of the current state.


(Chrisb) #7

Tell me more about this storing last state. That’s a bit above my current tasker knowledge, but would come in real handy with a different tasker function I have (report current phone volume settings to my pebble).


(Convinced ST will never be unbroken…) #8

Just create a variable in Tasker, name it something all uppercase, and it will be persistent (even across system reboots).


(Alex) #9

Check this out. This is one way of making a widget that will reflate a state from ST.


(Convinced ST will never be unbroken…) #10

And if you want to get really sexy, check out Zooper Pro (my favorite widget authoring tool). Not only does it support Tasker variables, you can also call Tasker tasks by tapping various elements in a widget (making them interactive)


(Convinced ST will never be unbroken…) #11

@miket, @chrisb

One more thing to note is that you can not put a widget into the dock. You can put shortcuts there, but you can’t modify a shortcut’s appearance.

I don’t use widgets for this purpose, instead I have Tasker read my notifications aloud (at least the ones I care about). Then I don’t have to check the notifications drawer when they come in. Of course if you live or work in an environment where you can’t have your phone talking to you all of the time, this won’t be satisfactory.