The Official Emoncms Android App

Hi all,

This thread has been following the development of what has turned into the official Emoncms app for Android. I'm pleased to say it is now in public beta via the Google Play store. Click the below URL to sign up for the beta. When the app is released you will stay on the beta channel and receive the latest updates. If you would prefer to receive only stable releases use the link to remove yourself from the beta channel.

Any thoughts or input will be appreciated.

LAST UPDATED 08/12/15

JOIN THE BETA:
https://play.google.com/apps/testing/org.emoncms.myapps

SOURCE:
https://github.com/emoncms/AndroidApp

Kev

Paul Reed's picture

Re: The Official Emoncms Android App

Good idea, it would be much easier to access emoncms via a dedicated app, so I look forward to following your progress.

What are your plans for distributing it (presuming that's your intention), are you hoping to add it to google's play store, and if so, will it be free, paid for, or include advertising (hopefully not!).

Paul

JumpMaster's picture

Re: The Official Emoncms Android App

I could publish it to the store once it's sufficiently bug free as I've already paid to publish apps.  It will also be on github so hopefully the community can help with development.

Always free and ad-free!

Paul Reed's picture

Re: The Official Emoncms Android App

Thanks Kevin, that's great news.

Paul

fluppie007's picture

Re: The Official Emoncms Android App

Cool! Maybe someone can port it to iOS :-).

JumpMaster's picture

Re: The Official Emoncms Android App

Here's an initial alpha version.  Everything on the screen is live and will refresh ever 10 seconds.  To add your emoncms URL and API drag from the left to open the navigation drawer and switch to the settings page.

All feedback appreciated!

https://dl.dropboxusercontent.com/u/18412241/emoncms.apk

Paul Reed's picture

Re: The Official Emoncms Android App

Thanks Kevin, tried it earlier this morning, but get 'CONNECTION ERROR'
Could it be because my server is using the https:// protocol and there is no way to select that in the app?

Paul

JumpMaster's picture

Re: The Official Emoncms Android App

Yes that is definitely an issue.  I'll need to add a setting to enable/disable HTTPS.  I'll take a look at it later today.

JumpMaster's picture

Re: The Official Emoncms Android App

I've added the option to enable SSL in the settings menu but am unable to test it.  Same URL as before but pasted below anyway.

https://dl.dropboxusercontent.com/u/18412241/emoncms.apk

Paul Reed's picture

Re: The Official Emoncms Android App

Yes, it now works fine on https, thanks.

I can't really check the kWh/d barchart, as I don't have any kWh/d feeds (the recommended configuration process is now the 'power to kWh' process, and all my daily feeds are now stored in that format).

The graph is really good to navigate, using pinch and slide, and is very smooth and controlled - a big thumbs up!

The left menu now contains 2 items - 'settings', and 'emoncms' which produces the 'My Power' screen. Is the intention to extend this - for example, to have 'settings', 'my power' & 'my solar'?

Paul

nihonjin's picture

Re: The Official Emoncms Android App

Any plans to include solar?  Well done and thanks for sharing.

Eric_AMANN's picture

Re: The Official Emoncms Android App

Hi JumpMaster.

Great work ! Tested on an android emulator with success.

Some suggestions :

- Power now value : round the value that can be a float (for people calulating power from energy)

- In settings: change "INPUTS" to "FEEDS"

- In settings : it will be great to be able to select an accumulating energy feed and not only a KWh/d feed. KWh/d is  (or will be) deprecated.  For more explanation read the last paragraph of Trystan post here

- In settings : it would be great to have a scaling factor (as some people accumulates Wh and some other kWh)

 

Eric

 

 

 

TrystanLea's picture

Re: The Official Emoncms Android App

Hello JumpMaster, looks really nice! really great to see!

JumpMaster's picture

Re: The Official Emoncms Android App

Thanks for the support and suggestions.

I've made the first set of changes including removing the kWhd feed requirement and replaced it with a copy/paste from myelectric.  It may take 2 updates (10 second) to display the information correctly so don't panic if it show's you've used 1000's of kWh's today :)

I only get to work on this on the train to and from work so I upload as much as I get done before my stop.

Download link is the same - https://dl.dropboxusercontent.com/u/18412241/emoncms.apk

Kev

Paul Reed's picture

Re: The Official Emoncms Android App

The kWh feed is a welcome addition, and now the daily bar graph displays great from my existing feeds.

Nice work Kev

Paul

Paul Reed's picture

Re: The Official Emoncms Android App

...a couple of things I've noticed;

1) The scale does not include the higher reference, ie stops at 2000 instead of including 3000

2) By tapping the daily bargraph, it zooms in, obscuring the view. Shouldn't it be a fixed view that cannot be user changed?

JumpMaster's picture

Re: The Official Emoncms Android App

@Paul

Yes graph maximum and minimums are something I need to work on.  I've managed to spend an hour on it this morning and the bottom graph is no longer selectable.  The whole update process is much nicer and won't shouldn't display erroneous data at start. Need to add some code to rollover the day if you happen to have it open just before midnight.

Same URL as before.

Paul Reed's picture

Re: The Official Emoncms Android App

Yes that's a big improvement, it displayed the correct data immediately, and the daily bargraph is now fixed.

Paul

Bill Thomson's picture

Re: The Official Emoncms Android App

Hi JumpMaster,

I've tried installing your app, but get only a "parse error" message.

Security has been set to enable sideloading. Android version is 4.1.2 (phone is a Motorla Razr)

(FWIW, I get the same error on another phone, but it runs an ancient version of Android (2.3.7), so I expected issues with that install.)

Thanks,

Bill

JumpMaster's picture

Re: The Official Emoncms Android App

I've added support for Android 4.0 (API 14) and up which will support your Razr.  Was trying to add support for my test Nexus One phone but too much would need to be changed.

Bill Thomson's picture

Re: The Official Emoncms Android App

Thanks JM,

Any chance it can support Android 2.x? (The Android 4 phone is not mine. I used it only to test load your app)

If not, no problem.

Tnx again,

Bill

Paul Reed's picture

Re: The Official Emoncms Android App

Problem would be that by supporting early versions of Android, it would restrict being able to take advantage of new features only available in later versions.

Bill Thomson's picture

Re: The Official Emoncms Android App

That's what I figured. No problem.

Tnx guys,

Bill

ondrej1024's picture

Re: The Official Emoncms Android App

Great to finally see a native Android app for OEM. That's something I've always hoped for :-)

Is the source code already available on Github? Would like to have a look.

Here some of my observations:

  • On my Samsung ACE in portrait mode the screen is not big enough to show both "Power now" and "Use today" figures. They overlap. So these numbers should probably be scaled.
  • Once I'm in the settings screen, I don't know how to exit from this. The phones "back" button exits from the app alltogether
  • Can the initial period of the power usage graph be selected? Looks like it's showing about 3 hours now.
  • The apps name should probably be myElectric rather than emoncms.

Anyway, great work so far.

Thanks Ondrej

JBecker's picture

Re: The Official Emoncms Android App

I have the same problem as Ondrej that the two numbers overlap. The power reading is shown as a float with many decimals like 220.974528642W. The kWh reading is totally wrong but that may be due to my mistake to use a wrong feed !?!

Then the 'graph' is not showing anything meaningful. The time is wrong (wrong time zone?), showing a value from 04:00:30 to 04:02:20 when it is 10:02 in reality (6 hours offset?). The power reading is just a single line from left to right with a constant value of ~-100W (power now reading is 1938.993444578...W). I think I am just seeing a wrong part of the feed data.

As this is working for others there might be something wrong on my side.

Apart from this, the settings worked from the start, feeds were found immediately and the design is very clean. Keep on the good work, very nice!

BR, Jörg.

JumpMaster's picture

Re: The Official Emoncms Android App

Hi!

I've uploaded a new version with lots of big fixes and general improvements especially when the app is paused/resumed the graphs should be synchronized correctly.

I'll upload the source very soon once I've removed any test/dev/tutorial code.  I want it to look like I half know what I'm doing :)

Same URL as always.

sumnerboy's picture

Re: The Official Emoncms Android App

Starting to look really good Kev - great work! The smaller fonts for the counters look great on my HTC M7. Awesome little addition to the Emon family - thanks a million!

Sergegsx's picture

Re: The Official Emoncms Android App

Good work!

And thanks for making it open source, that way we can all help out.

JumpMaster's picture

Re: The Official Emoncms Android App

Here's the source as promised
https://github.com/JumpMaster/emoncms_android

Also I've added a Wh / kWh scale selector.  Looks like it works but if someone who accumulates watt hours can test I'd appreciate it.

Eric_AMANN's picture

Re: The Official Emoncms Android App

Hi,

if someone who accumulates watt hours can test  -> I did it and it works.

Is it possible to change the period of the power usage graph ? Something like the D/W/M/Y button of the myelectric app would be appreciated. Being able to modify the start and end time by touching the graph would be interesting.

Thank for sharing. Great job !

Eric

 

 

JumpMaster's picture

Re: The Official Emoncms Android App

Great to hear that work.  Thanks for testing.

I've added some buttons to change the power usage graph period.  It has the same options as MyElectric. 3 hours, 6 hours, 1 day, 1 week, 1 month (30 days).

Paul Reed's picture

Re: The Official Emoncms Android App

The app continues to work well, and I'm using it numerous times a day.
Just wondered... if you were considering adding 'my solar' to it.

Paul

Eric_AMANN's picture

Re: The Official Emoncms Android App

Hi,

"I've added some buttons to change the power usage graph period".

I can't see them. Did you update the apk file ? Same download url ?

Thank's

Eric

Paul Reed's picture

Re: The Official Emoncms Android App

I can see them OK, and I'm using the download link above.

Paul

Bill Thomson's picture

Re: The Official Emoncms Android App

Hi JM,

I'm seeing the same thing Eric sees i.e. no buttons.

I loaded the app today (14 Oct), via your download link.

Otherwise, seems to be OK.

Device is a 7 inch tablet running Android 4.2.2.

JumpMaster's picture

Re: The Official Emoncms Android App

Different versions of Android seem to build the layout differently.  Joy!  I've changed the layout so it works on all versions.  Same URL as before.

Eric_AMANN's picture

Re: The Official Emoncms Android App

Hi,

This works now fine on my 7' tab (android 4.4)

Thank you and congratulations for your quick support !

Eric

 

ondrej1024's picture

Re: The Official Emoncms Android App

Works fine for me as well now. I don't have any issues to report at the moment. I'm happy with the app.

Ondrej

Bill Thomson's picture

Re: The Official Emoncms Android App

Mine makes three. Thanks for the fast fix!

glyn.hudson's picture

Re: The Official Emoncms Android App

Wow very impressive. Great work.

Got this installed on my phone today, seems I had to use adb to sideload. Anyway, looks great on my Moto X android 5.0. I did notice a bug which caused my old PHPTIMESERIES kwh/d feed to be displayed funny. Looking at the posts above it seems this only effects this type of feed type. See attached photo showing the same kwh/d feed being displayed in my electric on emoncms and on the app. 

goldfish's picture

Re: The Official Emoncms Android App

Looks great - am using it to track my heatpump usage as opposed to full house.

Conor

ondrej1024's picture

Re: The Official Emoncms Android App

Hi JumpMaster,

here's one issue I noticed. If I let the app running over midnight, then the "Use today" value is not reset. It keeps accumulating the kWh. So it would probably a good idea to have the app reset the value to 0 at midnight.

I use an old smartphone as EmonCMS display, so it is quite natural to have the app running all the time.

Ondrej

goldfish's picture

Re: The Official Emoncms Android App

Hi Ondrej, I've noticed the same thing - have starting using the app in the Kitchen on a 7" tab as the home readout . Would be really great if it could reset at midnight.

Conor

JumpMaster's picture

Re: The Official Emoncms Android App

Hi all,

I've updated the app. Same URL as before.  It now updates yesterday's power usage and the bar graph every minute. So if the time on servers or phones doesn't match up it should only be wrong for the first minute of the day!

As it's only 8AM here in the UK I haven't seen if the rollover to midnight works so let me know how it works.

Kev

JumpMaster's picture

Re: The Official Emoncms Android App

I've added a full screen option for those of you who want it.  It can be toggled in the settings menu.

Kev

Paul Reed's picture

Re: The Official Emoncms Android App

The full screen mode is a good idea, and really maximises the viewing panel.
I've noticed however that the full screen does not persist if you touch the screen, for example, changing the time period.

Paul

JumpMaster's picture

Re: The Official Emoncms Android App

Yup noticed that too and googling it being up a few suggestions and of course changes throughout the API version. Joy!

JumpMaster's picture

Re: The Official Emoncms Android App

Looks like I've mostly fixed it.  If you pull from the top or bottom of the screen the navigation bars and status bars show and won't re-hide.  Pulling down on the status bar and returning to the app hides both the navigation and status bar.

I'll keep looking for a better fix.  Also I'm only able to test on Marshmallow but it should work in a limited fashion back to Ice Cream Sandwich.

Paul Reed's picture

Re: The Official Emoncms Android App

That's a lot better, thanks.

Paul

joyrider3774's picture

Re: The Official Emoncms Android App

Hi,

i only have power values is it possible to create a kwh elapsed feed somehow ? i'm think of convert power to kwh and save to feed -> reset to zero -> add feed (the one from power to kwh) -> add accumulator. will this result give me a kwh elapsed feed ? if not is it possible to create a kwh elapased feed when one only has power / watt values.

edit: the suggestion i had above is not working. Am i correct in the understanding that i just have to create a feed power to kwh and then select this feed for the bar graph ?

 

Also it's unclear to me as to what my feeds should be named. Clicking in the settings on the feeds doesn't seem to bring up a select feed option. I understand this was a todo item but can someone tell me what my feeds should be called ? thanks

edit:found out the url should work first and then you can select your feeds

also are urls with a port number in it supported ? like url:8080/emoncms/ ? i'm running a local version on a non standard port and keep getting connection error nomatter what i try

edit: found out it is supported

smitt1979's picture

Re: The Official Emoncms Android App

Hi Kev

Is this still an active project for you? 
If so, it would be great if you could make a page for the mysolar page too :)
Thanks Steve

 

JumpMaster's picture

Re: The Official Emoncms Android App

Hi!

I'm still here but haven't made any changes to the app. I don't use MySolar so will have to look at what it does and how it does it first.  I've been spending my train journeys researching MPV's, car seats, and prams as I'm expecting my first (and second, twins!) in a few months.

I'll take a look this week!

Kev

Paul Reed's picture

Re: The Official Emoncms Android App

Great!

Mysolar would be a great addition for me as I use it much more than Myelectric.

Paul

smitt1979's picture

Re: The Official Emoncms Android App

Thanks Kev

smitt1979's picture

Re: The Official Emoncms Android App

Hi Kev

Another nice feature would be if you could set the app not to allow the screen to turn off then it could be used as a standalone energy monitor  

JumpMaster's picture

Re: The Official Emoncms Android App

Hi,

I've add a "keep screen awake" option which is working well. Same download link as usual.

Regarding MySolar. It has the option of having multiple energy consumption feed and multiple solar generation feeds.  Does anyone have multiple of either feeds or do most people just have one of each?

Kev

Paul Reed's picture

Re: The Official Emoncms Android App

I've only got just one of each.

Paul

firefox7518's picture

Re: The Official Emoncms Android App

Hi Kev

I do have multiple ones as I have 3 solar systems from 3 different brands on my roof (Test installations) :-)
So do my father in law and some of the users of my emoncms installation. I think for them it would be cool to see the different solar power feeds in mysolar I think. They now use Multigraphs to do that now.

http://swiss-solar-log.ch:85/vis/multigraph?mid=2&embed=1

Thanks for the cool app. Works good

Regards
Andreas

smitt1979's picture

Re: The Official Emoncms Android App

Hi Kev

I've only got just one of each

Steve

smitt1979's picture

Re: The Official Emoncms Android App

Hi Kev
May have just found a small bug

When the first load the app the status bar hides so the app is full screen 

But if you then go to the setting page the status bar un-hides and stays open the only way I could find to get the app back in full screen was to restart the app

I’m using a Samsung galaxy S3 

Can anyone else confirm this on other devices?

This is not a criticism just thought you would like to know 

 

smitt1979's picture

Re: The Official Emoncms Android App

Hi Kev 

Tested the keep screen awake setting last night works well 

Steve

chaveiro's picture

Re: The Official Emoncms Android App

Hi JumpMaster,

Good idea this app, and hope you can make it nice to use. I've developped myself a simple one for window Phone sometime ago that display last values (burried on some forum post).

I'd like to ask if you could make a simple sizable widget for android where you can configure the feed and update rate to show on home screen. Last feed value is nice, but a graphic background with last values would be nicer.
A widget like that will allow a quick glance on that key feed that you like to monitor constantly.

Any one else likes this idea?

firefox7518's picture

Re: The Official Emoncms Android App

Nice idea indeed, Chaveiro.

Maybe 2 or 3 widget sizes so that the small one could be 1x1 and the biger ones 4x1 and 4x2 sizes?

The 4x2 size could be nice to have on tablets where you could configre different feeds for the widget. So one for house consupmtion, one for heatpump and one for solar. I'm using FHEM as home automation system and it would be really nice to have the widgets on the home screens together with the FHEM widgets to turn on heating, fans, lights etc. :-)

smitt1979's picture

Re: The Official Emoncms Android App

Hi Kev

Well you did say that you had a few months before the twins get here lol

Steve

JumpMaster's picture

Re: The Official Emoncms Android App

Yeah I might as well start getting used to not sleeping!

I'll take a look at widgets first.  It's a feature I've wanted to implement but is very different to the normal andorid application development.  If it's done incorrectly it could be a drain on the battery too.

JasWil's picture

Re: The Official Emoncms Android App

The kWh feed is a welcome addition, and now the daily bar graph displays great from my existing feeds.

Nice work Kev
http://www.sales.care/

aniston's picture

Re: The Official Emoncms Android App

@JumpMaster, I managed to install the app on an Android 4.2.1 however after settings were accepted as soon as the app launches only the POWER NOW feed value is displayed at the top left hand corner and then the app is closed with the standard error "Unfortunately, emoncms has stopped" error keeps on repeating if the app is relaunched, and only option is to say OK to the closed app.

Any ideas if this is related to my phone or something related to the app and my Android version ?

glyn.hudson's picture

Re: The Official Emoncms Android App

Just installed the latest version and it's getting very polished now. Great work, I really love the full screen and keep-on option. I've just installed on a Samsung tab tablet and noticed the Kwh labels on the bar graph and days of the week text is very small and unreadable:

High res photo: https://goo.gl/photos/ouwvxyaAeHpxaucY6

​Couple of other minor things: 

  • The time labels on the real-time graph are a bit random and don't really need 'seconds' digits 
  • Cost option like on the MyElectric dashboard would be nice :-)
marcolino7's picture

Re: The Official Emoncms Android App

Hi,

I have local server at my home. URL include a folder and App give me a Connection Error.

Url is http://192.168.45.3/emoncms/

smitt1979's picture

Re: The Official Emoncms Android App

Hi marcolino7 

i couldn't get it working with my local server but it works with the emoncms,org site

Steve

Paul Reed's picture

Re: The Official Emoncms Android App

It currently doesn't work for me with IP addresses, don't know if it's because I'm https?

You could grab a free domain, http://www.freenom.com/ is easy to set up and free for 12 months.

Paul

JumpMaster's picture

Re: The Official Emoncms Android App

Hi all,

I've just tested using the IP of my server and it works as expected.  As long as you can visit the site from your browser using the IP you can use the IP in the app.

For example. http://80.243.190.58/emoncms works just as well as http://emoncms.org/emoncms

​Kev

P.S.
If the server is on your local LAN you'll need to make sure your phone is using WiFi so it's also on the same LAN.

smitt1979's picture

Re: The Official Emoncms Android App

I can confirm this now

If your using emoncms.org it works with just "emoncms.org"

If you are using a local server it needs to have "/emoncms" after the IP address

Steve

glyn.hudson's picture

Re: The Official Emoncms Android App

I use a Chromebook as my home laptop, it's now possible to run Anrdoid apps on Chrome OS using ARC Welder. I've just tested the Emoncms app and it works pretty well. As on a tablet it could do with the font of Kwh bars increasing slightly, a back button (since Android keys are not accessible on Chrome) and a burger menu to access settings (swiping is hard with a mouse!). However it's fully functional. It would be great to get the app into the Chrome webstore as well as the Play store to allow running the app on ChromeOS desktop / laptop devices. It's a great way to quickly check dashboard. It's just a matter of uploading .zip once APK has been tested using ARC Welder

https://developer.chrome.com/apps/getstarted_arc 

https://developer.chrome.com/webstore/publish

 

 

aniston's picture

Re: The Official Emoncms Android App

Hello @JumpMaster , can you confirm if the lookup address is hard coded to add /emoncms after the FQDN or IP part just like http:// is hard coded ?

possibly this is the reason the app closes on devices trying to connect to an OEM web server not running with /emoncms subdirectory.

If so is there a possibility to option that out ?

..aniston

JumpMaster's picture

Re: The Official Emoncms Android App

Hi aniston,

Only the http:// or https:// is hardcoded.  So if your webserver is setup with /emoncms put it in the URL field.

Kev

glyn.hudson's picture

Re: The Official Emoncms Android App

Just tested latest version, new cost view option works great :-) 

smitt1979's picture

Re: The Official Emoncms Android App

Hi JumpMaster 

Have you had time to compile this into a new .apk as id love to have a play

Steve

JumpMaster's picture

Re: The Official Emoncms Android App

Now that you mention it...yes I have!

The app is now signed so the old one will need to be uninstalled.  This is the only time such a change will be made.

I've only made a couple of cosmetic changes to the myelectric screen along with adding the option to show cost.  I've also split the settings so there's a new cog icon above "USE TODAY" to set the feed ids for myelectric.  App wide settings such as keeping the screen on are in the normal settings page.  This will allow for seperate settings pages when the MySolar screen appears at some point.

Without having access to MySolar it's going to be difficult to develop.  Could someone with a working MySolar system create me a user account so I can develop for it?  Would be a great help!

https://dl.dropboxusercontent.com/u/18412241/emoncms-release.apk

Kev

smitt1979's picture

Re: The Official Emoncms Android App

Hi JumpMaster

Can you PM me an e-mail address and i'll see what i can do 

Steve

Beire's picture

Re: The Official Emoncms Android App

If you can add myheatpump i'd be more than happy to provide you an account :)

Nice app btw!

smitt1979's picture

Re: The Official Emoncms Android App

Hi JumpMaster 

Any news on the new development :)

Steve

JumpMaster's picture

Re: The Official Emoncms Android App

Hi Steve,

I've spent most of my time working on general improvements to the current MyElectric screen and the app in general.  The user experience should now be consistent on all devices. As with MyElectric the number of days history is dependent on the size of your device which looks great on tablets.

This is now the official Emoncms app for Android and I've been working hard with Glyn to make a polished product which can be publicly released.  The next step is a public beta which I would to invite you all to. Sign up with the below URL to download it from the Google Play Store.  Updates will then be automatically pushed out via the Play store.  This thread will still be the main system for reporting bugs and improvements.

https://play.google.com/apps/testing/org.emoncms.myapps

Thanks for everyone's help getting the app this far!

Kev

smitt1979's picture

Re: The Official Emoncms Android App

Hi Kev

Good to hear the project is move forward I have several android devices so I’ll get test for you were would you like any bugs reporting to be posted on the forum or on Google play reporting service

Great work can't wait to see whats next 

Steve 

JumpMaster's picture

Re: The Official Emoncms Android App

Hi Steve,

Hopefully bug reports will automatically be available through the Google Play console.  If you could also report them here that would be great.

Kev

Paul Reed's picture

Re: The Official Emoncms Android App

Congratulations Kev on getting this far, and thanks for all your work.
Just got the latest version and it's really looking polished.

Paul

chaveiro's picture

Re: The Official Emoncms Android App

I tried myself the app for the first time.
Nice initiative.

Some comments:

- If i skip emoncms config on first run i was not able to return there, had to delete cache or reinstall.
- Feeds list should be categorized by Tag as there could be different feeds with the same name.
- Adding a new screen with a simple table list of selected feeds last value may be useful.
 

Peter Galbavy's picture

Re: The Official Emoncms Android App

Installed beta on my Nexus 7 (2013) running 6.0

Got to adding URL and API key and ticking SSL but when trying to config power feeds there is no dialogue for "Power feed (Watts)" or "Bar graph feed (kWh)". The other options all pop up dialogues ok.

 

JumpMaster's picture

Re: The Official Emoncms Android App

Hi Peter,

The Power feed and Kwh feed selections only appear if they can successfully get your feed list with the api and url details you have supplied.  URL should be something like www.mysite.com/emoncms and API key only needs to be the read key.

If you have further issues you could provide the URL you are using please.

Thanks,
Kev

sumnerboy's picture

Re: The Official Emoncms Android App

I am down in New Zealand and am noticing the Use Today value is not aligned properly with my *midnight*. I.e. it is 9am here now and the app is reporting 27kWh for the day, whereas in Emoncms web the My Electric app is correctly reporting 5kWh.

Is anyone else seeing this on TZs other than GMT?

JumpMaster's picture

Re: The Official Emoncms Android App

Hi sumnerboy,

The timezone is taken from your device the same way it is from your browser in MyElectric.  Check your android device settings and let me know if something differs.

Kev

Peter Galbavy's picture

Re: The Official Emoncms Android App

Stupid auto-correct keyboard replaced a "." with a space in the URL. Almost there. Does the SSL option use an underlying connection that requires a valid certificate (as opposed to self-signed) ?

JumpMaster's picture

Re: The Official Emoncms Android App

Nice find!  I will be adding a message notifying users that the connection failed in a future version.

I believe as long as you can browse to the url in chrome without having to accept any warnings it will work in the app.  So if you're using a self signed certificate you will have to add this certificate to the trusted list in Android.  I have no idea how to do this though! :)

sumnerboy's picture

Re: The Official Emoncms Android App

Hey @JumpMaster - yeah my phone is definitely on NZ timezone - the date/time is correct and I checked the settings and it is configured to automatically obtain the time and zone from the network, and is correctly reporting NZT.

JumpMaster's picture

Re: The Official Emoncms Android App

Hi summerboy,

I'm really not sure what to suggest. I've just manually set the timezone on my phone several times until it was -8 hours and the previous day.  The app kept up with each change. The timezone code in the app is a direct copy/paste from My Electric and it's on my todo list to change it to the correct android APIs. Are you using emoncms.org or your own hosted server? If it's your own has the timezone been set correctly in php.ini and in the system in general? This is going to take some working out!

 

Also to the user with the Lenovo Tab 2 who posted the bug report when turning landscape.  Thanks for taking the time to send the bug report. Version 1.0.8 has been uploaded which will resolve this issue,

Kev

Beire's picture

Re: The Official Emoncms Android App

Last night i got an update through play store.

Ever since the emoncms crashes immediately after opening.

I have sent a report. Anything else i should supply?

Running Nexus 6 and V1.0.8

Edit: If i open the app while in landscape mode it works fine. In portrait it crashes.

glyn.hudson's picture

Re: The Official Emoncms Android App

I'm getting 'unfortunately emoncms has stopped' error when I change the rotation on my nexus 7. App works great if I keep the orientation the same as when I opened the app it's only when I rotate. Eg it's fine in landscape if I opened in landscape and vice versa. Same issue on my moto X. 

glyn.hudson's picture

Re: The Official Emoncms Android App

Sorry, spoke too soon! Just applied 1.0.8 update this morning and all is fixed, amazing :-) 

Good work. 

Paul Reed's picture

Re: The Official Emoncms Android App

Seems to be stable here - working fine. 

I wish you could hide the grey menu though, it's eating into real estate.

Paul

HTC One M8

JumpMaster's picture

Re: The Official Emoncms Android App

Luckily I decided to check the crash reports on the train in and noticed someone had sent this issue in two minutes earlier.  It was a stupid mistake in setting the title in the Toolbar.

getSupportActionbar().setTitle("My Electric")

On some occasions the toolbar hasn't been created by the time that call is made so getSupportActionBar() returns null.  Trying to set a title to null doesn't end well :-)  I've moved it to later on in the lifecycle and checked for a null return before setting the title.  Nice easy fix!

 

Regarding the grey menu I assume you mean the toolbar? It doesn't take up much more space then the settings button and kwh/cost switch previous took plus I needed to add the burger icon for opening navigation drawer.  It also follows the android design guidelines.

Would having it hide when in full screen mode help or is this during normal use on a phone where the full screen option isn't used?

Kev

Paul Reed's picture

Re: The Official Emoncms Android App

Yes it would help if it could be hidden in full screen mode, but I'm a little confused why it's there anyway, because in previous versions the settings were (and still can) be accessed by swiping right.

Paul

JumpMaster's picture

Re: The Official Emoncms Android App

OK I'll look at hiding it while in full screen.

There are now two settings menus.  The main settings menu where you set the URL, APIKEY, fullscreen, etc, are settings that are application wide.  Then there's a My Electric specific settings page which is in the toolbar for selecting feed ids and cost values that is only applicable to My Electric.  In the future there should be My Solar, My Heatpump, etc.  If all of these settings were in the same settings page it would be messy so I've separated them making future updates easier.

JumpMaster's picture

Re: The Official Emoncms Android App

Just pushed version 1.0.10.  Switching to full screen mode is now done via the toolbar and hides the toolbar in the process.

Paul Reed's picture

Re: The Official Emoncms Android App

It's good to see emoncms back in full screen mode again! thanks.

Rather than have a button to select full screen, have you considered auto hiding the menu/toolbar by default.
So the menu is visible for say 3-4 seconds, then the app would be automatically be in full screen mode. It could then be brought back for another 3-4 seconds by a downward swipe if the menu was needed?

I don't know if that is a viable option from a code perspective, or a feature that others would like, but I use a navigation app - 'Sygic' which does exactly that. (but by tapping the screen once instead of swiping down) giving options to change route, cancel route, search etc. then returns to full screen after a few seconds, maximizing the viewing area.

Paul

 

Larsjo's picture

Re: The Official Emoncms Android App

Any possibility to get cost unit in local ?

JumpMaster's picture

Re: The Official Emoncms Android App

@Larsjo Can you explain that in more detail please?  Currently you can set the unit cost (per kWh) and select from dollars, pounds, yen, and euros.

Kev

Paul Reed's picture

Re: The Official Emoncms Android App

Kev, Larsjo is Danish, I believe that their currency is Krone (kr) as they did not adopt the euro currency.

Could the currency suffix be user defined?

Paul

JumpMaster's picture

Re: The Official Emoncms Android App

Like in these two screenshots? http://imgur.com/a/032pw

JumpMaster's picture

Re: The Official Emoncms Android App

I've pushed version 1.0.12 which adds the option for "System Locale" as a currency unit.  Thanks Larsjo.

Paul Reed's picture

Re: The Official Emoncms Android App

The System Locale is a nice touch, works well here.

Paul

Larsjo's picture

Re: The Official Emoncms Android App

I am the one to say thank you, nice work.

(Have the same problem with emoncms)

 

 

sumnerboy's picture

Re: The Official Emoncms Android App

Hey @JumpMaster - I just checked /etc/php5/apache2/php.ini and confirmed date.timezone = "Pacific/Auckland". I am running EmonCMS locally. The My Electric app in EmonCMS has the correct daily counter value, it is just on the Android app. So from what I can tell the server itself is configured correctly. 

And my phone is definitely displaying the correct time/date for NZ. 

Is it possible there is some kind of *double* timezone conversion happening? The app is doing conversion to the phone TZ, even tho the server is reporting data in the correct TZ to start with?

Thanks for your patience with this!

Bill Thomson's picture

Re: The Official Emoncms Android App

Hi Kev,

Nice work! Here's a bit of feedback:

The range values overlap the buttons (outlined in red in the screenshot) and the numbers at the bottom of the screen get pushed out of view if their value is small, or less than zero.

Device is a 10-inch tablet running Android 4.4.4

Regards,

Bill

Paul Reed's picture

Re: The Official Emoncms Android App

Bill, is it still the same in full screen mode?

Paul

Bill Thomson's picture

Re: The Official Emoncms Android App

is it still the same in full screen mode?

Hi Paul,

Yes. Same behavior in full screen mode.

JumpMaster's picture

Re: The Official Emoncms Android App

It's possible. The strange thing is the code I'm using to pull the data to get power today is a copy/paste from myelectric.js so it should be identical.

One last check. Could you run the following command to show the date, time, and timezone of your server.

date +%Z

I'm checking javascript vs Android SDK's to make sure Date() is returning the same values on both whether is be in GMT or local timezone.  Next I'll send you a version with the timezone conversion removed and see how that works.

Kev

sumnerboy's picture

Re: The Official Emoncms Android App

Hey Kev,

Here is the output of that command on my EmonCMS server;

web@web01:~$ date +%Z
NZDT

Cheers mate, appreciate your efforts with this!

Ben

 

sumnerboy's picture

Re: The Official Emoncms Android App

Just checked again now, at 2330, and the Android app is reporting 20.0kWh for the day, but the My Electric app on my EmonCMS server is reporting 20.5kWh. This morning (before midday) when I checked the Android app it was reporting about 27kWh but the EmonCMS app was reporting 4kWh.

Very odd.

JumpMaster's picture

Re: The Official Emoncms Android App

Thanks for checking.  Sounds like everything is as it should be.  How many hours do you suspect it is out by? Can you try manually changing your time zone until it is correct and letting me know what the difference is.

After that give the below build a try where I've removed all time zone calculations.

https://dl.dropboxusercontent.com/u/18412241/emoncms_no_timezone_alterations.apk

sumnerboy's picture

Re: The Official Emoncms Android App

Thanks Kev - so I tried the *no-timezone* version and it was definitely not right. I uninstalled and reinstalled the release candidate from the play store beta site, and now the totals are looking much closer to what I am seeing on EmonCMS. The Android app is reporting a little lower for *Use Today* - i.e. 5.0kWh whereas EmonCMS is showing 6.0kWh in the My Electric app. 

No idea why this changed with a reinstall. Very confusing. Still not totally accurate but a heck of a lot better than it was. 

I wouldn't worry too much about it tho - I am more than happy with this level of accuracy. Don't expect you to burn too much time trying to figure out what I have managed to cock up on my install ;).

pb66's picture

Re: The Official Emoncms Android App

Excellent work on this !!! very polished app,

No bugs here, +1 for Paul's suggestion on making the top bar hidden by default (although personally I would like to keep my notification bar, no biggy though)

If you really want to push the boat out have you considered making it multi-instance, only one at a time of course but so you can set up different url, apikey or feeds for multiple properties or even to report different feeds from the same account.

 I started using the myelectic module in emoncms quite frequently and used to switch the source feeds to display different things, cost or import or export or earnings or use or self-use etc etc and it worked well for each but it was a pain switching and I could never remember which I left it on so it's use sort of faded in favour of dashboards. 

This is soooo much nicer to use on a smartphone and it would be even better with myelectric(1), myelectric(2) etc user editable names would be the cherry but not at all essential.

Keep up the good work !

Paul

PS @Ben - do you get different results in emoncms if you don't set TZ in php.ini? in theory server time should not effect emoncms, only unixtime, emoncms user account TZ and browser time should be used, setting php.ini may mask a emoncms quirk ie the app and emoncms may report the same (right or wrong) but php.ini is altering (correcting?) emoncms.

JumpMaster's picture

Re: The Official Emoncms Android App

@sumnerboy - I took a look at your emoncms with the credentials you provided and both my electric and the android app show the same figures.  As the time zone settings are taken from the device you are viewing from not the location of the server have you checked that both show the same figures from your phone?

 

@pb66 - Great ideas! I like the idea of multi instance. Once the app is pushed to the public my first focus will be My Solar which should be easy to use as a base for my heatpump.  Then I can take a look at multiple instances.  Maybe the My Electric title could be a dropdown to switch between configurations.  Shouldn't be too difficult.

Eric_AMANN's picture

Re: The Official Emoncms Android App

+1, would love being able to display several feeds with configurable names, colors and units. At least three tabs for my  myelectric, mygas, and my water.

Congratulations !

 

sumnerboy's picture

Re: The Official Emoncms Android App

Hey Kev - that is bizarre. But seems to indicate there is nothing wrong with your app! Below is a screenshot showing the Android app (left) and the My Electric app (right) - both on my phone just taken now. The view from my phones Chrome browser matches what I see on my PCs Chrome browser. 

I wonder if it is something to do with Chrome? Let me check using Edge/Firefox...

sumnerboy's picture

Re: The Official Emoncms Android App

Nope - both Edge and Firefox browsers on my PC give the same view as Chrome (on both phone and PC).

pb66's picture

Re: The Official Emoncms Android App

"Maybe the My Electric title could be a dropdown to switch between configurations."

That would work or what could be really snazzy is being able to "carousel" through all the instances by swiping left or right, but that clashes with the current configuration settings menu. just thinking out loud I have no idea how complex something like that is to implement....

"Shouldn't be too difficult."

That's the spirit ....  :-)

There's no rush for me, when you get to it is great. I'm looking forward to seeing mysolar too. Perhaps keep "multi-instance" in mind when coding that too. Maybe "Type" (mySolar, myElectric or myHeatpump etc) could be a configuration setting for each instance so we can have any number or mix of instances. (food for thought perhaps?) 

Paul

Paul Reed's picture

Re: The Official Emoncms Android App

.. is being able to "carousel" through all the instances by swiping left or right..

Yes, agree, that would be the ideal solution IMO, but no idea how difficult or feasible to implement

Paul

jojora's picture

Re: The Official Emoncms Android App

Hi
I see a litler error with use today have a 12 hours

Paul Reed's picture

Re: The Official Emoncms Android App

Sorry jojora - can't understand your comment. please try again.

Paul

glyn.hudson's picture

Re: The Official Emoncms Android App

The app is now public in the Play store! Would anyone mind leaving it a review?! Planning a blog post to announce and thank Kev tomorrow morning.

https://play.google.com/store/apps/details?id=org.emoncms.myapps

Does this link work for you?

glyn.hudson's picture

Re: The Official Emoncms Android App

Thanks guys :-D

Bill Thomson's picture

Re: The Official Emoncms Android App

Hi Kev,

I installed your emoncms app directly from the playstore, but am still having the same problem as before. i.e. buttons getting overlayed by data area background, and numerals at bottom of screen not fully in view. This time the device is a Motorola Droid RAZR running Android 4.1.2

Normal and full screen behave the same.

Tnx,

Bill

daturach's picture

Re: The Official Emoncms Android App

Great app, thanks.

I am experiencing a small offset for the "use today" value. I am at GMT+1 running Android 4.4.2.

Values are from emoncms.org.

 

joyrider3774's picture

Re: The Official Emoncms Android App

i'm seeing the same thing i'm from europe / belgium, near brussels (think that's gmt +1 as well) and the app is reporting 1.9 kwh in use today but my emoncms is reporting 2.33 khw used today. I'm also seeing small diffrences on the values on the bargraph (i know they are round but even with the rounding there's a diffrence) for example android app showing 3.8 on a certain day while emoncms shows 4.00. (i modified emoncms to round to 2 digit's after decimal point in my electric instead of a single integer value)

daturach's picture

Re: The Official Emoncms Android App

Maybe it's a coincidence but it looks like the system starts the calculation of the daily accumulated kWh 2 hours after Midnight.

My consumption between Midnight and 2:00 corresponds to the offset I currently see.

Something to check if you wish?

Thanks

JumpMaster's picture

Re: The Official Emoncms Android App

I'm trying to look at this time/use today issue.  The app gets the power usage per day and then takes the yesterday's power figure away from the current Wh figure to get today's usage.  So I'm assuming that whenever there's a problem with the use today figure there's a similar issue with the previous days figure in the bottom graph compared to the web based My Electric?

Kev

daturach's picture

Re: The Official Emoncms Android App

Thanks for looking at this.

The daily consumption (24 hours!) values are the same on the Web and in the app. However, to me, your day don't start at midnight but later (by 2 hours?). That's why this offset is only visible during the current day. Don't know if that makes sense to you?

joyrider3774's picture

Re: The Official Emoncms Android App

jumpmaster, i can confirm the bargraphs itselve have that problem as well i can clearly see it for a few days on my (modified myelectric app) . the diffrences are subtle but they are there. i modified my electric from emoncms to show digits after decimal point since i'm only seeing like 4-5 kwh usuage a day. if i remember correctly, the bargraphs on emoncms default myelectric app, the numbers had no decimal digit's making it hard to see the diffrences / issue

JumpMaster's picture

Re: The Official Emoncms Android App

After lots of testing in emulators set to different timezones it looks like I've fixed it.  I've pushed a new release (1.1.1) to the beta channel.  If someone can test and let me know it works I'll push it onto public release.

Thanks for your help!

daturach's picture

Re: The Official Emoncms Android App

Thanks for your work.

I would like to test it. I just joined the BETA testing program. How long does it take to be notified with this new update?

Thanks again

 

JumpMaster's picture

Re: The Official Emoncms Android App

Hi daturach,

It usually takes an hour or so for a new build to go live but longer for it to be distributed throughout the Play store worldwide.  At the moment the build is still processing which means Google haven't given it a once over yet.

Keep checking the Play store hourly to get it as soon as possible.
https://play.google.com/store/apps/details?id=org.emoncms.myapps

daturach's picture

Re: The Official Emoncms Android App

Excellent JumpMaster, The "use today" values match now. They are identical on the "Web" as well as in the app.

I am at GMT+1. Maybe someone else can verify this.

Thanks

Walter

JumpMaster's picture

Re: The Official Emoncms Android App

Thanks Walter.  It was close but had one last flaw. If your timezone causes you to be a day ahead of UTC which would be 23:00 for you but 11:00 for our friends in Auckland then it doesn't know it's a day ahead and just shows a higher power figure.  I've just pushed version 1.1.2 to beta users which should be the final timezone fix.

Hopefully sumnerboy can confirm it's now working :)

joyrider3774's picture

Re: The Official Emoncms Android App

i just suscribed to the beta channel as well, but no update yet. i'll check in an hour or so again and let you know. I'm also on gmt + 1. we probably also have to check around midnight to see if it still works then ?

just wondering does it account for DST (day light saving time) as well ?

borpin123's picture

Re: The Official Emoncms Android App

Just downloaded the app and it looks great.  I have brought an old tablet out of retirement and it runs 4.2.2 with, it seems, no change of updating it. I have a couple of observations;

  1. The graph on this tablet does not display the same way as it does on my newer device (under line not filled correctly). 
  2. If I zoom in the graph does not resize correctly.
  3. Once I have 'pinch and zoomed' the button at the to do not reset it to the correct size/time period.

I know it is difficult to accommodate older versions of Android, but folk are likely to use old devices for this sort of application.

Keep up the great work!

Cheers, Brian.

 

borpin123's picture

Re: The Official Emoncms Android App

Two other observation; the slider is not the most intuitive UI for switching to Cost.  Could there be an option to show both at the same time?

Secondly, the cog confused me initially as it took me into local settings rather than app settings.  Again not the most intuitive design.

One other enhancement; it is pointless the display be 'always on' as I am out or asleep more than I am in.  Could there be a schedule added for when the display is kept alive?  Just a thought :)

But this is really good :)

joyrider3774's picture

Re: The Official Emoncms Android App

with the new beta it's showing same values in the app as in emoncms my electric. I'll check around midnight as well

daturach's picture

Re: The Official Emoncms Android App

Ok. Let's wait until NZ wakes up ...

A couple of comments:

- In the time slot selection, you could replace the abbreviation for the hours (capital H) by a lower case (h). This is what I learned at school some time ago...

- I am getting from time to time a "connection error". Then, the app reconnects automatically. Is it something "by design"?

Thanks

sumnerboy's picture

Re: The Official Emoncms Android App

Confirmed!! Thanks Kev, you are a superstar. Both Android app and Emoncms app are reporting the same totals now. Great job, thanks for taking the time to fix this. 

JumpMaster's picture

Re: The Official Emoncms Android App

So here's a mass reply to some messages I've missed as they've been between other issues.

@Bill Thomson
I'm not sure why the layout isn't been drawn as it is meant to be.  There's no reason for the graphs to be higher in the order then the buttons or why the app would be trying to use more space then is available.  I don't see that in the emulator with 4.1 installed.  Maybe there's a firmware update for your device which may resolve the issue?

@Bill Thomson / @borpin123
Version 1.1.3 pushed to the play store this morning should resolve the bar graph fill issue.  I've had to disable hardware acceleration on devices pre-KitKat.  Can you let me know if there's any noticeable performance loss due to this?

@borpin123
Lots of effort goes into supporting previous versions of Android.  I have around 10 different emulators for devices 4.0 through to 6.0.  The app supports 4.0+ and it's my goal to have the same user experience on all of them.

The cog icon and navigation drawer are pretty standard UI elements across android applications. Sometimes Google doesn't even use the burger icon which I think is very confusing.  When the app is opened for the first time the draw should open automatically to show that is exists to users. This was removed by mistake in an earlier version and I'll put it back in.  Having the cog and settings in the navigation menu was the only way I could think to access seperate settings menu for the app and My Electric screens.  My Solar (when I implement it) will also have it's own settings menu and if all these options were in a single settings page it would be very long and messy.  If you have any ideas on how it could be improved let me know.

Lastly regarding the 'always on' and having the option to schedule on/off times.  Unfortunately it's not possible.  There maybe an app that can do this on rooted devices.  Always on was added at the request of many forum members.

Kev

klausi0812's picture

Re: The Official Emoncms Android App

Congratulations to another milestone in the Emoncms world. The app is really great and works well.

Kev, back to your question on MySolar app: definitely YES. I would appreciate to see it and many others using PV on the roof may do either.

Since I am using a battery storage system, I am wondering if the MySolar app can be modified to handle such equipment. Like on the discussion of multiple (PV) source feeds, there could be (multiple?) storage elements. I already have feeds for all these data, so having an app for it would be a great benefit.

Thanks again for your great work!

--klaus.

Paul Reed's picture

Re: The Official Emoncms Android App

Kev, have you any thoughts about the suggestion that I made above re auto-hiding the menu bar -http://openenergymonitor.org/emon/node/11260#comment-36947

Paul

JumpMaster's picture

Re: The Official Emoncms Android App

Hi Paul,

Yes I have.  But I'm not sure how best to implement it.  A users pulls down on the status bar and exits full screen.  I can start a 5 second timer to re-enter full screen mode.  But what events should delay/reset or abort the 5 second time?  Any screen presses?  Exiting the My Electric window for sure.  Pinching the graph?

The issue is there isn't an easy way to get an overall "the screen was pressed" call back which would make it much easier.  Another thought...auto-fullscreen would only be activated when both always on and full screen are in use.

I'm still thinking about the best solution.  Feel free to raise it as an "issue" on GitHub to make sure I don't forget!

Paul Reed's picture

Re: The Official Emoncms Android App

But what events should delay/reset or abort the 5 second time?

It wouldn't need delaying or resetting, the 5 second delay is simply providing enough time for the user to be able to select one of the options. If they selected the cog wheel, it would take them to another page for the settings to be changed. Returning back to the main page would then be in full screen again, until the menu bar was again activated.

Paul

griffous's picture

Re: The Official Emoncms Android App

Hi Kev,

Feature request: would it be possible to support negative kWh/d values?

Our household is mid-summer at the moment, and our daily usage is a healthy -10kWh or more each day, which the android app displays as '0'. As a dirty work-around, I added another process to my feed ($feed * -1), which gives me a 'flipped' value which the android app can display and graph. It's obviously not ideal though, the numbers are "wrong" and in a few months time we'll be back to oscillating between net import and export... so only half the values will work and...you get the idea I'm sure. :)

The native html My Electric supports negative kWh/d values nicely at the top right, but the bar graph has never scaled negative bars correctly, so I appreciate this may not be a simple feature request - it requires a better implementation than the original.

Many thanks,
Jonathan

JumpMaster's picture

Re: The Official Emoncms Android App

Hi all!

I've pushed version 1.1.4 out to the beta channel.  This adds automatic return to fullscreen after 5 seconds and allows negative numbers to display in the power per day graph. @griffous If you could post a screenshot of how this looks I'd appreciate it.  For negative values I might have to remove the decimal point as I don't believe figures like -10.1 are going to fit.

Kev

Paul Reed's picture

Re: The Official Emoncms Android App

The auto return to full screen doesn't seem to work when the app is first opened. I have to click the full screen icon first for it to work.
If it could auto hide after 5 seconds when first opening the app, the 'full screen' button would then serve no purpose and could be removed?

JumpMaster's picture

Re: The Official Emoncms Android App

Yep there's no application wide option for full screen.  Once the button is pressed it will be auto-fullscreen until the screen is changed or the button is pressed again.

Bill Thomson's picture

Re: The Official Emoncms Android App

Hi Kev,

I'm not sure why the layout isn't been drawn as it is meant to be.  There's no reason for the graphs to be higher in the order then the buttons or why the app would be trying to use more space then is available.  I don't see that in the emulator with 4.1 installed.  Maybe there's a firmware update for your device which may resolve the issue?

Unfortunately no firmware update is available, but 1.1.4 seems to have solved the problem.

Version 1.1.3 pushed to the play store this morning should resolve the bar graph fill issue.  I've had to disable hardware acceleration on devices pre-KitKat.  Can you let me know if there's any noticeable performance loss due to this?

Upgraded to 1.1.4 today. No performance loss that I could see with 1.1.3 or 1.1.4.

I might have to remove the decimal point as I don't believe figures like -10.1 are going to fit.

The numbers in the bars get overlayed by the day of the week, but otherwise, look OK.

At the top of the display, the minus sign has pushed the last digit of the power value into the first digit of the energy value.

Thanks!

Bill

 

griffous's picture

Re: The Official Emoncms Android App

Thanks Kev, what service!

Attached is as I see 1.1.4 on my 1920x1080p phone. Historical is graphing correctly, but "today" is still reading zero in both places? Perhaps a new variation on the timeline/zone issues returning? (I'm +13 utc)

To better deal with the graph's vertically overlapping text, might it be possible to display the day's value on the other side over the x axis? That works for positive and negative, at the expense of a few pixels.
I'd be happy with rounding too, but that's more a horizontal issue.

Thanks,
Jonathan

Bill Thomson's picture

Re: The Official Emoncms Android App

Kev,

Food for thought. Instead of a minus sign for the negative numbers, what do you think about changing the color of the negative numbers? Maybe change the digit's background color too?

 

borpin123's picture

Re: The Official Emoncms Android App

The app works really well but the graph still does not fill correctly on my 4.2.2 tablet.  The change in the HW acceleration shows a marked deterioration in trying to pinch and zoom and scroll.  As it does not solve the filling of the graphs may be best to put it in or make it user selectable?

Cheers

borpin123's picture

Re: The Official Emoncms Android App

Hi Kev,  What platform are you using to develop this?  Cheers. Brian.

xrayman's picture

Re: The Official Emoncms Android App

Stupid question and forgive me if shared in the above posts but does the app work OK with MySQL data for the bar graph? I have both Power kWh and Power kWhd feeds neither work I just get a connection error. However using the web version in 8.3.2 they work fine. The power feed dies work. Could my server version be too old?

glyn.hudson's picture

Re: The Official Emoncms Android App

Sorry I'm afraid the app (or rather the My Electric dashboard) does not work with MYSQL daily data 

glyn.hudson's picture

Re: The Official Emoncms Android App

Is it possible to specify a port other than port 80 for the emoncms server?

JumpMaster's picture

Re: The Official Emoncms Android App

Absolutely. You should be able to enter the URL as myurl.com:8080/emoncms

I can't test that it works but entering emoncms.org:80 works and entering emoncms.org:88 breaks it :)

glyn.hudson's picture

Re: The Official Emoncms Android App

Awesome, I can confirm it works great. Thanks. I was putting the port number in the wrong place 

dariocdj's picture

Re: The Official Emoncms Android App

Excuse me, this app work only with emoncms dedicated server, or can work also in cloud ? 

In settings i've put emoncms.org/dariocdj and my api reading key but it gives me connection error ???

daturach's picture

Re: The Official Emoncms Android App

Sorry to break this discussion but I would like to report a crash of emoncms.

I installed the latest version (1.1.6) on 4.4.2. If you zoom in, then move the graph to the right, and then choose the 3h range, the app crashes. Anybody else noticed that?

Thanks

Walter

glyn.hudson's picture

Re: The Official Emoncms Android App

I'm blissfully unaware of the technical challenges involved but how difficult would it be to 'port' the app to IOS? Could this be does with something like http://phonegap.com? Personally I love Android but IOS version would be great for the Apple lovers. For a skilled IOS developer, do you think it would be a lot of work to port? Or would it require an almost total start from scratch? 

Bill Thomson's picture

Re: The Official Emoncms Android App

Looks good. Installed the latest version from the P/S and tried to make it crash as per Walter's post above, but it kept going w/o issue.

On another note... The power and energy values overlap. See attached screenshot.

Android 4.1.2 on a Motorola Droid RAZR

 

daturach's picture

Re: The Official Emoncms Android App

I have installed emoncms on a tablet running Android 4.4.2 and I can repro the crash at any time.

Walter

Bill Thomson's picture

Re: The Official Emoncms Android App

If you zoom in, then move the graph to the right, and then choose the 3h range, the app crashes. Anybody else noticed that?

Yes!

I was scrolling to the right, but not all the way to the right.

When I scroll all the way to the right (after zooming) and select the 3 hour button it does indeed crash.

Both the Motorola Droid RAZR and a 10 inch ANTM tablet (Android 4.4.4) crash after that "command sequence" is performed.

JumpMaster's picture

Re: The Official Emoncms Android App

Yep I managed to reproduce the crash on Android Marshmallow too. Just pushed version 1.1.7 which fixes the issue and resets the zoom when changing the time period.

Thanks for the heads up.

Bill Thomson's picture

Re: The Official Emoncms Android App

v1.1.7 checks good on both my devices. Thanks JM!

daturach's picture

Re: The Official Emoncms Android App

New version looks good on my 2 devices (running 4.4.2). 

Thanks for your prompt support.

Walter

dariocdj's picture

Re: The Official Emoncms Android App

Excuse me, this app work only with emoncms dedicated server, or can work also in cloud ?
In settings i've put emoncms.org/dariocdj and my api reading key but it gives me connection error ??? Sorry for duplicate posting...

JumpMaster's picture

Re: The Official Emoncms Android App

There is no need to put your username at the end of the URL.  It needs to be the same as the URL you use in Chrome/Firefox/Safari but without the http:// or https://

gfo's picture

Re: The Official Emoncms Android App

Hello,

I've tried to download the sources corresponding to the emoncms app which is on google play. But I don't find them. The sources in "https://github.com/emoncms/AndroidApp" don't correspond to this application. Is there an other place to downoad the sources or is it possible to have them ?

Thank you,

BR

gfo

 

 

 

 

 

dariocdj's picture

Re: The Official Emoncms Android App

Thank you i 've solved my issues removing username from url

JumpMaster's picture

Re: The Official Emoncms Android App

Hi gfo,

Those are indeed the sources for the Android app as found on the store.

Kev

gfo's picture

Re: The Official Emoncms Android App

Thank you for your answer, main be I don't download the last version, could you give me please the link to download the sources ?

Thank you,

gfo

gfo's picture

Re: The Official Emoncms Android App

I just want to complete my last post, in fact the interface corresponding to the sources is the one that is shown here but when you install the google play app there is in addtion a menu at the top of the screen with an icone to display the menu, I find this more convenient. Is it possible to get the source corresponding to this enhancement.

Thank you,

JumpMaster's picture

Re: The Official Emoncms Android App

gfo,

I'm assuming you haven't compiled the code? The source is for the latest stable release including the menu at the top. It is only the picture on GitHub that is out of date.

Kev

gfo's picture

Re: The Official Emoncms Android App

Kev,

Yes I have recompiled the code. And I got the same screen as above. If you have an other link where I can download the sources I could check if Ido something wrong. ( I did my test by downloading the zip file in Github , may be it is not the good way to get the sources)

Thank you

gfo

glyn.hudson's picture

Re: The Official Emoncms Android App

Looking at the Play Store stats for the app, almost 800 installs and positive feedback :-) 

The most interesting thing IMO, is how many users of the app we have in Italy. More than the US! I have no idea why this is. The stats for the website don't reflect this. One guess: could there be a large Italian company using the system? The app would work nicely for customer solar PV generation data. 

 

daturach's picture

Re: The Official Emoncms Android App

Italy is one of the world largest producer of electricity using PV. That may well explain why they would need such an app.
Check this at https://en.wikipedia.org/wiki/Solar_power_in_Italy

Walter

gsiviero's picture

Re: The Official Emoncms Android App

Hi, I've just installed the app and I will test it this evening... another user from Italy!

Ciao!

Gwil's picture

Re: The Official Emoncms Android App

Just to let you know that emoncms.org does now support https!

tagorter's picture

Re: The Official Emoncms Android App

Hello,

I'm getting "connection error" on the Android AP.

using URL my.domain.name/emoncms

using read API key

tried with and without https (my server supports both)

with my account on emoncms.org it works okay.

Are there any port settings I should be aware of? Or are there any other server side setting I should look at?

Thank you.

 

gsiviero's picture

Re: The Official Emoncms Android App

Hello,

are you sure your router's port forwarding rules are correctly configured?

1) try to connect using the app with your_internal_IP/emoncms

2) try to connect using a browser from an external IP to my.domain.name/emoncms

Check also other similar threads, for example the one titled "Accessing emoncms from outside LAN"

tagorter's picture

Re: The Official Emoncms Android App

Hello,

thanks for those ideas. Although they do not apply as my installation of emoncms is on a server in a datacentre. As such it is publicly accessible. The server also runs wordpress and mail services, as such I know it is functioning correctly. Albeit that some unusual ports are required, which may currently be blocked.

Thanks,

glyn.hudson's picture

Re: The Official Emoncms Android App

App uses standard http port 80 as default. Can you view Emoncms from your domain in your web browser? 

fourdee's picture

Re: The Official Emoncms Android App

Impressive lightweight, clean, slick app. Works a treat with emoncms.org. Great work :)

thamir_a's picture

Re: The Official Emoncms Android App

Hello everyone,

i get this error when i lunch the app:

FATAL EXCEPTION: main
Process: org.emoncms.myapps, PID: 19524
java.lang.NumberFormatException: Invalid long: "1.4591663E12"
at java.lang.Long.invalidLong(Long.java:124)
at java.lang.Long.parse(Long.java:361)
at java.lang.Long.parseLong(Long.java:352)
at java.lang.Long.parseLong(Long.java:318)
at org.emoncms.myapps.MyElectricMainFragement$3$1.onResponse(MyElectricMainFragement.java:339)
at org.emoncms.myapps.MyElectricMainFragement$3$1.onResponse(MyElectricMainFragement.java:299)
at com.android.volley.toolbox.JsonRequest.deliverResponse(JsonRequest.java:65)
at com.android.volley.ExecutorDelivery$ResponseDeliveryRunnable.run(ExecutorDelivery.java:99)
at android.os.Handler.handleCallback(Handler.java:733)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5584)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1268)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1084)
at dalvik.system.NativeStart.main(Native Method)

I see readings for few seconds before the app crash.

Any advice?

JBecker's picture

Re: The Official Emoncms Android App

Hmmm, since a few days I am getting a wrong display of the kWh/day bar graph again (I think I had this already, but it seemed to be ok during the last months). It is now Monday ~10am and the last bar shown is that for Sunday (with a 'wrong' kWh value apparently).

Can this be due to a wrong time zone setting again?

I am using the Emoncms.org server atm.

BR Jörg. 

PS: and I get 'connection error' quite frequentlybut this is more a cosmetic problem 

tsavikos's picture

Re: The Official Emoncms Android App

I have just the same problem using Android app. Today (25 Apr.) it is showing cumulative Sunday + Monday value.

All daily values are correct in emoncms.org.

BR, Timo

pb66's picture

Re: The Official Emoncms Android App

I'm seeing the same issue Jörg. I noticed it last night and compared against myelctric on emoncms.org, which is still working correctly.

In addition to the current day being missing from the graph, I noticed both the kWh "use today" and the graph bar/value for yesterday are equal to the total of the current day plus yesterdays total. So the android app is interpreting today and yesterday as one "current" day which is in fact still yesterday.

By this time it was close to midnight so I came back a while later to see how the issue had rolled over and found sunday was properly displayed and saturday was about half the value it was before midnight as it was now a single day, but today (monday) was missing from graph and the kWh "use today" was counting up from yesterdays total.

See the attached screenshots, in both the before midnight and after midnight pairs the myelectric is correct and android app is effectively merging the current(today) and previous(yesterday) days.

I haven't really been checking the app this week so cannot be sure when it occurred but I'm pretty sure this has only occurred within the last week.

Paul

daturach's picture

Re: The Official Emoncms Android App

I will not add a lot of value to this thread if I say "me too" to respond to the above threads:-)

So, yes, today Monday, I don't have the accumulated kWh. They just show up and are stacked on Sunday. The "connection error" issue reported above is something I always had, at least during these 2 or so months.

Walter

JumpMaster's picture

Re: The Official Emoncms Android App

Hi all,

I'll add "me too" to this :-)

There's been a change in the api in the latest release that I don't think is backwards compatible.  I'm awaiting some advice from @TrystanLea.

Kev

borpin123's picture

Re: The Official Emoncms Android App

I'll add a not me!  All OK.

V4.7 of the app and 9.2 Emoncms non SSL connection to local server.

As the app simply does API calls for the data then creates the graphs locally, has anything changed in the API recently?

JumpMaster's picture

Re: The Official Emoncms Android App

Yep the API has been updated. My server was working fine until I did a git pull.

borpin123's picture

Re: The Official Emoncms Android App

Mmm, well that isn't very clever.  Now, either the API is broken and needs fixed or when modified to work with new API, the App will fail for older installations.  There will then be a need to support 2 different APIs or drop those who do not wish to upgrade local installations right now into the abyss.

Paul Reed's picture

Re: The Official Emoncms Android App

Just checked, and my app was working fine and displaying todays bargraph, and was using emoncms last updated April 21st (last commit was 3a45850...)

However, I've now git pulled latest commit (ed24aa7...) and that broke the app for me too, so at least we know which commit has caused the issue.

Paul

JumpMaster's picture

Re: The Official Emoncms Android App

I prefer the changes to the API so moving forward there needs to be a way of detecting the API version. It would make sense for this to be a header in all API requests.

TrystanLea's picture

Re: The Official Emoncms Android App

It should be possible for the old api to work here as its still present and largely the same. I made one change to the old api that could well be the cause of this however.

I added in this check:

https://github.com/emoncms/emoncms/commit/ed24aa7319a68e56c14dbbfaae0d2c...

if ($time>=$start && $time<$end) {

The api was returning one or more datapoints either on or beyond the request end time which meant the average values where skewed slightly by one datapoint outside of the request range. I could perhaps revert this change for now if it fixes the issue?

JumpMaster's picture

Re: The Official Emoncms Android App

Just replied to your email but to keep everyone in the loop.  Yes that is the change causing the issue.  My API request expects a return that is equal to the end time.  If that line were to be:

if ($time>=$start && $time<=$end) {

The issue is resolved.

Kev

TrystanLea's picture

Re: The Official Emoncms Android App

Ok great, we will be adding a slight error to the average values returned but perhaps thats better than the current situation? I'll make that change temporarily for now, which will give us time to switch over to the timezone correct api mode=daily and then we could change this back later.

JumpMaster's picture

Re: The Official Emoncms Android App

Agreed.  If there were a way to detect the API version I could use the newer request if it were available.

Maybe including the API version at the top of the feed list?

[
  api: 2
  {
    id: "2",
    userid: "1",
    name: "watts",
    datatype: "1",
    tag: "Node:1",
    public: "0",
    size: "8404612",
    engine: "6",
    processList: "",
    time: "1461664430",
    value: "490"
  },
  {
    id: "3",
    userid: "1",
    name: "kWh",
    datatype: "1",
    tag: "Node:1",
    public: "0",
    size: "7085828",
    engine: "5",
    processList: "",
    time: "1461664430",
    value: "2462.5858523853"
  }
]

TrystanLea's picture

Re: The Official Emoncms Android App

Changed it back on the master branch and on emoncms.org
https://github.com/emoncms/emoncms/commit/7079df9db2acaa86d8fe02542bf892...

 

TrystanLea's picture

Re: The Official Emoncms Android App

I think the issue was caused by the api previously returning null for midnight start of tomorrow as it where? and then after the change that last null is not returned?

For example the request:

https://emoncms.org/feed/data.json?id=116694&start=1461024000000&end=146...

returns:

2016-04-19 01:00:00, 587.8
2016-04-20 01:00:00, 605.4
2016-04-21 01:00:00, 619.8
2016-04-22 01:00:00, 626.7
2016-04-23 01:00:00, 646.4
2016-04-24 01:00:00, 652.8
2016-04-25 01:00:00, 662.2
2016-04-26 01:00:00, 678.4
2016-04-27 01:00:00, null

Shown with timestamps:

1461024000, 587.8
1461110400, 605.4
1461196800, 619.8
1461283200, 626.7
1461369600, 646.4
1461456000, 652.8
1461542400, 662.2
1461628800, 678.4
1461715200, null (last value here outside of our request range - hence the fix)

Could the app detect for the presence of this extra datapoint and remove it perhaps?

JumpMaster's picture

Re: The Official Emoncms Android App

Not quite.  Here's the request causing the issue.

https://emoncms.org/feed/data.json?id=3&start=1461106800000&end=14616252...

Output

[
[
1461106800000,
2378.5310058594
],
[
1461193200000,
2393.0297851562
],
[
1461279600000,
2404.9904785156
],
[
1461366000000,
2418.3171386719
],
[
1461452400000,
2433.3271484375
],
[
1461538800000,
2444.6281738281
],
[
1461625200000,
2459.345703125
]
]

 

See the last result timestamp matches the end time hence the need for <=.

TrystanLea's picture

Re: The Official Emoncms Android App

You have skipmissing=1 there so its missing out the null value? Is that the same in the app?

TrystanLea's picture

Re: The Official Emoncms Android App

Thanks for all your help with this Kevin! really appreciate what your doing with the app!

JumpMaster's picture

Re: The Official Emoncms Android App

No problem Trystan.  Yes I believe skipmissing did remove nulls but it doesn't seem to have any effect now.  The api call was copy/pasted from the apps debug output. Except I'm not using emoncms.org.

JBecker's picture

Re: The Official Emoncms Android App

Hmmmm,

since a few days (?, I noticed it yesterday), I am not seeing any 'bars' with negative values any more. I have negative values on these days when my PV production value is bigger than consumption. It did certainly work before.

BR, Jörg.

 

AllenConquest's picture

Re: The Official Emoncms Android App

Is anyone looking at doing this for iOS? If nobody is currently looking at it, I'd be interested in taking it on as a project. However, I don't have access to an Android device, so I'm not sure what the current app's capabilities are.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.