IoT Buddy iPhone App

I enjoyed playing with this App on my Ipad. Any plans for further development? Used it along with Prowl for feedback on making settings. Nice job! :-*

Good to hear. I am finishing up a new app right now, and hoping to get it out for Apple to review this week. The new app is designed specifically for the electric imp and xively. It is basically 4 apps in one. There will be a control panel like IoT Buddy, but will send and receive JSON data so that you can reply back from the imp with whatever you like. A xively app with one feed and two channels, and then a garage door, and security system app based on projects that I have completed. I’ll post example code for each on my github account.

I’m going to then start updating IoT Buddy, but probably try to keep it somewhat cross hardware, so people can use it with Arduino’s, R-Pi’s ect.

I do expect to make an iPad version as well, that way you don’t have to 2x it…

Great look forward to using it. Thanks

Hi, really great stuff! I want to get the status (open/close) of my garage door with electricimp and iot buddy on my iphone. Do you think this is possible with the next release of iot buddy? When will the new version be available?

check out my new app Pitchfork. I made a panel just for that, as well as imp code on github. IoT Buddy update coming soon as we’ll. I’m working on a bot control interface for it. Pitchfork does JSON and has full http response

Nice! I ordered an electric imp. Let’s see where this ends :slight_smile:

It will end with a big smile on your face while you open and close your garage door from anywhere and show it off to friends and coworkers. :slight_smile:

I keep redesigning my circuit, which is really simple. It is almost where I want it. Here are two pictures, and I apologize in advance for one of them being really gross, but it is the top of an old greasy garage door opener.

Now, I am NOT proud of this, but it does work. That switch is hot glued directly over top of the switch for the opener itself, so the black arm can switch both of them. There is an identical set up on the other side, so that I can know if the door is up, down, or somewhere it the middle. I am convinced that this works well, so I should epoxy or more permanently fasten the switches, but hot glue is great for prototyping.

The relay setup is easy, the breadboard and terminals are Adafruit, and the relay, resistor and diode are from Radio Shack. 5V relay, 1K resistor, 1N4001 diode, and I’ve found that 2N2222 or 2N3904 transistors work work fine with the Electric Imp pinout. I think if I did the math correctly, that you wouldn’t want to go under 680 Ohm for the resistor value, as you would try to source to much current from the Imp pin. You should be able to get the needed voltage drop across the transistor with a 1K.

Those terminals can be taken apart and linked to as many pieces as you like, and they have two pins for each terminal, so I snipped the ones I didn’t need… some go to ground, some to relay, and some to the Imp.

I’d be happy to offer assistance with the project, keep me posted. I want to add more functionality to mine.

Hi Jwehr,
A challenge; Have u though of using 2 axis accelerometer to detect the position of the door? this way not only you can detect whether closed or open, but u can detect and control door to open to any degree (e.g to let the cat out, etc). Reliability should increas as there are no contacts and adjustment to worry about (just sw adjustments)

Ken
NZ

Yep… I have…but I can’t think of a way to do it that works better than my current setup. Where would you mount the accelerometer? How do you wire it back to the Imp easily without worrying about wire snags? If it is wireless, then you need a battery.

You did just make me think of something… Isn’t there a flexible wire that changes resistance as it stretches? Hook that to the frame and let it stretch with a spring as the door goes down…measure the change in voltage and you could know exactly where the door was.

Looks great.

Ok, I have my garage door hooked up and running. Little devil or IoT both work to control it.

BUT…

Yesterday I came across the coolest thing. Better than any app to control it.

SiriProxy.

NO jailBreaking is required, siriproxy runs on my raspberry pi, but you could run it on any mac or ubuntu as far as I can tell.

Now when on my home wifi I can do the following:
Say: Open Garage door.
Say: Close Garage door.
Say: Garage temperature.
Say: Garage status

You can easily create plugins or modify existing ones.
The plugins are written in ruby, so pretty easy to pick up, although I am having trouble getting valid JSON sent over to my imp agent at this point.

a typical plugin would have the following code in it.

listen_for /siri proxy test question/i do
response = ask “Is this thing working?” #ask the user for something

if(response =~ /yes/i) #process their response
  say "Great!"
else
  say "You could have just said 'yes'!"
end

request_completed #always complete your request! Otherwise the phone will "spin" at the user!

end

I saw that on lifehacker… though they were using an R-Pi. If I ever upgrade my iPhone 4, I’ll definitely check it out. Maybe I should upgrade so I can make my own version. :slight_smile:

Hi, I tried using IoTBuddy with an Imp, but unfortunately I cannot make it reacting to it. If I use the we browser, everything works fine when I type:
https://agent.electricimp.com/{MY_IMP_ID}?value=1
When using IoTBuddy, I input in URL:
https://agent.electricimp.com/{MY_IMP_ID}
and in value:
1
…but I cannot get it to work. What am I doing wrong??
Thanks and best,
Marc

Marc,

If things work in your browser, It should work exactly the same way with IoTBuddy. The only thing I can think of is to check your URL and value for whitespace and that the URL is correct.

IoT Buddy was the first app that I posted, and it is very limited. I’m hoping to post an update before too long. I would also recommend checking out Little Devil (free) as it allows you to send JSON data to the Imp. Also, my app Pitchfork (not free) does the same, and allows you to also send an API Key for additional security. If you are using this to control a garage door, I would highly recommend using Pitchfork for the additional security, as it has a control just for the door.

Also, you can use the agent to respond with HTML and make a web control that you can open in any browser. Take a look at the SnackBot code on the Electric Imp GitHub page. It is really easy to modify that code to make a custom Imp controller with HTML buttons… then you can control your imp with anything that has a browser.

@jwehr
I have been working with agents from a web browser and had used your IoT buddy from my ipad but it was going through the planner input method. I had been using a Get method from a browser and would now like to convert over the IoT app. Now that the planner is deprecated I need to get Agents working for the IoT app. Are you using post or what to send to the IMP. any formatting info would be helpful.

I don’t actually use the original version of IoT Buddy, since it neither passes JSON data or has code for a response. Shortly after publishing it, I wrote and published Pitchfork, which is my main iOS app. I am debating what to do with IoT Buddy, as there are quite a few people using it, and I have to assume that many of them are using it with Arduino or R-Pi’s. (I don’t actually know). In any case, Pitchfork, and @brendandawes app LIttle Devil, will handle requests with JSON, and give you a response back to your app. I have quite a bit of example code on my GitHub page for how to do it.
As for IoT Buddy, I will most likely leave the current Control Panel as it is, and add several new panels for various controls. Probably 'bot control, Pan/Tilt control, Color Picker…If only there were more time in the day. I’ve been focusing on hardware, and controlling Imps from an Agent hosted web page lately, but I need to finish up some work on those two apps.
You should still be able to pull the value=x out of the url, though I’d have to look into that. I would encourage you to use something with more security, like Pitchfork though, it allows you to pass an API-Key in the headers, in case you are controlling something you really don’t want people to mess with… like a lock or garage door.

@jwehr,
Thanks for the help. I will have to check out your other IOS app “Pitchfork”. So for just trying update some code to remove planner dependency. I got it working once I realized it was post rather than get and body of post is a string. Then parsed the string to get the value. Not elegant but seems to work for now.

Does anyone know of an iPhone app that can receive data back from the imp (simple data like temperature). I found IoTBuddy and Little Devil, but my understanding is those apps can only post data to the agent. They cannot do anything with the response from the agent.