I’ve started a project that I am calling Pitchfork. When I complete a project myself, I will be posting code, tutorials, and an iOS control interface in the Pitchfork app. I submitted the app for review yesterday, so it should be available in a week or so. In the meantime, here is a demo video. Each panel is actively controlling or reading data from Electric Imps at my house, so the demo is of live completed projects.
GitHub code: https://github.com/joel-wehr
@jwehr wow looking forward to this
By the way what did you use to record app?
Could use this for my web app tutorials
Looks pretty sweet is it all in json?
@controlCloud I did a quick search this morning and found this: http://www.abdus.me/ios-programming-tips/record-video-from-ios-simulator/
Unfortunately, I don’t think it is going to be any good to anyone that doesn’t want to record directly from the iOS simulator. However, I haven’t actually looked to see if it has any other features besides what I used.
@howardnl Yep. I wish handling JSON in Objective-C was as easy as it is in Squirrel. I’ve got the example code up on my GitHub page: https://github.com/joel-wehr
Do I interpret correctly that the pop-up in Control Panel following each action is actually the status of the controlled device (so two-way traffic to and from the controlled device)?
That is correct. Also, if you use the Security System panel and code it similarly to my example, it will actually “set” or synchronize the controls on the app, with the settings of the device anytime the panel comes into view. That way you can have the app running on different phones and everyone is synched with the system.
My garage door system uses two sensors so that it knows if the door is fully closed, fully opened or in between. The device waits until it gets a callback from the imp before responding with the new door status. Gotta love the e.imp.
Will you be sharing the code iOS code for this two-way traffic, would make my weekend!
Yep, I’ll get the iOS code up. However, I’m not putting it out there as an example of good iOS code, in fact I’m still very frustrated with trying to understand how to handle JSON in an HTTP response. I figured out one way to make it work, and that is how I handle it in each view controller. I’ve read lots of posts on Stack Overflow and tutorials on Ray Wenderlichs page, but some things aren’t clicking. But, I did get one method to work, so thats it for now.
Also, thanks to input from @beardedinventor, I added API Key support, which is totally necessary for devices that need to be secure.
@jwehr don’t worry about wether it is “good” iOS code. An example for the path from controlled device back to iOS is something I have been looking for quite some time now. Really looking forward to starting with it…
There is a great library called AFNetworking that is included in the app. I am not using it, but the Xively library does. It makes working with NSURLConnection easier, but I am still doing things the old fashion way until I understand it better. I believe that I have all of the standard methods for dealing with NSURLConnection in the app. Getting the response is pretty straightforward, but I got hung up for a while trying to determine how to get the jSON moved around correctly in arrays and dictionaries. After that it is just a matter of pulling out the values for keys you are interested in and working with them. I am probably making it harder in my brain than it actually is. Let me know if you see anything that could be done more elegantly. As soon as I make sure the code is ready for a public repository, I’ll commit it.
@moose For some reason, I’m having trouble pushing a local repo properly, so in the meantime, here is a zip files of the code.
This is going to keep me busy this Sunday, will keep you posted.
Pitchfork is now available on the App Store. Thanks in advance to everyone who supports the project.
I have learned a lot from the Pitchfork iOS code, thanks for that!
Unfortunately can’t find Pitchfork in the AppStore (same as with IoTBuddy :"> ).
Once I have located it I will submit a review =D>
Found it, bought it (don’t need it of course but really appreciate you helping me out)!!
Hope more people buy it, it’s nicely set up.
Thanks Moose, I really appreciate the support! If anyone else is looking, if you search for “Pitchfork” in the app store, its likely to be the 3rd app in the results for whatever reason.
@sbright33 Developing iOS apps requires enrolling into the Apple Developer program - cost $99,-/year. I therefor have no problem at all supporting an iOS developer who has spent time and money(!) on making an app this way.
So: Bougth it? Yes I did!! Cost? Very low priced!!