iOS app thoughts

hmm not getting any thin in the logs .

slightly oddly the view doesn’t appear to have valid values was expecting 9 and 30 rather than nil
from in the debugger.

//  MyElectricAppViewController.swift

appData	EmonCMSiOS.MyElectricAppData	0x0000000170167980
RealmSwift.Object	RealmSwift.Object	
uuid	String	"3E5BDB3B-5B15-40BA-ADB2-446C60DFCFB5"	
name	String	"MyElectric"	
useFeedId	String?	nil	none
kwhFeedId	String?	nil	noneappData	EmonCMSiOS.MyElectricAppData	0x0000000170167980

Hmm yeh, that’s odd. It hasn’t saved the feeds. When you tap configure - does it definitely have the feeds selected?

when going into configure the feeds get selected and set but then they get lost somewhere.
Clicking configure again its still a blank set.

Ok that’s really weird.

Is there any chance I can get a login on your emoncms so I can take a look please?

Hi @mattjgalloway! Would like to have testflight also. Looks very promising. How can get the promotion code? Can’t find your email.

Kristo

Found! Will send e-mail :slight_smile:

This is fixed, along with the MyElectric not working. Just pushing out a new build now!

just updated from master :slight_smile:
looks great nice a quick and well behaved now not managed to break it yet.
Thanks for the great work so far

1 Like

got the testflight update

feeds work in the app now
works in both vertical and horizontal

will test, saw something weird when zooming in on top graph in horizontal ode but can’t reproduce it … will keep posted
nice work Matt

hmm ok slightly odd
going direct (192.168.254.4) all is ok
going via my full DNS (you have the details) the QR signup doesn’t work

I’ll take a look now.

Ah, I see the problem.

So Apple introduced ATS (App Transport Security) with iOS 9. This meant that instantly all connections had to be HTTPS unless you specified exceptions. You could turn it off entirely if you wanted. However I haven’t specified any exceptions or turned it off entirely in the app so far. So @David_Hunnisett - it’s not talking to your server because you’re running on plain HTTP.

However, from January next year you won’t be allowed to turn off ATS at all unless you have a very good reason. It’s debatable whether it’s “a very good reason” for us. On one hand, we can’t control everyone’s emoncms install. On the other, we could mandate you have to be running HTTPS.

I am for the latter (and I’ll add a suitable error message). In this day and age and with free SSL certificates all over the place, we should all be running on HTTPS really.

Anyone against me mandating we use HTTPS? (If we don’t mandate it, the app could get rejected by Apple, or at the very least we’d need a good reason lined up for disabling ATS.)

Totally agree! Cloudflare is a great example - easy to set up, and free!

Paul

Thanks for adding me to the beta club :slight_smile:.

Not had a chance to test properly yet. But looks nice! I’m up and running on my little pink 5c :blush:

I also noticed the HTTP issue when testing with my home emonPi.

When I link to my Emoncms.org account I can see my feeds but the app force closes if i try and click on them. How can I view debug?

Agree, in an ideal word all web traffic would be HTTPS. But I think if possible we should leave the option to the user (with sufficient warning messages).

I am aware a number of users (including solarPV installers) use the Android app on internal local network(s) to connect to the emonPi as an always-on wall mounted display. In this local network use case no traffic is going over the wider internet I don’t see a problem with HTTP.

I’m not sure how we would go about shipping each emonPi ready installed with pre-signed SSL certificates… This is a topic for another discussion!

Ah yes I forgot to mention. Apple allow HTTP if it’s on the same network as the device. So we can allow that even if we don’t turn off ATS.

We can try going through review with ATS turned off and see what they say, but they may come back and say we have to have it on. I’ve not had experience trying to get something like this through. I can ask around though.

2 Likes

Didn’t have to much time to play with the app but one thing that feels weird is when a feed is zero (for ex right now there is no solar production) you still have a fill under the zero mark, giving you the impression there is still something …

not sure this can become a simple 1 px line instead what we have now, at least we see it as zero

glad to hear HTTP can be used for a local network!

On 1.0(5) the time disappears when zoomed in too far. (Eric’s post above reminded me!). Is it possible to add half hours? Or maybe not allow the graph to be zoomed in too far?!?

EDIT: Updated gif to only loop 3 times.

Ugh. All of these graphing errors are annoying. I’m using the iOS version of the library that’s used on Android, but I think it’s not quite as mature and has lots of little issues. There’s tweaks I can make, but the API is pretty tricky!

Thanks for reporting these 2 things - I’ll sort them!

@glyn.hudson - I am trying to add an iOS emoncms Config for the Optical Pulse Sensor.

 

For the electricity meter, each pulse is 1 Wh. So 1000 pulses equal 1 kWh. I can obtain the kWh Feed using 3 - Log to feed - ePi_Opt_Pulse_kWh pictured below. I tried using kWh to Power but I get very odd output.

How do I create a Use Feed for Optical Pulse Watts?

I’m still having the force close issue whenever I try and view a graph. Same issue for emoncms.org and local Emoncms. Tried to illustrate the issue with a video. Sorry for the poor camera angle :