iOS app

After thinking about it for a while, I finally decided to embark on making an iOS app for emoncms.

I’m developing it here: GitHub - mattjgalloway/emoncms-ios

It’s not pretty so far. But you can log in, view a list of your feeds with current value, and see a graph of the last 24 hours of a feed.

My aim is to make it like the Android app.

If anyone wants to help out, let me know! I’m using it as a way to try out some new things, as well as try out Swift 3 properly in a brand new app. I can talk through the design philosophy with anyone who wants to chip in. I’d love to collaborate on this!

3 Likes

Awesome! Nice work! :thumbsup: :smile:

I will send out a tweet on the OpenEnergyMonitor twitter to try and find some more IOS developers interested in this.

I hope you don’t mind, I edited you post to include the screen grabs

Matt, is it being structured in such a way that at some time it could be ported to Android too?
Or is to purely iOS?

It would be good to have consistency.

Paul

1 Like

Matt - I can help via testing. I have Xcode loaded up on a MacBook Pro and just need to locate instructions to get your app onto an iPhone (or into iTunes and on the iPhone).

Not at all! Thanks!

I was going to try out React Native which would have the added benefit of being easier to do an Android version. But I ended up getting a bit bogged down, and realised since my skill really lies in pure iOS, I should stick to that.

We can ensure this even without a combined code base. Even these cross platform libraries you only really get the benefit of sharing some layers of the code - and that layer would be quite thin on an app like this.

Sweet! Yeh I will set up a beta test program once I’ve got a bit further. It’s very early days so far. I’m sort of playing around with some new Swift/iOS shinyness while I’m making this.

1 Like

can also help test if needed, am on testflight and also have xcode on machine
not a coder but used to test for others

Sweet! I’ll put out a call for email addresses to add people to the beta program once I’m ready for that.

1 Like

I’m happy to help out where I can. Limited programming skills. But happy to help where I can. Using a emonpi in my home with a solar PV setup.

Cool! If you’ve got an iPhone/iPod/iPad then testing would be definitely appreciated. If you fancy getting into coding, let me know and I can help you get set up.

I’m on my way with a basic MyElectric app.

It pains me that we have to write these 3 times - WWW, Android and iOS. And then there’s the massive duplication between MyElectric, MySolarPV, etc.

The right way to go long term is everything in Javascript, using React, so that it can run on WWW (vanilla React) and mobile (React Native). But that’s a big undertaking, which I don’t have time to do.

I’m away from my computer for a few more days. But have most Apple gadgets to test it on. Have had a look at xcode in the past.
Looks like a cool project

I got a bit further today…

The styling needs to be done for sure, but this is basically a straight clone of the Android My Electric app. Funnily enough, the charting library I’m using is a direct port of the same charting library that’s used on the emoncms Android app. So getting things looking similar is pretty easy!

Just a few more tweaks on that and it’ll be usable. Things that need doing:

  • “Use today” is clearly not right - it’s just the current value of the kWh feed. Just testing!
  • Bar chart needs a little bit of styling to get the nice M T W T F S S in the bottom of the bars.
  • It needs to auto-update. And probably a refresh button in the top right.
  • It needs buttons to change to 1 hour, 8 hour, 1 day, zoom, pan, etc.

But we’re getting there!

3 Likes

It’s looking good Matt!

Paul

for what it is worth - I like the nice clean white background like in the first post. I am personally not a fan of dark backgrounds. Just my 2 cents worth as an armchair quarterback / back seat driver! :wink:

I have been thinking that maybe we could do something similar to the dashboard editor that is more targeted at full screen/mobile/tablet display.

Then just the rendering of these would have to be ported to the different platforms.

Hi Matt, Like what doing, personally I do not use iOS but I was interested by your original approach which looked more like the mainstream or full emoncms feed page than the emoncms apps. Is that a route you intend to pursue further or are you now going for the emoncms apps as the main feature set?

With regard to the MyElectric and MySolar duplication, I wanted to mention some change in the pipeline for the AndroidApp that I would also like to add to the emoncms web apps, so you may want to concider them here too?

Whilst the MySolar app is quite specific to the overall picture (but could have alternatives eg your MyDiverted app or hydro/wind etc) and would usually (but not always) only be needed once in any account, the MyElectric app is a simple report based on a single power&energy feed pair, This could be used for several different feed pairs to report a multitude of different things from the more obvious electricals (eg EV charging or hot-tub heating etc) but also as “rate & total” pairs, other instances of “MyElectric” could also report gas, oil or water consumption or even rainfall etc too.

It would be good to collaborate and move the AndroidApp, emoncms apps and the iOS app forward together for this, if you have any interest in making “myElectric” a group of user defined (freetext title/2x feeds/1x colour each) pages rather than a single page, I think many users would find this extremely useful.

Android programmer to expand MyElectric app

We are also in the process of making the AndroidApp multi account too, but I understand that maybe a less appealing feature as many users only have a single emoncms account.

I tend to agree. I just wanted to make it the same for now. Although it doesn’t really fit in with the iOS way. So I think it does need to change.

Totally agree. I would love to add something like that eventually!

YES YES, and YES. Any thoughts on best ways we can collaborate? Should we have some place where we discuss things? And maybe come up with a combined roadmap? This goes with your other points. It would be great to share a roadmap so that we can keep track of where everything is going so as not to diverge, and also share in the thoughts of each app.

It’s part of my design from the start for iOS. It’s not there just yet, because it’s not top priority, but it’ll work eventually :smiley:

I actually like having an open discussion in an easily accessible and central location, like here on the forum and then raising specific tasks/bugs/todo’s etc as issues on GitHub, that keeps the chit chat out of the “issues” and keeps everyone involved in the discussions rather than developing behind closed doors, from the forum, issues can be linked rather than spreading one discussion across many locations. In this instance though there are at least 3 repo’s (iOS, Android and web apps) in play and with multiple contributors this could easily double/triple.

Since we will not all get access to multiple emoncms repo’s to make use of the issue tracking labels, assignment and milestones I could set up a dummy/temporary github repo just for some central issue tracking during development, that way we can all have some access.

Yeh, having the discussion on here is fine. I just wondered if we should ask for a separate section? Or actually, we can just use a tag. I tagged this post with “mobile” for example. I’ve not used Discourse much, but maybe there’s a way to subscribe to a tag so that interested people can be notified when there’s a mobile discussion going on?!

If you click on any “mobile” tag you will get this page, on the right near the top, directly under your profile pic/button, there is a dropdown offering these options

so it is possible to get notified, perhaps an “appscollaboration” tag would be less likely to get used for general mobile related topics and could include the emoncms web apps too?

EDIT - See the appscollaboration tag.