Extending indigo (my own little effort)

Posted on
Sun Mar 01, 2015 11:11 am
KostasV offline
Posts: 39
Joined: Nov 16, 2014
Location: London, UK

Extending indigo (my own little effort)

Hello everyone,

I have been using indigo for a while and as an iPhone user I wanted a bit more functionality on my phone so I embarked on a journey to learn how to program a native iOS app with the aim of managing my Z-Wave devices from my phone.

After many hours of coding, a bit of help from the guys at indigo and a bit of help from Stackoverflow I managed to get the first version of an iPhone app (indigolink) for iOS 8 and above (using my iPhone 6 plus as the initial layout) and a Python Server (indigolinkserver) that becomes the 'middle-ware' between the app and the indigo server.

I have made the source code available on GitHub:

indigolink - iPhone app (iOS 8)
https://github.com/indigolink/indigolink
indigolinkserver - Python Server (2.7)
https://github.com/indigolink/indigolinkserver

The code can take a bit of an improvement as it was written when I had some free time and while learning Swift & Objective-C as well.

In short the indigolinkserver is a Python script that polls the indigo API every few seconds (user defined) and collects any changes. If there is a client (the indigolink app) connected it will push the changes (e.g. switch on/off, new temperature value, etc) to the device as it uses sockets. It has a number of other nice features like notifications APNs when the 'alarm' is set 'on' and a graphs page.

This is my first stab at this and there is still a lot to do but a million mile journey begins with a single step.

I'm open to all the (constructive) feedback so please try it and let me know.

Thanks!

Kostas

[Edit] - Adding some screen grabs: http://s292.photobucket.com/user/indigolink2015/slideshow/

Image

Image

Image

Image

Posted on
Fri Mar 06, 2015 10:14 am
DaveL17 offline
User avatar
Posts: 5909
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Extending indigo (my own little effort)

Very cool. In my opinion, the more options the better and it all can only be good for Indigo. Is the charting function native to the app or is that an image render?

Keep up the good work.
Dave

p.s. I looked for your app on the US App Store and it's not coming up for me (iPhone 5, iOS 8)

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Posted on
Sun Mar 08, 2015 10:41 am
matt (support) offline
Site Admin
User avatar
Posts: 20568
Joined: Jan 27, 2003
Location: Texas

Re: Extending indigo (my own little effort)

Hi Kostas,

Looks good – thanks for sharing it with everyone. We plan on greatly improving Indigo's RESTful API which will probably be useful for your middle-ware server.

Image

Posted on
Sun Mar 08, 2015 11:01 am
KostasV offline
Posts: 39
Joined: Nov 16, 2014
Location: London, UK

Re: Extending indigo (my own little effort)

Thanks for your kind words guys! Motivation to keep going and still looking forward to the new indigo Touch as well!

I have not yet made the iPhone app available to the Apple app store as it requires the 'middle ware' to run (and for Apple to test and I only have my house system to play around, don't want Apple to be switching my lights and plugs on/off while testing the app :mrgreen: ).

Also some more features (like dimmers, support for more devices) are needed plus proper icons and graphics in general which I hope to get into the next few weeks and then make an initial release. The source code is on GitHub if you want to give it a try on your Mac as Xcode (require to compile the code) is a free download from the Mac App Store).

I'm also eager to see more features on the API, I love open architectures that enable users to chose their client or develop one of their own that's why I like indigo! :)

The charting component is from Telerik, I couldn't get Core Plot to do exactly what I wanted without writing a ton of code so chose the easy way. It is a commercial component though that's why I have been using their trial version up to now and the end product will have the full licensed version so the users will enjoy all the nice graphs on their device.

Kostas

Posted on
Sun Mar 08, 2015 7:06 pm
RogueProeliator offline
User avatar
Posts: 2437
Joined: Nov 13, 2012
Location: Baton Rouge, LA

Re: Extending indigo (my own little effort)

The charting component is from Telerik, I couldn't get Core Plot to do exactly what I wanted without writing a ton of code so chose the easy way. It is a commercial component though that's why I have been using their trial version up to now and the end product will have the full licensed version so the users will enjoy all the nice graphs on their device

I love the Telerik products but I might warn you that the UI for iOS product does not allow you to distribute it to GitHub with your application (even the commercial license)... Not really sure how to get around it other than maybe what you are already doing to point users to download it? You can contact their support and see if there are options/exceptions, but from their point of view if you post the library then others are able to link to and use / develop with their components for free...

Now that I think about it, one option that SHOULD work would be to provide the source sans the Telerik component library and then provide a separate download with it already linked/built. Thus users who want the source are the only ones who would need to download the components separately.

Adam

Posted on
Wed Mar 11, 2015 8:36 am
KostasV offline
Posts: 39
Joined: Nov 16, 2014
Location: London, UK

Re: Extending indigo (my own little effort)

In the GitHub repository I have not included the Telerik library to avoid any of the licensing issues as you mention. If people want to download and use the code that there is there I have made it clear that they have to download the chart library from Telerik as only on their web site you van get the trial license. As a developer myself I'm totally respectful of other people's efforts and intellectual property.

At the same time I will be licensing the product for use in the app that I will put on the Apple app store hopefully fairly soon (will be a free download)!

Kostas

Posted on
Wed Mar 11, 2015 10:36 am
RogueProeliator offline
User avatar
Posts: 2437
Joined: Nov 13, 2012
Location: Baton Rouge, LA

Re: Extending indigo (my own little effort)

In the GitHub repository I have not included the Telerik library to avoid any of the licensing issues as you mention. If people want to download and use the code that there is there I have made it clear that they have to download the chart library from Telerik as only on their web site you van get the trial license.

Oh no, wasn't faulting you for what was up there - that looked perfect. You had just mentioned purchasing a license so wanted to let you know that as I had to examine their licenses a little bit ago -- and some CAN be distributed freely even open source after purchase, which muddies the waters, but that was not one of them. I too was looking at them for graphing -- and still may at some point.

Adam

Posted on
Wed Apr 29, 2015 9:22 pm
lcavalie offline
Posts: 1
Joined: Apr 29, 2015

Re: Extending indigo (my own little effort)

Hello,
I trying to install the python part of the project and I get the following error when I do
python indigolinkserver.py

Traceback (most recent call last):
File "indigolinkserver.py", line 8, in <module>
import devices
File "/Users/home/indigolinkserver/devices.py", line 8, in <module>
import requests
ImportError: No module named requests

I suspect this is a matter of missing dependencies.
You mention that the python server requires a few modules but honestly I have no idea how to check if those are present or how to install them if they are missing.
I'm an iOS developer and I'm sorry but I know nothing about python, a little assistance would be greatly appreciated.

Thanks

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 1 guest