iOS app thoughts

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 :

my iPhone 6S (iOS 10.0.2) will lockup when trying to connect with https://emoncms.org. But all works A-OK with a local emonPi. I am using emoncms app version 1.0 (5).

EDIT: also the Save button (upper right) never appears when trying to connect with https://emoncms.org

EDIT2: if I don’t use the Scan QR Code and hand type the emoncms URL and API read key, all works A-OK.

Pretty sure I’ve fixed this. I’ll release a new build tonight.

Hmm. Are you entering both an address and an API key? It won’t enable until you’ve entered both.

If I use the QR code from emoncms.org then the emoncms app will lock up.

If I use the URL and API (manual entry) from emoncms.org then all works OK.

Ah I see. At what point does it lock up?

found another not to nice behaviour in a apps graph (finally found how to reproduce it)
when you use the usual zoom option via pinching etc the graph zooms in but stays visible. But you can also double tap on the graph and it zooms in … but out of the screen. Even when you zoom out it doesn’t refit inside the visible frame, you need to scroll up and down
Hope the video attached is accepted and clear

https://community.openenergymonitor.org:/uploads/default/original/2X/3/31efa7ffcf2bee843971f5bc9921a0ff9f589d28.mp4

Nice thanks for finding these things! I’m stopping zoom from working at all.

immediately after it sees the QR code. The camera turns off, there is no “Save” and then I am in the Settings. Clicking Feed or Apps does nothing.

OK good to know. I’ll have a look. Thanks!

Another thing @glyn.hudson - can you make sure that your iPhone is set to send crash reports please? You can do it from Settings → Privacy → Diagnostics & Usage, and then make sure the “Share with app developers” is turned on. That way I get the crash reports. I see you have some crashes, but I can’t access them, which I assume is because you have that turned off.

1 Like

Press Scan QR Code:

 

Show camera the QR:

 

The Accounts Details page appears for a split second. And then quickly disappears without clicking Save.

 

Then the Settings page appears. Clicking Feeds or Apps does nothing except change the blue highlight at the bottom of the screen.

Thanks @Jon! Found, and fixed. Will be in the next build (not the one I just released - sorry!).