Android Control Application

So, I work from home and have three kids who are home for about half of the time I am working on any given day, most of the time this is fine, but if I’m on a conference call or video call it would be nice if the kids made a little less noise.

I started joking that I needed an “On Air” sign so everyone would know when I was at in a meeting. From there the idea took on a life of its own, and It eventually evolved into a Spark controlled outlet (I’ll publish a link to that build soon) that I could plug the sign into (a sign that I ended up making) with 4 addressable plugs.

I eventually settled on an Android application that would control everything and it works like a charm. You can turn each plug on and off individually or all at once.

At the moment I only have one thing plugged in, but I like to plan ahead.

The application also will technically support an infinite number of Sparks with 4 ‘plugs’ each, but I didn’t add in any way for the user to manage that … yet.

Please pardon the format of the video, I just did a screen capture off my phone and don’t have a quick and easy way of editing the video.

3 Likes

Very nice!

Would you mind sharing the Android code? I would like to build my own app but I fail badly at android (not just android haha) :wink:

1 Like

Just a quick picture of the outlet I built. Nothing fancy, 4 individually addressable plugs, an indicator light for each and a reset switch.

I used the relay shield and a Spark Core to drive the whole thing.

1 Like

Let me give it some thought @TheHawk1337, I might just want to wait until I get it so that the user tokens / spark ids aren’t hard coded.

1 Like

No problem! Looking forward to it :slight_smile:

Part of my issue is popping up a screen and saying to the user ‘type in this really long number’ :slight_smile:

Well, you can easily copy it from the spark website so it’s just be a paste :wink:

It might be neater if you let them log in with their credentials (mail/pass)? This way you’ll never have to manually go get that accesstoken again, but can just use the credentials. Also useful in case the accesstoken expires. Just an idea though :wink:

1 Like

That indeed would be the most user friendly option. Seems to be much harder to implement though.

I haven’t really investigated much into what beyond what I needed to get it working for this project so I haven’t looked into what else is available.

That’s what I was talking about ‘type in this really long number’, at this junction it would telling the user to lookup their access codes/tokens online and typing them into their phones. Possible, but not very cool and not something I’ve played with much since its essentially v.01 I threw together to make it work for my project.

1 Like

Ahhh, its openauth, will take a little time, but not anything I haven’t done before. I’ll see what I can do.

1 Like

Nice! Looking forward to it :smile:

Hey, that is a great project. Would you be willing to collaborate on this? I’m currently working on an Android app which controls rc switches, Hue lamps and other components through my raspberrypi. But I’m only waiting for my Spark Photon to arrive, so it seems we’re tackling the same problems.

Possibly, I got some basic oAuth stuff working yesterday and I’m refactoring the code a bit today to handle multiple sparks/etc.

I’m trying to make it generic (mostly because I’m lazy and don’t like to rework things later). I don’t have any of that other stuff (though I kickstarted a LIGHTFREQ but haven’t recieved it), I’m open to ideas.

Just to add to the list of Android apps in development, here’s mine that implements Spark Cloud login. It’s for a thermostat though, so YMMV on whether or not it’s useful. Here’s a video of it in action:

1 Like